Bladeren bron

仓储模块修改

wengyuwen 4 jaren geleden
bovenliggende
commit
2f79704320

+ 231 - 126
src/views/warehouseBusiness/inStock/index.vue

@@ -269,19 +269,36 @@
       :data="warehousebillsList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column type="selection" width="55" fixed align="center" />
+      <el-table-column type="index" label="行号" align="center" fixed/>
+      <el-table-column
+        width="100"
+        label="入库状态"
+        fixed
+        align="center"
+        prop="fItemsStatus"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === 1">计划</span>
+          <span v-if="scope.row.fItemsStatus === 2">待入库</span>
+          <span v-if="scope.row.fItemsStatus === 3">入库中</span>
+          <span v-if="scope.row.fItemsStatus === 4">已入库</span>
+        </template>
+      </el-table-column>
+
       <el-table-column
         :show-overflow-tooltip="true"
         label="货权方"
+        fixed
         align="center"
         prop="fCorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
-      <el-table-column label="品名" :show-overflow-tooltip="true" align="center" prop="fProductName" />
-      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="提单号" fixed align="center" prop="fMblno" show-overflow-tooltip/>
+      <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="center" prop="fProductName" />
+      <el-table-column label="品牌" fixed align="center" prop="fMarks" />
       <el-table-column
         label="入库日期"
+        fixed
         align="center"
         prop="fBsdate"
         width="100"
@@ -295,7 +312,7 @@
         prop="fTrademodeid"
         :formatter="fTrademodeidFormat"
       /> -->
-      <el-table-column label="仓库" align="center" prop="fWarehouseid" />
+      <el-table-column label="仓库" fixed align="center" prop="fWarehouseid" />
       <el-table-column label="计划件数" align="center" prop="fPlanqty" />
       <el-table-column label="入库件数" align="center" prop="fQty" />
       <!--      <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
@@ -310,19 +327,6 @@
                        :formatter="fBusinessTypeFormat"/>
       <el-table-column
         width="100"
-        label="入库状态"
-        align="center"
-        prop="fItemsStatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === 1">计划</span>
-          <span v-if="scope.row.fItemsStatus === 2">待入库</span>
-          <span v-if="scope.row.fItemsStatus === 3">入库中</span>
-          <span v-if="scope.row.fItemsStatus === 4">已入库</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="100"
         label="费用状态"
         align="center"
         prop="fBillstatus"
@@ -4774,116 +4778,130 @@ export default {
               }
             }
             this.msgSuccess('入账成功')
