Преглед изворни кода

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

liyg пре 2 година
родитељ
комит
5419c38b81

+ 1 - 1
build/utils.js

@@ -15,7 +15,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
-//let devModules = ['index', 'queue', 'statisticalReport','QMS','appoint','sale']
+// let devModules = ['index', 'statisticalReport', 'queue']
 let devModules = ['all']
 //let devModules=['index']
 if (pathSrc.indexOf('node_modules') > -1) {

+ 1 - 1
config/index.js

@@ -73,7 +73,7 @@ let proxyTable = {
   // 所有数据的请求域名地址r
   '/api/v1': {
     target: 'http://172.16.33.166:80',
-    //target: 'http://localhost:8080',
+    // target: 'http://localhost:8080',
     // target: 'http://192.168.1.104:8080',
     ws: true,
     pathRewrite: {

+ 12 - 12
src/config/include.js

@@ -1,20 +1,20 @@
 /* eslint-disable */
 /**************************************************************** 通用引入,包含element-ui等 ***********************************************************************************/
-import Vue from 'vue';
-import ElementUI from 'element-ui';
-import 'element-ui/lib/theme-chalk/index.css'; // 2.4.2
+import Vue from 'vue'
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css' // 2.4.2
 
 /**************************************************************** 引入babel-polyfill转换es6 ***********************************************************************************/
-import 'babel-polyfill';
+import 'babel-polyfill'
 
 /**************************************************************** import 全局filter         ***********************************************************************************/
-import '@/utils/filter.js';
+import '@/utils/filter.js'
 
 /**************************************************************** import 全局方法           ***********************************************************************************/
-import '@/utils/method.js';
+import '@/utils/method.js'
 
 /**************************************************************** import 公共方法           ***********************************************************************************/
-import '@/utils/commonFunction.js';
+import '@/utils/commonFunction.js'
 
 /**************************************************************** 引入外部插件              ***********************************************************************************/
 import VueClipboard from 'vue-clipboard2'
@@ -23,14 +23,14 @@ import jsPlumb from 'jsplumb'
 
 import icorePlugin from 'icore-sdk/icore/index.js' // icore-sdk
 
-window.jsPlumb = jsPlumb.jsPlumb;
+window.jsPlumb = jsPlumb.jsPlumb
 
 Vue.use(VueClipboard)
 
 // use element-ui 2.4.2
-Vue.use(ElementUI);
-Vue.use(icorePlugin);
+Vue.use(ElementUI)
+//console.log('----------------------fffff')
+Vue.use(icorePlugin)
 
 /**************************************************************** 引入项目公用样式 简直覆盖Element-ui css ***********************************************************************/
-import '@/assets/css/index.css';
-
+import '@/assets/css/index.css'

+ 57 - 53
src/views/TMS/components/importedShip/addUnloadShip.vue

@@ -18,135 +18,139 @@
       </div>
     </div>
     <div class="button_box">
-      <el-button type="primary" :loading="isLoading" @click="makeSure">新增卸船作业</el-button>
+      <el-button type="primary" :loading="isLoading" @click="makeSure"
+        >新增卸船作业</el-button
+      >
     </div>
   </div>
 </template>
 
 <script>
-import PageTitle from "@/components/Page/Title";
-import { sjTime } from "@/utils/sharedJsFile";
+import PageTitle from '@/components/Page/Title'
+import { sjTime } from '@/utils/sharedJsFile'
+import { getCookie } from '@/utils/util.js'
 export default {
   components: { PageTitle },
   data() {
     return {
-      input: "",
-      isLoading:false,
+      input: '',
+      isLoading: false,
       restaurants: [],
-      state: "",
+      state: '',
       form: {},
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
+        requestUrl: '/api/v1/tms/getCapacityList?apiId=138',
         // 控制显示当选列
-        selectionType: "radio"
+        selectionType: 'radio'
       },
       unloadMap: {}
-    };
+    }
   },
   computed: {
     a1() {
-      return this.form.resultEndTime;
+      return this.form.resultEndTime
     }
   },
   watch: {
     a1() {
-      this.unloadShipMes();
+      this.unloadShipMes()
     }
   },
   methods: {
     unloadShipMes() {
       if (
-        typeof this.form.resultStartTime == "undefined" ||
+        typeof this.form.resultStartTime == 'undefined' ||
         this.form.resultStartTime == null ||
-        this.form.resultStartTime == "null" ||
-        this.form.resultStartTime == "undefined"
+        this.form.resultStartTime == 'null' ||
+        this.form.resultStartTime == 'undefined'
       ) {
-        this.$message.warning("请先填写卸船开始时间!");
-        this.form.resultEndTime = null;
+        this.$message.warning('请先填写卸船开始时间!')
+        this.form.resultEndTime = null
       }
-      return;
+      return
     },
     currentRadioChange(row) {
-      this.unloadMap = {};
-      this.unloadMap = row;
-      console.log(row);
+      this.unloadMap = {}
+      this.unloadMap = row
+      console.log(row)
     },
     onclick() {
       this.option.requestUrl =
-        "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
+        '/api/v1/tms/getCapacityList?apiId=138&con=' + this.input
     },
     // 新增
     makeSure() {
-      this.isLoading=true;
-      console.log(this.unloadMap);
+      this.isLoading = true
+      console.log(this.unloadMap)
       if (JSON.stringify(this.unloadMap).length == 2) {
-        this.$message.error("请先选择卸船的船只!");
-        this.isLoading=false;
-        return;
+        this.$message.error('请先选择卸船的船只!')
+        this.isLoading = false
+        return
       }
       if (
         this.form.resultEndTime != null &&
-        this.form.resultEndTime != "undefined" &&
-        typeof this.form.resultEndTime != "undefined" &&
-        this.form.resultEndTime != "null"
+        this.form.resultEndTime != 'undefined' &&
+        typeof this.form.resultEndTime != 'undefined' &&
+        this.form.resultEndTime != 'null'
       ) {
-        this.unloadShipMes();
+        this.unloadShipMes()
       }
-      let resultArrivalDate = null;
-      let resultStartTime = null;
-      let resultEndTime = null;
+      let resultArrivalDate = null
+      let resultStartTime = null
+      let resultEndTime = null
       if (
-        typeof this.form.resultArrivalDate != "undefined" &&
+        typeof this.form.resultArrivalDate != 'undefined' &&
         this.form.resultArrivalDate != null
       ) {
-        resultArrivalDate = sjTime(this.form.resultArrivalDate);
+        resultArrivalDate = sjTime(this.form.resultArrivalDate)
       }
       if (
-        typeof this.form.resultStartTime != "undefined" &&
+        typeof this.form.resultStartTime != 'undefined' &&
         this.form.resultStartTime != null
       ) {
-        resultStartTime = sjTime(this.form.resultStartTime);
+        resultStartTime = sjTime(this.form.resultStartTime)
       }
       if (
-        typeof this.form.resultEndTime != "undefined" &&
+        typeof this.form.resultEndTime != 'undefined' &&
         this.form.resultEndTime != null
       ) {
-        resultEndTime = sjTime(this.form.resultEndTime);
+        resultEndTime = sjTime(this.form.resultEndTime)
       }
       let mapVal = {
         resultArrivalDate: resultArrivalDate,
         resultStartTime: resultStartTime,
         resultEndTime: resultEndTime,
         resultStatus: this.form.resultStatus
-      };
+      }
       this.axios
-        .post("/api/v1/tms/addUnLoadShip", {
+        .post('/api/v1/tms/addUnLoadShip', {
           mapVal: mapVal,
-          unloadMap: this.unloadMap
+          unloadMap: this.unloadMap,
+          userId: getCookie('userId')
         })
         .then(res => {
           if (res.data.code == 200) {
             this.$message({
-              type: "success",
-              message: "新增成功!"
-            });
+              type: 'success',
+              message: '新增成功!'
+            })
             // this.$refs.table.refreshData();
-            this.$router.go(-1);
+            this.$router.go(-1)
           } else {
-            this.$message.error("新增失败!");
+            this.$message.error('新增失败!')
           }
-          this.isLoading=false;
-        });
+          this.isLoading = false
+        })
     },
     loadAll() {
-      return [];
+      return []
     },
     handleSelect(item) {
-      console.log(item);
+      console.log(item)
     }
   }
