Redeem 1 سال پیش
والد
کامیت
a89eb7d9b3

+ 9 - 2
build/utils.js

@@ -17,8 +17,15 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
 let devModules = ['all']
-// let devModules = ['index', 'statisticalReport']
-// let devModules = ['all']/
+// let devModules = [
+//   'index',
+//   'statisticalReport',
+//   'SporadicManage',
+//   'appoint',
+//   'sale',
+//   'inward'
+// ]
+// let devModules = ['all']
 // let devModules = ['index', 'sale']
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 0 - 1
package.json

@@ -42,7 +42,6 @@
     "jssha": "^3.2.0",
     "lay-excel": "^1.7.6",
     "marked": "5.0.5",
-    "mathjs": "^10.6.4",
     "object-assign": "^4.1.1",
     "qrcodejs2": "0.0.2",
     "qs": "^6.9.3",

+ 23 - 15
src/components/DilCommonUI/packages/form/src/form.vue

@@ -1,5 +1,10 @@
 <template>
-  <el-form v-bind="$attrs" v-on="$listeners" :label-width="labelWidth">
+  <el-form
+    v-bind="$attrs"
+    v-on="$listeners"
+    :label-width="labelWidth"
+    :labelPosition="labelPosition"
+  >
     <form-group
       v-for="item in list"
       :key="item.id"
@@ -10,58 +15,61 @@
 </template>
 
 <script>
-import formGroup from "./form-group.vue";
-import Tool from "./common.js";
+import formGroup from './form-group.vue'
+import Tool from './common.js'
 export default {
-  name: "DilForm",
+  name: 'DilForm',
   components: { formGroup },
   model: {
-    prop: "value",
-    event: "change"
+    prop: 'value',
+    event: 'change'
   },
   props: {
     // 用户输入的值
     value: {
       default() {
-        return {};
+        return {}
       }
     },
     // 表单唯一标识
     formId: {
-      default: "",
+      default: '',
       required: true
     },
     labelWidth: {
-      default: "auto"
+      default: '120px'
+    },
+    labelPosition: {
+      default: 'right'
     }
   },
   data() {
     return {
       list: []
-    };
+    }
   },
   created() {
     if (this.formId) {
-      Tool.getFormData(this.formId, data => (this.list = data));
+      Tool.getFormData(this.formId, data => (this.list = data))
     } else {
-      this.$alert("参数缺失 : formId");
+      this.$alert('参数缺失 : formId')
     }
   },
   methods: {
     // 抛出事件
     change(val) {
-      this.$emit("change", val);
+      this.$emit('change', val)
     }
   },
   watch: {
     value: {
       deep: true,
       handler(val) {
-        this.change(val);
+        this.change(val)
       }
     }
   }
-};
+}
 </script>
 
 <style></style>

+ 34 - 18
src/components/DilCommonUI/packages/table/src/table.js