-            this.$refs['form'].validate((valid) => {
-              if (valid) {
-                if(!this.dataList.length){
-                  this.form.fBillstatus = status
-                  this.form.fNetweight = this.fNetweight
-                  this.form.fPlanvolumn = this.fPlanvolumn
-                  this.form.fGrossweight = this.fGrossweight
-                  this.form.fQty = this.fQty
-                  // if (!this.form.fId) {
-                  //   this.form.fId = this.fid
-                  // }
-                  // if (!this.form.fBusinessType) {
-                  //   this.$message.error('请选择货物属性!')
-                  //   return false
-                  // }
-                  for (let list in this.dataList) {
-                    if (!this.dataList[list].fBusinessType) {
-                      this.$message.error('请输入库存明细的货物属性!')
-                      return false
-                    }
+            getWarehousebills(this.form.fId).then((response) => {
+              if (response.data.warehousebills) {
+                this.form = response.data.warehousebills;
+                this.before = this.form.createBy
+                if (this.form.fBillstatus > 2) {
+                  this.approvalStatus = false;
+                } else {
+                  this.fMblno = true;
+                }
+                this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+                this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+                this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+                this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+                this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+                this.$set(this.form, "fFeeUnitid", this.form.fFeeunitid + "");
+                this.$set(this.form, "fPlannetweight", this.form.fPlannetweight.toFixed(2));
+                this.$set(this.form, "fPlangrossweight", this.form.fPlangrossweight.toFixed(2));
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                  if (this.dataList[list].fBillstatus > 10) {
+                    this.formBrowseStatus = true;
+                    this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+                  }else{
+                    this.formBrowseStatus = false;
                   }
-                  let formDatae = new window.FormData()
-                  // 附件数据
-                  this.form.fBillingway = this.form.fFeetunit
-                  // this.form.fBstime = JSON.stringify(this.form.fBstime)
-                  formDatae.append('tWarehouseBills', JSON.stringify(this.form))
-                  // 库存明细
-                  formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
-                  // 附件数据
-                  formDatae.append('tEnclosure', JSON.stringify(this.relevantAttachments))
-                  // 费用明细付款
-                  formDatae.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
-                  // 收款
-                  formDatae.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
-                  addWarehousebills(formDatae).then((response) => {
-                    this.form = response.data.warehouseBills
-                    this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
-                    this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
-                    this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
-                    this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-                    this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
-                    this.dataList = response.data.warehousebillsitems
-                    for (let list in this.dataList) {
-                      this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
-                      this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
-                    }
-                    this.fid = response.data.warehouseBills.fId
-                    this.getList()
-                  })
-                }else{
-                  for(let item in this.dataList){
-                    if(!this.dataList[item].fGoodsids){
-                      this.$message.error("请维护第"+ (Number(item)+1) +"行品名!")
-                      return false
-                    }
-                    if(!this.dataList[item].fMarks){
-                      this.$message.error("请维护第"+ (Number(item)+1) +"行货物属性!")
-                      return false
-                    }
+                  if(this.dataList[list].fBillstatus === 40){
+                    this.contrOl = true
+                  }else{
+                    this.contrOl = false
                   }
-                  this.form.fBillstatus = status
-                  this.form.fNetweight = this.fNetweight
-                  this.form.fPlanvolumn = this.fPlanvolumn
-                  this.form.fGrossweight = this.fGrossweight
-                  this.form.fQty = this.fQty
-                  // if (!this.form.fId) {
-                  //   this.form.fId = this.fid
-                  // }
-                  // if (!this.form.fBusinessType) {
-                  //   this.$message.error('请选择货物属性!')
-                  //   return false
-                  // }
-                  for (let list in this.dataList) {
-                    if (!this.dataList[list].fBusinessType) {
-                      this.$message.error('请输入库存明细的货物属性!')
-                      return false
-                    }
+                }
+              }
+              if (response.data.corps) {
+                this.fMblnoOptions = response.data.corps;
+                this.KHblnoOptions = response.data.corps;
+                this.fCompanyOptIons = response.data.corps;
+                this.fleetOptions = response.data.corps;
+              }
+              if (response.data.feesList) {
+                this.fWbuOptions = response.data.feesList;
+              }
+              if (response.data.warehouse) {
+                this.warehouseOptions = response.data.warehouse;
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for(let list in this.dataList){
+                  if (this.dataList[list].fBillstatus > 10) {
+                    this.formBrowseStatus = true;
                   }
-                  let formDatae = new window.FormData()
-                  // 附件数据
-                  this.form.fBillingway = this.form.fFeetunit
-                  formDatae.append('tWarehouseBills', JSON.stringify(this.form))
-                  // 库存明细
-                  formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
-                  // 附件数据
-                  formDatae.append('tEnclosure', JSON.stringify(this.relevantAttachments))
-                  // 费用明细付款
-                  formDatae.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
-                  // 收款
-                  formDatae.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
-                  addWarehousebills(formDatae).then((response) => {
-                    this.msgSuccess('保存成功')
-                    this.form = response.data.warehouseBills
-                    this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
-                    this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
-                    this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
-                    this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-                    this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
-                    this.dataList = response.data.warehousebillsitems
-                    for (let list in this.dataList) {
-                      this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
-                      this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
-                    }
-                    this.fid = response.data.warehouseBills.fId
-                    this.getList()
-                  })
                 }
               }
+              if (response.data.enclosures) {
+                this.relevantAttachments = response.data.enclosures;
+              }
+              for (let list in this.dataList) {
+                this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+              }
+              this.kqhouseOptions = response.data.warehouseAreas;
+              this.warehouseDrList = response.data.warehousebillsfeesDr;
+              for (let dr in this.warehouseDrList) {
+                this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + '');
+                this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+                this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+              }
+              this.warehouseCrList = response.data.warehousebillsfeesCr;
+              for (let cr in this.warehouseCrList) {
+                this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
+              }
+              this.userOptions = response.data.sysUser;
+              // this.warehouseDrList[0].fBusinessType = this.form.fBusinessType
+              this.open = true;
+              this.title = "修改仓入库";
+              this.warehousesssMethod()
+            });
+            this.form.fNetweight = this.fNetweight
+            this.form.fPlanvolumn = this.fPlanvolumn
+            this.form.fGrossweight = this.fGrossweight
+            this.form.fQty = this.fQty
+            // if (!this.form.fId) {
+            //   this.form.fId = this.fid
+            // }
+            // if (!this.form.fBusinessType) {
+            //   this.$message.error('请选择货物属性!')
+            //   return false
+            // }
+            for (let list in this.dataList) {
+              if (!this.dataList[list].fBusinessType) {
+                this.$message.error('请输入库存明细的货物属性!')
+                return false
+              }
+            }
+            let formDatae = new window.FormData()
+            // 附件数据
+            this.form.fBillingway = this.form.fFeetunit
+            // this.form.fBstime = JSON.stringify(this.form.fBstime)
+            formDatae.append('tWarehouseBills', JSON.stringify(this.form))
+            // 库存明细
+            formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
+            // 附件数据
+            formDatae.append('tEnclosure', JSON.stringify(this.relevantAttachments))
+            // 费用明细付款
+            formDatae.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
+            // 收款
+            formDatae.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
+            addWarehousebills(formDatae).then((response) => {
+              this.form = response.data.warehouseBills
+              this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
+              this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+              this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+              this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+              this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+              this.dataList = response.data.warehousebillsitems
+              for (let list in this.dataList) {
+                this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
+                this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              }
+              this.fid = response.data.warehouseBills.fId
+              this.getList()
+              console.log("000")
             })
-
             this.$refs.checkout.clearSelection()
             this.contrOl = true
           })
@@ -5004,6 +5022,85 @@ export default {
                 this.$set(this.dataList[li], "fBusinessType", this.dataList[li].fBusinessType + '')
               }
               this.msgSuccess("卸货成功");
+              getWarehousebills(this.form.fId).then((response) => {
+                if (response.data.warehousebills) {
+                  this.form = response.data.warehousebills;
+                  this.before = this.form.createBy
+                  if (this.form.fBillstatus > 2) {
+                    this.approvalStatus = false;
+                  } else {
+                    this.fMblno = true;
+                  }
+                  this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+                  this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+                  this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+                  this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+                  this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+                  this.$set(this.form, "fFeeUnitid", this.form.fFeeunitid + "");
+                  this.$set(this.form, "fPlannetweight", this.form.fPlannetweight.toFixed(2));
+                  this.$set(this.form, "fPlangrossweight", this.form.fPlangrossweight.toFixed(2));
+                }
+                if (response.data.warehouseBillsItem) {
+                  this.dataList = response.data.warehouseBillsItem;
+                  for (let list in this.dataList) {
+                    this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                    if (this.dataList[list].fBillstatus > 10) {
+                      this.formBrowseStatus = true;
+                      this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+                    }else{
+                      this.formBrowseStatus = false;
+                    }
+                    if(this.dataList[list].fBillstatus === 40){
+                      this.contrOl = true
+                    }else{
+                      this.contrOl = false
+                    }
+                  }
+                }
+                if (response.data.corps) {
+                  this.fMblnoOptions = response.data.corps;
+                  this.KHblnoOptions = response.data.corps;
+                  this.fCompanyOptIons = response.data.corps;
+                  this.fleetOptions = response.data.corps;
+                }
+                if (response.data.feesList) {
+                  this.fWbuOptions = response.data.feesList;
+                }
+                if (response.data.warehouse) {
+                  this.warehouseOptions = response.data.warehouse;
+                }
+                if (response.data.warehouseBillsItem) {
+                  this.dataList = response.data.warehouseBillsItem;
+                  for(let list in this.dataList){
+                    if (this.dataList[list].fBillstatus > 10) {
+                      this.formBrowseStatus = true;
+                    }
+                  }
+                }
+                if (response.data.enclosures) {
+                  this.relevantAttachments = response.data.enclosures;
+                }
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+                }
+                this.kqhouseOptions = response.data.warehouseAreas;
+                this.warehouseDrList = response.data.warehousebillsfeesDr;
+                for (let dr in this.warehouseDrList) {
+                  this.$set(this.warehouseDrList[dr], "fFeeUnitid", this.warehouseDrList[dr].fFeeunitid + '');
+                  this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+                  this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+                }
+                this.warehouseCrList = response.data.warehousebillsfeesCr;
+                for (let cr in this.warehouseCrList) {
+                  this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
+                }
+                this.userOptions = response.data.sysUser;
+                // this.warehouseDrList[0].fBusinessType = this.form.fBusinessType
+                this.open = true;
+                this.title = "修改仓入库";
+                this.warehousesssMethod()
+              });
+
               this.$refs.checkout.clearSelection();
             });
           }
