Quellcode durchsuchen

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

zyf vor 2 Jahren
Ursprung
Commit
c538463340

+ 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","RMS","appoint","sale","statisticalReport","queue","QMS","inward"];
+// let devModules = ['index', 'statisticalReport', 'appoint']
 let devModules = ['all']
 //let devModules=['index']
 if (pathSrc.indexOf('node_modules') > -1) {

+ 2 - 2
config/index.js

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

+ 31 - 1
src/views/WMS/components/port_deposit/unloadPortStock.vue

@@ -15,6 +15,13 @@
       </el-button>
     </div>
     <mergeRowTable v-bind.sync="option">
+      <el-table-column fixed="right" label="操作" width="60">
+          <template slot-scope="scope">
+              <el-button @click="detailclick3(scope.row)" type="text" size="small">
+                手动清场
+              </el-button>
+          </template>
+    </el-table-column>
     </mergeRowTable>
   </div>
 </template>
@@ -41,11 +48,34 @@ export default {
       console.log(item);
     },
     onclick() {
-      console.log(1);
+      this.option.requestUrl="/api/v1/wmsh/getUnloadPortStockList?apiId=497&i="+new Date();
     },
     btnclick(pathId) {
       this.$router.push("/path/addHomeworkPath/" + pathId);
     },
+     detailclick3(row){
+      console.log("row",row);
+       this.$confirm('确认清场?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+         this.axios.post("/api/v1/wmsh/clearWmshGridMaterial", row).then(res => {
+          console.log("res", res);
+          if(res.data.succeed){
+            this.$message.success("清场成功!");
+            this.onclick();
+          }else{
+            this.$message.error("清场失败!");
+          }
+        });
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '取消操作'
+          });          
+        });
+    },
   },
 };
 </script>

+ 38 - 40
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -50,14 +50,14 @@
           >
             <i class="upload2"></i>批量上传
           </el-button>
-           <el-button
+          <el-button
             type="primary"
             @click="batchDeleteFirst"
             v-if="activeName == 'first'"
           >
             <i class="upload2"></i>批量删除
           </el-button>
-           <el-button
+          <el-button
             type="primary"
             @click="batchDeleteSecond"
             v-if="activeName == 'second'"
