Forráskód Böngészése

仓储模块修改

wengyuwen 4 éve
szülő
commit
0f5b6def50

+ 16 - 0
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -2419,6 +2419,22 @@
         this.warehouseCrList = []
         this.warehouseOptions = []
         this.relevantAttachments = []
+        this.form = {
+          fCorpid:null,
+          fTocorpid:null,
+          fBillno:null,
+          fBsdate:null,
+          fChargedate:null,
+          fStltypeid:null,
+          fTrademodeid:null,
+          fMblno:null,
+          fFeetunit: '2',
+          fOriginalbillno:null,
+          orgStorageDate:null,
+          fMarks:null,
+          fProductName:null,
+          formBrowseStatus:'1'
+        }
       },
       /** 搜索按钮操作 */
       handleQuery() {

+ 147 - 84
src/views/warehouseBusiness/inStock/index.vue

@@ -1217,7 +1217,7 @@
             <el-table-column
               prop="fGrossweight"
               header-align="center"
-              width="150px"
+              width="180px"
               align="center"
               label="*入库毛重(kg)"
             >
@@ -1234,7 +1234,7 @@
             <el-table-column
               prop="fNetweight"
               header-align="center"
-              width="150px"
+              width="180px"
               align="center"
               label="*入库净重(kg)"
             >
@@ -2818,7 +2818,7 @@
               width="1400"
               colspan="6"
               class="zzss"
-              style="font-size: 28px; font-weight: bold; border: none"
+              style="font-size: 24px; font-weight: bold; border: none"
             >
               大木国际物流(青岛)有限公司作业单
             </td>
@@ -3050,39 +3050,39 @@ export default {
       closeButton:true,
       //表单校验
       checkout: {
-        fGoodsid:[
-          { required: true, message: ' ', trigger: 'blur' }
-        ],
-        fMarks: [
+        fGoodsids:[
           { required: true, message: ' ', trigger: 'blur' }
         ],
-        fWarehouselocid:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fGrossweight:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fNetweight:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fQty:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fPackagespecs:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fTruckno:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fDriverName:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fDriverTel:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ],
-        fDriverIdCar:[
-          { required: true, message: ' ', trigger: 'blur'}
-        ]
+        // fMarks: [
+        //   { required: true, message: ' ', trigger: 'blur' }
+        // ],
+        // fWarehouselocid:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fGrossweight:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fNetweight:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fQty:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fPackagespecs:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fTruckno:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fDriverName:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fDriverTel:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ],
+        // fDriverIdCar:[
+        //   { required: true, message: ' ', trigger: 'blur'}
+        // ]
       },
       queryForm: {},
       // 新增用户对话框
@@ -3548,7 +3548,7 @@ export default {
     printSomething() {
       // 此处的style即为打印时的样式
       const style =
-        "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
+        "@media print { .print-div{ border:1px solid #000;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
       print({
         printable: "print_area3",
         type: "html",
@@ -3559,7 +3559,7 @@ export default {
     printSomething1() {
       // 此处的style即为打印时的样式
       const style =
-        "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
+        "@media print { .print-div{ border:1px solid #000;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
       print({
         printable: "print_area2",
         type: "html",
@@ -3570,7 +3570,7 @@ export default {
     printSomething2() {
       // 此处的style即为打印时的样式
       const style =
-        "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
+        "@media print { .print-div{ border:1px solid #000;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
       print({
         printable: "print_area1",
         type: "html",
@@ -3733,6 +3733,10 @@ export default {
           return false
         }
         for (let li in this.Printinglist) {
+          if (!this.Printinglist[li].fId) {
+            this.$message.error('请先保存!')
+            return false
+          }
           if (!this.Printinglist[li].fBsdate) {
             this.$message.error('请选择入库日期')
             return false
@@ -3773,10 +3777,6 @@ export default {
             this.$message.error('请选择相同司机名')
             return false
           }
-          if (!this.Printinglist[li].fId) {
-            this.$message.error('请先保存!')
-            return false
-          }
           if (!this.Printinglist[li].fBusinessType) {
             this.$message.error('请先维护业务类型!')
             return false
@@ -4756,6 +4756,7 @@ export default {
     // 卸货按钮
     discharge() {
       if (this.Printinglist.length > 0) {
+
         for (let warehouseCr in this.Printinglist) {
           if (this.Printinglist[warehouseCr].fBillstatus === 10) {
             this.$message.error("请先打印作业单");
@@ -4847,52 +4848,114 @@ export default {
     preservation() {
       this.$refs['form'].validate((valid) => {
         if (valid) {
-          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(!this.dataList.length){
+            console.log("000")
+            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
+              }
             }
-          }
-          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
+            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('保存成功')
+              console.log("000")
+              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
+              }
+            }
+            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) {
-              this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
-              this.$set(this.dataList[list], 'fBusinessType', this.dataList[list].fBusinessType + '')
+              if (!this.dataList[list].fBusinessType) {
+                this.$message.error('请输入库存明细的货物属性!')
+                return false
+              }
             }
-            this.fid = response.data.warehouseBills.fId
-            this.getList()
-          })
+            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) => {
+              console.log("111")
+              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()
+            })
+          }
         }
       })
     },

+ 33 - 39
src/views/warehouseBusiness/outStock/index.vue

@@ -853,7 +853,7 @@
             </div>
             <div style="display: flex">
               <el-button type="info" :disabled="printinglist.length <= 0 || browseStatus" prop="打印" @click="printJobSheet">作业单</el-button>
-              <el-button :disabled="printinglist.length <= 0 || browseStatu" @click="discharge">装货完成</el-button>
+              <el-button :disabled="printinglist.length <= 0 || browseStatus" @click="discharge">装货完成</el-button>
               <el-button
                 :disabled="dataListSelection.length <= 0 || browseStatus"
                 @click.prevent="creditClick"
@@ -3271,7 +3271,6 @@ export default {
         this.approval = JSON.parse(this.approval)
         this.approVal = true
         this.browseStatus = status;
-        this.browseStatu = true
         this.contrOl = true
         this.detailsHidden = false;
         this.formBrowseStatus = false;
@@ -4162,7 +4161,6 @@ export default {
       // if (this.dataList.length === 0){
       //   this.contrOl = true
       // }
-      this.browseStatu = status;
       this.browseStatus = status;
       this.contrOl = status
       this.detailsHidden = false;
@@ -4507,11 +4505,9 @@ export default {
               for (let i in this.dataList) {
                 if (listSelection[li].fId === this.dataList[i].fId) {
                   this.$set(this.dataList[i], "fBillstatus", 40);
-
                 }
               }
             }
-
           });
         }
       });
@@ -4594,32 +4590,36 @@ export default {
     },
     // 装货按钮
     discharge() {
+
       if (this.printinglist.length <= 0) {
         this.$message.error("请选择需要装货的明细!");
         return false
       }
-      for (let li in this.dataListSelection) {
-        if (!this.dataListSelection[li].fId) {
-          this.$message.error('请先保存!')
-          return false
-        } else if (this.dataListSelection[li].fBillstatus === 10) {
-          this.$message.error('请先打印')
-          return false
-        } else if (this.dataListSelection[li].fBillstatus >= 30) {
-          this.$message.error('请勿重复装货')
-          return false
-        // } else if (!this.dataListSelection[li].fQty || this.dataListSelection[li].fQty === 0) {
-        //   this.$message.error('请维护出库件数')
-        //   return false
+      if(this.printinglist.length > 0){
+        if(this.dataListSelection) {
+          for (let li in this.dataListSelection) {
+            if (!this.dataListSelection[li].fId) {
+              this.$message.error('请先保存!')
+              return false
+            } else if (this.dataListSelection[li].fBillstatus === 10) {
+              this.$message.error('请先打印')
+              return false
+            }
+            if (this.dataListSelection[li].fBillstatus >= 30) {
+              this.$message.error('请勿重复装货')
+              return false
+            }
+          }
+        }
+      if(this.dataWithdrawList){
+            for(let li in this.dataWithdrawList){
+              if (this.dataWithdrawList[li].fBillstatus >= 30) {
+                this.$message.error('请勿重复装货')
+                return false
+              }
+            }
+          }
         }
-          // else if (!this.dataListSelection[li].fGrossweight || this.dataListSelection[li].fGrossweight === 0) {
-        //   this.$message.error('请维护出库毛重')
-        //   return false
-        // } else if (!this.dataListSelection[li].fNetweight || this.dataListSelection[li].fNetweight === 0) {
-        //   this.$message.error('请维护出库净重')
-        //   return false
-        // }
-      }
       this.$refs['form'].validate((valid) => {
         if (valid) {
           let withdrawList = JSON.parse(JSON.stringify(this.dataListSelection))
@@ -4665,24 +4665,18 @@ export default {
     },
     // 库存明细多选
     selectinventory(selection) {
-      for(let item in selection){
-        if(selection[item].fBillstatus > '20'){
-          this.browseStatu = true
-        }else{
-          this.browseStatu = false
-        }
-      }
       this.printinglist = selection;
       this.dataWithdrawList = [];
       this.dataListSelection = [];
       if (!selection || selection.length === 0) {
         return false
-      }
-      for (let se in selection) {
-        if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
-          this.dataListSelection.push(selection[se])
-        } else if (selection[se].fBillstatus && selection[se].fBillstatus === 40) {
-          this.dataWithdrawList.push(selection[se])
+      }else{
+        for (let se in selection) {
+          if (!selection[se].fBillstatus || selection[se].fBillstatus !== 40) {
+            this.dataListSelection.push(selection[se])
+          } else if (selection[se].fBillstatus && selection[se].fBillstatus === 40) {
+            this.dataWithdrawList.push(selection[se])
+          }
         }
       }
       this.fTruckno = selection[0].fTruckno

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

@@ -812,7 +812,7 @@
             </div>
             <div style="display: flex">
               <el-button type="info" :disabled="printinglist.length <= 0 || browseStatus" prop="打印" @click="printJobSheet">作业单</el-button>
-              <el-button :disabled="printinglist.length <= 0 || browseStatu " @click="discharge">装货</el-button>
+              <el-button :disabled="printinglist.length <= 0 || browseStatus " @click="discharge">装货</el-button>
               <el-button
                 :disabled="dataListSelection.length <= 0 || browseStatus"
                 @click.prevent="creditClick"
@@ -2402,7 +2402,6 @@ export default {
   },
   data() {
     return {
-      browseStatu:false,
       fCompanyOptIons:[],
       fleetOptions:[],
       activeIndex: '1',
@@ -2784,7 +2783,6 @@ export default {
         this.hide = false
         this.open = true
         this.browseStatus = true
-        this.browseStatus = true
         this.contrOl = true
         this.notChange = true
         this.approve = true
@@ -3572,7 +3570,6 @@ export default {
       this.reset();
       this.contrOl = true
       this.browseStatus = status;
-      this.browseStatu = status;
       this.detailsHidden = false;
       let data = row || this.ids;
       getStockTransfer(data.fId).then((response) => {
@@ -4139,26 +4136,29 @@ export default {
         this.$message.error("请选择需要装货的明细!");
         return false
       }
-      for (let li in this.dataListSelection) {
-        if (!this.dataListSelection[li].fId) {
-          this.$message.error('请先保存!')
-          return false
-        } else if (this.dataListSelection[li].fBillstatus === 10) {
-          this.$message.error('请先打印')
-          return false
-        } else if (this.dataListSelection[li].fBillstatus >= 30) {
-          this.$message.error('请勿重复装货')
-          return false
+      if(this.printinglist.length > 0){
+        if(this.dataListSelection) {
+          for (let li in this.dataListSelection) {
+            if (!this.dataListSelection[li].fId) {
+              this.$message.error('请先保存!')
+              return false
+            } else if (this.dataListSelection[li].fBillstatus === 10) {
+              this.$message.error('请先打印')
+              return false
+            }
+            if (this.dataListSelection[li].fBillstatus >= 30) {
+              this.$message.error('请勿重复装货')
+              return false
+            }
+          }
         }
-        else if (!this.dataListSelection[li].fQty || this.dataListSelection[li].fQty === 0) {
-          this.$message.error('请填写调拨件数')
-          return false
-        } else if (!this.dataListSelection[li].fNetweight) {
-          this.$message.error('请填写调拨毛重')
-          return false
-        } else if (!this.dataListSelection[li].fGrossweight) {
-          this.$message.error('请填写调拨净重')
-          return false
+        if(this.dataWithdrawList){
+          for(let li in this.dataWithdrawList){
+            if (this.dataWithdrawList[li].fBillstatus >= 30) {
+              this.$message.error('请勿重复装货')
+              return false
+            }
+          }
         }
       }
       this.$refs['form'].validate((valid) => {
@@ -4176,6 +4176,7 @@ export default {
           this.formBrowseStatus = true
           this.$refs.tableList.clearSelection()
           disChargelist(formData).then((response) => {
+            console.log(response)
             for (let li in withdrawList) {
               for (let i in this.dataList) {
                 if (withdrawList[li].fId === this.dataList[i].fId) {