@@ -5056,7 +5153,8 @@ export default {
       this.$refs['form'].validate((valid) => {
         if (valid) {
           if(!this.dataList.length){
-            this.form.fBillstatus = status
+            console.log(status)
+            // this.form.fBillstatus = status
             this.form.fNetweight = this.fNetweight
             this.form.fPlanvolumn = this.fPlanvolumn
             this.form.fGrossweight = this.fGrossweight
@@ -5102,10 +5200,12 @@ export default {
               }
               this.fid = response.data.warehouseBills.fId
               this.getList()
+              console.log("000")
             })
           }else{
             for(let item in this.dataList){
               if(!this.dataList[item].fGoodsids){
+                console.log(this.dataList[item].fGoodsids)
                 this.$message.error("请维护第"+ (Number(item)+1) +"行品名!")
                 return false
               }
@@ -5114,7 +5214,8 @@ export default {
                 return false
               }
             }
-            this.form.fBillstatus = status
+            console.log(status)
+            // this.form.fBillstatus = status
             this.form.fNetweight = this.fNetweight
             this.form.fPlanvolumn = this.fPlanvolumn
             this.form.fGrossweight = this.fGrossweight
@@ -5134,7 +5235,8 @@ export default {
             }
             let formDatae = new window.FormData()
             // 附件数据
-            this.form.fBillingway = this.form.fFeetunit
+            // this.form.fBillingway = this.form.fFeetunit
+            console.log(this.form.fBillstatus)
             formDatae.append('tWarehouseBills', JSON.stringify(this.form))
             // 库存明细
             formDatae.append('tWarehousebillsitems', JSON.stringify(this.dataList))
@@ -5145,6 +5247,7 @@ export default {
             // 收款
             formDatae.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
             addWarehousebills(formDatae).then((response) => {
+              console.log(this.form.fBillstatus)
               this.msgSuccess('保存成功')
               this.form = response.data.warehouseBills
               this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
@@ -5159,6 +5262,7 @@ export default {
               }
               this.fid = response.data.warehouseBills.fId
               this.getList()
+              console.log("111")
             })
           }
         }
@@ -5215,6 +5319,7 @@ export default {
             this.msgSuccess('提交成功')
             this.open = false
             this.getList()
+
             this.reset()
           })
         }

