gjy 2 년 전
부모
커밋
e5ad2fcccd
1개의 변경된 파일16개의 추가작업 그리고 12개의 파일을 삭제
  1. 16 12
      src/views/warehousenew/inventoryCheck.vue

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

@@ -14,12 +14,12 @@
             <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.warehouseName" style="color: #8890b1" />
           </el-select>
           <div style='width:50%;margin-right:10px;display: flex;'>
-          <!-- <el-select v-model="goodsName" filterable placeholder="" @change="goodsNameChange" 
+          <el-select v-model="goodsName" filterable placeholder="" @change="goodsNameChange" 
             style="margin: 0 10px">
             <el-option key="全部货名" label="全部货名" value="0" style="color: #8890b1" />
             <el-option v-for="(item,index) in goodsList" :key="item.id" :label="item.goodsName"
               :value="(index+1)" style="color: #8890b1" />
-          </el-select> -->
+          </el-select>
         </div>
       </template>
       <template slot="right">
@@ -48,9 +48,9 @@
             `warehouseManagement.warehousingOrder.View`
           ">盘亏
         </ws-button>
-        <!-- <ws-button :type="searchType === '1' ? 'primary' : ''" @click="handle('1')" v-hasPermission="
+        <ws-button :type="searchType === '1' ? 'primary' : ''" @click="handle('1')" v-hasPermission="
         `warehouseManagement.warehousingOrder.View`">待审核
-        </ws-button> -->
+        </ws-button>
         </el-col>
         <el-col style='text-align:right;' :span="12">
           
@@ -135,13 +135,13 @@
             <el-form-item label="实际剩余(吨)">
               <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-form-item label="仓位">
+            <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>
             </el-select>
-          </el-form-item> -->
+          </el-form-item>
           </el-form>
         </div>
         <span v-if='title=="审核"' slot="footer" class="dialog-footer">
@@ -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: '当前数据审核中',
@@ -718,7 +721,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 +735,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