瀏覽代碼

批量派车/改车;打印次数重置

liyg 2 年之前
父節點
當前提交
1a01991683

+ 1 - 1
src/views/statisticalReport/components/inwardReport/putInwardReport.vue

@@ -128,7 +128,7 @@ export default {
         purchaseOrder: this.purchaseOrder
       }
       console.log(map);
-      this.axios.post('/api/v1/bp/updateOrderStatus',map).then((res)=>{
+      this.axios.post('/api/v1/bp/insertToUploadEas',map).then((res)=>{
           this.$message.success(res.data.data);
       });
     },

+ 20 - 20
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -832,6 +832,7 @@
                 >反关闭运单</el-button
               >
             </div>
+            <el-button  round @click="resetPrintNumber">重置打印次数</el-button>
           </div>
           <div class="steelMapClass3">
             <div class="steelMapClass32">
@@ -2094,6 +2095,15 @@ export default {
   },
   computed: {},
   methods: {
+    resetPrintNumber(){
+      this.axios.post('/api/v1/bp/resetPrintNumber',this.steelMap).then((res)=>{
+        if(res.data.status=='succeed'){
+          this.$message.success("重置成功!");
+        }else{
+          this.$message.error("重置失败!");
+        }
+      });
+    },
     showBatchCapacity() {
       this.capacityNo = null
       this.capacityId = null
@@ -2137,8 +2147,7 @@ export default {
           return
         }
         console.log('this.batchCapacityList', this.batchCapacityList)
-        // this.batchCapacityList.forEach(row => {})
-        for (let i = 0; i < this.batchCapacityList.length; i++) {
+         this.batchCapacityList.forEach(row => {
           row.capacityId = this.capacityId
           row.capacityNumber = this.capacityNo
           //是否校验GPS
@@ -2148,31 +2157,22 @@ export default {
             this.$message.error('请先授权承运商!')
             return
           }
-          if (row.capacityIds != 0) {
-            await this.axios
-              .post('/api/v1/ams/updateCapacityNumberInFactory', row)
-              .then(res => {
-                if (res.data.code == 200) {
-                  console.log(res.data)
-                } else {
-                  this.$message.error(res.data.data)
-                }
-              })
-          } else {
+          if (row.capacityIds == 0) {
             row.lineId = this.lineSpelling[row.size]
-            let arr = []
-            arr.push(row)
-            await this.axios
-              .post('/api/v1/ams/dispatchSteelOrder', arr)
+          }
+         })
+         let map={
+          list:this.batchCapacityList
+         }
+        await this.axios
+              .post('/api/v1/ams/batchUpdateCapacity',map )
               .then(res => {
                 if (res.data.code == '200') {
                   this.$message.success('派车成功!')
                 } else {
                   this.$message.error(res.data.data)
                 }
-              })
-          }
-        }
+        })
         this.batchCarrierVisible = false
         this.getSteelReport()
       } else {