浏览代码

增加发货方

lichao 3 年之前
父节点
当前提交
8c66ed75b4
共有 2 个文件被更改,包括 84 次插入2 次删除
  1. 25 0
      src/views/Warehousing/inStock/AddOrUpdate.vue
  2. 59 2
      src/views/Warehousing/outStock/AddOrUpdate.vue

+ 25 - 0
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -529,6 +529,29 @@
                 </el-form-item>
               </el-col>
             </el-row>
+            <el-row>
+              <el-col :span="12">
+                <el-form-item label="发货方">
+                  <el-select
+                    v-model="form.fShipper"
+                    clearable
+                    filterable
+                    placeholder="请输入关键词"
+                    :disabled="browseStatus || form.warehouseStatus > 3"
+                    style="width: 80%"
+                    allow-create
+                    default-first-option
+                  >
+                    <el-option
+                      v-for="(item, index) in fMblnoOptions"
+                      :key="index.fId"
+                      :label="item.fName"
+                      :value="item.fName"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
           </div>
           <el-row>
             <el-col :span="12">
@@ -7207,6 +7230,8 @@ export default {
               "fStltypeid",
               e.fStltypeid ? e.fStltypeid.toString() : null
           );
+          // 选完客户带入发货方
+          this.$set(this.form, 'fShipper', e.fName)
         }
       });
     },

+ 59 - 2
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -432,6 +432,27 @@
                 />
               </el-form-item>
             </el-col>
+            <el-col :span="12">
+              <el-form-item label="发货方">
+                <el-select
+                  v-model="form.fShipper"
+                  clearable
+                  filterable
+                  placeholder="请输入关键词"
+                  disabled
+                  style="width: 80%"
+                  allow-create
+                  default-first-option
+                >
+                  <el-option
+                    v-for="(item, index) in fMblnoOptions"
+                    :key="index.fId"
+                    :label="item.fName"
+                    :value="item.fName"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
           </el-row>
           <el-row>
             <el-col :span="12">
@@ -2292,6 +2313,7 @@
                   v-model="whgenlegParams.fCntrno"
                   placeholder="请输入箱号"
                   clearable
+                  @keyup.enter.native="getDetailsList()"
               />
             </el-form-item>
           </el-col>
@@ -4875,6 +4897,7 @@ export default {
     this.queryUser();
     this.getRow();
     this.getRow2();
+    this.form.fBstime = Date.parse(new Date());
   },
   filters: {
     fBsdateFormat(row) {
@@ -5289,6 +5312,7 @@ export default {
             fWarehouseInformation: e.fWarehouseids,
             fSrcid: e.fId,
             fSrcBsdate: e.fBsdate,
+            fShipper: e.fShipper,
           });
         });
       } else {
@@ -5330,6 +5354,7 @@ export default {
             fWarehouseInformation: e.fWarehouseids,
             fSrcid: e.fId,
             fSrcBsdate: e.fBsdate,
+            fShipper: e.fShipper,
           });
         });
       }
@@ -5516,6 +5541,8 @@ export default {
       this.fMblnoOptions.map((e) => {
         if (row == e.fId) {
           this.$set(this.form, "fStltypeid", e.fStltypeid.toString());
+          // 选完客户带入发货方
+          // this.$set(this.form, 'fShipper', e.fName)
         }
       });
     },
@@ -6282,6 +6309,10 @@ export default {
         let fMarks = [];
         let fProductName = [];
         let fMblno = [];
+        let fShipper = [];
+        let fPlanqty = 0;
+        let fPlannetweight = 0;
+        let fPlangrossweight = 0;
         this.detailList.map((e) => {
           if (e.fMarks) {
             fMarks.push(e.fMarks);
@@ -6292,7 +6323,24 @@ export default {
           if (e.fMblno) {
             fMblno.push(e.fMblno);
           }
+          if (e.fShipper) {
+            fShipper.push(e.fShipper)
+          }
+          if (e.fPlanqty) {
+            fPlanqty += e.fPlanqty
+          }
+          if (e.fPlannetweight) {
+            fPlannetweight += e.fPlannetweight
+          }
+          if (e.fPlangrossweight) {
+            fPlangrossweight += e.fPlangrossweight
+          }
         });
+        // 如果计划件数、计划净重、计划毛重 为空或为0带入明细
+        this.form.fPlanqty == 0 || !this.form.fPlanqty? this.$set(this.form, "fPlanqty", fPlanqty): 0
+        this.form.fPlannetweight == 0 || !this.form.fPlannetweight? this.$set(this.form, "fPlannetweight", fPlanqty): 0
+        this.form.fPlangrossweight == 0 || !this.form.fPlangrossweight? this.$set(this.form, "fPlangrossweight", fPlanqty): 0
+        this.$set(this.form, "fShipper", [...new Set(fShipper)].join(","))
         this.$set(this.form, "fMarks", [...new Set(fMarks)].join(","));
         this.$set(
             this.form,
@@ -6913,14 +6961,23 @@ export default {
       this.$set(this.whgenlegParams, 'fCorpid', this.form.fCorpid)
       this.$set(this.whgenlegParams, 'fWarehouseid', this.form.fWarehouseid)
       this.$set(this.whgenlegParams, 'fTrademodeid', this.form.fTrademodeid)
+      let arr = [];
+      let total = 0;
       listWhgenleg(this.whgenlegParams).then((response) => {
         response.rows.map((e) => {
           e.fQtyblc2 = e.fQtyblc;
           e.fGrossweightblc2 = e.fGrossweightblc;
           e.fNetweightblc2 = e.fNetweightblc;
+          const index = this.detailList.findIndex(item => item.fSrcid === e.fId)
+          if (index == -1) {
+            arr.push(e)
+            total++
+          }
         });
-        this.whgenlegList = response.rows;
-        this.whgenlegTotal = response.total;
+        // this.whgenlegList = response.rows;
+        // this.whgenlegTotal = response.total;
+        this.whgenlegList = arr;
+        this.whgenlegTotal = total;
       });
     },
     async printZyd() {