wengyuwen 4 роки тому
батько
коміт
c971258060
1 змінених файлів з 48 додано та 32 видалено
  1. 48 32
      src/views/warehouseBusiness/outStock/index.vue

+ 48 - 32
src/views/warehouseBusiness/outStock/index.vue

@@ -829,7 +829,7 @@
               filterable
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
               :remote-method="kqhouseRemoteMethod"
-              placeholder="请选择库区"
+              placeholder="请选择业务类型"
             >
               <el-option
                 v-for="(dict, index) in fStorageTypeOptions"
@@ -863,14 +863,6 @@
         </el-table-column>
 
         <el-table-column
-          prop="fMarks"
-          header-align="center"
-          align="center"
-          width="140px"
-          label="*品牌"
-        >
-        </el-table-column>
-        <el-table-column
           prop="fWarehouselocids"
           header-align="center"
           width="150px"
@@ -1001,7 +993,6 @@
         >
           <template slot-scope="scope">
             <el-input
-              oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
               v-model="scope.row.fCntrtype"
               :disabled="browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
               placeholder="箱型"
@@ -1183,10 +1174,19 @@
           label="状态"
         >
           <template slot-scope="scope">
-            <span v-if="scope.row.fBillstatus === 40">已出库</span>
-            <span v-if="scope.row.fBillstatus === 20">卸货中</span>
-            <span v-if="scope.row.fBillstatus === 30">已装货</span>
+          <span v-if="form.fBusinessType === '出库装箱'">
+             <span v-if="scope.row.fBillstatus === 40">已装箱</span>
+            <span v-if="scope.row.fBillstatus === 20">待装箱</span>
+            <span v-if="scope.row.fBillstatus === 30">装箱中</span>
+            <span v-if="scope.row.fBillstatus === 10">计划</span>
+          </span>
+
+            <span v-if="form.fBusinessType === '来车提货'">
+             <span v-if="scope.row.fBillstatus === 40">已出库</span>
+            <span v-if="scope.row.fBillstatus === 20">待出库</span>
+            <span v-if="scope.row.fBillstatus === 30">出库中</span>
             <span v-if="scope.row.fBillstatus === 10">计划</span>
+          </span>
           </template>
         </el-table-column>
         <el-table-column