-};
+}
 </script>
 <style lang="scss">
 .shipTransport {
@@ -186,7 +190,7 @@ export default {
   }
   .button_box {
     margin-left: 45%;
-    width:160px;
+    width: 160px;
   }
 }
 </style>

+ 167 - 58
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -184,13 +184,13 @@
         <el-tab-pane label="两拼车辆排队链表" name="fourth">
           <el-table
             :data="tableData2"
-            :span-method="objectSpanMethod"
+            :span-method="objectSpanMethod1"
             border
             style="width: 100%; margin-top: 20px"
-            @selection-change="handleSelectionChange"
+            @selection-change="handleSelectionChangeSpelling"
             :row-key="getRowKey"
             max-height="500px"
-            ref="spellData"
+            ref="twoSpellData"
           >
             <el-table-column
               type="selection"
@@ -263,7 +263,7 @@
             :span-method="objectSpanMethod"
             border
             style="width: 100%; margin-top: 20px"
-            @selection-change="handleSelectionChange"
+            @selection-change="handleSelectionChangeSpelling"
             :row-key="getRowKey"
             max-height="500px"
             ref="spellData"
@@ -373,10 +373,11 @@ export default {
       activeName: 'first',
       tableData: [],
       tableData1: [],
-      tableData2:[],
+      tableData2: [],
       tableData3: [],
       //存放每一行记录的合并数
       spanArr: [],
+      spanArr1: [],
       maplist: [],
       id: null,
       option: [],
@@ -443,9 +444,10 @@ export default {
           })
           this.getNoSpellingArray()
           this.getSpellingArray()