@@ -359,7 +359,7 @@ export default {
       matSum1: null,
       matSum2: null,
       tableData: [],
-      secondList:[],
+      secondList: [],
       saleDateOfReceipt: null,
       //销售订单主表数据
       saleOrderList: [
@@ -819,10 +819,10 @@ export default {
         .post('/api/v1/ams/addSteelSaleOrderList', saleOrderListMap)
         .then(res => {
           if (res.data.code == '200') {
-            loading.close()
             this.getRequestUrl()
-            this.$message.success('新增销售订单成功!')
             this.tableData = []
+            loading.close()
+            this.$message.success('新增销售订单成功!')
           } else {
             this.$message.error(res.data.data)
             this.getRequestUrl()
@@ -1093,8 +1093,8 @@ export default {
         .then(res => {
           if (res.data.code == '200') {
             this.$message.success('上传成功')
-            loading.close()
             this.getRequestUrl()
+            loading.close()
           } else {
             this.$message.error('上传失败')
             loading.close()
@@ -1109,13 +1109,13 @@ export default {
       console.log(selection)
       this.batchReportList = []
       this.batchReportList = selection
-      console.log("firstList:",this.batchReportList)
+      console.log('firstList:', this.batchReportList)
     },
-    selectionChange2(selection){
+    selectionChange2(selection) {
       console.log(selection)
       this.secondList = []
       this.secondList = selection
-      console.log("secondList:",this.secondList)
+      console.log('secondList:', this.secondList)
     },
     refresh() {
       this.getRequestUrl()
@@ -1301,9 +1301,9 @@ export default {
         center: true
       })
         .then(() => {
-         let rows=[];
-         rows.push(scope);
-         this.batchDelete(rows);
+          let rows = []
+          rows.push(scope)
+          this.batchDelete(rows)
         })
         .catch(() => {
           this.$message({
@@ -1312,12 +1312,12 @@ export default {
           })
         })
     },
-    batchDeleteFirst(){
-      let rows=this.batchReportList;
-      console.log("rows:",rows);
-      if(!rows || rows.length<=0){
-        this.$message.warning("请选中订单!");
-        return;
+    batchDeleteFirst() {
+      let rows = this.batchReportList
+      console.log('rows:', rows)
+      if (!rows || rows.length <= 0) {
+        this.$message.warning('请选中订单!')
+        return
       }
       this.$confirm('是否删除', '提示', {
         confirmButtonText: '确定',
@@ -1326,7 +1326,7 @@ export default {
         center: true
       })
         .then(() => {
-         this.batchDelete(rows);
+          this.batchDelete(rows)
         })
         .catch(() => {
           this.$message({
@@ -1335,12 +1335,12 @@ export default {
           })
         })
     },
-    batchDeleteSecond(){
-      let rows=this.secondList;
-      console.log("rows:",rows);
-      if(!rows || rows.length<=0){
-        this.$message.warning("请选中订单!");
-        return;
+    batchDeleteSecond() {
+      let rows = this.secondList
+      console.log('rows:', rows)
+      if (!rows || rows.length <= 0) {
+        this.$message.warning('请选中订单!')
+        return
       }
       this.$confirm('是否删除', '提示', {
         confirmButtonText: '确定',
@@ -1349,7 +1349,7 @@ export default {
         center: true
       })
         .then(() => {
-         this.batchDelete(rows);
+          this.batchDelete(rows)
         })
         .catch(() => {
           this.$message({
@@ -1358,20 +1358,18 @@ export default {
           })
         })
     },
-    batchDelete(rows){
-       this.axios
-            .post(
-              '/api/v1/ams/deleteAmsSaleOrderBySaleOrderId',rows
-            )
-            .then(res => {
-              if (res.data.code == '200') {
-                this.$message.success('删除成功')
-                this.getRequestUrl()
-              } else {
-                this.$message.success('删除失败')
-                this.getRequestUrl()
-              }
-            })
+    batchDelete(rows) {
+      this.axios
+        .post('/api/v1/ams/deleteAmsSaleOrderBySaleOrderId', rows)
+        .then(res => {
+          if (res.data.code == '200') {
+            this.$message.success('删除成功')
+            this.getRequestUrl()
+          } else {
+            this.$message.success('删除失败')
+            this.getRequestUrl()
+          }
+        })
     }
   }
 }

+ 3 - 3
src/views/index/components/login.vue

@@ -227,9 +227,9 @@ export default {
                 })
               }
               this.loginBtnLoading = false
-              // setTimeout(() => {
-              //   this.$router.go(0);
-              // }, 2000);
+              setTimeout(() => {
+                this.$router.go(0)
+              }, 50)
             })
             .catch(() => {
               this.loginBtnLoading = false

+ 31 - 1
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -56,7 +56,7 @@ export default {
         },
         {
           prop: "tonnage1",
-          label: "二船吨位"
+          label: "二船吨位"
         },
         {
           label: "未到闸船舶",
@@ -197,6 +197,10 @@ export default {
         Object.keys(table_book.Sheets.Sheet1).forEach((key) => {
           if (key.indexOf('!') < 0) {
             table_book.Sheets.Sheet1[key].s = {
+              font:{
+                name:"宋体",
+                sz:10
+              },
               alignment: {//对齐方式
                 horizontal: 'center',//水平居中
                 vertical: 'center',//竖直居中
@@ -211,6 +215,7 @@ export default {
             }
           }
        })
+       this.addRangeBorder(table_book.Sheets.Sheet1['!merges'],table_book.Sheets.Sheet1);
        console.log("sheet:",table_book.Sheets.Sheet1);
         //导出
         let table_write = XLSXStyle.write(table_book, {
@@ -227,6 +232,31 @@ export default {
         }
         return table_write;
     },
+    addRangeBorder (range, ws) {
+      let cols = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
+      range.forEach(item => {
+        console.log(item)
+        let style = {
+          s: {
+            border: {
+              top: { style: 'thin' },
+              left: { style: 'thin' },
+              bottom: { style: 'thin' },
+              right: { style: 'thin' }
+            }
+          }
+        }
+        // 处理合并行
+        for (let i = item.s.c; i <= item.e.c; i++) {
+          ws[`${cols[i]}${Number(item.e.r) + 1}`] = ws[`${cols[i]}${Number(item.e.r) + 1}`] || style
+          // 处理合并列
+          for (let k = item.s.r + 2; k <= item.e.r + 1; k++) {
+            ws[cols[i] + k] = ws[cols[k] + item.e.r] || style
+          }
+        }
+      })
+      return ws;
+    },
     appendOne(Sheet,row){
       //从后面新增1行,并行合并
         let seArr=Sheet['!fullref'].split(":");

+ 43 - 14
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -107,10 +107,11 @@
           >
         </el-form-item>
         <el-form-item>
-          <span style="margin-left: 1rem;font-size:16px">车数/件数:</span>
-          <span style="font-size:16px"
-            >{{ totalCapacity }}/{{ totalNumber }}</span
-          >
+          <label
+            class="el-form-item__label"
+            style="width: auto;font-size: 16px;line-height: auto;"
+            >车数/件数: {{ totalCapacity }}/{{ totalNumber }}
+          </label>
         </el-form-item>
       </el-form>
     </div>
@@ -125,8 +126,8 @@
         :height="maxHeight"
         :row-class-name="tableRowClassName"
         @cell-click="cellClik"
-        @cell-mouse-enter="cellMouse"
-        @cell-mouse-leave="cellLeave"
+        @cell-mouse-enter="cellMouse1"
+        @cell-mouse-leave="cellLeave1"
         @row-click="rowClick"
         :cell-style="cellStyle"
         @filter-change="filterChange"
@@ -637,7 +638,7 @@
             </div>
           </div>
         </div>
-        <div class="table">
+        <div class="table1">
           <el-table
             :data="steelMap.mapList"
             border
@@ -1229,6 +1230,12 @@ export default {
     this.updateTruckCarrierDebounce = this.debounce(() => {
       this.updateTruckCarrier()
     }, 3000)
+    this.cellMouse1 = this.debounce((row, column, cell) => {
+      this.cellMouse(row, column, cell)
+    }, 100)
+    this.cellLeave1 = this.debounce((row, column, cell) => {
+      this.cellLeave(row, column, cell)
+    }, 100)
     this.getSteelReport()
   },
   watch: {
@@ -1283,7 +1290,7 @@ export default {
       this.scrollTop = e.target.scrollTop
       setTimeout(() => {
         this.debounceS = false
-      }, 50)
+      }, 100)
     })
   },
   activated() {
@@ -1671,6 +1678,7 @@ export default {
       }
     },
     cellMouse(row, column, cell, event) {
+      console.log(row)
       if (this.isRowClick == 0) {
         this.tableRowIndex = row.group
       }
@@ -2409,10 +2417,6 @@ export default {
             data[i].group = data[i - 1].group + 1
           }
         }
-        this.totalCapacity = data[data.length - 1].group + 1
-        this.totalNumber = data.reduce(function(prev, item) {
-          return prev + item.materialNum
-        }, 0)
       }
     },
     objectSpanMethod({ row, column, rowIndex, columnIndex }) {
@@ -2425,6 +2429,18 @@ export default {
         }
       }
     },
+    //计算总件数和总车数
+    getTotalNum(data) {
+      //通过车序号的个数来计算车数
+      let arr = []
+      arr = data.map(e => {
+        return e.saleOrderMaterialId
+      })
+      this.totalCapacity = Array.from(new Set(arr)).length
+      this.totalNumber = data.reduce(function(prev, item) {
+        return prev + item.materialNum
+      }, 0)
+    },
     //减少物资件数
     updateBillOrder(row) {
       const loading = this.$loading({
@@ -2600,6 +2616,7 @@ export default {
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
           this.getSpanArr(this.visibleList)
+          this.getTotalNum(this.tableData)
           loading.close()
         })
     },
@@ -2688,6 +2705,7 @@ export default {
             Math.floor(this.maxHeight / this.itemHeight) + 1
           )
           this.getSpanArr(this.visibleList)
+          this.getTotalNum(this.tableData)
           loading.close()
         })
         .catch(() => {
@@ -2710,6 +2728,10 @@ export default {
     .el-tooltip {
       width: auto !important;
     }
+    /deep/ .el-table__body {
+      overflow-y: auto;
+      position: absolute !important;
+    }
     ::-webkit-scrollbar {
       // width: 20px;
       height: 20px;
@@ -2814,6 +2836,13 @@ export default {
         }
       }
     }
+    .table1 {
+      margin-left: 20px;
+      margin-top: 20px;
+      .el-tooltip {
+        width: auto !important;
+      }
+    }
   }
   .address {
     .button-box {
@@ -2824,11 +2853,11 @@ export default {
   }
 }
 </style>
-<style lang="scss">
+<!-- <style lang="scss">
 .el-table__body-wrapper {
   overflow-y: auto;
   .el-table__body {
     position: absolute;
   }
 }
-</style>
+</style> -->

+ 76 - 3
src/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue

@@ -58,6 +58,20 @@
             >重新生成计划</el-button
           >
         </el-form-item>
+        <el-form-item>
+          <el-upload
+            class="upload-excel"
+            action=""
+            :on-change="exportEasEntry"
+            :show-file-list="false"
+            accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
+            :auto-upload="false"
+          >
+            <el-button type="primary" icon="el-icon-upload"
+              >导入金蝶分录查询</el-button
+            >
+          </el-upload>
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="refresh">
             <i class="el-icon-refresh"></i>
@@ -461,7 +475,8 @@ export default {
       ],
       saleDateOfReceipt: null,
       remarkDateNew: null,
-      remarkDateOld: null
+      remarkDateOld: null,
+      entryIdList: []
     }
   },
   created() {
@@ -482,10 +497,18 @@ export default {
     this.remarkDateOld = this.getRemarkDateOld()
     this.addSaleOrder1 = this.debounce(() => {
       this.addSaleOrder()
-    }, 3000)
+    }, 2000)
     this.getSteelReport()
   },
-  watch: {},
+  watch: {
+    tableData: {
+      handler(oldVal, newVal) {
+        this.filterListChange()
+      },
+      deep: true,
+      immediate: true
+    }
+  },
   computed: {},
   mounted() {
     this.$nextTick(() => {
@@ -513,6 +536,7 @@ export default {
         }, delay)
       }
     },
+    handleSelectionChange() {},
     //记录每一行的合并数
     getSpanArr(data) {
       //每次调用方法初始化
@@ -550,6 +574,55 @@ export default {
         }
       }
     },
+    exportEasEntry(file) {
+      let that = this
+      that.entryIdList = []
+      if (!file) {
+        that.$message({
+          message: '文件错误!',
+          type: 'warning'
+        })
+        return
+      }
+      this.entryIdList = []
+      var reader = new FileReader()
+      var data = null
+      var workbook = null
+      //设置读取操作
+      reader.onload = function(e) {
+        data = e.target.result
+        workbook = XLSX.read(data, {
+          type: 'binary'
+        })
+        let rows = XLSX.utils.sheet_to_json(
+          workbook.Sheets[workbook.SheetNames[0]]
+        ) //只取第一页
+        let arr = []
+        Array.from(rows).forEach(e => {
+          let map = {}
+          Object.keys(e).forEach(e1 => {
+            if (e1.includes('金蝶分录ID')) {
+              map.entryId = e[e1]
+              arr.push(map)
+            }
+          })
+        })
+        that.entryIdList = Array.from(
+          new Set(
+            arr.map(e => {
+              return e.entryId
+            })
+          )
+        )
+        console.log(that.entryIdList)
+        if (that.entryIdList.length > 0) {
+          let obj = {}
+          obj.entryIdList = that.entryIdList
+          that.onclick(obj)
+        }
+      }
+      reader.readAsBinaryString(file.raw) //以二进制方式读取
+    },
     addSaleOrder() {
       this.$confirm(
         `确定将所选${this.$refs.tableRef.selection.length}条分录重新上传金蝶?`,

Datei-Diff unterdrückt, da er zu groß ist
+ 473 - 440
src/views/statisticalReport/components/tableItem.vue


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.