@@ -2491,9 +2491,9 @@ export default {
       deptOptions: [],
       // 主表状态
       businessTypeOption: [{
-        name: '场地直装'
+        name: '出库装箱'
       }, {
-        name: '常规入账'
+        name: '来车提货'
       }],
       // 仓库(仓库数据)
       warehouseOptions: [],
@@ -2578,7 +2578,6 @@ export default {
         fGoodsid: null,
         fCntrtype: null,
         fCntqty: null,
-        fBusinessType: '常规入账',
       },
       // 库存总账参数
       whgenlegParams: {
@@ -2595,21 +2594,19 @@ export default {
         fCorpid: null,
         fTrademodeid: null,
         fWarehouseid: null,
+        fBusinessType: '出库装箱'
       },
       // 表单校验
       rules: {
         fDeptid: [{ required: true, message: " ", trigger: "blur" }],
         fBsdeptid: [{ required: true, message: " ", trigger: "blur" }],
         fCorpid: [{ required: true, message: " ", trigger: "blur"},],
-        fPlanqty: [{ required: true, message: " ", trigger: "blur"},],
-        fPlannetweight: [{ required: true, message: " ", trigger: "blur"},],
         fFeeUnitid: [{ required: true, message: " ", trigger: "blur" }],
         fChargedate: [{ required: true, message: " ", trigger: "blur" }],
         fBillingway: [{ required: true, message: " ", trigger: "blur" }],
         fBsdate: [{ required: true, message: " ", trigger: "blur" }],
         fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
         fSbu: [{ required: true, message: " ", trigger: "blur" }],
-        fPlangrossweight: [{ required: true, message: " ", trigger: "blur"},],
         fStorekeeper: {
           required: true,
           message: " ",
@@ -3075,6 +3072,12 @@ export default {
           this.$set(this.form, "fMblno", this.dialogWhgenlegList[whgen].fMblno);
         }
         this.changeInformation()
+        for (let list in this.fStorageTypeOptions) {
+          if (this.dialogWhgenlegList[whgen].fBusinessType  === this.fStorageTypeOptions[list].dictValue) {
+            this.$set(this.dialogWhgenlegList[whgen], 'fBusinessType', this.fStorageTypeOptions[list].dictLabel)
+            break
+          }
+        }
         this.dataList.push({
           fId: null,
           fMblno: this.dialogWhgenlegList[whgen].fMblno,
@@ -3106,8 +3109,12 @@ export default {
           fIsPass: 'F',
           fDriverName:this.whgenlegList.fDriverName,
           fDriverTel:this.whgenlegList.fDriverTel,
-          fDriverIdCar:this.whgenlegList.fDriverIdCar
+          fDriverIdCar:this.whgenlegList.fDriverIdCar,
+          fBusinessType:this.dialogWhgenlegList[whgen].fBusinessType
+
         });
+        console.log(this.dialogWhgenlegList[whgen].fWarehouseLocationids)
+        console.log(this.dialogWhgenlegList[whgen].fBusinessType)
       }
       this.whgenlegVisible = false;
     },
@@ -3181,21 +3188,21 @@ export default {
             } else if (!this.printinglist[warehouseCr].fDriverName || this.printinglist[warehouseCr].fDriverName !== fDriverName) {
               this.$message.error('请填写司机姓名选择相同司机姓名')
               return false
-              // } else if (!this.printinglist[warehouseCr].fGrossweight) {
-              //   this.$message.error('请选择出库毛重')
-              //   return false
+              } else if (!this.printinglist[warehouseCr].fGrossweight) {
+                this.$message.error('请选择出库毛重')
+                return false
             } else if (!this.printinglist[warehouseCr].fDriverTel) {
               this.$message.error('请选填写司机电话')
               return false
             } else if (!this.printinglist[warehouseCr].fDriverIdCar) {
               this.$message.error('请选填写司机身份证')
               return false
-              // } else if (!this.printinglist[warehouseCr].fNetweight) {
-              //   this.$message.error('请选择出库净重')
-              //   return false
-              // } else if (!this.printinglist[warehouseCr].fQty) {
-              //   this.$message.error('请选择出库件数')
-              //   return false
+              } else if (!this.printinglist[warehouseCr].fNetweight) {
+                this.$message.error('请选择出库净重')
+                return false
+              } else if (this.printinglist[warehouseCr].fQty == '0') {
+                this.$message.error('请选择出库件数')
+                return false
             } else if (!this.printinglist[warehouseCr].fDriverName) {
               this.$message.error('请输入司机姓名')
               return false
@@ -3237,7 +3244,7 @@ export default {
             this.$message.error("请选择品名");
             return false;
           }
-          if (!this.printinglist[warehouseCr].fWarehouselocid) {
+          if (!this.printinglist[warehouseCr].fWarehouselocids) {
             this.$message.error("请选择库区");
             return false;
           }
@@ -3249,7 +3256,7 @@ export default {
             this.$message.error("请选择入库净重");
             return false;
           }
-          if (!this.printinglist[warehouseCr].fQty) {
+          if (this.printinglist[warehouseCr].fQty) {
             this.$message.error("请选择入库件数");
             return false;
           }
@@ -3330,6 +3337,7 @@ export default {
       this.whgenlegParams.fWarehouseid = this.form.fWarehouseid;
       this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
       listWhgenleg(this.whgenlegParams).then((response) => {
+        console.log(response)
         this.whgenlegList = response.rows;
         this.whgenlegTotal = response.total;
       });
@@ -3409,6 +3417,7 @@ export default {
         fGoodsid: null,
         fCntrtype: null,
         fCntqty: null,
+        fBusinessType: '出库装箱'
       };
       this.deptOptions = [];
       this.userOptions = [];
@@ -3991,6 +4000,14 @@ export default {
           this.$message.error('请添加库存明细!')
           return false
         }
+        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)
+              break
+            }
+          }
+        }
         // for (let list in this.dataList) {
         //   this.changeOutStock(this.dataList[list])
           // if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
@@ -4027,7 +4044,6 @@ export default {
               this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
               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 + '');
                 console.log(this.dataList)