qukaidi 4 年之前
父節點
當前提交
5c8e01921f

+ 13 - 6
src/views/Warehousing/cargoClearance/AddOrUpdate.vue

@@ -205,7 +205,7 @@
               maxlength="9"
               laceholder="计划件数"
               :disabled="browseStatus || current !== before"
-              />
+            />
           </el-form-item>
         </el-col>
         <el-col :span="8">
@@ -1489,7 +1489,7 @@
             fixed
             align="center"
           />
-       <el-table-column
+          <el-table-column
             prop="fCorpid"
             header-align="center"
             align="center"
@@ -1560,7 +1560,7 @@
             </template>
           </el-table-column>
 
-                    <el-table-column
+          <el-table-column
             prop="fFeeUnitid"
             header-align="center"
             align="center"
@@ -2626,7 +2626,7 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     draggable,
-    upLoad
+    upLoad,
   },
   data() {
     return {
@@ -3181,6 +3181,7 @@ export default {
   },
   methods: {
     init() {
+      this.approVal = false;
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];
@@ -3190,6 +3191,10 @@ export default {
       if (this.dataShowcar == "1") {
         this.detailsHidden2 = false;
       }
+      if (this.$route.query.id) {
+        this.approVal = true;
+        this.$router.push({ query: {} });
+      }
       this.getForm();
     },
     init2() {
@@ -3503,8 +3508,7 @@ export default {
     },
     returnData() {
       this.addOrUpdateVisib = false;
-      this.open = false;
-      this.cancelTwo();
+      this.$router.push({ path: "/index" });
     },
     addOrUpdateHandle(form) {
       this.addOrUpdateVisible = true;
@@ -4925,6 +4929,9 @@ export default {
       });
     },
     cancel() {
+      if (this.$route.query.id) {
+        this.$router.push({ query: {} });
+      }
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];

+ 10 - 3
src/views/Warehousing/goodsTransfer/AddOrUpdate.vue

@@ -1796,7 +1796,7 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     draggable,
-    upLoad
+    upLoad,
   },
   data() {
     return {
@@ -2308,12 +2308,17 @@ export default {
   },
   methods: {
     init() {
+      this.approVal = false;
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];
       this.warehouseCrList = [];
       this.warehouseDrList = [];
       this.CntrTable = [];
+      if (this.$route.query.id) {
+        this.approVal = true;
+        this.$router.push({ query: {} });
+      }
       this.getForm();
     },
     init2() {
@@ -2621,8 +2626,7 @@ export default {
     },
     returnData() {
       this.addOrUpdateVisib = false;
-      this.open = false;
-      this.cancelTwo();
+      this.$router.push({ path: "/index" });
     },
     addOrUpdateHandle(form) {
       this.addOrUpdateVisible = true;
@@ -3845,6 +3849,9 @@ export default {
       }
     },
     cancel() {
+      if (this.$route.query.id) {
+        this.$router.push({ query: {} });
+      }
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];

+ 11 - 66
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -2962,6 +2962,7 @@ export default {
   },
   methods: {
     init() {
+      this.approVal = false;
       this.resetForm("form");
       this.resetForm("importList");
       this.detailList = [];
@@ -2973,6 +2974,10 @@ export default {
       if (this.dataShowcar == "1") {
         this.detailsHidden2 = false;
       }
+      if (this.$route.query.id) {
+        this.approVal = true;
+        this.$router.push({ query: {} });
+      }
       this.getForm();
     },
     reset() {
@@ -3111,8 +3116,7 @@ export default {
     },
     returnData() {
       this.addOrUpdateVisib = false;
-      this.open = false;
-      this.cancelTwo();
+      this.$router.push({ path: "/index" });
     },
     addOrUpdateHandle(form) {
       this.addOrUpdateVisible = true;
@@ -3849,34 +3853,6 @@ export default {
         }
       });
     },
-    // 付款合计
-    warehouseDrSummaries(param) {
-      const { columns, data } = param;
-      const sums = [];
-      columns.forEach((column, index) => {
-        if (index === 0) {
-          sums[index] = "合计";
-          return;
-        }
-        const values = data.map((item) => Number(item[column.property]));
-        if (
-          column.property === "fUnitprice" ||
-          column.property === "fAmount" ||
-          column.property === "fQty"
-        ) {
-          sums[index] = values.reduce((prev, curr) => {
-            const value = Number(curr);
-            if (!isNaN(value)) {
-              return prev + curr;
-            } else {
-              return prev;
-            }
-          }, 0);
-          sums[index] = sums[index].toFixed(2);
-        }
-      });
-      return sums;
-    },
     // 收款信息新行
     addCollection() {
       this.$refs["form"].validate((valid) => {
@@ -4095,6 +4071,8 @@ export default {
             this.importList.fQty = this.Printinglist[0].fQty;
             this.importList.fGrossweight = this.Printinglist[0].fGrossweight;
             this.importList.fNetweight = this.Printinglist[0].fNetweight;
+            this.tfNetweightnum2 = (this.importList.fNetweight / 1000).toFixed(2);
+            this.tfGrossweightnum2 = (this.importList.fGrossweight / 1000).toFixed(2);
           }
           console.log(this.importList);
           this.weightList = true;
@@ -4306,42 +4284,6 @@ export default {
         this.isrequired2 = 2;
       }
     },
-    // 数量计算
-    changeContractAmt(row) {
-      let fQty = 0;
-      let fUnitprice = 0;
-      if (row.fUnitprice) {
-        fUnitprice = row.fUnitprice;
-      }
-      if (row.fQty) {
-        fQty = row.fQty;
-      }
-      this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
-    },
-    // 变更计价单位
-    changeFeeUnit(row) {
-      if (!row.fFeeUnitid) {
-        return false;
-      }
-      if (row.fFeeUnitid === "2") {
-        this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
-      } else if (row.fFeeUnitid === "1") {
-        this.$set(row, "fQty", this.fQty.toFixed(2));
-      } else if (row.fFeeUnitid === "3") {
-        this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
-      } else if (row.fFeeUnitid === "7") {
-        this.$set(row, "fQty", this.fCntqty);
-      } else {
-        this.$set(row, "fQty", 0);
-      }
-      if (row.fUnitprice) {
-        this.$set(
-          row,
-          "fAmount",
-          parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
-        );
-      }
-    },
     //打印
     addprint(status) {
       if (status == "zyd") {
@@ -4434,6 +4376,9 @@ export default {
       });
     },
     cancel() {
+      if (this.$route.query.id) {
+        this.$router.push({ query: {} });
+      }
       this.resetForm("form");
       this.resetForm("importList");
       this.detailList = [];

+ 12 - 5
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -1537,7 +1537,7 @@
             </template>
           </el-table-column>
 
-                    <el-table-column
+          <el-table-column
             prop="fFeeUnitid"
             header-align="center"
             align="center"
@@ -2733,7 +2733,7 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     draggable,
-    upLoad
+    upLoad,
   },
   data() {
     return {
@@ -3301,6 +3301,7 @@ export default {
   },
   methods: {
     init() {
+      this.approVal = false;
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];
@@ -3310,6 +3311,10 @@ export default {
       if (this.dataShowcar == "1") {
         this.detailsHidden2 = false;
       }
+      if (this.$route.query.id) {
+        this.approVal = true;
+        this.$router.push({ query: {} });
+      }
       this.getForm();
     },
     init2() {
@@ -3607,8 +3612,7 @@ export default {
     },
     returnData() {
       this.addOrUpdateVisib = false;
-      this.open = false;
-      this.cancelTwo();
+      this.$router.push({ path: "/index" });
     },
     addOrUpdateHandle(form) {
       this.addOrUpdateVisible = true;
@@ -4433,7 +4437,7 @@ export default {
               return prev;
             }
           }, 0);
-           if (column.property === "fGrossweight") {
+          if (column.property === "fGrossweight") {
             sums[index] = (sums[index] / 1000).toFixed(2) + "吨";
           } else if (column.property === "fNetweight") {
             sums[index] = (sums[index] / 1000).toFixed(2) + "吨";
@@ -4991,6 +4995,9 @@ export default {
       });
     },
     cancel() {
+      if (this.$route.query.id) {
+        this.$router.push({ query: {} });
+      }
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];

+ 13 - 6
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -205,7 +205,7 @@
               maxlength="9"
               laceholder="计划件数"
               :disabled="browseStatus || current !== before"
-              />
+            />
           </el-form-item>
         </el-col>
         <el-col :span="8">
@@ -1868,7 +1868,7 @@
             </template>
           </el-table-column>
 
-                  <el-table-column
+          <el-table-column
             prop="fFeeUnitid"
             header-align="center"
             align="center"
@@ -2935,7 +2935,7 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     draggable,
-    upLoad
+    upLoad,
   },
   data() {
     return {
@@ -3489,6 +3489,7 @@ export default {
   },
   methods: {
     init() {
+      this.approVal = false;
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];
@@ -3498,6 +3499,10 @@ export default {
       if (this.dataShowcar == "1") {
         this.detailsHidden2 = false;
       }
+      if (this.$route.query.id) {
+        this.approVal = true;
+        this.$router.push({ query: {} });
+      }
       this.getForm();
     },
     init2() {
@@ -3810,9 +3815,8 @@ export default {
       this.addOrUpdateVisible = false;
     },
     returnData() {
-      this.addOrUpdateVisib = false;
-      this.open = false;
-      this.cancelTwo();
+         this.addOrUpdateVisib = false;
+      this.$router.push({ path: "/index" });
     },
     addOrUpdateHandle(form) {
       this.addOrUpdateVisible = true;
@@ -5216,6 +5220,9 @@ export default {
       });
     },
     cancel() {
+      if (this.$route.query.id) {
+        this.$router.push({ query: {} });
+      }
       this.resetForm("form");
       this.detailList = [];
       this.relevantAttachments = [];

+ 2 - 2
src/views/index.vue

@@ -160,7 +160,7 @@
                 <div class="home_stock_table">
                   {{ item.sendTime ? item.sendTime.slice(0,10) : item.sendTime}}
                 </div>
-                <div class="home_stock_table"><p style="text-align: center;">{{ item.refno3 }}</p></div>
+                <div class="home_stock_table" @click="approval(item)"><p style="text-align: center;">{{ item.refno3 }}</p></div>
                 <div class="home_stock_table">
                   <span v-if="item.refno2 === 'SJRK'">入库</span>
                   <span v-else-if="item.refno2 === 'SJCK'">出库</span>
@@ -698,7 +698,7 @@
               <div class="home_stock_table">
                 {{ item.sendTime ? item.sendTime.slice(0, 10):'' }}
               </div>
-              <div class="home_stock_table"><p>{{ item.refno3}}</p></div>
+              <div class="home_stock_table" @click="approval(item)"><p>{{ item.refno3}}</p></div>
               <div class="home_stock_table">
                 <span v-if="item.refno2 === 'SJRK'">入库</span>
                 <span v-else-if="item.refno2 === 'SJCK'">出库</span>