+ 126 - 41
src/views/warehouseBusiness/outStock/index.vue

@@ -254,20 +254,37 @@
       :data="warehousebillsList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column type="selection" width="55" fixed align="center" />
+      <el-table-column type="index" label="行号" fixed align="center" />
+      <el-table-column
+        width="100"
+        label="出库状态"
+        fixed
+        align="center"
+        prop="fItemsStatus"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === 1">计划</span>
+          <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
+          <span v-if="scope.row.fItemsStatus === 3">已装货</span>
+          <span v-if="scope.row.fItemsStatus === 4">已出库</span>
+        </template>
+      </el-table-column>
+
       <el-table-column
         :show-overflow-tooltip="true"
         label="货权方"
+        fixed
         align="center"
         prop="fCorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
-      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
-      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="提单号" align="center" prop="fMblno" fixed show-overflow-tooltip/>
+      <el-table-column label="品名" :show-overflow-tooltip="true" fixed align="ceter" prop="fProductName" />
+      <el-table-column label="品牌" align="center" fixed prop="fMarks" />
       <el-table-column
         label="出库日期"
         align="center"
+        fixed
         prop="createTime"
         style="width: 60%"
         width="100"
@@ -276,7 +293,7 @@
         <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
       </template>
       </el-table-column>
-      <el-table-column label="仓库" align="center" prop="fWarehouseid" />
+      <el-table-column label="仓库" fixed align="center" prop="fWarehouseid" />
       <el-table-column label="计划件数" align="center" prop="fPlanqty" />
       <el-table-column label="出库件数" align="center" prop="fQty" />
       <el-table-column label="出库毛重(kg)" align="center" prop="fGrossweight" width="100"/>