+          this.getSpellingArrayTwo()
         } else {
           this.$message({
-            message: '撤失败',
+            message: '撤失败',
             type: 'error',
             duration: 2000,
             center: true,
@@ -470,12 +472,15 @@ export default {
     refresh() {
       this.getSpellingArray()
       this.getNoSpellingArray()
+      this.getSpellingArrayTwo()
       this.getSteelOrderNum()
       this.getStoreArray()
       this.redDotNum = null
       this.totalQueueNum = null
       this.totalQueueNumFirst = null
       this.isQueryCapacity = null
+      this.maplist = []
+      this.filterArr1 = []
       this.i = 0
       clearInterval(this.timer)
       this.start()
@@ -498,7 +503,11 @@ export default {
       } else {
         if (
           this.maplist.some(e => {
-            return e.ROW_ID == row.ROW_ID || e.ROW_ID + 1 == row.ROW_ID
+            return (
+              e.ROW_ID == row.ROW_ID ||
+              e.ROW_ID + 1 == row.ROW_ID ||
+              typeof row.ROW_ID == 'undefined'
+            )
           })
         ) {
           return true
@@ -509,7 +518,7 @@ export default {
     },
     selectInitSplleing(row) {
       if (this.maplist.length == 0) {
-        if (row.ROW_ID == 1) {
+        if (row.group + 1 == 1) {
           return true
         } else {
           return false
@@ -517,7 +526,7 @@ export default {
       } else {
         if (
           this.maplist.some(e => {
-            return e.ROW_ID == row.ROW_ID || e.ROW_ID + 1 == row.ROW_ID
+            return e.group == row.group || e.group + 1 == row.group
           })
         ) {
           return true
@@ -569,19 +578,19 @@ export default {
           .then(res => {
             this.tableData1 = res.data.data
           })
-      } else if(this.activeName ==second){
+      } else if (this.activeName == second) {
         this.axios
           .post('/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1', map)
           .then(res => {
             this.tableData = res.data.data
             this.getSpanArr(this.tableData)
           })
-      }else if (this.activeName == fourth){
+      } else if (this.activeName == fourth) {
         this.axios
           .post('/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2', map)
           .then(res => {
             this.tableData2 = res.data.data
-            this.getSpanArr(this.tableData2)
+            this.getSpanArr1(this.tableData2)
           })
       }
       this.table1 = false
@@ -601,19 +610,39 @@ export default {
           this.spanArr.push(1)
           this.pos = 0
           data[i].group = i
-          data[i].ROW_ID = i + 1
         } else {
           // 判断当前元素与上一个元素是否相同
           if (data[i].resultTotalId === data[i - 1].resultTotalId) {
             this.spanArr[this.pos] += 1
             this.spanArr.push(0)
             data[i].group = data[i - 1].group
-            data[i].ROW_ID = data[i - 1].ROW_ID
           } else {
             this.spanArr.push(1)
             this.pos = i
             data[i].group = data[i - 1].group + 1
-            data[i].ROW_ID = data[i - 1].ROW_ID + 1
+          }
+        }
+      }
+    },
+    //记录每一行的合并数
+    getSpanArr1(data) {
+      //每次调用方法初始化
+      this.spanArr1 = []
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr1.push(1)
+          this.pos = 0
+          data[i].group = i
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].resultTotalId === data[i - 1].resultTotalId) {
+            this.spanArr1[this.pos] += 1
+            this.spanArr1.push(0)
+            data[i].group = data[i - 1].group
+          } else {
+            this.spanArr1.push(1)
+            this.pos = i
+            data[i].group = data[i - 1].group + 1
           }
         }
       }
@@ -640,6 +669,28 @@ export default {
         }
       }
     },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4 ||
+        columnIndex === 10 ||
+        columnIndex === 11 ||
+        columnIndex === 12 ||
+        columnIndex === 13 ||
+        columnIndex === 14 ||
+        columnIndex === 15
+      ) {
+        const _row = this.spanArr1[rowIndex]
+        const _col = _row > 0 ? 1 : 0
+        return {
+          rowspan: _row,
+          colspan: _col
+        }
+      }
+    },
     handleClick() {
       this.redDotNum = null
       this.totalQueueNum = null
@@ -649,7 +700,7 @@ export default {
         this.getNoSpellingArray()
       } else if (this.activeName == 'second') {
         this.getSpellingArray()
-      }else if (this.activeName == 'fourth'){
+      } else if (this.activeName == 'fourth') {
         this.getSpellingArrayTwo()
       } else {
         this.getStoreArray()
@@ -681,13 +732,13 @@ export default {
       this.axios
         .post(
           '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
-          new Date()
+            new Date()
         )
         .then(res => {
           this.tableData2 = res.data.data
           this.isQueryCapacity = null
           console.log(this.tableData2)
-          this.getSpanArr(this.tableData2)
+          this.getSpanArr1(this.tableData2)
         })
     },
     getStoreArray() {
@@ -710,7 +761,7 @@ export default {
             this.tableData1 = res.data.data
           })
         console.log('wzxxx')
-      } else if (this.activeName == second){
+      } else if (this.activeName == second) {
         this.axios
           .post(
             '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=' +
@@ -723,24 +774,25 @@ export default {
             this.tableData = res.data.data
             this.getSpanArr(this.tableData)
           })
-      }else if (this.activeName ==fourth){
+      } else if (this.activeName == fourth) {
         this.axios
           .post(
             '/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=2&i=' +
-            new Date() +
-            '&capacityNumber=' +
-            this.capacityNo
+              new Date() +
+              '&capacityNumber=' +
+              this.capacityNo
           )
           .then(res => {
             this.isQueryCapacity = 1
             this.tableData2 = res.data.data
-            this.getSpanArr(this.tableData2)
+            this.getSpanArr1(this.tableData2)
           })
       }
     },
     handleSelectionChange(selection) {
       this.maplist = []
       this.maplist = selection
+      console.log(selection)
       for (let i = 0; i < this.maplist.length; i++) {
         if (i + 1 < this.maplist.length) {
           if (this.maplist[i].ROW_ID + 1 != this.maplist[i + 1].ROW_ID) {
@@ -756,7 +808,28 @@ export default {
         })
       ) {
         this.$refs.mutiData.clearSelection()
+      }
+    },
+    handleSelectionChangeSpelling(selection) {
+      this.maplist = []
+      this.maplist = selection
+      console.log(selection)
+      for (let i = 0; i < this.maplist.length; i++) {
+        if (i + 1 < this.maplist.length) {
+          if (this.maplist[i].group + 1 != this.maplist[i + 1].group) {
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+          }
+        }
+      }
+      // 限制只取第一个去掉
+      if (
+        !this.maplist.some(e => {
+          return e.group == 0
+        })
+      ) {
         this.$refs.spellData.clearSelection()
+        this.$refs.twoSpellData.clearSelection()
       }
     },
     updateBill(scope) {
@@ -767,9 +840,20 @@ export default {
     },
     filterArr(resultId) {
       console.log('fdhjsaj')
-      this.filterArr1 = this.filterArr1.concat(
-        this.tableData.filter(ele => ele.resultId == resultId)
-      )
+      this.filterArr1 = []
+      if (this.activeName == 'first') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData1.filter(ele => ele.resultId == resultId)
+        )
+      } else if (this.activeName == 'second') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData.filter(ele => ele.resultId == resultId)
+        )
+      } else if (this.activeName == 'fourth') {
+        this.filterArr1 = this.filterArr1.concat(
+          this.tableData2.filter(ele => ele.resultId == resultId)
+        )
+      }
     },
     allow() {
       if (this.maplist.length == 0) {
@@ -814,6 +898,7 @@ export default {
         }
         this.filterArr(this.maplist[i].resultId)
       }
+      console.log(this.filterArr1, 'this.fil')
       var filterArr2 = []
       this.filterArr1.forEach(e => {
         if (filterArr2.indexOf(e) === -1) {
@@ -828,50 +913,74 @@ export default {
       if (this.activeName == 'first') {
         map.mapList = this.maplist
       }
-      console.log("勾选的数据")
+      console.log('勾选的数据')
       console.log(map)
-      this.axios.post('/api/v1/qms/allowEnFactory', map).then(res => {
-        if (res.data.code == '200') {
-          this.$message({
-            message: '放行成功,等待进厂',
-            type: 'success',
-            duration: 2000,
-            center: true,
-            offset: 100
-          })
+      this.axios
+        .post('/api/v1/qms/allowEnFactory', map)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message({
+              message: '放行成功,等待进厂',
+              type: 'success',
+              duration: 2000,
+              center: true,
+              offset: 100
+            })
+            this.maplist = []
+            this.$refs.mutiData.clearSelection()
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+            this.getNoSpellingArray()
+            this.getSpellingArray()
+            this.getSpellingArrayTwo()
+            this.getStoreArray()
+            this.redDotNum = null
+            this.totalQueueNum = null
+            this.totalQueueNumFirst = null
+            this.i = 0
+            clearInterval(this.timer)
+            this.start()
+          } else {
+            this.$message({
+              message: '请按顺序勾选',
+              type: 'error',
+              duration: 2000,
+              center: true,
+              offset: 100
+            })
+            this.maplist = []
+            this.$refs.mutiData.clearSelection()
+            this.$refs.spellData.clearSelection()
+            this.$refs.twoSpellData.clearSelection()
+            this.getNoSpellingArray()
+            this.getSpellingArray()
+            this.getStoreArray()
+            this.getSpellingArrayTwo()
+            this.redDotNum = null
+            this.totalQueueNum = null
+            this.totalQueueNumFirst = null
+            this.i = 0
+            clearInterval(this.timer)
+            this.start()
+          }
+        })
+        .catch(e => {
+          console.log(e)
           this.maplist = []
           this.$refs.mutiData.clearSelection()
           this.$refs.spellData.clearSelection()
+          this.$refs.twoSpellData.clearSelection()
           this.getNoSpellingArray()
           this.getSpellingArray()
           this.getStoreArray()
+          this.getSpellingArrayTwo()
           this.redDotNum = null
           this.totalQueueNum = null
           this.totalQueueNumFirst = null
           this.i = 0
           clearInterval(this.timer)
           this.start()
-        } else {
-          this.$message({
-            message: '请按顺序勾选',
-            type: 'error',
-            duration: 2000,
-            center: true,
-            offset: 100
-          })
-          this.maplist = []
-          this.$refs.mutiData.clearSelection()
-          this.getNoSpellingArray()
-          this.getSpellingArray()
-          this.getStoreArray()
-          this.redDotNum = null
-          this.totalQueueNum = null
-          this.totalQueueNumFirst = null
-          this.i = 0
-          clearInterval(this.timer)
-          this.start()
-        }
-      })
+        })
     },
     changePriority(row) {
       console.log('装货点:' + row.id)

+ 8 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -91,7 +91,10 @@
           <!-- <el-button type="primary" @click="batchoperation()"
             ><i class="el-icon-edit"></i>批量更改</el-button
           > -->
-          <el-button type="primary" @click="checkPoint()"
+          <el-button
+            type="primary"
+            @click="checkPoint()"
+            v-if="!notRoutList.includes('checkPoint')"
             ><i class="el-icon-map-location"></i>实时路径</el-button
           >
         </el-form-item>
@@ -125,6 +128,10 @@
         @row-click="rowClick"
         :cell-style="cellStyle"
         @filter-change="filterChange"
+        :key="saleSteelKey"
+        id="salesLogisticsStat_saleSteelReports_table"
+        individual-panel
+        @resetTable="reset"
       >
         <el-table-column
           width="50"