瀏覽代碼

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

ccj 2 年之前
父節點
當前提交
40e34f4780
共有 1 個文件被更改,包括 12 次插入13 次删除
  1. 12 13
      src/views/warehousenew/inventoryCheck.vue

+ 12 - 13
src/views/warehousenew/inventoryCheck.vue

@@ -136,7 +136,7 @@
               <el-input :disabled='disabled' v-model="form.num"></el-input>
             </el-form-item>
             <el-form-item label="仓位">
-            <el-select :disabled='disabled' @focus="warehousefocus" @change="warehousechange" v-model="form.binNo"
+            <el-select :disabled='disabled' @focus="warehousefocus" @change="warehousechange" v-model="form.binNumber"
               filterable placeholder="请选择">
               <el-option v-for="item in options" :key="item.id" :label="item.binNumber" :value="item.binNumber">
               </el-option>
@@ -306,6 +306,7 @@
         compId: localStorage.getItem('ws-pf_compId'),
         historyList: [],
         aduitshow:false,
+        goodsName:'0',
         pickerBeginDateBefore: {
           disabledDate: (time) => {
             return time.getTime() > Date.now()
@@ -460,7 +461,9 @@
           this.form.id=row.id
           this.form.surplusWeight=row.surplusWeight
           this.form.profitAndLoss=row.profitAndLoss
-          this.form.num=row.surplusWeight+row.plValue
+          this.form.num=parseInt((row.surplusWeight+row.plValue)*100)/100
+          this.form.positionId=row.positionId
+          this.form.binNumber=row.binNumber
           this.form.plValue=row.plValue
           this.title='审核'
           this.currectflag=row.operationFlag
@@ -486,7 +489,7 @@
             this.title='盘亏'
             this.slecetwarehouseName=''
             // console.log(this.multipleSelection[ware].approveStatus,1111111111111)
-            if(this.multipleSelection[ware.id].inventoryStatus){
+            if(this.multipleSelection[ware.id].inventoryStatus&&this.multipleSelection[ware.id].inventoryStatus=='待审核'){
             this.$notify.warning({
               title: '警告',
               message: '当前数据审核中',
@@ -519,7 +522,7 @@
           this.form.surplusWeight=this.multipleSelection[ware.id].surplusWeight
           this.form.profitAndLoss=this.multipleSelection[ware.id].profitAndLoss
           this.title='盘盈'
-          if(this.multipleSelection[ware.id].inventoryStatus){
+          if(this.multipleSelection[ware.id].inventoryStatus&&this.multipleSelection[ware.id].inventoryStatus=='待审核'){
             this.$notify.warning({
               title: '警告',
               message: '当前数据审核中',
@@ -553,7 +556,7 @@
             return
           }
         if(this.title=='盘盈'){
-          this.form.plValue=this.form.num-this.form.surplusWeight
+          this.form.plValue=(this.form.num-this.form.surplusWeight).toFixed(2)
           this.form.flag=0
           if(this.form.num<this.form.surplusWeight){
             this.$notify.warning({
@@ -565,7 +568,7 @@
           title='确定提交盘盈数据?'
         }
         if(this.title=='盘亏'){
-          this.form.plValue=this.form.num-this.form.surplusWeight
+          this.form.plValue=(this.form.num-this.form.surplusWeight).toFixed(2)
           this.form.flag=1
           if(this.form.num>this.form.surplusWeight){
             this.$notify.warning({
@@ -592,11 +595,6 @@
                   type: 'success'
                 });
                 this.getList()
-              }).catch(() => {
-                  this.$message({
-                    message: '提交失败',
-                    type: 'error'
-                  });
               })  
         })
       },
@@ -718,7 +716,8 @@
             inOutType:this.inOutType,
             flag:this.flag,
             inventoryFlag:1,
-            inventoryStatus:this.searchType
+            inventoryStatus:this.searchType,
+            goodsName:this.goodsName!='0'?this.goodsName:'',
           })
           .toPromise()
           .then((response) => {
@@ -731,7 +730,7 @@
                 //    data[q].surplusWeight=(data[q].inWarehouseWeight/1000)-data[q].outWarehouseWeight+data[q].profitAndLoss
                 // }else{
                   data[q].inWarehouseWeight1=data[q].inWarehouseWeight.toFixed(3)
-                  data[q].surplusWeight=data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss
+                  data[q].surplusWeight=parseInt((data[q].inWarehouseWeight-data[q].outWarehouseWeight+data[q].profitAndLoss)*100)/100
                 // }
                 data[q].select=false
                 data[q].weightedit=false