@@ -288,19 +305,6 @@
       <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>
       <el-table-column
         width="100"
-        label="出库状态"
-        align="center"
-        prop="fItemsStatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === 1">计划</span>
-          <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
-          <span v-if="scope.row.fItemsStatus === 3">已装货</span>
-          <span v-if="scope.row.fItemsStatus === 4">已出库</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="100"
         label="费用状态"
         align="center"
         prop="fBillstatus"
@@ -2320,6 +2324,8 @@
               <span v-if="scope.row.fFeeUnitid === 3">净重</span>
               <span v-if="scope.row.fFeeUnitid === 4">尺码</span>
               <span v-if="scope.row.fFeeUnitid === 5">固定</span>
+              <span v-if="scope.row.fFeeUnitid === 5">其他</span>
+              <span v-if="scope.row.fFeeUnitid === 7">箱量</span>
             </template>
           </el-table-column>
           <el-table-column
@@ -2650,7 +2656,7 @@
               colspan="2"
               class="zzss"
               style="padding-bottom: 0px; font-weight: bold;"
-            >车辆类型:{{ form.fCartype }}
+            >车辆类型:{{ fCartype }}
             </td>
             <td
               width="500"
@@ -2814,6 +2820,7 @@ export default {
   },
   data() {
     return {
+      fCartype:'',
       fBstime:'',
       browseStatu:false,
       key_s:'',
@@ -3877,7 +3884,7 @@ export default {
     printJobSheet() {
       for(let item in this.fCartypeOptions){
         if(this.form.fCartype == this.fCartypeOptions[item].dictValue){
-          this.$set(this.form,'fCartype',this.fCartypeOptions[item].dictLabel)
+          this.fCartype = this.fCartypeOptions[item].dictLabel
         }
       }
       if (this.printinglist.length <= 0) {
@@ -4087,6 +4094,7 @@ export default {
       });
       this.loading = true;
       listWarehousebills(this.queryParams).then((response) => {
+        console.log(response)
         this.warehousebillsList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -4320,8 +4328,6 @@ export default {
         if (response.data.corps) {
           this.fMblnoOptions = response.data.corps;
           this.KHblnoOptions = response.data.corps;
-          this.fleetOptions = response.data.corps;
-          this.fCompanyOptIons = response.rows;
         }
         if (response.data.feesList) {
           this.fWbuOptions = response.data.feesList;
@@ -4616,17 +4622,92 @@ export default {
             this.dataWithdrawList = []
             this.dataListSelection = []
             this.msgSuccess("出库成功");
-            this.saveForm()
+            console.log(this.form.fBillstatus)
             this.$refs.tableList.clearSelection();
             this.formBrowseStatus = true;
             this.contrOl = true
+            this.form.fBillstatus = 40
             for (let li in listSelection) {
               for (let i in this.dataList) {
-                if (listSelection[li].fId === this.dataList[i].fId) {
+                console.log(this.dataList[i].fId)
+                console.log(listSelection[li].fId)
+                if (listSelection[li].fId == this.dataList[i].fId) {
                   this.$set(this.dataList[i], "fBillstatus", 40);
+                  console.log(this.dataList[i].fBillstatus)
                 }
               }
             }
+            console.log(this.form.fBillstatus)
+            getWarehousebills(this.form.fId).then((response) => {
+              if (response.data.warehousebills) {
+                console.log(response)
+                this.form = response.data.warehousebills;
+                this.before = this.form.createBy
+                this.$set(this.form,'fCartype',response.data.warehousebills.fCartype + '')
+                this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+                this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+                this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+                this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+                this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+                if (this.form.fBillstatus > 2) {
+                  this.approvalStatus = false;
+                } else {
+                  this.approvalStatus = true;
+                }
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+                  if (this.dataList[list].fBillstatus > 10) {
+                    this.formBrowseStatus = true;
+                    this.$set(this.dataList[list], "fBusinessType", this.dataList[list].fBusinessType + '')
+                  }
+                  if(this.dataList[list].fBillstatus === 40){
+                    this.contrOl = true
+                  }
+                }
+              }
+              if (response.data.corps) {
+                this.fMblnoOptions = response.data.corps;
+                this.KHblnoOptions = response.data.corps;
+              }
+              if (response.data.feesList) {
+                this.fWbuOptions = response.data.feesList;
+              }
+              if (response.data.warehouse) {
+                this.warehouseOptions = response.data.warehouse;
+              }
+              if (response.data.warehouseBillsItem) {
+                this.dataList = response.data.warehouseBillsItem;
+                for (let list in this.dataList) {
+                  this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
+                }
+              }
+              if (response.data.enclosures) {
+                this.relevantAttachments = response.data.enclosures;
+              }
+              this.goodsOptions = response.data.goodsList;
+              this.kqhouseOptions = response.data.warehouseAreas;
+
+              this.warehouseDrList = response.data.warehousebillsfeesDr;
+              for (let dr in this.warehouseDrList) {
+                this.$set(this.warehouseDrList[dr], "fFeeunitid", this.warehouseDrList[dr].fFeeunitid + '');
+                this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
+                this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
+              }
+              this.warehouseCrList = response.data.warehousebillsfeesCr;
+              for (let cr in this.warehouseCrList) {
+                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
+                // this.$set(this.warehouseCrList[cr], "fBusinessType", response.data.warehousebillsfeesCr);
+              }
+              this.userOptions = response.data.sysUser;
+              this.open = true;
+              this.title = "修改仓入库";
+              this.warehousesssMethod()
+              console.log(this.form.fBillstatus)
+            });
+
             this.$refs['form'].validate((valid) => {
               for (let li in this.dataList) {
                 for(let list in this.fStorageTypeOptions){
@@ -4641,7 +4722,6 @@ export default {
                 this.form.fGrossweight = this.fGrossweight
                 this.form.fQty = this.fQty
                 setTimeout(() => {
-                  this.form.fBillstatus = 2
                   let formData = new window.FormData()
                   formData.append("warehouseBills", JSON.stringify(this.form));
                   formData.append("warehousebillsitems", JSON.stringify(this.dataList));
@@ -4667,9 +4747,9 @@ export default {
                     }
                   })
                 }, 200);
+                console.log(this.form.fBillstatus)
               }
             })
-
           });
         }
       });
@@ -4874,7 +4954,7 @@ export default {
         for (let li in this.dataList) {
           for(let list in this.fStorageTypeOptions){
             if (this.dataList[li].fBusinessType  === this.fStorageTypeOptions[list].dictLabel) {
-              this.$set(this.dataList[li], 'fBusinessType', this.fStorageTypeOptions[list].dictValue)
+              // this.$set(this.dataList[li], 'fBusinessType', this.fStorageTypeOptions[list].dictValue)
               break
             }
           }
@@ -4910,6 +4990,7 @@ export default {
               this.msgSuccess('保存成功')
               console.log(response.data.warehouseBills)
               this.form = response.data.warehouseBills
+              console.log(this.form.fBusinessType)
               this.$set(this.form,'fCartype',response.data.warehouseBills.fCartype + '')
               this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
               this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
@@ -4918,7 +4999,8 @@ export default {
               this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
               this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
               this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
-              this.$set(this.form, 'fBusinessType', Date.parse(this.form.fChargedate))
+              this.$set(this.form, 'fBusinessType', this.form.fBusinessType + '')
+              console.log(this.form.fBusinessType)
               this.dataList = response.data.warehousebillsitems
               for (let list in this.dataList) {
                 this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
@@ -4973,18 +5055,21 @@ export default {
             return false
           }
         }
-        for (let list in this.warehouseDrList) {
-          if (!this.warehouseDrList[list].fCorpid) {
-            this.$message.error('请选择客户名称')
-            return false
-          }
-        }
-        for (let list in this.warehouseCrList) {
-          if (!this.warehouseCrList[list].fCorpid) {
-            this.$message.error('请选择客户名称')
-            return false
-          }
-        }
+
+        // for (let index in this.warehouseDrList) {
+        //   if (!this.warehouseDrList[index].fCorpid) {
+        //     console.log(index)
+        //     console.log(this.warehouseDrList[index].fCorpid)
+        //     this.$message.error('请选择客户名称')
+        //     return false
+        //   }
+        // }
+        // for (let list in this.warehouseCrList) {
+        //   if (!this.warehouseCrList[list].fCorpid) {
+        //     this.$message.error('请选择客户名称')
+        //     return false
+        //   }
+        // }
         if (valid) {
           setTimeout(() => {
             this.form.fBillstatus = status

+ 24 - 20
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -255,28 +255,45 @@
       :data="warehousebillsList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column type="selection" width="55" fixed align="center" />
+      <el-table-column type="index" label="行号" fixed align="center" />
+      <el-table-column
+        width="100"
+        fixed
+        label="调拨状态"
+        align="center"
+        prop="fItemsStatus"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === 1">计划</span>
+          <span v-if="scope.row.fItemsStatus === 2">待调拨</span>
+          <span v-if="scope.row.fItemsStatus === 3">调拨中</span>
+          <span v-if="scope.row.fItemsStatus === 6">已调拨</span>
+        </template>
+      </el-table-column>
+
       <el-table-column
         :show-overflow-tooltip="true"
         label="货权方"
+        fixed
         align="center"
         prop="fCorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
-      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
-      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="提单号" fixed align="center" prop="fMblno" show-overflow-tooltip/>
+      <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
+      <el-table-column label="品牌" fixed align="center" prop="fMarks" />
       <el-table-column
         label="调拨日期"
         align="center"
+        fixed
         prop="createTime"
         width="100"
         ><template slot-scope="scope">
           <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="调入仓库" align="center" prop="fWarehouseid" />
-      <el-table-column label="调出仓库" align="center" prop="fInwarehouseid" />
+      <el-table-column label="调入仓库" fixed align="center" prop="fWarehouseid" />
+      <el-table-column label="调出仓库" fixed align="center" prop="fInwarehouseid" />
       <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" width="100"/>
       <el-table-column label="调拨件数" align="center" prop="fQty" />
       <el-table-column label="调拨毛重(kg)" align="center" prop="fGrossweight" width="100"/>
@@ -285,19 +302,6 @@
 
       <el-table-column
         width="100"
-        label="调拨状态"
-        align="center"
-        prop="fItemsStatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === 1">计划</span>
-          <span v-if="scope.row.fItemsStatus === 2">待调拨</span>
-          <span v-if="scope.row.fItemsStatus === 3">调拨中</span>
-          <span v-if="scope.row.fItemsStatus === 6">已调拨</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        width="100"
         label="费用状态"
         align="center"
         prop="fBillstatus"