@@ -25,13 +25,12 @@ export default {
     }
   },
   created() {
-    if (this.isHeigth) {
-      window.addEventListener('resize', this.getHeight)
-      this.getHeight()
-    }
+    this.requestDataDebounce = this.debounce(value => {
+      this.requestData(value)
+    }, 800)
+    this.requestDataDebounce()
     this.dataCurrentPage = this.currentPage
     this.dataPageSize = this.pageSize
-    this.requestData()
   },
   mounted() {
     //行拖拽
@@ -40,9 +39,20 @@ export default {
     // this.columnDrop();
   },
   methods: {
-    getHeight() {
-      this.height = window.innerHeight - this.shiyHeigth
+    debounce(func, delay = 1500) {
+      let timer = null
+      return function(...args) {
+        if (timer !== null) {
+          clearTimeout(timer)
+        }
+        timer = setTimeout(function() {
+          func.apply(this, args)
+        }, delay)
+      }
     },
+    // // getHeight() {
+    //   this.height = window.innerHeight - this.shiyHeigth
+    // },
     // 通过请求获取数据
     requestData(options) {
       console.log('我被调用了几次')
@@ -77,7 +87,7 @@ export default {
         }
         //判断是否是带分页查询
         if (this.isKuang) {
-          this.loading = true;
+          this.loading = true
           // 发送请求
           this.axios
             .post(url, data, {
@@ -96,11 +106,15 @@ export default {
               this.refreshColumnData(d.columnData)
               //this.$refs.mainTable.getTableConfig();
               this.isShow = true
-              this.loading = false;
+              this.loading = false
+            })
+            .catch(error => {
+              this.loading = false
+              this.$message.error(error.message)
             })
         } else {
-          this.dataCurrentPage = 1
-          this.loading = true;
+          // this.dataCurrentPage = 1
+          this.loading = true
           // 发送请求
           this.axios
             .post(url, data, {
@@ -119,7 +133,11 @@ export default {
               this.refreshColumnData(d.columnData)
               //this.$refs.mainTable.getTableConfig();
               this.isShow = true
-              this.loading = false;
+              this.loading = false
+            })
+            .catch(error => {
+              this.loading = false
+              this.$message.error(error.message)
             })
         }
       } else {
@@ -174,8 +192,8 @@ export default {
       for (const key in value) {
         q[key] = value[key]
       }
-      this.requestData(q)
-      this.$emit('update:requestQuery', q)
+      this.requestDataDebounce(q)
+      // this.$emit('update:requestQuery', q)
       this.dataRequestQuery = q
     },
     // 格式化字符串
@@ -248,7 +266,7 @@ export default {
     // current-page 改变时会触发
     currentChange(val, isRequest = true) {
       if (isRequest) {
-        this.requestData({ pageNum: val })
+        this.requestDataDebounce({ pageNum: val })
       }
       // 最后通知父节点页面改变
       this.dataCurrentPage = val
@@ -257,7 +275,7 @@ export default {
     // pageSize 改变时会触发
     sizeChange(val) {
       this.dataPageSize = val
-      this.requestData({})
+      this.requestDataDebounce({})
       this.$emit('update:size-change', val)
     }
   },
@@ -308,12 +326,10 @@ export default {
     requestQuery: {
       deep: true,
       handler(val, oldVal) {
-        console.log(oldVal, 'oldVal')
         let q = this.dataRequestQuery
         for (const key in val) {
           q[key] = val[key] ? val[key] : undefined
         }
-        console.log(q, 'q')
         this.setDataRequestQuery(q)
       }
     }

+ 6 - 6
src/components/DilCommonUI/packages/table/src/table.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="st-base-table"  v-show="isShow">
+  <div class="st-base-table" v-show="isShow">
     <!-- 表格主体 -->
     <el-table
       ref="mainTable"
@@ -225,9 +225,7 @@ export default {
         return ({ row, rowIndex }) => ''
       }
     },
-    loading: {
-      default: false
-    },
+
     // 是否启用分页器
     isPagination: {
       default: true
@@ -264,13 +262,15 @@ export default {
   },
   data() {
     return {
-      height: null
+      // height: null,
+      loading: false
     }
   },
   methods: {
     // 刷新表格数据
     refreshData() {
-      this.requestData()
+      console.log('刷新表格数据')
+      this.requestDataDebounce()
       // 多选表格清空用户的选择
       if (this.isClear != '1') {
         this.$refs.mainTable.clearSelection()

+ 8 - 0
src/components/el-divider/index.js

@@ -0,0 +1,8 @@
+import Divider from './src/main'
+
+/* istanbul ignore next */
+Divider.install = function(Vue) {
+  Vue.component(Divider.name, Divider)
+}
+
+export default Divider

+ 42 - 0
src/components/el-divider/src/main.vue

@@ -0,0 +1,42 @@
+<template functional>
+  <div
+    v-bind="data.attrs"
+    v-on="listeners"
+    :class="[data.staticClass, 'el-divider', `el-divider--${props.direction}`]"
+    class="el-divider"
+  >
+    <div
+      v-if="slots().default && props.direction !== 'vertical'"
+      :class="['el-divider__text', `is-${props.contentPosition}`]"
+    >
+      <slot />
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'ElDivider',
+  props: {
+    direction: {
+      type: String,
+      default: 'horizontal',
+      validator(val) {
+        return ['horizontal', 'vertical'].indexOf(val) !== -1
+      }
+    },
+    contentPosition: {
+      type: String,
+      default: 'center',
+      validator(val) {
+        return ['left', 'center', 'right'].indexOf(val) !== -1
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.el-divider {
+  margin: 5px;
+}
+</style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 174 - 113
src/utils/util.js


+ 170 - 47
src/views/appoint/components/saleContract/addSaleOrderArrange.vue

@@ -4,10 +4,8 @@
     <page-title>新增销售订单排车</page-title>
     <!-- 销售订单表的数据 -->
     <div class="saleOrder">
-      <dilTable v-bind.sync="option" @selection-change="selectionChange">
-      </dilTable>
+      <dilTable v-bind.sync="option" @func="func"> </dilTable>
     </div>
-
     <div class="button-box">
       <el-button type="primary" @click="arragne">确定排车</el-button>
     </div>
@@ -58,6 +56,9 @@
           <template slot="scope" v-if="item.label !== '车序号'">
             <span>{{ item.label }}</span>
           </template>
+          <template slot="scope" v-if="item.label !== '承运商'">
+            <span>{{ item.label }}</span>
+          </template>
           <template slot="scope" v-if="item.label !== '收货地址'">
             <span>{{ item.label }}</span>
           </template>
@@ -93,6 +94,21 @@
                   @change="updateArragneCxh(scope.row.cxh)"
                 ></el-input>
               </template>
+              <template v-if="item.prop == 'carrierName'">
+                <el-autocomplete
+                  class="textinput1"
+                  v-model="scope.row.carrierName"
+                  :fetch-suggestions="querySearchCarrier"
+                  placeholder="请输入承运商名称"
+                  :trigger-on-focus="false"
+                  @select="handleSelectCarrier($event, scope.row)"
+                  style="width:150px"
+                >
+                  <template slot-scope="{ item }">
+                    <div class="name">{{ item.carrierName }}</div>
+                  </template>
+                </el-autocomplete>
+              </template>
               <!-- 收货地址 -->
               <template v-if="item.prop == 'saleShipperAddressName'">
                 <el-input
@@ -291,9 +307,9 @@ export default {
         // 表格请求数据的地址
         requestUrl:
           '/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=' +
-          this.$route.params.saleOrderId,
+          this.$route.params.saleOrderId
         // 控制显示多选列
-        selectionType: 'select'
+        // selectionType: 'select'
       },
       //是否打开收货地址的模态框
       addressDrawer: false,
@@ -336,7 +352,7 @@ export default {
         {
           prop: 'cxh',
           label: '车序号',
-          width: '80',
+          width: '60',
           slot: true
         },
         {
@@ -347,7 +363,13 @@ export default {
         {
           prop: 'Specification',
           label: '规格型号',
-          width: '140'
+          width: '80'
+        },
+        {
+          prop: 'carrierName',
+          label: '承运商',
+          width: '180',
+          slot: true
         },
         {
           prop: 'orderPlanWeight',
@@ -418,6 +440,43 @@ export default {
     }
   },
   methods: {
+    createFilterCarrier(queryString) {
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.value
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        )
+      }
+    },
+    //承运商搜索
+    querySearchCarrier(queryString, cb) {
+      this.axios
+        .post('/api/v1/uc/getCarrierMesByLike?index=' + queryString)
+        .then(res => {
+          if (res.data.code == '200') {
+            var restaurantsCarrier = res.data.data
+            console.log(restaurantsCarrier, 'restaurantsCarrier')
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    handleSelectCarrier(item, row) {
+      this.carrierId = item.carrierId
+      item.carrierName = this.stateCarrier
+      row.carrierId = item.carrierId
+    },
+    func(res) {
+      console.log(res.list, 'res.list')
+      // this.selectionList1 = []
+      let arr = []
+      this.arragneCxh = res.list[0].maxCxh + 1
+      this.selectionList1 = JSON.parse(JSON.stringify(arr.concat(res.list)))
+    },
     //点击浏览事件
     ondrawer(row, index) {
       this.row = row
@@ -479,13 +538,34 @@ export default {
     },
     //复制多条的方法
     copyRow(index, row) {
+      //先做判断,后复制
+      if (row.carrierId == null) {
+        this.$message({
+          type: 'error',
+          message: '请选择承运商!'
+        })
+        return
+      }
+      if (!row.saleDateOfReceipt) {
+        this.$message({
+          type: 'error',
+          message: '请选择截止日期!'
+        })
+        return
+      }
       let arr = []
-      for (var i = 0; i < this.selectionList.length; i++) {
+      for (let i = 0; i < this.selectionList.length; i++) {
         if (i == index) {
           arr.push(this.selectionList[i])
           //车序号自增
-          var cxhStart = row.cxh
-          for (var j = 0; j < this.selectionList[i].arragneCount; j++) {
+          let cxhStart = this.selectionList.reduce((prev, item) => {
+            if (item.cxh > prev) {
+              return item.cxh
+            } else {
+              return prev
+            }
+          }, 0)
+          for (let j = 0; j < this.selectionList[i].arragneCount; j++) {
             //增加选择单价累加
             if (row.priceValue) {
               this.choosePriceCount++
@@ -504,7 +584,9 @@ export default {
               priceId: row.priceId,
               saleShipperAddressId: row.saleShipperAddressId,
               place: row.place,
-              saleShipperAddressName: row.saleShipperAddressName
+              saleShipperAddressName: row.saleShipperAddressName,
+              carrierName: row.carrierName,
+              carrierId: row.carrierId
             })
           }
           //确定车序号最大值并赋值给初始化车序号
@@ -646,34 +728,57 @@ export default {
       // this.priceMap = val;
     },
     // 框计算
-    onclick() {
-      this.option.requestUrl =
-        '/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=' +
-        this.$route.params.saleOrderId
-      //"/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
-    },
-    open() {
-      if (this.selectionList1.length != 0) {
-        this.$confirm('取消会将已选择的数据清空, 是否继续?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        })
-          .then(() => {
-            this.selectionList1 = []
-            this.table = false
-          })
-          .catch(() => {})
-      } else {
-        this.table = false
-      }
-    },
+    // onclick() {
+    //   this.option.requestUrl =
+    //     '/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=' +
+    //     this.$route.params.saleOrderId
+    //   //"/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
+    // },
+    // open() {
+    //   if (this.selectionList1.length != 0) {
+    //     this.$confirm('取消会将已选择的数据清空, 是否继续?', '提示', {
+    //       confirmButtonText: '确定',
+    //       cancelButtonText: '取消',
+    //       type: 'warning'
+    //     })
+    //       .then(() => {
+    //         this.selectionList1 = []
+    //         this.table = false
+    //       })
+    //       .catch(() => {})
+    //   } else {
+    //     this.table = false
+    //   }
+    // },
     // 进行排车
     arragne() {
+      let preCxh = this.arragneCxh
+      if (this.selectionList.length > 0) {
+        if (!this.selectionList[this.selectionList.length - 1].carrierId) {
+          this.$message({
+            type: 'error',
+            message: '请先选择承运商!'
+          })
+          return
+        }
+        if (
+          !this.selectionList[this.selectionList.length - 1].saleDateOfReceipt
+        ) {
+          this.$message({
+            type: 'error',
+            message: '请填入截止日期!'
+          })
+          return
+        }
+        preCxh =
+          this.selectionList.reduce((prev, item) => {
+            return item.cxh > prev ? item.cxh : prev
+          }, 0) + 1
+      }
       this.selectionList1.forEach(e => {
-        var addmap = {
+        let addmap = {
           // materialCode: e.materialCode,
-          cxh: this.arragneCxh,
+          cxh: preCxh,
           materialName: e.materialName,
           Specification: e.specificationModel,
           orderPlanWeight: null,
@@ -692,14 +797,8 @@ export default {
       })
       //获取是否自提判断
       this.saleOrderIsselfMention = this.selectionList1[0].saleOrderIsselfMention
-      this.selectionList1 = []
+      // this.selectionList1 = []
       this.table = false
-      //重置销售订单信息
-      this.option.requestUrl =
-        '/api/v1/ams/getSaleOrderAndMaterialById?apiId=410&saleOrderId=' +
-        this.$route.params.saleOrderId +
-        '&i=' +
-        new Date()
     },
     // 返回选中的物资信息
     selectionChange(selection) {
@@ -708,11 +807,32 @@ export default {
     },
     // 确定
     makeSure() {
+      if (this.selectionList.length == 0) {
+        this.$message({
+          type: 'error',
+          message: '请先排车!'
+        })
+        return
+      }
+      if (!this.selectionList[0].carrierId) {
+        this.$message({
+          type: 'error',
+          message: '请先选择承运商!'
+        })
+        return
+      }
+      if (!this.selectionList[0].saleDateOfReceipt) {
+        this.$message({
+          type: 'error',
+          message: '请填入截止日期!'
+        })
+        return
+      }
       //初始化maplist
-      var mapList = []
+      let mapList = []
       this.selectionList.forEach(item => {
         //初始化mapItem
-        var mapItem = {
+        let mapItem = {
           //销售订单id
           saleOrderId: 0,
           //车序号
@@ -732,7 +852,9 @@ export default {
           //物资数量
           materialNumber: 0,
           //运输单价ID
-          priceId: 0
+          priceId: 0,
+          //承运商ID
+          carrierId: null
         }
         mapItem.saleOrderId = this.$route.params.saleOrderId
         mapItem.truckNo = item.cxh
@@ -744,6 +866,7 @@ export default {
         mapItem.saleMaterialId = item.saleMaterialId
         mapItem.materialNumber = item.orderPlanWeight
         mapItem.priceId = item.priceId
+        mapItem.carrierId = item.carrierId
         mapList.push(mapItem)
       })
       //校验是否自提,是自提,则运输单价必选,非自提,运输单价为空
@@ -752,7 +875,7 @@ export default {
           e.priceId = null
         })
         //发送请求
-        this.axios.post('/api/v1/ams/addTruckNo', mapList).then(res => {
+        this.axios.post('/api/v1/ams/addTruckNoGreat', mapList).then(res => {
           if (res.data.code == '200') {
             this.$router.go(-1)
           }
@@ -765,7 +888,7 @@ export default {
         //判断是否全部完成运输单价的选择
         if (this.choosePriceCount == this.selectionList.length) {
           //发送请求
-          this.axios.post('/api/v1/ams/addTruckNo', mapList).then(res => {
+          this.axios.post('/api/v1/ams/addTruckNoGreat', mapList).then(res => {
             if (res.data.code == '200') {
               this.$router.go(-1)
             }

+ 73 - 69
src/views/sale/app.js

@@ -1,64 +1,66 @@
 // The Vue build version to load with the `import` command
 // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
-import Vue from 'vue';
-import App from '@/components/App.vue';
+import Vue from 'vue'
+import App from '@/components/App.vue'
 // include
-import '@/config/include.js';
+import '@/config/include.js'
 
 // 通用store
-import store from '@/store/index.js';
+import store from '@/store/index.js'
 
 // router
-import router from './router/index.js';
+import router from './router/index.js'
 
 import VueApollo from 'vue-apollo'
 
 import apollo from '@/config/apolloConfig.js'
 
-import Print from 'vue-print-nb';
-Vue.use(Print);
-import 'xe-utils' 
+import Print from 'vue-print-nb'
+Vue.use(Print)
+import 'xe-utils'
 import VXETable from 'vxe-table'
 import 'vxe-table/lib/style.css'
 Vue.use(VXETable)
 Vue.prototype.$XModal = VXETable.modal
 
-import AMap from 'vue-amap';
+import elDivider from '@/components/el-divider'
+Vue.use(elDivider)
+
+import AMap from 'vue-amap'
 window._AMapSecurityConfig = {
-  securityJsCode:'6a75ec7300ae4ba9f385d1bb452ffd21',
+  securityJsCode: '6a75ec7300ae4ba9f385d1bb452ffd21'
 }
-Vue.use(AMap);
-  AMap.initAMapApiLoader({
-    key: '168d3d854afba86848eac1b055d53ca3',
-    plugin: [
-      "AMap.Autocomplete", // 输入提示插件
-      "AMap.PlaceSearch", // POI搜索插件
-      "AMap.Scale", // 右下角缩略图插件 比例尺
-      "AMap.OverView", // 地图鹰眼插件
-      "AMap.ToolBar", // 地图工具条
-      "AMap.MapType", // 类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
-      "AMap.PolyEditor", // 编辑 折线多,边形
-      "AMap.CircleEditor", // 圆形编辑器插件
-      "AMap.Geolocation", // 定位控件,用来获取和展示用户主机所在的经纬度位置
-      "AMap.ControlBar" ,  // 缩放、尺寸控制器
-      "AMap.Geocoder",
-      
-    ],
-    // 默认高德 sdk 版本为 1.4.4
-    v: '1.4.15',
-    uiVersion: '1.1.1'
-});
+Vue.use(AMap)
+AMap.initAMapApiLoader({
+  key: '168d3d854afba86848eac1b055d53ca3',
+  plugin: [
+    'AMap.Autocomplete', // 输入提示插件
+    'AMap.PlaceSearch', // POI搜索插件
+    'AMap.Scale', // 右下角缩略图插件 比例尺
+    'AMap.OverView', // 地图鹰眼插件
+    'AMap.ToolBar', // 地图工具条
+    'AMap.MapType', // 类别切换控件,实现默认图层与卫星图、实施交通图层之间切换的控制
+    'AMap.PolyEditor', // 编辑 折线多,边形
+    'AMap.CircleEditor', // 圆形编辑器插件
+    'AMap.Geolocation', // 定位控件,用来获取和展示用户主机所在的经纬度位置
+    'AMap.ControlBar', // 缩放、尺寸控制器
+    'AMap.Geocoder'
+  ],
+  // 默认高德 sdk 版本为 1.4.4
+  v: '1.4.15',
+  uiVersion: '1.1.1'
+})
 
 import Share from 'vue-social-share'
-Vue.use(Share);
+Vue.use(Share)
 
-import 'view-design/dist/styles/iview.css';
-import ViewUI from 'view-design';
-Vue.use(ViewUI);
+import 'view-design/dist/styles/iview.css'
+import ViewUI from 'view-design'
+Vue.use(ViewUI)
 // import VueAMap from 'vue-amap'
- 
+
 // Vue.use(VueAMap)
- 
+
 // VueAMap.initAMapApiLoader({
 //   key: 'eed46ea40bbcadbf8a9cdd5dc1a94642',
 //   plugin: [//高德地图扩展插件(按需添加)
@@ -72,69 +74,71 @@ Vue.use(ViewUI);
 //     'AMap.CircleEditor', // 圆形编辑器插件
 //     'AMap.Geolocation' // 定位控件,用来获取和展示用户主机所在的经纬度位置
 //   ],
-  // uiVersion: '1.1', // ui库版本,不配置不加载,
-  // v: '2.0'
+// uiVersion: '1.1', // ui库版本,不配置不加载,
+// v: '2.0'
 // })
 
-
 // 关闭生产模式下给出的提示
-Vue.config.productionTip = false;
+Vue.config.productionTip = false
 
 Vue.use(VueApollo)
 
 // 注册表格的全局组件
-import DilCommonUI from "@/components/DilCommonUI";
-Vue.use(DilCommonUI);
+import DilCommonUI from '@/components/DilCommonUI'
+Vue.use(DilCommonUI)
 
 const apolloProvider = new VueApollo({
-    defaultClient: apollo
+  defaultClient: apollo
 })
 
- //把时间戳改为正常可读的时间
- export function renderTime(date) {
-  if(date !== null){
-      let dateee = new Date(date).toJSON();
-      return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, " ").replace(/\.[\d]{3}Z/, "");
+//把时间戳改为正常可读的时间
+export function renderTime(date) {
+  if (date !== null) {
+    let dateee = new Date(date).toJSON()
+    return new Date(+new Date(dateee) + 8 * 3600 * 1000)
+      .toISOString()
+      .replace(/T/g, ' ')
+      .replace(/\.[\d]{3}Z/, '')
   }
-  return null;
+  return null
 }
 //把毫秒数转换分
-export function getDuration(my_time) { 
-  if(my_time !== null){
-      return Math.floor(my_time / 1000 / 60);
+export function getDuration(my_time) {
+  if (my_time !== null) {
+    return Math.floor(my_time / 1000 / 60)
   }
-  return null;
+  return null
 }
 export function sjTime(orderPlanInTime) {
-  var stringTime = renderTime(orderPlanInTime);
-  var timestamp1 = stringTime.replace(/-/g, "/");
-  return new Date(timestamp1).getTime();
+  var stringTime = renderTime(orderPlanInTime)
+  var timestamp1 = stringTime.replace(/-/g, '/')
+  return new Date(timestamp1).getTime()
 }
 //验证电话号码
 export function VerifyPhoneNumber(Phone) {
-  var myreg=/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
+  var myreg = /^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/
   if (!myreg.test(Phone)) {
-      return false;
+    return false
   } else {
-      return true;
+    return true
   }
 }
 export function isNumber(value) {
   //验证是否为数字
-  var patrn = /^(-)?\d+(\.\d+)?$/;
-  if (patrn.exec(value) == null || value == "") {
-    return false;
+  var patrn = /^(-)?\d+(\.\d+)?$/
+  if (patrn.exec(value) == null || value == '') {
+    return false
   } else {
-    return true;
+    return true
   }
 }
 export function isIntegerNumber(value) {
   //验证是否为整数
-  var patrn = /^\+?[1-9][0-9]*$/g;
-  if (patrn.exec(value) == null || value == "") {
-    return false;
+  var patrn = /^\+?[1-9][0-9]*$/g
+  if (patrn.exec(value) == null || value == '') {
+    return false
   } else {
-    return true;
+    return true
   }
 }
 /* eslint-disable no-new */
@@ -145,4 +149,4 @@ new Vue({
   components: { App },
   provide: apolloProvider.provide(),
   template: '<App/>'
-});
+})

+ 312 - 265
src/views/sale/components/transport_appointment/openDistribution.vue

@@ -1,49 +1,76 @@
 // 定向派单接单
 <template>
-  <div >
-    <div >
-        <el-select v-model="condition1" placeholder="请选择筛选条件"  style="width:150px" clearable>
-        <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-input
-        placeholder="请输入内容"
-        v-model="input1"
-        style="width:200px"
-        clearable
-      >
-      </el-input>
-      <el-select v-model="condition2" placeholder="请选择筛选条件" style="width:150px" clearable>
-        <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-input
-        placeholder="请输入内容"
-        v-model="input2"
-        style="width:200px"
-        clearable
-      >
-      </el-input>
-      <el-button type="primary" class="btn" @click="onclick1">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button v-if="activeName == 'first'" type="primary" @click="receive">
-        <i></i>批量接收订单
-      </el-button>
-      <el-button v-if="activeName == 'first'" type="primary" @click="refuse">
-        <i></i>批量拒绝订单
-      </el-button>
-      <el-button v-if="activeName == 'second'" type="primary" @click="close">
-        <i></i>批量关闭订单
-      </el-button>
+  <div class="openDistribution">
+    <div class="top">
+      <el-form inline>
+        <el-form-item>
+          <el-select
+            v-model="condition1"
+            placeholder="请选择筛选条件"
+            style="width:150px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input1"
+            style="width:200px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="condition2"
+            placeholder="请选择筛选条件"
+            style="width:150px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input2"
+            style="width:200px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="elDivider">
+      <el-divider></el-divider>
+    </div>
+    <div class="buttonModel">
+      <div class="operation">
+        <el-button v-if="activeName == 'first'" type="primary" @click="receive">
+          <i></i>批量接收订单
+        </el-button>
+        <el-button v-if="activeName == 'first'" type="primary" @click="refuse">
+          <i></i>批量拒绝订单
+        </el-button>
+        <el-button v-if="activeName == 'second'" type="primary" @click="close">
+          <i></i>批量关闭订单
+        </el-button>
+      </div>
+      <div class="search">
+        <el-button type="primary" class="btn" @click="onclick1">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" @tab-click="handleClick">
@@ -144,452 +171,472 @@
 </template>
 
 <script>
-import { getCookie } from "@/utils/util.js";
+import { getCookie } from '@/utils/util.js'
 export default {
   data() {
     return {
-      condition1:null,
-      condition2:null,
-      input1:null,
-      input2:null,
-      options:[
-         {
-          label:"物资名称",
-          value:"materialName"
+      condition1: null,
+      condition2: null,
+      input1: null,
+      input2: null,
+      options: [
+        {
+          label: '收货单位',
+          value: 'consigneeCompanyName'
         },
         {
-          label:"备注",
-          value:"saleRemark"
+          label: '物资名称',
+          value: 'materialName'
         },
+        {
+          label: '备注',
+          value: 'saleRemark'
+        }
       ],
       drawer: false,
       ssoId: null,
-      direction: "rtl",
-      activeName: "first",
-      inputText: "",
+      direction: 'rtl',
+      activeName: 'first',
+      inputText: '',
       dispatchId: null,
-      input: "",
+      input: '',
       //所有选中的车序号订单
       selectTruckOrder: [],
       first: {
         // first请求数据的地址
-        requestUrl: "",
-        selectionType: "select"
+        requestUrl: '',
+        selectionType: 'select'
       },
       second: {
-        requestUrl: "",
-        selectionType: "select"
+        requestUrl: '',
+        selectionType: 'select'
       },
       closeList: [],
       //记录旧的row对象(未接收)
-      oldRow: "",
+      oldRow: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
       oldRowCount: 1,
       //记录旧的row对象(已接收)
-      oldRow1: "",
+      oldRow1: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
       oldRowCount1: 1,
       tableHead: [
         {
-          prop: "materialName",
-          label: "物资名称",
+          prop: 'materialName',
+          label: '物资名称',
           width: 150
         },
         {
-          prop: "specificationModel",
-          label: "规格型号",
+          prop: 'specificationModel',
+          label: '规格型号',
           width: 150
         },
         {
-          prop: "materialNumber",
-          label: "物资件数",
+          prop: 'materialNumber',
+          label: '物资件数',
           width: 100
         },
         {
-          prop: "materialWeight",
-          label: "物资重量",
+          prop: 'materialWeight',
+          label: '物资重量',
           width: 100
         }
       ],
       tableData: [],
       tableData1: []
-    };
+    }
   },
   created() {
-    this.firstGetRequestUrl();
-    this.secondGetRequestUrl();
+    this.firstGetRequestUrl()
+    this.secondGetRequestUrl()
   },
   methods: {
     currentSelectChange1(selection) {
-      console.log(selection);
-      this.closeList = selection;
+      console.log(selection)
+      this.closeList = selection
     },
     close() {
-      this.$confirm("是否将选中的订单批量关闭? 继续?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
+      this.$confirm('是否将选中的订单批量关闭? 继续?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
         .then(() => {
           //请求后端
           this.axios
-            .post("/api/v1/ams/refuseDispatchSaleOrderList", this.closeList)
+            .post('/api/v1/ams/refuseDispatchSaleOrderList', this.closeList)
             .then(res => {
               if (res.data.code == 200) {
-                this.$message.success("关闭成功");
-                this.secondGetRequestUrl();
+                this.$message.success('关闭成功')
+                this.secondGetRequestUrl()
               } else {
-                this.$message.error("关闭失败");
+                this.$message.error('关闭失败')
               }
             })
             .catch(() => {
-              this.$message.error("关闭失败");
-            });
+              this.$message.error('关闭失败')
+            })
         })
         .catch(() => {
-          this.$message.info("取消关闭");
-        });
+          this.$message.info('取消关闭')
+        })
     },
     handleClick(tab, event) {
-      console.log(tab, event);
+      console.log(tab, event)
     },
     firstGetRequestUrl() {
-      let _this=this;
-      new Promise((resolve,reject)=>{
-        let option={
-          requestQuery:{},
-          selectionType: "select"
+      let _this = this
+      new Promise((resolve, reject) => {
+        let option = {
+          requestQuery: {},
+          selectionType: 'select'
         }
-        option.requestQuery[this.condition1]=[];
-        option.requestQuery[this.condition2]=[];
-        if(this.condition1 == this.condition2){
-          option.requestQuery[this.condition1]=[this.input1,this.input2]
-        }else{
-          option.requestQuery[this.condition1]=[this.input1]
-          option.requestQuery[this.condition2]=[this.input2]
+        option.requestQuery[this.condition1] = []
+        option.requestQuery[this.condition2] = []
+        if (this.condition1 == this.condition2) {
+          option.requestQuery[this.condition1] = [this.input1, this.input2]
+        } else {
+          option.requestQuery[this.condition1] = [this.input1]
+          option.requestQuery[this.condition2] = [this.input2]
         }
-        if (getCookie("orgCode") == "chengyunshang") {
-            option.requestUrl =
-            "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=" +
-            getCookie("userId");
+        if (getCookie('orgCode') == 'chengyunshang') {
+          option.requestUrl =
+            '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
+            getCookie('userId')
         } else {
-            option.requestUrl =
-            "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=" +
-            this.ssoId;
+          option.requestUrl =
+            '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
+            this.ssoId
         }
-        resolve(option);
-      }).then((option)=>{
-        _this.first=option
-      });
+        resolve(option)
+      }).then(option => {
+        _this.first = option
+      })
     },
     secondGetRequestUrl() {
-      let _this=this;
-      new Promise((resolve,reject)=>{
-        let option={
-          requestQuery:{},
-          selectionType: "select"
+      let _this = this
+      new Promise((resolve, reject) => {
+        let option = {
+          requestQuery: {},
+          selectionType: 'select'
         }
-        option.requestQuery[this.condition1]=[];
-        option.requestQuery[this.condition2]=[];
-        if(this.condition1 == this.condition2){
-          option.requestQuery[this.condition1]=[this.input1,this.input2]
-        }else{
-          option.requestQuery[this.condition1]=[this.input1]
-          option.requestQuery[this.condition2]=[this.input2]
+        option.requestQuery[this.condition1] = []
+        option.requestQuery[this.condition2] = []
+        if (this.condition1 == this.condition2) {
+          option.requestQuery[this.condition1] = [this.input1, this.input2]
+        } else {
+          option.requestQuery[this.condition1] = [this.input1]
+          option.requestQuery[this.condition2] = [this.input2]
         }
-        if (getCookie("orgCode") == "chengyunshang") {
+        if (getCookie('orgCode') == 'chengyunshang') {
           option.requestUrl =
-            "/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierSsoId=" +
-            getCookie("userId")+"&con=" +this.input;
+            '/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierSsoId=' +
+            getCookie('userId') +
+            '&con=' +
+            this.input
         } else {
           option.requestUrl =
-            "/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierSsoId=" +
-            this.ssoId+"&con=" +this.input;
+            '/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierSsoId=' +
+            this.ssoId +
+            '&con=' +
+            this.input
         }
-        resolve(option);
-      }).then((option)=>{
-        _this.second=option
-      });
+        resolve(option)
+      }).then(option => {
+        _this.second = option
+      })
     },
     onclick1() {
-      console.log();
-      if (this.activeName == "first") {
-        this.firstGetRequestUrl();
-        console.log(this.first.requestUrl);
-      } else if (this.activeName == "second") {
-        this.secondGetRequestUrl();
-        console.log(this.second.requestUrl);
+      if (this.activeName == 'first') {
+        this.firstGetRequestUrl()
+      } else if (this.activeName == 'second') {
+        this.secondGetRequestUrl()
       }
     },
     dispatch(scope) {
-      this.dispatchId = scope.row.dispatchId;
-      this.$router.push("/openDistributionSection/" + scope.row.dispatchId);
+      this.dispatchId = scope.row.dispatchId
+      this.$router.push('/openDistributionSection/' + scope.row.dispatchId)
     },
     // handleBtnClick1(){
     // 		this.drawer=true
     // 	},
     //车序号订单表格
     currentSelectChange(select) {
-      this.selectTruckOrder = [];
-      this.selectTruckOrder = select;
+      this.selectTruckOrder = []
+      this.selectTruckOrder = select
     },
     onclick() {
       this.third.requestUrl =
-        "/api/v1/oms/getCapacityAndDriverList?apiId=246&con=" + this.input;
+        '/api/v1/oms/getCapacityAndDriverList?apiId=246&con=' + this.input
     },
     makeSure() {
-      this.$confirm("是否派发", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('是否派发', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
         center: true
       })
         .then(() => {
           //初始化承运商SsoId
-          var carrierSsoId = "";
-          if (getCookie("orgCode") == "chengyunshang") {
-            carrierSsoId = getCookie("userId");
+          var carrierSsoId = ''
+          if (getCookie('orgCode') == 'chengyunshang') {
+            carrierSsoId = getCookie('userId')
           } else {
-            carrierSsoId = null;
+            carrierSsoId = null
           }
           this.axios
             .post(
-              "/api/v1/oms/addAppTruckOrder?orderType=" +
+              '/api/v1/oms/addAppTruckOrder?orderType=' +
                 1 +
-                "&carrierId=" +
+                '&carrierId=' +
                 carrierSsoId +
-                "&dispatchId=" +
+                '&dispatchId=' +
                 this.dispatchId +
-                "&capacityNumber=" +
+                '&capacityNumber=' +
                 this.mapList.capacityNumber
             )
             .then(res => {
               if (res.data.code == 200) {
                 this.$message({
-                  type: "success",
-                  message: "派单成功!"
-                });
-                this.$router.go(0);
+                  type: 'success',
+                  message: '派单成功!'
+                })
+                this.$router.go(0)
               } else {
                 this.$message({
-                  message: "删除失败",
-                  type: "warning"
-                });
+                  message: '删除失败',
+                  type: 'warning'
+                })
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "派发操作已取消!"
-          });
-        });
+            type: 'info',
+            message: '派发操作已取消!'
+          })
+        })
     },
 
     // -------查看物资详情(未接收)
     detailclick(row) {
       // 记录重复点击次数
       if (this.oldRow === row) {
-        this.oldRowCount += 1;
+        this.oldRowCount += 1
       }
       // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
+      this.$refs.table.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
+      if (this.oldRow != '') {
         if (this.oldRow != row) {
           if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
+            this.$refs.table.toggleRowExpansion(this.oldRow)
           } else {
-            this.oldRowCount = 1;
+            this.oldRowCount = 1
           }
         } else {
-          this.oldRow = null;
-          return;
+          this.oldRow = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow = row;
-      this.getMaterial(row.dispatchId);
+      this.oldRow = row
+      this.getMaterial(row.dispatchId)
     },
     // 根据销售订单物资中间表id查询物资信息
     getMaterial(dispatchId) {
       this.axios
-        .post("/api/v1/ams/getDispatchMaterialList?dispatchId=" + dispatchId)
+        .post('/api/v1/ams/getDispatchMaterialList?dispatchId=' + dispatchId)
         .then(res => {
-          this.tableData = res.data.data;
-        });
+          this.tableData = res.data.data
+        })
     },
 
     // -------查看物资详情(已接收)
     detailclick1(row) {
       // 记录重复点击次数
       if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
+        this.oldRowCount1 += 1
       }
       // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
+      this.$refs.table1.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
+      if (this.oldRow1 != '') {
         if (this.oldRow1 != row) {
           if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow);
+            this.$refs.table1.toggleRowExpansion(this.oldRow)
           } else {
-            this.oldRowCount1 = 1;
+            this.oldRowCount1 = 1
           }
         } else {
-          this.oldRow1 = null;
-          return;
+          this.oldRow1 = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow1 = row;
+      this.oldRow1 = row
       // 根据销售订单物资中间表id查询物资信息
       this.axios
         .post(
-          "/api/v1/ams/getDispatchMaterialList?dispatchId=" + row.dispatchId
+          '/api/v1/ams/getDispatchMaterialList?dispatchId=' + row.dispatchId
         )
         .then(res => {
-          this.tableData1 = res.data.data;
-        });
+          this.tableData1 = res.data.data
+        })
     },
 
     //接收所有已选中的订单
     receive() {
-      this.$confirm("是否接收已选中的订单", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('是否接收已选中的订单', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
         center: true
       })
         .then(() => {
           //初始化承运商SsoId
-          var carrierSsoId = "";
-          if (getCookie("orgCode") == "chengyunshang") {
-            carrierSsoId = getCookie("userId");
+          var carrierSsoId = ''
+          if (getCookie('orgCode') == 'chengyunshang') {
+            carrierSsoId = getCookie('userId')
           } else {
-            carrierSsoId = null;
+            carrierSsoId = null
           }
           //所有选中的分派Id
-          var dispatchIdList = [];
+          var dispatchIdList = []
           this.selectTruckOrder.forEach(item => {
             //初始化mapItem
             var mapItem = {
               //分派Id
               dispatchId: 0
-            };
-            mapItem.dispatchId = item.dispatchId;
-            dispatchIdList.push(mapItem);
-          });
+            }
+            mapItem.dispatchId = item.dispatchId
+            dispatchIdList.push(mapItem)
+          })
           //保存承运商SsoId和所有选中的分派Id
           let map = {
             carrierSsoId: carrierSsoId,
             mapList: dispatchIdList
-          };
+          }
           //请求后端
           this.axios
-            .post("/api/v1/ams/lockDispatchSaleOrderList", map)
+            .post('/api/v1/ams/lockDispatchSaleOrderList', map)
             .then(res => {
               if (res.data.code == 200) {
                 this.$message({
-                  type: "success",
-                  message: "接收成功!"
-                });
-                if (getCookie("orgCode") == "chengyunshang") {
+                  type: 'success',
+                  message: '接收成功!'
+                })
+                if (getCookie('orgCode') == 'chengyunshang') {
                   this.first.requestUrl =
-                    "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=" +
-                    getCookie("userId") +
-                    "&i=" +
-                    new Date();
+                    '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
+                    getCookie('userId') +
+                    '&i=' +
+                    new Date()
                 } else {
                   this.first.requestUrl =
-                    "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=" +
+                    '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
                     this.ssoId +
-                    "&i=" +
-                    new Date();
+                    '&i=' +
+                    new Date()
                 }
               } else {
                 this.$message({
-                  message: "接单失败,请联系管理员!",
-                  type: "warning"
-                });
+                  message: '接单失败,请联系管理员!',
+                  type: 'warning'
+                })
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "接单操作已取消!"
-          });
-        });
+            type: 'info',
+            message: '接单操作已取消!'
+          })
+        })
     },
     //拒绝所有已选中的订单
     refuse() {
-      this.$confirm("是否拒绝已选中的订单", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('是否拒绝已选中的订单', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
         center: true
       })
         .then(() => {
           //所有选中的分派Id
-          var mapList = [];
+          var mapList = []
           this.selectTruckOrder.forEach(item => {
             //初始化mapItem
             var mapItem = {
               //分派Id
               dispatchId: 0
-            };
-            mapItem.dispatchId = item.dispatchId;
-            mapList.push(mapItem);
-          });
+            }
+            mapItem.dispatchId = item.dispatchId
+            mapList.push(mapItem)
+          })
           //请求后端
           this.axios
-            .post("/api/v1/ams/refuseDispatchSaleOrderList", mapList)
+            .post('/api/v1/ams/refuseDispatchSaleOrderList', mapList)
             .then(res => {
               if (res.data.code == 200) {
                 this.$message({
-                  type: "success",
-                  message: "拒绝成功!"
-                });
-                if (getCookie("orgCode") == "chengyunshang") {
+                  type: 'success',
+                  message: '拒绝成功!'
+                })
+                if (getCookie('orgCode') == 'chengyunshang') {
                   this.first.requestUrl =
-                    "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=" +
-                    getCookie("userId") +
-                    "&i=" +
-                    new Date();
+                    '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
+                    getCookie('userId') +
+                    '&i=' +
+                    new Date()
                 } else {
                   this.first.requestUrl =
-                    "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=" +
+                    '/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=' +
                     this.ssoId +
-                    "&i=" +
-                    new Date();
+                    '&i=' +
+                    new Date()
                 }
               } else {
                 this.$message({
-                  message: "拒绝失败,请联系管理员!",
-                  type: "error"
-                });
+                  message: '拒绝失败,请联系管理员!',
+                  type: 'error'
+                })
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "拒绝操作已取消!"
-          });
-        });
+            type: 'info',
+            message: '拒绝操作已取消!'
+          })
+        })
     }
   }
-};
+}
 </script>
 
 <style lang="scss" scode>
-.button-box {
-  display: flex;
-  text-align: center;
-  align-items: center;
-  justify-content: center;
-  margin-top: 0.3125rem;
-  margin-bottom: 1.25rem;
+.openDistribution {
+  .top {
+    margin-top: 10px;
+    margin-left: 10px;
+  }
+  .buttonModel {
+    margin-top: 5px;
+
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .operation {
+      margin-left: 10px;
+    }
+    .search {
+      margin-right: 10px;
+    }
+  }
+  .table {
+    margin-left: 10px;
+    margin-top: 5px;
+  }
 }
 </style>

+ 313 - 198
src/views/sale/components/transport_order/saleChemicalCokeOrder.vue

@@ -1,58 +1,86 @@
 // 接收化产焦炭运单
 <template>
-  <div>
-    <div style="margin:10px">
-      <el-select
-        v-model="condition1"
-        placeholder="请选择筛选条件"
-        style="width:150px"
-        clearable
-      >
-        <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
+  <div class="saleChemicalCokeOrder">
+    <div class="top">
+      <el-form inline>
+        <el-form-item
+          ><el-select
+            v-model="condition1"
+            placeholder="请选择筛选条件"
+            style="width:150px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input1"
+            style="width:200px"
+            clearable
+          >
+          </el-input
+        ></el-form-item>
+        <el-form-item
+          ><el-select
+            v-model="condition2"
+            placeholder="请选择筛选条件"
+            style="width:150px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input2"
+            style="width:200px"
+            clearable
+          >
+          </el-input
+        ></el-form-item>
+      </el-form>
+    </div>
+    <div class="elDivider">
+      <el-divider></el-divider>
+    </div>
+    <div class="buttonModel">
+      <div class="operation">
+        <el-button
+          type="primary"
+          class="btn"
+          @click="batchCloseOrder"
+          v-if="activeName == 'third'"
         >
-        </el-option>
-      </el-select>
-      <el-input
-        placeholder="请输入内容"
-        v-model="input1"
-        style="width:200px"
-        clearable
-      >
-      </el-input>
-      <el-select
-        v-model="condition2"
-        placeholder="请选择筛选条件"
-        style="width:150px"
-        clearable
-      >
-        <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
+          <i></i>批量关闭订单
+        </el-button>
+        <el-button
+          type="primary"
+          class="btn"
+          @click="batchCloseOrderReceived"
+          v-if="activeName == 'first' && orgCode != 'chengyunshang'"
         >
-        </el-option>
-      </el-select>
-      <el-input
-        placeholder="请输入内容"
-        v-model="input2"
-        style="width:200px"
-        clearable
-      >
-      </el-input>
-      <el-button type="primary" class="btn" @click="onClick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" class="btn" @click="batchCloseOrder">
-        <i></i>批量关闭订单
-      </el-button>
-      <el-button type="primary" @click="refresh">
-        <i class="el-icon-refresh"></i>刷新
-      </el-button>
+          <i></i>批量关闭订单
+        </el-button>
+        <el-button type="primary" @click="refresh">
+          <i class="el-icon-refresh"></i>刷新
+        </el-button>
+      </div>
+      <div class="search">
+        <el-button type="primary" class="btn" @click="onClick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
     </div>
     <el-dialog
       title="车辆信息"
@@ -78,146 +106,161 @@
         >
       </span>
     </el-dialog>
-    <el-tabs v-model="activeName">
-      <!-- 未接收 -->
-      <el-tab-pane label="未接收" name="third">
-        <dilTable
-          v-bind.sync="option3"
-          @selection-change="selectionChange"
-          ref="table2"
-          :isHeigth="isHeigth"
-          :shiyHeigth="shiyHeigth"
-          :isKuang="isKuang"
-        >
-          <el-table-column fixed="right" label="操作" width="180">
-            <template slot-scope="scope">
-              <el-button
-                @click="updateCapacity(scope.row)"
-                type="text"
-                size="small"
-              >
-                修改运力
-              </el-button>
-              <el-button
-                @click="detailclick2(scope.row)"
-                type="text"
-                size="small"
-              >
-                物资详情
-              </el-button>
-              <el-button
-                @click="closeOrder(scope.row)"
-                type="text"
-                size="small"
-              >
-                关闭订单
-              </el-button>
-            </template>
-          </el-table-column>
-          <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-            <template slot-scope="props">
-              <el-form label-position="center" inline class="demo-table-expand">
-                <div v-if="false">{{ props }}</div>
-                <div>
-                  <el-table :data="tableData2" border>
-                    <el-table-column
-                      v-for="(item, i) in tableHead"
-                      :key="i"
-                      :prop="item.prop"
-                      :label="item.label"
-                      :width="item.width"
-                    ></el-table-column>
-                  </el-table>
-                </div>
-              </el-form>
-            </template>
-          </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-      <!-- 已接收 -->
-      <el-tab-pane label="已接收" name="first">
-        <dilTable
-          v-bind.sync="option1"
-          ref="table"
-          :isHeigth="isHeigth"
-          :shiyHeigth="shiyHeigth"
-          :isKuang="isKuang"
-        >
-          <el-table-column fixed="right" label="操作" width="80">
-            <template slot-scope="scope">
-              <el-button
-                @click="detailclick(scope.row)"
-                type="text"
-                size="small"
-              >
-                物资详情
-              </el-button>
-            </template>
-          </el-table-column>
-          <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-            <template slot-scope="props">
-              <el-form label-position="center" inline class="demo-table-expand">
-                <div v-if="false">{{ props }}</div>
-                <div>
-                  <el-table :data="tableData" border>
-                    <el-table-column
-                      v-for="(item, i) in tableHead"
-                      :key="i"
-                      :prop="item.prop"
-                      :label="item.label"
-                      :width="item.width"
-                    ></el-table-column>
-                  </el-table>
-                </div>
-              </el-form>
-            </template>
-          </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-      <!-- 已拒绝 -->
-      <el-tab-pane label="已拒绝" name="second">
-        <dilTable
-          v-bind.sync="option2"
-          ref="table1"
-          :isHeigth="isHeigth"
-          :shiyHeigth="shiyHeigth"
-          :isKuang="isKuang"
-        >
-          <el-table-column fixed="right" label="操作" width="80">
-            <template slot-scope="scope">
-              <el-button
-                @click="detailclick1(scope.row)"
-                type="text"
-                size="small"
-              >
-                物资详情
-              </el-button>
-            </template>
-          </el-table-column>
-          <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-            <template slot-scope="props">
-              <el-form label-position="center" inline class="demo-table-expand">
-                <div v-if="false">{{ props }}</div>
-                <div>
-                  <el-table :data="tableData1" border>
-                    <el-table-column
-                      v-for="(item, i) in tableHead"
-                      :key="i"
-                      :prop="item.prop"
-                      :label="item.label"
-                      :width="item.width"
-                    ></el-table-column>
-                  </el-table>
-                </div>
-              </el-form>
-            </template>
-          </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-    </el-tabs>
+    <div class="table">
+      <el-tabs v-model="activeName">
+        <!-- 未接收 -->
+        <el-tab-pane label="未接收" name="third">
+          <dilTable
+            v-bind.sync="option3"
+            @selection-change="selectionChange"
+            ref="table2"
+            :isHeigth="isHeigth"
+            :shiyHeigth="shiyHeigth"
+            :isKuang="isKuang"
+          >
+            <el-table-column fixed="right" label="操作" width="180">
+              <template slot-scope="scope">
+                <el-button
+                  @click="updateCapacity(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  修改运力
+                </el-button>
+                <el-button
+                  @click="detailclick2(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  物资详情
+                </el-button>
+                <el-button
+                  @click="closeOrder(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  关闭订单
+                </el-button>
+              </template>
+            </el-table-column>
+            <!-- 物资详情抽屉 -->
+            <el-table-column type="expand" width="1">
+              <template slot-scope="props">
+                <el-form
+                  label-position="center"
+                  inline
+                  class="demo-table-expand"
+                >
+                  <div v-if="false">{{ props }}</div>
+                  <div>
+                    <el-table :data="tableData2" border>
+                      <el-table-column
+                        v-for="(item, i) in tableHead"
+                        :key="i"
+                        :prop="item.prop"
+                        :label="item.label"
+                        :width="item.width"
+                      ></el-table-column>
+                    </el-table>
+                  </div>
+                </el-form>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已接收 -->
+        <el-tab-pane label="已接收" name="first">
+          <dilTable
+            v-bind.sync="option1"
+            ref="table"
+            :isHeigth="isHeigth"
+            :shiyHeigth="shiyHeigth"
+            :isKuang="isKuang"
+            @selection-change="selectionChange1"
+          >
+            <el-table-column fixed="right" label="操作" width="80">
+              <template slot-scope="scope">
+                <el-button
+                  @click="detailclick(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  物资详情
+                </el-button>
+              </template>
+            </el-table-column>
+            <!-- 物资详情抽屉 -->
+            <el-table-column type="expand" width="1">
+              <template slot-scope="props">
+                <el-form
+                  label-position="center"
+                  inline
+                  class="demo-table-expand"
+                >
+                  <div v-if="false">{{ props }}</div>
+                  <div>
+                    <el-table :data="tableData" border>
+                      <el-table-column
+                        v-for="(item, i) in tableHead"
+                        :key="i"
+                        :prop="item.prop"
+                        :label="item.label"
+                        :width="item.width"
+                      ></el-table-column>
+                    </el-table>
+                  </div>
+                </el-form>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已拒绝 -->
+        <el-tab-pane label="已拒绝" name="second">
+          <dilTable
+            v-bind.sync="option2"
+            ref="table1"
+            :isHeigth="isHeigth"
+            :shiyHeigth="shiyHeigth"
+            :isKuang="isKuang"
+          >
+            <el-table-column fixed="right" label="操作" width="80">
+              <template slot-scope="scope">
+                <el-button
+                  @click="detailclick1(scope.row)"
+                  type="text"
+                  size="small"
+                >
+                  物资详情
+                </el-button>
+              </template>
+            </el-table-column>
+            <!-- 物资详情抽屉 -->
+            <el-table-column type="expand" width="1">
+              <template slot-scope="props">
+                <el-form
+                  label-position="center"
+                  inline
+                  class="demo-table-expand"
+                >
+                  <div v-if="false">{{ props }}</div>
+                  <div>
+                    <el-table :data="tableData1" border>
+                      <el-table-column
+                        v-for="(item, i) in tableHead"
+                        :key="i"
+                        :prop="item.prop"
+                        :label="item.label"
+                        :width="item.width"
+                      ></el-table-column>
+                    </el-table>
+                  </div>
+                </el-form>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -251,7 +294,9 @@ export default {
       inputText: '',
       option1: {
         // option1请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
-        requestUrl: ''
+        requestUrl: '',
+        selectionType: 'select',
+        mapList1: []
       },
       option2: {
         // option2请求数据的地址,承运商暂时设置为默认(运输订单状态为)
@@ -307,10 +352,12 @@ export default {
       tableData2: [],
       capacityId: null,
       dialogTableVisible: false,
-      orderId: null
+      orderId: null,
+      orgCode: null
     }
   },
   created() {
+    this.orgCode = getCookie('orgCode')
     this.getRequestUrl()
   },
 
@@ -368,6 +415,9 @@ export default {
     selectionChange(selection) {
       this.option3.mapList = selection
     },
+    selectionChange1(selection) {
+      this.option1.mapList1 = selection
+    },
     batchCloseOrder() {
       if (this.option3.mapList.length == 0) {
         this.$message({
@@ -413,6 +463,56 @@ export default {
           })
       }
     },
+    batchCloseOrderReceived() {
+      if (this.option1.mapList1.length == 0) {
+        this.$message({
+          type: 'warning',
+          message: '请先选择要关闭的订单!'
+        })
+      } else {
+        this.$confirm('是否关闭这些订单(出皮无法关闭)', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+          center: true
+        })
+          .then(() => {
+            //初始化maplist
+            var mapList = []
+            this.option1.mapList1.forEach(item => {
+              //初始化mapItem
+              let mapItem = {
+                //销售订单物资中间表id
+                orderId: 0
+              }
+              mapItem.orderId = item.orderId
+              mapList.push(mapItem)
+            })
+            this.axios
+              .post('/api/v1/oms/batchCloseOrder', mapList)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.getRequestUrl()
+                  this.$message({
+                    type: 'success',
+                    message: '关闭成功!'
+                  })
+                } else {
+                  this.$message({
+                    type: 'error',
+                    message: '关闭失败!'
+                  })
+                }
+              })
+          })
+          .catch(() => {
+            this.$message({
+              type: 'info',
+              message: '取消关闭!'
+            })
+          })
+      }
+    },
     refresh() {
       this.getRequestUrl()
     },
@@ -651,12 +751,27 @@ export default {
 }
 </script>
 <style lang="scss" scode>
-.steel_inbound {
-  .sache {
-    padding: 1.25rem 0.375rem;
-    .el-input {
-      margin-right: 1.25rem;
+.saleChemicalCokeOrder {
+  .top {
+    margin-top: 10px;
+    margin-left: 10px;
+  }
+  .buttonModel {
+    margin-top: 5px;
+
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .operation {
+      margin-left: 10px;
     }
+    .search {
+      margin-right: 10px;
+    }
+  }
+  .table {
+    margin-left: 10px;
+    margin-top: 5px;
   }
 }
 </style>

+ 3 - 0
src/views/statisticalReport/app.js

@@ -25,6 +25,9 @@ Vue.use(tableToExcel)
 
 import htmlToPdf from '@/components/exportPdfs/exportPdfs'
 Vue.use(htmlToPdf)
+
+import elDivider from '@/components/el-divider'
+Vue.use(elDivider)
 //导出PDF组件
 import 'xe-utils'
 import VXETable from 'vxe-table'

+ 1023 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeFormMonitor.vue

@@ -0,0 +1,1023 @@
+<template>
+  <div class="saleChemicalCokeFormMonitor">
+    <div class="top">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-select
+            v-model="condition1"
+            placeholder="筛选条件"
+            style="width:120px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input1"
+            style="width:180px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="condition2"
+            placeholder="筛选条件"
+            style="width:120px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input2"
+            style="width:180px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="时间类型"
+            clearable
+            style="width:85px"
+          >
+            <el-option
+              v-for="item in timeOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="派车时间"
+            style="width: 180px;"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="派车时间"
+            style="width: 180px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <el-form :inline="true">
+        <el-form-item>
+          <el-select
+            v-model="condition3"
+            placeholder="筛选条件"
+            style="width:120px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input3"
+            style="width:180px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>已进厂车数:</span>
+          <el-input
+            v-model="enFactoryNumber"
+            :disabled="true"
+            style="width: 100px;"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>已过毛车数:</span>
+          <el-input
+            v-model="grossNumber"
+            :disabled="true"
+            style="width: 100px;"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>合计净重:</span>
+          <el-input
+            v-model="totalNumber"
+            :disabled="true"
+            style="width: 100px;"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>合计车数:</span>
+          <el-input
+            v-model="totalCapacity"
+            :disabled="true"
+            style="width: 50px;"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="elDivider">
+      <el-divider></el-divider>
+    </div>
+    <div class="buttonModel">
+      <div class="operation">
+        <el-button type="primary" @click="dealWithOverWeight">
+          超重出厂
+        </el-button>
+        <el-button type="primary" @click="openReceive">
+          <i class="el-icon-document"></i>签收抵达</el-button
+        >
+        <el-button type="primary" @click="checkTrans">
+          <i class="el-icon-truck"></i>轨迹
+        </el-button>
+        <el-button type="primary" @click="buLuCaseNo">
+          <i class="el-icon-truck"></i>补录箱号
+        </el-button>
+        <el-button type="primary" @click="closeTransOrder">
+          关闭运单
+        </el-button>
+      </div>
+      <div class="search">
+        <el-button type="primary" @click="exportToExcel('销售化产焦炭报表')"
+          ><i class="el-icon-download"></i>Excel</el-button
+        >
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button type="primary" @click="refresh">
+          <i class="el-icon-refresh"></i>
+        </el-button>
+      </div>
+    </div>
+    <div class="main">
+      <dilTable
+        id="excelDom"
+        ref="excelDom"
+        v-bind.sync="option"
+        :isHeigth="isHeigth"
+        :isKuang="isKuang"
+        @func="func"
+        highlight-current-row
+        @radio-change="selectOne"
+        :pageSize="pageSize"
+      >
+        <el-table-column
+          label="抵达地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.arrivalPhoto)"
+              >{{ scope.row.arrivalAddress }}</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="签收地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.receiptPhoto)"
+              >{{ scope.row.receiptAddress }}</el-button
+            >
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <div style="height: 100%">
+      <vxe-modal
+        width="1237"
+        height="731"
+        v-model="value7"
+        show-zoom
+        resize
+        title="轨迹查询"
+      >
+        <template #default>
+          <PathView v-bind.sync="pathOption"></PathView>
+        </template>
+      </vxe-modal>
+    </div>
+    <el-dialog :visible.sync="disvisiable">
+      <div class="admin2">
+        <div class="carrier from">
+          <el-form :inline="true" class="demo-form-inline" label-width="80px">
+            <el-form-item label="车牌号:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="capacityName"
+                :fetch-suggestions="querySearchCapacity"
+                placeholder="车牌号"
+                :trigger-on-focus="false"
+                @select="handleSelectCapacity"
+              >
+                <template slot-scope="{ item }">
+                  <div class="name">{{ item.capacityNumber }}</div>
+                </template>
+              </el-autocomplete>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="poundNo from">
+          <span class="text">运输订单号:</span>
+          <el-input v-model="orderNumber" disabled></el-input>
+        </div>
+        <div class="button_box">
+          <el-button type="primary" @click="updateCanwork" :disabled="disabled"
+            >确认</el-button
+          >
+        </div>
+      </div>
+    </el-dialog>
+    <el-dialog :visible.sync="caseNoVisiable">
+      <div class="admin2">
+        <div class="poundNo from">
+          <span class="text">运输订单号:</span>
+          <el-input v-model="orderNumber" disabled></el-input>
+        </div>
+        <div class="poundNo from">
+          <span class="text">箱号:</span>
+          <el-input v-model="caseNumber"></el-input>
+        </div>
+        <div class="button_box">
+          <el-button type="primary" @click="buLuCaseNoZx()">确认</el-button>
+        </div>
+      </div>
+    </el-dialog>
+    <el-dialog
+      title="抵达签收"
+      :visible.sync="arrivalReceiving"
+      :before-close="closeUpload"
+    >
+      <el-form style="margin-left:20%">
+        <el-form-item label="车牌号码">
+          <el-input
+            v-model="capacityNumber"
+            disabled
+            style="width:300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="签收地址">
+          <el-input
+            v-model="location"
+            style="width:400px"
+            :disabled="orgCode != 'wuliuyunshubu'"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="抵达时间">
+          <el-date-picker
+            v-model="arrivalTime"
+            type="datetime"
+            :disabled="orgCode != 'wuliuyunshubu'"
+            placeholder="选择日期时间"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="签收时间">
+          <el-date-picker
+            v-model="receiptTime"
+            type="datetime"
+            :disabled="orgCode != 'wuliuyunshubu'"
+            placeholder="选择日期时间"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="抵达图片(车头、满货箱)" style="">
+          <el-upload
+            ref="arrival"
+            list-type="picture-card"
+            :file-list="arriavlList"
+            action="/api/v1/otms/addtmstruckArrivalResult"
+            :limit="12"
+            :on-change="fileChange1"
+            :on-remove="fileChange1"
+            :on-preview="handlePictureCardPreview"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="签收图片(空货箱、质保书、签收单)">
+          <el-upload
+            ref="receive"
+            list-type="picture-card"
+            :file-list="receiveList"
+            action="null"
+            :limit="11"
+            :on-change="fileChange2"
+            :on-remove="fileChange2"
+            :on-preview="handlePictureCardPreview"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <el-button
+        type="primary"
+        @click="arrivalAndReceive"
+        :loading="isLoading"
+        style="margin-left:40%"
+        >确定</el-button
+      >
+    </el-dialog>
+    <el-dialog title="图片预览" :visible.sync="dialogVisible" width="80%">
+      <img width="100%" :src="dialogImageUrl" alt="" />
+    </el-dialog>
+    <el-dialog title="图片查看" :visible.sync="dialogVisible2" width="80%">
+      <img
+        width="100%"
+        v-for="item in picList"
+        :src="item"
+        :key="item"
+        alt=""
+      />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
+import PathView from './mapTest.vue'
+import currentLocation from './currentLocation.vue'
+import { downloadFile, creatImageFile } from '@/utils/base64ToBlob.js'
+export default {
+  components: {
+    PathView,
+    currentLocation
+  },
+  data() {
+    return {
+      caseNoVisiable: false,
+      caseNumber: null,
+      condition1: null,
+      condition2: null,
+      condition3: null,
+      input1: '',
+      input2: '',
+      input3: '',
+      options: [
+        {
+          label: '车牌号',
+          value: 'capacityNumber'
+        },
+        {
+          label: '收货单位',
+          value: 'receivName'
+        },
+        {
+          label: '物资名称/备注',
+          value: 'remark'
+        },
+        {
+          label: '装货地点',
+          value: 'wareHouse'
+        },
+        {
+          label: '摘要',
+          value: 'saleRemark'
+        },
+        {
+          label: '仓库',
+          value: 'saleWarehouse'
+        },
+        {
+          label: '车辆状态',
+          value: 'transportStatus'
+        }
+      ],
+      orderNumber: null,
+      orderId: null,
+      disabled: false,
+      capacityName: null,
+      disvisiable: false,
+      wareHouse: null,
+      inputMaterial: null,
+      // shiyHeigth: 140,
+      isHeigth: true,
+      pageSize: 20,
+      isKuang: false,
+      option: {
+        requestUrl: '',
+        selectionType: 'radio',
+        requestQuery: null
+      },
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      enFactoryNumber: 0,
+      grossNumber: 0,
+      tableTitle: '销售统计报表',
+      inputReceiveName: null,
+      //抵达签收
+      selection: null,
+      orgCode: null,
+      location: null,
+      capacityNumber: null,
+      arrivalReceiving: false,
+      arriavlList: [],
+      receiveList: [],
+      fileListArrival: [],
+      fileListReceive: [],
+      dialogImageUrl: '',
+      dialogVisible: false,
+      picList: [],
+      dialogVisible2: false,
+      isLoading: false,
+      arrivalTime: null,
+      receiptTime: null,
+      dialogFormVisible: false,
+      //轨迹
+      value7: false,
+      pathOption: {
+        orderNumber: '',
+        capacityNumber: '',
+        startPointName: '',
+        endPointName: '',
+        statusCode: '位置'
+      },
+      screen: 0,
+      timeOptions: [
+        {
+          label: '派车时间',
+          value: 0
+        },
+        {
+          label: '进厂时间',
+          value: 1
+        }
+      ]
+    }
+  },
+  created() {
+    this.getRequestUrl({
+      isEnFactoryFlag: this.screen
+    })
+  },
+  methods: {
+    buLuCaseNo() {
+      if (!this.selection) {
+        this.$message.warning('请选择需要补录箱号的实绩')
+        return
+      }
+      console.log(this.selection, 'this.selection')
+      this.orderNumber = this.selection.orderNumber
+      this.caseNumber = this.selection.caseNumber
+      this.caseNoVisiable = true
+    },
+    buLuCaseNoZx() {
+      console.log(this.selection, 'selection')
+      if (this.caseNumber) {
+        this.axios
+          .post('/api/v1/tms/updateLoadingIdRemark', {
+            loadResultId: this.selection.resultId,
+            caseNumber: this.caseNumber
+          })
+          .then(res => {
+            this.getRequestUrl()
+            this.$message({
+              type: 'success',
+              message: '补录成功',
+              offsite: 250,
+              duration: 2000
+            })
+            this.caseNoVisiable = false
+          })
+          .catch(e => {
+            this.$message({
+              type: 'error',
+              message: '补录失败',
+              offsite: 250,
+              duration: 2000
+            })
+            this.caseNoVisiable = false
+          })
+      }
+    },
+    //选中
+    selectOne(selection) {
+      this.selection = selection
+    },
+    closeTransOrder() {
+      if (!this.selection.orderId) {
+        this.$message({
+          type: 'warning',
+          message: '请先选择要关闭的订单!'
+        })
+      } else {
+        this.$confirm('是否关闭运单(出皮无法关闭)', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+          center: true
+        })
+          .then(() => {
+            //初始化maplist
+            let mapList = []
+            mapList.push(this.selection)
+            this.axios
+              .post('/api/v1/oms/batchCloseOrder', mapList)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.getRequestUrl()
+                  this.$message({
+                    type: 'success',
+                    message: '关闭成功!'
+                  })
+                } else {
+                  this.$message({
+                    type: 'error',
+                    message: '关闭失败!'
+                  })
+                }
+              })
+          })
+          .catch(() => {
+            this.$message({
+              type: 'info',
+              message: '取消关闭!'
+            })
+          })
+      }
+    },
+    //抵达签收
+    openReceive() {
+      if (!this.selection) {
+        this.$message.warning('请选择需要补录的实绩')
+        return
+      }
+      let row = this.selection
+      if (!row.resultOutGateTime) {
+        this.$message.warning('该车未出厂,不允许签收')
+        return
+      }
+      if (row.arrivalAddress) {
+        //优先获取抵达地址
+        this.location = row.arrivalAddress
+      } else {
+        //其次获取车辆定位
+        this.axios
+          .get(
+            '/api/v1/otms/getCurrentLocation?capcityNumber=' +
+              row.capacityNumber
+          )
+          .then(res => {
+            if (
+              res.data.status == 'succeed' &&
+              res.data.data.result.status != 1001
+            ) {
+              this.location = res.data.data.result.adr
+            } else {
+              this.location = null
+              // this.$message.warning('获取不到车辆定位!请联系销售公司上传!')
+            }
+          })
+      }
+      this.orderNumber = row.orderNumber
+      this.capacityNumber = row.capacityNumber
+      this.arrivalTime = row.arrivalTime
+      this.receiptTime = row.receiptTime
+      this.arrivalReceiving = true
+      //抵达图片
+      this.axios
+        .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNumber)
+        .then(res => {
+          console.log('arrivalPhoto:', res)
+          if (res.data) {
+            this.arriavlList = []
+            res.data.forEach((e, index) => {
+              creatImageFile(e, 'file1-' + index).then(res => {
+                this.arriavlList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              })
+            })
+            this.fileListArrival = this.arriavlList
+          }
+        })
+      //签收图片
+      this.axios
+        .post(
+          '/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNumber
+        )
+        .then(res => {
+          console.log('ReceivingPhoto:', res)
+          if (res.data) {
+            this.receiveList = []
+            res.data.forEach((e, index) => {
+              creatImageFile(e, 'file2-' + index).then(res => {
+                this.receiveList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              })
+            })
+            this.fileListReceive = this.receiveList
+          }
+        })
+    },
+    arrivalAndReceive() {
+      if (!this.location) {
+        this.$message.warning(
+          '签收地址必须取车辆定位!若取不到请联系销售公司上传!'
+        )
+        return
+      }
+      if (this.fileListArrival.length < 3) {
+        this.$message.warning('抵达图至少三张')
+        return
+      }
+      if (this.fileListReceive.length < 2) {
+        this.$message.warning('签收图最少两张')
+        return
+      }
+      this.isLoading = true
+      //上传抵达
+      let formData = new window.FormData()
+      this.fileListArrival.forEach((item, index) => {
+        formData.append('file' + index, item.raw)
+      })
+      formData.append('orderNumber', this.orderNumber)
+      formData.append('resultArrivalAddress', this.location)
+      if (this.arrivalTime) {
+        formData.append('arrivalTime', sjTime(this.arrivalTime))
+      }
+      let options = {
+        // 设置axios的参数
+        url: '/api/v1/otms/addtmstruckArrivalResult',
+        data: formData,
+        method: 'post',
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      }
+      this.axios(options).then(res => {
+        console.log('arrivalRes:', res)
+        //上传签收
+        let formData = new window.FormData()
+        let request = ''
+        this.fileListReceive.forEach((item, index) => {
+          formData.append('file' + index, item.raw)
+        })
+        formData.append('orderNumber', this.orderNumber)
+        formData.append('resultArrivalAddress', this.location)
+        if (this.receiptTime) {
+          formData.append('receiptTime', sjTime(this.receiptTime))
+        }
+        formData.append('num', request.length)
+        let options = {
+          url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
+          data: formData,
+          method: 'post',
+          headers: {
+            'Content-Type': 'multipart/form-data'
+          }
+        }
+        this.axios(options).then(res => {
+          console.log('receiveRes:', res)
+          this.$message.success('上传成功!')
+          this.selection.arrivalAddress = this.location
+          this.closeUpload()
+          // this.refresh()
+        })
+      })
+    },
+    fileChange1(file, fileList) {
+      this.fileListArrival = fileList
+    },
+    fileChange2(file, fileList) {
+      this.fileListReceive = fileList
+    },
+    fileChange3(file, fileList) {
+      this.remarkPicList = fileList
+    },
+    exceed() {
+      this.$message.warning('超出上传数量!')
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url
+      this.dialogVisible = true
+    },
+    closeUpload() {
+      this.location = null
+      this.arrivalTime = null
+      this.receiptTime = null
+      this.arrivalReceiving = false
+      this.isLoading = false
+      this.$refs.arrival.clearFiles()
+      this.$refs.receive.clearFiles()
+    },
+    showPic(urls) {
+      //获取图片到本地
+      this.axios.post('/api/v1/uc/getPicture', { urls: urls }).then(res => {
+        console.log(res)
+        if (res.data) {
+          this.picList = res.data
+        } else {
+          this.picList = []
+        }
+        this.dialogVisible2 = true
+      })
+    },
+    //轨迹
+    checkTrans() {
+      let row = this.selection
+      if (!this.selection) {
+        this.$message.error('请点击需要查看轨迹的行!')
+        return
+      }
+      if (row.resultOutGateTime == null) {
+        this.$message.error('该车还未出厂,暂无轨迹')
+        return
+      }
+      let that = this
+      that.axios
+        .post('/api/v1/otms/fullPath?orderNumber=' + row.orderNumber)
+        .then(res => {
+          console.log(res.data)
+          if (res.data.data == '-1') {
+            this.$message.error('运输订单未关闭的自提车辆无权查看!')
+          } else if (res.data.data.startAndEndRoutes != null) {
+            that.pathOption.orderNumber = row.orderNumber
+            that.pathOption.capacityNumber = row.capacityNumber
+            that.pathOption.startPointName = '达钢集团小东门'
+            that.pathOption.endPointName = row.receiptAddress
+            that.value7 = true
+            if (row.orderStatus == '已完成') {
+              that.pathOption.statusCode = '位置'
+            } else {
+              that.pathOption.statusCode = '当前位置'
+            }
+          } else {
+            this.$message.error('车辆没有开启GPS')
+          }
+        })
+    },
+    exportToExcel(tableTitle = '表格标题') {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let requestQuery = {}
+      requestQuery.isEnFactoryFlag = this.screen
+      if (this.startTime && this.endTime) {
+        requestQuery.startTime = sjTime(this.startTime)
+        requestQuery.endTime = sjTime(this.endTime)
+      }
+      if (!this.condition1) {
+        requestQuery['remarkOne'] = this.input1 + ''
+      } else {
+        requestQuery[this.condition1] = this.input1
+      }
+      if (!this.condition2) {
+        requestQuery['remarkTwo'] = this.input2 + ''
+      } else {
+        requestQuery[this.condition2] = this.input2 + ''
+      }
+      if (!this.condition3) {
+        requestQuery['remarkThree'] = this.input3 + ''
+      } else {
+        requestQuery[this.condition3] = this.input3 + ''
+      }
+      requestQuery.isExcel = 1
+      //查询数据
+      this.axios.post(this.option.requestUrl, requestQuery).then(res => {
+        console.log(res, 'res')
+        let columnData = res.data.data.columnData
+        let data = []
+        if (!res.data.data.list || res.data.data.list.length <= 0) {
+          this.$message({
+            message: '请先查询,再导出!',
+            type: 'warning',
+            duration: 1000
+          })
+          return
+        } else {
+          //替换表头
+          console.log('columnData', columnData)
+          res.data.data.list.forEach((item, index) => {
+            let temp = {}
+            columnData.forEach(col => {
+              temp[col.label] = item[col.prop]
+            })
+            data.push(temp)
+          })
+          console.log('data', data)
+          //将json数组转换成sheet
+          let table_sheet = XLSX.utils.json_to_sheet(data)
+          //为工作簿添加sheet
+          XLSX.utils.book_append_sheet(wb, table_sheet, '第一页')
+          //导出
+          XLSX.writeFile(wb, tableTitle + '.xlsx')
+        }
+      })
+    },
+    //以下是运力边输边查搜索
+    querySearchCapacity(queryString, cb) {
+      if (queryString.length < 3) {
+        return
+      }
+      this.axios
+        .get('/api/v1/uc/getCapacityNumber?index=' + queryString)
+        .then(res => {
+          if (res.data.code == '200') {
+            var restaurantsCarrier = res.data.data
+            console.log(restaurantsCarrier, 'restaurantsCarrier')
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    createFilterCarrier(queryString) {
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.capacityNumber
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        )
+      }
+    },
+    updateCanwork() {
+      this.axios
+        .post('/api/v1/bp/updateOrderCanWork?orderNumber=' + this.orderNumber)
+        .then(res => {
+          this.$message.success('修改成功')
+          this.getRequestUrl()
+          this.disvisiable = false
+        })
+    },
+    //运力弹出层
+    handleSelectCapacity(item) {
+      this.capacityId = item.capacityId
+      this.capacityName = item.capacityNumber
+      this.axios
+        .get('/api/v1/uc/getOrderNumber?capacityId=' + this.capacityId)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.orderId = res.data.data.orderId
+            this.orderNumber = res.data.data.orderNumber
+            this.axios
+              .get('/api/v1/uc/getMaterialIdByOrderId?orderId=' + this.orderId)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.materialList = res.data.data
+                }
+              })
+          }
+        })
+    },
+    refresh() {
+      this.getRequestUrl()
+    },
+    func(res) {
+      this.totalNumber = res.list[0].totalNumber
+      this.totalCapacity = res.total
+      //统计已进厂车数
+      this.enFactoryNumber = res.list[0].enFactoryNumber
+      this.grossNumber = res.list[0].grossNumber
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
+      this.isKuang = false
+    },
+    onclick() {
+      let requestQuery = {}
+      requestQuery.isEnFactoryFlag = this.screen
+      if (this.startTime && this.endTime) {
+        requestQuery.startTime = sjTime(this.startTime)
+        requestQuery.endTime = sjTime(this.endTime)
+      }
+      if (!this.condition1) {
+        requestQuery['remarkOne'] = this.input1 + ''
+      } else {
+        requestQuery[this.condition1] = this.input1
+      }
+      if (!this.condition2) {
+        requestQuery['remarkTwo'] = this.input2 + ''
+      } else {
+        requestQuery[this.condition2] = this.input2 + ''
+      }
+      if (!this.condition3) {
+        requestQuery['remarkThree'] = this.input3 + ''
+      } else {
+        requestQuery[this.condition3] = this.input3 + ''
+      }
+      console.log(requestQuery, 'requestQuery')
+      this.option.requestQuery = requestQuery
+      // console.log(this.option.requestQuery, 'this.option.requestQuery')
+    },
+    //格式化日期
+    dataFormat(value) {
+      let date = new Date(value)
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      let h = date.getHours()
+      h = h < 10 ? '0' + h : h
+      let m = date.getMinutes()
+      m = m < 10 ? '0' + m : m
+      let s = date.getSeconds()
+      s = s < 10 ? '0' + s : s
+      return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
+    },
+    dealWithOverWeight() {
+      this.disvisiable = true
+    },
+    getRequestUrl(
+      data = {
+        isEnFactoryFlag: this.screen
+      }
+    ) {
+      if (getCookie('orgCode') == 'chengyunshang') {
+        this.option.requestUrl =
+          '/api/v1/tms/getAllSaleReportByLb?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=' +
+          getCookie('userId') +
+          '&i=' +
+          new Date()
+      } else {
+        this.option.requestUrl =
+          '/api/v1/tms/getAllSaleReportByLb?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=' +
+          null +
+          '&i=' +
+          new Date()
+      }
+      this.onclick()
+      this.option.requestQuery = data
+      //时间段初始化
+      const start = new Date(
+        new Date(new Date().toLocaleDateString()).getTime()
+      )
+      let startTime = this.dataFormat(sjTime(start))
+      let endTime = this.dataFormat(sjTime(new Date()))
+      this.tableTitle = startTime + ' 至 ' + endTime
+      this.orgCode = getCookie('orgCode')
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.saleChemicalCokeFormMonitor {
+  .top {
+    margin-top: 10px;
+    margin-left: 10px;
+  }
+  .buttonModel {
+    margin-top: 5px;
+
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .operation {
+      margin-left: 10px;
+    }
+    .search {
+      margin-right: 10px;
+    }
+  }
+  .main {
+    margin-left: 10px;
+    margin-top: 5px;
+  }
+}
+</style>

+ 927 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductFormMonitor.vue

@@ -0,0 +1,927 @@
+<template>
+  <div class="saleCoproductFormMonitor">
+    <div class="top">
+      <el-form :inline="true">
+        <el-form-item>
+          <el-select
+            v-model="condition1"
+            placeholder="筛选条件"
+            style="width:120px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input1"
+            style="width:180px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="condition2"
+            placeholder="筛选条件"
+            style="width:120px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input2"
+            style="width:180px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-select
+            v-model="screen"
+            placeholder="时间类型"
+            clearable
+            style="width:85px"
+          >
+            <el-option
+              v-for="item in timeOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-date-picker
+            v-model="startTime"
+            type="datetime"
+            placeholder="派车时间"
+            style="width: 180px;"
+          >
+          </el-date-picker>
+          <span>至</span>
+          <el-date-picker
+            v-model="endTime"
+            type="datetime"
+            placeholder="派车时间"
+            style="width: 180px;"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-form>
+      <el-form :inline="true">
+        <el-form-item>
+          <el-select
+            v-model="condition3"
+            placeholder="筛选条件"
+            style="width:120px"
+            clearable
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-input
+            placeholder="请输入内容"
+            v-model="input3"
+            style="width:180px"
+            clearable
+          >
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>已进厂车数:</span>
+          <el-input
+            v-model="enFactoryNumber"
+            :disabled="true"
+            style="width: 100px;"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>已过毛车数:</span>
+          <el-input
+            v-model="grossNumber"
+            :disabled="true"
+            style="width: 100px;"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>合计净重:</span>
+          <el-input
+            v-model="totalNumber"
+            :disabled="true"
+            style="width: 100px;"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <span>合计车数:</span>
+          <el-input
+            v-model="totalCapacity"
+            :disabled="true"
+            style="width: 50px;"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+    </div>
+    <div class="elDivider">
+      <el-divider></el-divider>
+    </div>
+    <div class="buttonModel">
+      <div class="operation">
+        <el-button type="primary" @click="dealWithOverWeight">
+          超重出厂
+        </el-button>
+        <el-button type="primary" @click="openReceive">
+          <i class="el-icon-document"></i>签收抵达</el-button
+        >
+        <el-button type="primary" @click="checkTrans">
+          <i class="el-icon-truck"></i>轨迹
+        </el-button>
+        <el-button type="primary" @click="closeTransOrder">
+          关闭运单
+        </el-button>
+      </div>
+      <div class="search">
+        <el-button type="primary" @click="exportToExcel('销售副产品报表')"
+          ><i class="el-icon-download"></i>Excel</el-button
+        >
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <el-button type="primary" @click="refresh">
+          <i class="el-icon-refresh"></i>
+        </el-button>
+      </div>
+    </div>
+    <div class="main">
+      <dilTable
+        ref="excelDom"
+        v-bind.sync="option"
+        :isHeigth="isHeigth"
+        :isKuang="isKuang"
+        @func="func"
+        highlight-current-row
+        @radio-change="selectOne"
+        :pageSize="pageSize"
+      >
+        <el-table-column
+          label="抵达地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.arrivalPhoto)"
+              >{{ scope.row.arrivalAddress }}</el-button
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="签收地址"
+          width="150"
+          :show-overflow-tooltip="true"
+        >
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              size="small"
+              @click="showPic(scope.row.receiptPhoto)"
+              >{{ scope.row.receiptAddress }}</el-button
+            >
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <div style="height: 100%">
+      <vxe-modal
+        width="1237"
+        height="731"
+        v-model="value7"
+        show-zoom
+        resize
+        title="轨迹查询"
+      >
+        <template #default>
+          <PathView v-bind.sync="pathOption"></PathView>
+        </template>
+      </vxe-modal>
+    </div>
+    <el-dialog :visible.sync="disvisiable">
+      <div class="admin2">
+        <div class="carrier from">
+          <el-form :inline="true" class="demo-form-inline" label-width="80px">
+            <el-form-item label="车牌号:">
+              <el-autocomplete
+                class="inline-input"
+                v-model="capacityName"
+                :fetch-suggestions="querySearchCapacity"
+                placeholder="车牌号"
+                :trigger-on-focus="false"
+                @select="handleSelectCapacity"
+              >
+                <template slot-scope="{ item }">
+                  <div class="name">{{ item.capacityNumber }}</div>
+                </template>
+              </el-autocomplete>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="poundNo from">
+          <span class="text">运输订单号:</span>
+          <el-input v-model="orderNumber" disabled></el-input>
+        </div>
+        <div class="button_box">
+          <el-button type="primary" @click="updateCanwork" :disabled="disabled"
+            >确认</el-button
+          >
+        </div>
+      </div>
+    </el-dialog>
+    <el-dialog
+      title="抵达签收"
+      :visible.sync="arrivalReceiving"
+      :before-close="closeUpload"
+    >
+      <el-form style="margin-left:20%">
+        <el-form-item label="车牌号码">
+          <el-input
+            v-model="capacityNumber"
+            disabled
+            style="width:300px"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="签收地址">
+          <el-input
+            v-model="location"
+            style="width:400px"
+            :disabled="orgCode != 'wuliuyunshubu'"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="抵达时间">
+          <el-date-picker
+            v-model="arrivalTime"
+            type="datetime"
+            :disabled="orgCode != 'wuliuyunshubu'"
+            placeholder="选择日期时间"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="签收时间">
+          <el-date-picker
+            v-model="receiptTime"
+            type="datetime"
+            :disabled="orgCode != 'wuliuyunshubu'"
+            placeholder="选择日期时间"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="抵达图片(车头、满货箱)" style="">
+          <el-upload
+            ref="arrival"
+            list-type="picture-card"
+            :file-list="arriavlList"
+            action="/api/v1/otms/addtmstruckArrivalResult"
+            :limit="12"
+            :on-change="fileChange1"
+            :on-remove="fileChange1"
+            :on-preview="handlePictureCardPreview"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+        <el-form-item label="签收图片(空货箱、质保书、签收单)">
+          <el-upload
+            ref="receive"
+            list-type="picture-card"
+            :file-list="receiveList"
+            action="null"
+            :limit="11"
+            :on-change="fileChange2"
+            :on-remove="fileChange2"
+            :on-preview="handlePictureCardPreview"
+            :on-exceed="exceed"
+            accept=".jpg,.jpeg,.png,.gif,.bmp,.JPG,.JPEG,.PBG,.GIF,.BMP,.PDF"
+            :auto-upload="false"
+          >
+            <i class="el-icon-plus"></i>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <el-button
+        type="primary"
+        @click="arrivalAndReceive"
+        :loading="isLoading"
+        style="margin-left:40%"
+        >确定</el-button
+      >
+    </el-dialog>
+    <el-dialog title="图片预览" :visible.sync="dialogVisible" width="80%">
+      <img width="100%" :src="dialogImageUrl" alt="" />
+    </el-dialog>
+    <el-dialog title="图片查看" :visible.sync="dialogVisible2" width="80%">
+      <img
+        width="100%"
+        v-for="item in picList"
+        :src="item"
+        :key="item"
+        alt=""
+      />
+    </el-dialog>
+  </div>
+</template>
+<script>
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
+import PathView from './mapTest.vue'
+import currentLocation from './currentLocation.vue'
+export default {
+  components: {
+    PathView,
+    currentLocation
+  },
+  data() {
+    return {
+      condition1: null,
+      condition2: null,
+      condition3: null,
+
+      input1: null,
+      input2: null,
+      input3: null,
+
+      options: [
+        {
+          label: '车牌号',
+          value: 'capacityNumber'
+        },
+        {
+          label: '收货单位',
+          value: 'receivName'
+        },
+        {
+          label: '物资名称/备注',
+          value: 'remark'
+        },
+        {
+          label: '装货地点',
+          value: 'wareHouse'
+        },
+        {
+          label: '摘要',
+          value: 'saleRemark'
+        },
+        {
+          label: '仓库',
+          value: 'saleWarehouse'
+        },
+        {
+          label: '车辆状态',
+          value: 'transportStatus'
+        }
+      ],
+      orderNumber: null,
+      orderId: null,
+      disabled: false,
+      capacityName: null,
+      disvisiable: false,
+      isHeigth: true,
+      pageSize: 20,
+      isKuang: false,
+      option: {
+        requestUrl: '',
+        selectionType: 'radio',
+        requestQuery: null
+      },
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNumber: 0,
+      //合计车数
+      totalCapacity: 0,
+      enFactoryNumber: 0,
+      grossNumber: 0,
+      tableTitle: '销售统计报表',
+      inputMaterial: null,
+      inputReceiveName: null,
+      wareHouse: null,
+      //抵达签收
+      selection: null,
+      orgCode: null,
+      location: null,
+      capacityNumber: null,
+      arrivalReceiving: false,
+      arriavlList: [],
+      receiveList: [],
+      fileListArrival: [],
+      fileListReceive: [],
+      dialogImageUrl: '',
+      dialogVisible: false,
+      picList: [],
+      dialogVisible2: false,
+      isLoading: false,
+      arrivalTime: null,
+      receiptTime: null,
+      dialogFormVisible: false,
+      //轨迹
+      value7: false,
+      pathOption: {
+        orderNumber: '',
+        capacityNumber: '',
+        startPointName: '',
+        endPointName: '',
+        statusCode: '位置'
+      },
+      screen: 0,
+      timeOptions: [
+        {
+          label: '派车时间',
+          value: 0
+        },
+        {
+          label: '进厂时间',
+          value: 1
+        }
+      ]
+    }
+  },
+  created() {
+    //初始化表头
+    this.getRequestUrl({
+      isEnFactoryFlag: this.screen
+    })
+    //时间段初始化
+    const start = new Date(new Date(new Date().toLocaleDateString()).getTime())
+    var startTime = this.dataFormat(sjTime(start))
+    var endTime = this.dataFormat(sjTime(new Date()))
+    this.tableTitle = startTime + ' 至 ' + endTime
+    this.orgCode = getCookie('orgCode')
+  },
+  methods: {
+    exportToExcel(tableTitle = '表格标题') {
+      //创建工作簿对象
+      let wb = XLSX.utils.book_new()
+      let requestQuery = {}
+      requestQuery.isEnFactoryFlag = this.screen
+      if (this.startTime && this.endTime) {
+        requestQuery.startTime = sjTime(this.startTime)
+        requestQuery.endTime = sjTime(this.endTime)
+      }
+      if (!this.condition1) {
+        requestQuery['remarkOne'] = this.input1 + ''
+      } else {
+        requestQuery[this.condition1] = this.input1
+      }
+      if (!this.condition2) {
+        requestQuery['remarkTwo'] = this.input2 + ''
+      } else {
+        requestQuery[this.condition2] = this.input2 + ''
+      }
+      if (!this.condition3) {
+        requestQuery['remarkThree'] = this.input3 + ''
+      } else {
+        requestQuery[this.condition3] = this.input3 + ''
+      }
+      requestQuery.isExcel = 1
+      //查询数据
+      this.axios.post(this.option.requestUrl, requestQuery).then(res => {
+        console.log(res, 'res')
+        let columnData = res.data.data.columnData
+        let data = []
+        if (!res.data.data.list || res.data.data.list.length <= 0) {
+          this.$message({
+            message: '请先查询,再导出!',
+            type: 'warning',
+            duration: 1000
+          })
+          return
+        } else {
+          //替换表头
+          console.log('columnData', columnData)
+          res.data.data.list.forEach((item, index) => {
+            let temp = {}
+            columnData.forEach(col => {
+              temp[col.label] = item[col.prop]
+            })
+            data.push(temp)
+          })
+          console.log('data', data)
+          //将json数组转换成sheet
+          let table_sheet = XLSX.utils.json_to_sheet(data)
+          //为工作簿添加sheet
+          XLSX.utils.book_append_sheet(wb, table_sheet, '第一页')
+          //导出
+          XLSX.writeFile(wb, tableTitle + '.xlsx')
+        }
+      })
+    },
+    getRequestUrl(data = { isEnFactoryFlag: this.screen }) {
+      if (getCookie('orgCode') == 'chengyunshang') {
+        this.option.requestUrl =
+          '/api/v1/tms/getAllSaleReportByLb?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=' +
+          getCookie('userId') +
+          '&i=' +
+          new Date()
+      } else {
+        this.option.requestUrl =
+          '/api/v1/tms/getAllSaleReportByLb?apiId=526&startTime=null&endTime=null&orderType=2&shipperId=1&carrierSsoId=' +
+          null +
+          '&i=' +
+          new Date()
+      }
+      this.onclick()
+      this.option.requestQuery = data
+    },
+    //选中
+    selectOne(selection) {
+      console.log('selection', selection)
+      this.selection = selection
+    },
+    //抵达签收
+    openReceive() {
+      if (!this.selection) {
+        this.$message.warning('请选择需要补录的实绩')
+        return
+      }
+      let row = this.selection
+      if (!row.resultOutGateTime) {
+        this.$message.warning('该车未出厂,不允许签收')
+        return
+      }
+      if (row.arrivalAddress) {
+        //优先获取抵达地址
+        this.location = row.arrivalAddress
+      } else {
+        //其次获取车辆定位
+        this.axios
+          .get(
+            '/api/v1/otms/getCurrentLocation?capcityNumber=' +
+              row.capacityNumber
+          )
+          .then(res => {
+            if (
+              res.data.status == 'succeed' &&
+              res.data.data.result.status != 1001
+            ) {
+              this.location = res.data.data.result.adr
+            } else {
+              this.location = null
+              // this.$message.warning('获取不到车辆定位!请联系销售公司上传!')
+            }
+          })
+      }
+      this.orderNumber = row.orderNumber
+      this.capacityNumber = row.capacityNumber
+      this.arrivalTime = row.arrivalTime
+      this.receiptTime = row.receiptTime
+      this.arrivalReceiving = true
+      //抵达图片
+      this.axios
+        .post('/api/v1/otms/getArrivalPhoto?orderNumber=' + row.orderNumber)
+        .then(res => {
+          console.log('arrivalPhoto:', res)
+          if (res.data) {
+            this.arriavlList = []
+            res.data.forEach((e, index) => {
+              creatImageFile(e, 'file1-' + index).then(res => {
+                this.arriavlList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              })
+            })
+            this.fileListArrival = this.arriavlList
+          }
+        })
+      //签收图片
+      this.axios
+        .post(
+          '/api/v1/otms/getReceivingPhotoByUrl?orderNumber=' + row.orderNumber
+        )
+        .then(res => {
+          console.log('ReceivingPhoto:', res)
+          if (res.data) {
+            this.receiveList = []
+            res.data.forEach((e, index) => {
+              creatImageFile(e, 'file2-' + index).then(res => {
+                this.receiveList.push({
+                  name: 'file' + index,
+                  raw: res,
+                  url: e
+                })
+              })
+            })
+            this.fileListReceive = this.receiveList
+          }
+        })
+    },
+    arrivalAndReceive() {
+      if (!this.location) {
+        this.$message.warning(
+          '签收地址必须取车辆定位!若取不到请联系销售公司上传!'
+        )
+        return
+      }
+      if (this.fileListArrival.length < 3) {
+        this.$message.warning('抵达图至少三张')
+        return
+      }
+      if (this.fileListReceive.length < 2) {
+        this.$message.warning('签收图最少两张')
+        return
+      }
+      this.isLoading = true
+      //上传抵达
+      let formData = new window.FormData()
+      this.fileListArrival.forEach((item, index) => {
+        formData.append('file' + index, item.raw)
+      })
+      formData.append('orderNumber', this.orderNumber)
+      formData.append('resultArrivalAddress', this.location)
+      if (this.arrivalTime) {
+        formData.append('arrivalTime', sjTime(this.arrivalTime))
+      }
+      let options = {
+        // 设置axios的参数
+        url: '/api/v1/otms/addtmstruckArrivalResult',
+        data: formData,
+        method: 'post',
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      }
+      this.axios(options).then(res => {
+        console.log('arrivalRes:', res)
+        //上传签收
+        let formData = new window.FormData()
+        let request = ''
+        this.fileListReceive.forEach((item, index) => {
+          formData.append('file' + index, item.raw)
+        })
+        formData.append('orderNumber', this.orderNumber)
+        formData.append('resultArrivalAddress', this.location)
+        if (this.receiptTime) {
+          formData.append('receiptTime', sjTime(this.receiptTime))
+        }
+        formData.append('num', request.length)
+        let options = {
+          url: '/api/v1/otms/addTmstruckReceiptResultForWeb',
+          data: formData,
+          method: 'post',
+          headers: {
+            'Content-Type': 'multipart/form-data'
+          }
+        }
+        this.axios(options).then(res => {
+          console.log('receiveRes:', res)
+          this.$message.success('上传成功!')
+          this.selection.arrivalAddress = this.location
+          this.closeUpload()
+          // this.refresh()
+        })
+      })
+    },
+    fileChange1(file, fileList) {
+      this.fileListArrival = fileList
+    },
+    fileChange2(file, fileList) {
+      this.fileListReceive = fileList
+    },
+    fileChange3(file, fileList) {
+      this.remarkPicList = fileList
+    },
+    exceed() {
+      this.$message.warning('超出上传数量!')
+    },
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url
+      this.dialogVisible = true
+    },
+    closeUpload() {
+      this.location = null
+      this.arrivalTime = null
+      this.receiptTime = null
+      this.arrivalReceiving = false
+      this.isLoading = false
+      this.$refs.arrival.clearFiles()
+      this.$refs.receive.clearFiles()
+    },
+    showPic(urls) {
+      //获取图片到本地
+      this.axios.post('/api/v1/uc/getPicture', { urls: urls }).then(res => {
+        console.log(res)
+        if (res.data) {
+          // let remarkPicList = []
+          // res.data.forEach((e, index) => {
+          //   creatImageFile(e, 'file2-' + index).then(res => {
+          //     remarkPicList.push({
+          //       name: 'file' + index,
+          //       raw: res,
+          //       url: e
+          //     })
+          //   })
+          // })
+          this.picList = res.data
+        } else {
+          this.picList = []
+        }
+        this.dialogVisible2 = true
+      })
+    },
+    //轨迹
+    checkTrans() {
+      let row = this.selection
+      if (!this.selection) {
+        this.$message.error('请点击需要查看轨迹的行!')
+        return
+      }
+      if (row.resultOutGateTime == null) {
+        this.$message.error('该车还未出厂,暂无轨迹')
+        return
+      }
+      let that = this
+      that.axios
+        .post('/api/v1/otms/fullPath?orderNumber=' + row.orderNumber)
+        .then(res => {
+          console.log(res.data)
+          if (res.data.data == '-1') {
+            this.$message.error('运输订单未关闭的自提车辆无权查看!')
+          } else if (res.data.data.startAndEndRoutes != null) {
+            that.pathOption.orderNumber = row.orderNumber
+            that.pathOption.capacityNumber = row.capacityNumber
+            that.pathOption.startPointName = '达钢集团小东门'
+            that.pathOption.endPointName = row.receiptAddress
+            that.value7 = true
+            if (row.orderStatus == '已完成') {
+              that.pathOption.statusCode = '位置'
+            } else {
+              that.pathOption.statusCode = '当前位置'
+            }
+          } else {
+            this.$message.error('车辆没有开启GPS')
+          }
+        })
+    },
+    dealWithOverWeight() {
+      this.disvisiable = true
+    },
+    //以下是运力边输边查搜索
+    querySearchCapacity(queryString, cb) {
+      if (queryString.length < 3) {
+        return
+      }
+      this.axios
+        .get('/api/v1/uc/getCapacityNumber?index=' + queryString)
+        .then(res => {
+          if (res.data.code == '200') {
+            var restaurantsCarrier = res.data.data
+            console.log(restaurantsCarrier, 'restaurantsCarrier')
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier
+            // 调用 callback 返回建议列表的数据
+            cb(results)
+          }
+        })
+    },
+    createFilterCarrier(queryString) {
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.capacityNumber
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        )
+      }
+    },
+    updateCanwork() {
+      console.log(this.orderNumber)
+      this.axios
+        .post('/api/v1/bp/updateOrderCanWork?orderNumber=' + this.orderNumber)
+        .then(res => {
+          this.$message.success('修改成功')
+          this.getRequestUrl()
+          this.disvisiable = false
+        })
+    },
+    //运力弹出层
+    handleSelectCapacity(item) {
+      this.capacityId = item.capacityId
+      this.capacityName = item.capacityNumber
+      this.axios
+        .get('/api/v1/uc/getOrderNumber?capacityId=' + this.capacityId)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.orderId = res.data.data.orderId
+            this.orderNumber = res.data.data.orderNumber
+            this.axios
+              .get('/api/v1/uc/getMaterialIdByOrderId?orderId=' + this.orderId)
+              .then(res => {
+                if (res.data.code == '200') {
+                  this.materialList = res.data.data
+                }
+              })
+          }
+        })
+    },
+    refresh() {
+      this.getRequestUrl()
+    },
+    func(res) {
+      this.totalNumber = res.list[0].totalNumber
+      this.totalCapacity = res.total
+      //统计已进厂车数
+      this.enFactoryNumber = res.list[0].enFactoryNumber
+      this.grossNumber = res.list[0].grossNumber
+      //获取总记录条数作为合计车数
+      // this.totalCapacity = res.total;
+      this.isKuang = false
+    },
+    onclick() {
+      let requestQuery = {}
+      requestQuery.isEnFactoryFlag = this.screen
+      if (this.startTime && this.endTime) {
+        requestQuery.startTime = sjTime(this.startTime)
+        requestQuery.endTime = sjTime(this.endTime)
+      }
+      if (!this.condition1) {
+        requestQuery['remarkOne'] = this.input1 + ''
+      } else {
+        requestQuery[this.condition1] = this.input1
+      }
+      if (!this.condition2) {
+        requestQuery['remarkTwo'] = this.input2 + ''
+      } else {
+        requestQuery[this.condition2] = this.input2 + ''
+      }
+      if (!this.condition3) {
+        requestQuery['remarkThree'] = this.input3 + ''
+      } else {
+        requestQuery[this.condition3] = this.input3 + ''
+      }
+      console.log(requestQuery, 'requestQuery')
+      this.option.requestQuery = requestQuery
+    },
+    //格式化日期
+    dataFormat(value) {
+      let date = new Date(value)
+      let y = date.getFullYear()
+      let MM = date.getMonth() + 1
+      MM = MM < 10 ? '0' + MM : MM
+      let d = date.getDate()
+      d = d < 10 ? '0' + d : d
+      let h = date.getHours()
+      h = h < 10 ? '0' + h : h
+      let m = date.getMinutes()
+      m = m < 10 ? '0' + m : m
+      let s = date.getSeconds()
+      s = s < 10 ? '0' + s : s
+      return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.saleCoproductFormMonitor {
+  .top {
+    margin-top: 10px;
+    margin-left: 10px;
+  }
+  .buttonModel {
+    margin-top: 5px;
+
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .operation {
+      margin-left: 10px;
+    }
+    .search {
+      margin-right: 10px;
+    }
+  }
+  .main {
+    margin-left: 10px;
+    margin-top: 5px;
+  }
+}
+</style>

+ 26 - 2
src/views/statisticalReport/router/index.js

@@ -86,10 +86,18 @@ const unloadingSteelReports = () =>
   )
 const steelTransportReport = () =>
   import('../components/salesLogisticsStatistics/steelTransportReport.vue')
-Vue.use(Router)
-
 const yawnReport = () =>
   import('../components/salesLogisticsStatistics/yawnReport.vue')
+
+const saleCoproductFormMonitor = () =>
+  import(
+    '@/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductFormMonitor.vue'
+  )
+
+const saleChemicalCokeFormMonitor = () =>
+  import(
+    '@/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeFormMonitor.vue'
+  )
 Vue.use(Router)
 
 const constantRouterMap = [
@@ -353,6 +361,22 @@ const constantRouterMap = [
           code: 'xtpzgl-yhgl'
         },
         component: yawnReport
+      },
+      {
+        path: 'saleChemicalCokeFormMonitor',
+        name: 'saleChemicalCokeFormMonitor',
+        meta: {
+          code: 'xtpzgl-yhgl'
+        },
+        component: saleChemicalCokeFormMonitor
+      },
+      {
+        path: 'saleCoproductFormMonitor',
+        name: 'saleCoproductFormMonitor',
+        meta: {
+          code: 'xtpzgl-yhgl'
+        },
+        component: saleCoproductFormMonitor
       }
     ]
   }

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است