瀏覽代碼

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui into master

qukaidi 4 年之前
父節點
當前提交
a71ca146c7

+ 5 - 9
src/views/index.vue

@@ -166,13 +166,6 @@ export default {
   activated() {
     this.getList()
     this.warehouses()
-    this.firstinventory()
-    this.inquiry()
-  },
-  created() {
-    this.getList()
-    this.warehouses()
-    this.firstinventory()
     this.inquiry()
   },
   methods: {
@@ -239,8 +232,9 @@ export default {
     handleClose(done) {
       this.dialogVisible = false
     },
-    firstinventory() {
-      information(0).then(response => {
+    firstinventory(fId) {
+      console.log(this.warehouse)
+      information(fId).then(response => {
         this.chart = response.data
         if (this.chart.whouseList.length !== 0) {
           for (let index of this.chart.corpsListWhouse) {
@@ -351,6 +345,8 @@ export default {
             fWarehouseid: index.fWarehouseid
           })
         }
+        console.log(this.warehouse)
+        this.firstinventory(this.warehouse[0].fWarehouseid)
       })
     },
     goTarget(href) {

+ 48 - 10
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -132,13 +132,23 @@
         </el-select>
       </el-form-item>
       <el-form-item label="仓库" prop="fWarehouseid">
-        <treeselect style="width:160px"
-                    v-model="queryParams.fWarehouselocid"
-                    :options="fWarehouseidOption"
-                    @select="treeseLect"
-                    :show-count="true"
-                    :disable-branch-nodes="true"
-                    placeholder="请选择归属库区" />
+        <el-select
+          v-model="queryParams.fWarehouseid"
+          filterable
+          remote
+          @select="treeseLect"
+          :disabled="browseStatus || formBrowseStatus"
+          style="width: 80%"
+          @keyup.enter.native="handleQuery"
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="(dict, index) in warehouseOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
       </el-form-item>
       <el-form-item label="品牌" prop="fMarks">
         <el-input
@@ -684,7 +694,7 @@
         >
         </el-table-column>
         <el-table-column
-          prop="fWarehouseids"
+          prop="fWarehouseInformation"
           header-align="center"
           width="150px"
           align="center"
@@ -1966,6 +1976,7 @@
         this.fWarehouseidOption = response.data
       })
       this.register()
+      this.warehousesssMethod()
     },
     activated(){
       this.Jump()
@@ -2219,7 +2230,7 @@
               fVolumn: this.dialogWhgenlegList[whgen].fVolumnblc,
               fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
               fBillingway: this.dialogWhgenlegList[whgen].fBillingway,
-              fWarehouseids: this.dialogWhgenlegList[whgen].fWarehouseids,
+              fWarehouseInformation: this.dialogWhgenlegList[whgen].fWarehouseids,
               fPackagespecs: this.dialogWhgenlegList[whgen].fPackagespecs,
               fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
               fOriginalbillno: this.dialogWhgenlegList[whgen].fOriginalbillno,
@@ -2419,6 +2430,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() {
@@ -2427,6 +2454,18 @@
       },
       /** 重置按钮操作 */
       resetQuery() {
+        this.queryParams = {
+          fBillno:null,
+          createBy:null,
+          timeInterval:null,
+          fTrademodeid:null,
+          fCorpid:null,
+          fMblno:null,
+          fSbu:null,
+          fGoodsid:null,
+          fWarehouseid:null,
+          fMarks:null,
+        }
         this.resetForm('queryForm')
         this.handleQuery()
       },
@@ -2847,7 +2886,6 @@
             formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
             formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
             addGoodsTransfer(formData).then((response) => {
-              console.log(response)
               this.msgSuccess('保存成功')
               this.form = response.data.warehouseBills
               this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))

+ 164 - 96
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)"
             >
@@ -2811,14 +2811,14 @@
           id="print_area1"
           class="biaoge zzss"
           border="1"
-          style="border-collapse: collapse; border: none"
+          style="border-collapse: collapse;border: none"
         >
           <tr>
             <td
               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>
@@ -2828,13 +2828,13 @@
               width="900"
               colspan="4"
               class="zzss"
-              style="font-size: 28px; font-weight: bold"
+              style="font-size: 28px; font-weight: bold;"
             >
             </td>
             <td
               width="500"
               colspan="2"
-              style="padding-bottom: 0px; font-weight: bold; border: none"
+              style="padding-bottom: 0px; font-weight: bold;"
               class="zzss"
             >
               入库日期:{{ fBsdates }}
@@ -2898,9 +2898,9 @@
             <td>机械/人工:</td>
             <td></td>
           </tr>
-          <tr>
-            <td colspan="6" class="zzss">&nbsp;</td>
-          </tr>
+<!--          <tr>-->
+<!--            <td colspan="6" class="zzss">&nbsp;</td>-->
+<!--          </tr>-->
           <tr>
             <td width="280" class="zzss"></td>
             <td width="280" class="zzss"></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:none;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:none;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:none;padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center;border:1px solid #000}}";
       print({
         printable: "print_area1",
         type: "html",
@@ -3723,6 +3723,8 @@ export default {
       }
     },
     showEditDialog_sss() {
+      treeselect(this.form.fWarehouseid).then(response => {
+      })
       if (this.Printinglist.length > 0) {
         if(this.form.fFeetunit > 3){
           this.$message.error('请维护主表计费单位为件数、毛重(kg)或净重(kg)')
@@ -3733,6 +3735,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 +3779,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
@@ -4070,7 +4072,6 @@ export default {
           });
           let qty = 1;
           if (this.dialogWhgenlegList[zhgen].fFeeUnitid == 1) {
-            console.log("111")
             qty = this.fQty
           } else if (this.dialogWhgenlegList[zhgen].fFeeUnitid == 2) {
             qty = (this.fGrossweight/1000).toFixed(2)
@@ -4098,7 +4099,6 @@ export default {
               fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
             })
           }else{
-            console.log(this.dialogWhgenlegList[zhgen].fFeeUnitid)
             this.warehouseCrList.push({
               fQty: qty,
               fCorpid: this.dialogWhgenlegList[zhgen].fCorpid,
@@ -4114,9 +4114,7 @@ export default {
               fMarks:this.form.fMarks,
               fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType)
             })
-            console.log(this.warehouseCrList)
           }
-
         }
         this.warehousingagreements = false;
       }
@@ -4250,6 +4248,18 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams = {
+        fBillno:null,
+        createBy:null,
+        timeInterval:null,
+        fTrademodeid:null,
+        fCorpid:null,
+        fMblno:null,
+        fSbu:null,
+        fGoodsid:null,
+        fWarehouseid:null,
+        fMarks:null,
+      }
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -4403,7 +4413,6 @@ export default {
           this.$set(this.warehouseDrList[dr], "fQty", this.warehouseDrList[dr].fQty.toFixed(2));
           this.$set(this.warehouseDrList[dr], "fAmount", this.warehouseDrList[dr].fAmount.toFixed(2));
         }
-        console.log(JSON.stringify(this.warehouseDrList))
         this.warehouseCrList = response.data.warehousebillsfeesCr;
         for (let cr in this.warehouseCrList) {
           this.$set(this.warehouseCrList[cr], "fFeeUnitid", this.warehouseCrList[cr].fFeeunitid + "");
@@ -4691,7 +4700,6 @@ export default {
           for (let se in this.dataListSelection) {
             if (Number(this.dataListSelection[se].fBillstatus) >= 10) {
               dataList.push(this.dataListSelection[se])
-              console.log("111")
             }
           }
           if (dataList.length !== 0) {
@@ -4756,6 +4764,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 +4856,111 @@ 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){
+            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('保存成功')
+              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) => {
+              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()
+            })
+          }
         }
       })
     },

