瀏覽代碼

修改复制新增

qukaidi 4 年之前
父節點
當前提交
2cc1450594

+ 33 - 11
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -714,7 +714,7 @@
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item >
+            <el-form-item>
               <el-table
                 :data="CntrTable"
                 style="width: 80%"
@@ -764,20 +764,28 @@
                       type="text"
                       @click.native.prevent="deleteRow(scope.$index, CntrTable)"
                       icon="el-icon-delete"
-                      ></el-button
-                    >
+                    ></el-button>
                   </template>
                 </el-table-column>
               </el-table>
               <div style="display: flex; justify-content: center; width: 80%">
-                <el-tag class="tag-hover" @click="addRow" style="border-top-left-radius: 0;border-top-right-radius: 0;height: 15px;padding: 0px 4px;line-height: 12px;"
+                <el-tag
+                  class="tag-hover"
+                  @click="addRow"
+                  style="
+                    border-top-left-radius: 0;
+                    border-top-right-radius: 0;
+                    height: 15px;
+                    padding: 0px 4px;
+                    line-height: 12px;
+                  "
                   ><i class="el-icon-plus"></i
                 ></el-tag>
               </div>
             </el-form-item>
           </el-col>
         </el-row>
-        
+
         <el-button type="primary" :disabled="browseStatus" @click="saveForm"
           >保 存</el-button
         >
@@ -2106,7 +2114,7 @@ export default {
   },
   data() {
     return {
-      CntrTable:[{}],
+      CntrTable: [{}],
       idCopy: "",
       //全屏放大
       dialogFull: false,
@@ -2311,7 +2319,7 @@ export default {
           width: 100,
         },
       ],
-      mblnoStatus:"",
+      mblnoStatus: "",
       allCheck: false,
       showSetting: false,
       headers: {
@@ -2662,7 +2670,13 @@ export default {
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = "总计";
-        } else if (index === 13 || index === 11 || index === 12) {
+        } else if (
+          index === 13 ||
+          index === 11 ||
+          index === 12 ||
+          index === 14 || 
+          index === 15
+        ) {
           const values = data.map((item) => Number(item[column.property]));
           if (!values.every((value) => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
@@ -2673,9 +2687,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 12) {
+            if (index === 14 || index === 15) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 13) {
+              sums[index] = sums[index];
+            }
           }
         }
       });
@@ -3193,7 +3210,7 @@ export default {
       this.warehouseOptions = [];
       this.relevantAttachments = [];
       this.mblnoStatus = "";
-      this.CntrTable=[{}];
+      this.CntrTable = [{}];
       this.form = {
         fCorpid: null,
         fTocorpid: null,
@@ -3414,6 +3431,8 @@ export default {
         getGoodsTransfer(this.idCopy).then((response) => {
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+             this.form.fProductName = "";
+            this.form.fMarks = "";
             queryUserVal().then((response) => {
               this.Lander = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -3436,7 +3455,10 @@ export default {
           this.KHblnoOptions = response.data.corps;
           this.fWbuOptions = response.data.feesList;
           this.warehouseOptions = response.data.warehouse;
-          this.dataList = response.data.warehouseBillsItem;
+               if(response.data.warehouseBillsItem.length>0){
+              this.form.fMblno=""
+            }
+            this.dataList = [];
           for (let list in this.dataList) {
             // if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
             //   this.formBrowseStatus = true

+ 6 - 2
src/views/warehouseBusiness/inStock/index.vue

@@ -2626,7 +2626,6 @@
                 />
               </template>
             </el-table-column>
-            d
             <el-table-column
               prop="fProductName"
               header-align="center"
@@ -5998,6 +5997,8 @@ export default {
           }
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+            this.form.fProductName = "";
+            this.form.fMarks = "";
             queryUserVal().then((response) => {
               this.userVal = response.user;
               this.current = response.user.userName;
@@ -6036,7 +6037,10 @@ export default {
             );
           }
           if (response.data.warehouseBillsItem) {
-            this.dataList = response.data.warehouseBillsItem;
+            if(response.data.warehouseBillsItem.length>0){
+              this.form.fMblno=""
+            }
+            this.dataList = [];
             for (let list in this.dataList) {
               this.$set(this.dataList[list], "fBillstatus", 10);
               this.$set(

+ 12 - 3
src/views/warehouseBusiness/outStock/index.vue

@@ -4466,6 +4466,7 @@ export default {
         if (index === 0) {
           sums[index] = "总计";
         } else if (
+          index === 14 ||
           index === 13 ||
           index === 10 ||
           index === 11 ||
@@ -4481,9 +4482,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 12) {
+            if (index === 13 ||index===14) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 12) {
+              sums[index] = sums[index];
+            }
           }
         }
       });
@@ -5559,7 +5563,7 @@ export default {
     },
     // 查询库存总账信息
     getWhgenlegList() {
-      this.whgenlegParams.fMblno = this.form.fMblno;
+      // this.whgenlegParams.fMblno = this.form.fMblno;
       this.whgenlegParams.fCorpid = this.form.fCorpid;
       this.whgenlegParams.fWarehouseid = this.form.fWarehouseid;
       this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
@@ -5759,6 +5763,8 @@ export default {
         getWarehousebills(this.idCopy).then((response) => {
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+            this.form.fProductName = "";
+            this.form.fMarks = "";
             queryUserVal().then((response) => {
               this.current = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -5784,7 +5790,10 @@ export default {
             this.$set(this.form, "fBillno", null);
           }
           if (response.data.warehouseBillsItem) {
-            this.dataList = response.data.warehouseBillsItem;
+            if(response.data.warehouseBillsItem.length>0){
+              this.form.fMblno=""
+            }
+            this.dataList = [];
             for (let list in this.dataList) {
               this.$set(this.dataList[list], "fBillstatus", 10);
               this.$set(

+ 11 - 2
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -3998,6 +3998,7 @@ export default {
         if (index === 0) {
           sums[index] = "总计";
         } else if (
+          index === 15 ||
           index === 13 ||
           index === 14 ||
           index === 11 ||
@@ -4013,9 +4014,12 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 || index === 14) {
+            if (index === 14|| index === 15) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
+            if (index === 13) {
+              sums[index] = sums[index];
+            }
           }
         }
       });
@@ -5370,6 +5374,8 @@ export default {
         getStockTransfer(this.idCopy).then((response) => {
           if (response.data.warehousebills) {
             this.form = response.data.warehousebills;
+            this.form.fProductName = "";
+            this.form.fMarks = "";
             queryUserVal().then((response) => {
               this.Lander = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -5406,7 +5412,10 @@ export default {
           }
 
           if (response.data.warehouseBillsItem) {
-            this.dataList = response.data.warehouseBillsItem;
+            if(response.data.warehouseBillsItem.length>0){
+              this.form.fMblno=""
+            }
+            this.dataList = [];
             for (let list in this.dataList) {
               if (!this.form.fMblno) {
                 this.$set(this.form, "fMblno", this.dataList[list].fMblno);