gjy il y a 2 ans
Parent
commit
5174604090

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -157,3 +157,5 @@ export const API_SPONSOR_WITHDRAW ='/newWorkflow/api/stopInstance'
 export const API_EXPORT_ORDER ='/warehousingOrder/exportWarehousingOrder'
 // 烘干入库获取
 export const API_GET_DRYLIST='/dryWarehouse/getInfo'
+// 计算折干后重量
+export const API_GET_DRYWEIGHT='/warehousingOrder/dryWeight'

+ 4 - 1
src/model/warehouse/index.js

@@ -76,7 +76,8 @@ import {
      API_GET_BINTYPE,
     API_SPONSOR_WITHDRAW,
     API_EXPORT_ORDER,
-    API_GET_DRYLIST
+    API_GET_DRYLIST,
+    API_GET_DRYWEIGHT
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
@@ -235,3 +236,5 @@ export const sponsorWithdraw = appRx.post(API_SPONSOR_WITHDRAW, errorCatcher, er
 export const exportOrder = appRx.post(API_EXPORT_ORDER)
 // 烘干记录获取
 export const getdrylist = appRx.get(API_GET_DRYLIST, errorCatcher, errorHandle, filter)
+// 计算折干后重量
+export const getdryweight = appRx.post(API_GET_DRYWEIGHT, errorCatcher, errorHandle, filter)

+ 3 - 1
src/views/universalityAudit/auditprint.vue

@@ -133,7 +133,9 @@ export default {
         {label:'合同审核',value:'合同审核'},
         {label:'运费结算',value:'运费结算'},
         {label:'仓库设置',value:'仓库设置'},
-        {label:'出入库任务',value:'出入库任务'}
+        {label:'出入库任务',value:'出入库任务'},
+        {label:'长途加油',value:'长途加油'},
+        {label:'短途加油',value:'短途加油'},
         ],
       intotal: 0,
       form: {},

+ 10 - 9
src/views/warehousenew/warehousingOrder.vue

@@ -553,7 +553,8 @@ import {
   setenabledinfo,
   getbyname,
   sponsorWithdraw,
-  exportOrder
+  exportOrder,
+  getdryweight
 } from '@/model/warehouse/index'
 import {
   selectWarehouseSelf,
@@ -995,6 +996,9 @@ export default {
         }
 
       }
+    },
+    warehouseweightfocus(){
+
     },
     warehousefocus1() {
       getposition({ baseId: this.fieldrationsList.baseId }).toPromise()
@@ -1312,7 +1316,7 @@ export default {
     interestrate() {
       this.interestrateshow = true
     },
-    fieldrations() {
+    async fieldrations() {
       let _this = this
       console.log(this.multipleSelection1)
       var arr = []
@@ -1402,20 +1406,17 @@ export default {
       this.fieldrationsList.warehousingOrderList = this.currectdata
       this.fieldrationsList.baseId = this.currectdata[0].baseId
       this.fieldrationsList.beforeWeight = weight.toFixed(3)
-      getbyname({ warehouseId: this.currectdata[0].baseId, goodsName: this.currectdata[0].goodsName }).toPromise()
-        .then((response) => {
-          if (response) {
+      var response=await getbyname({ warehouseId: this.currectdata[0].baseId, goodsName: this.currectdata[0].goodsName }).toPromise()
+      var response1=await getdryweight({ warehousingOrderList: arr1 }).toPromise()
+        if (response) {
             let weight2 = 0
             for (let i = 0; i < this.currectdata.length; i++) {
               var weightedMoisture = (this.currectdata[i].weightedMoisture - 14)
               var deductWeight = 100 - (weightedMoisture * response.deductWeight)
-              this.currectdata[i].afterWeight = ((deductWeight / 100) * this.currectdata[i].surplusWeight)
-              weight2 += ((deductWeight / 100) * this.currectdata[i].surplusWeight)
             }
-            this.fieldrationsList.afterWeight = weight2.toFixed(3)
+            this.fieldrationsList.afterWeight = response1
             this.fieldrationsshow = true
           }
-        })
       // this.fieldrationsList.beforeCost=this.currectdata[0].avgCost
     },
     distribution() {