+ 46 - 43
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;
@@ -3414,7 +3413,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}}";
+      const style = "@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_area", type: "html",
         style: style, // 亦可使用引入的外部css;
         scanStyles: false,
@@ -3912,13 +3911,10 @@ export default {
     },
     // 收款信息
     addCollection() {
-      console.log(this.form.fBusinessType)
       if(this.form.fBusinessType == null){
-        console.log("111")
         this.$message.error("请维护作业类型")
         return false
       }else {
-        console.log("222")
         this.warehouseDrList.push({
           fcorpid: this.form.fCorpid,
           ffeeid: null,
@@ -4125,6 +4121,18 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams = {
+        fBillno:null,
+        createBy:null,
+        timeInterval:null,
+        fTrademodeid:null,
+        fCorpid:null,
+        fMblno:null,
+        fSbu:null,
+        fGoodsid:null,
+        fWarehouseid:null,
+        fMarks:null,
+      }
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -4162,7 +4170,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 +4514,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 +4599,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 +4674,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

+ 42 - 32
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -242,17 +242,17 @@
         label="调拨日期"
         align="center"
         prop="createTime"
-        style="width: 60%"
+        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="实际调拨件数" align="center" prop="fQty" />
-      <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" />
-      <el-table-column label="计划调拨毛重(kg)" align="center" prop="fPlangrossweight" />
-      <el-table-column label="计划调拨净重(kg)" align="center" prop="fPlannetweight" />
+      <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"/>
+      <el-table-column label="调拨净重(kg)" align="center" prop="fNetweight" width="100"/>
       <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>
 
       <el-table-column
@@ -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"
@@ -942,7 +942,7 @@
               header-align="center"
               width="240px"
               align="center"
-              label="*调入1库位"
+              label="*调入库位"
             >
               <template slot-scope="scope">
                 <el-input
@@ -2402,7 +2402,6 @@ export default {
   },
   data() {
     return {
-      browseStatu:false,
       fCompanyOptIons:[],
       fleetOptions:[],
       activeIndex: '1',
@@ -2636,6 +2635,7 @@ export default {
         fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
         fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
         fBusinessType: [{ required: true, message: " ", trigger: "blur"},],
+        fInwarehouseid: [{ required: true, message: " ", trigger: "blur"},],
         fbillingway: [
           {
             required: true,
@@ -2784,7 +2784,6 @@ export default {
         this.hide = false
         this.open = true
         this.browseStatus = true
-        this.browseStatus = true
         this.contrOl = true
         this.notChange = true
         this.approve = true
@@ -3535,6 +3534,18 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
+      this.queryParams = {
+        fBillno:null,
+        createBy:null,
+        timeInterval:null,
+        fTrademodeid:null,
+        fCorpid:null,
+        fMblno:null,
+        fSbu:null,
+        fGoodsid:null,
+        fWarehouseid:null,
+        fMarks:null,
+      }
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -3572,7 +3583,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) => {
@@ -4065,7 +4075,6 @@ export default {
           for (let se in this.dataListSelection) {
             if (Number(this.dataListSelection[se].fBillstatus) >= 10) {
               dataList.push(this.dataListSelection[se])
-              console.log("111")
             }
           }
           if (dataList.length !== 0) {
@@ -4139,26 +4148,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) => {
@@ -4211,9 +4223,7 @@ export default {
     // 库存明细多选
     selectinventory(selection) {
       for(let item in selection){
-        console.log(selection[item].fBillstatus)
         if(selection[item].fBillstatus > '20'){
-          console.log("111")
           this.browseStatu = true
         }else{
           this.browseStatu = false