Prechádzať zdrojové kódy

增加 删除验证项

戴艳蓉 3 rokov pred
rodič
commit
107ffedae9

+ 2 - 2
src/config/env.development.js

@@ -3,8 +3,8 @@ module.exports = {
   title: '采销平台结算系统',
   baseUrl: 'http://localhost:8080',
   api: {
-    baseApi: 'http://inv.sit.wanyuhengtong.com/',
-    // tableApi: 'http://inv.sit.wanyuhengtong.com/',
+    // baseApi: 'http://inv.sit.wanyuhengtong.com/',
+    baseApi: 'http://www.invoice.com/',
   },
   fileURL: `https://api2.edusit.zretchome.com`,
   appId: 'wx5ac3a2c2d72b6f26',

+ 6 - 6
src/views/purchase/orderRecord/components/addView.vue

@@ -626,7 +626,7 @@ export default {
   methods: {
     async initForm() {
       this.loading = true;
-      console.log(this.pay_status);
+      // console.log(this.pay_status);
       this.pdisabled =
         parseInt(this.pay_status) === 0 && parseInt(this.dstatus) === 0;
       if (this.isDetail === "003" || this.isDetail === "007") {
@@ -703,7 +703,7 @@ export default {
       this.spread = !this.spread;
     },
     addGoods() {
-      console.log(this.supplierNo);
+      // console.log(this.supplierNo);
       if (this.supplierNo.length === 1) {
         this.changeModelId = this.supplierNo[0];
         if (this.ruleForm.goodList && this.ruleForm.goodList.length > 0) {
@@ -959,7 +959,7 @@ export default {
       } else {
         this.show = false;
       }
-      console.log(value);
+      // console.log(value);
     },
     delGoods(index) {
       this.ruleForm.goodList.splice(index, 1);
@@ -972,13 +972,13 @@ export default {
         if (valid) {
           let listTotal = 0;
           this.ruleForm.goodList.forEach((v1) => {
-            console.log(v1.purchasePrice);
-            console.log(v1.purchasePrice * 1);
+            // console.log(v1.purchasePrice);
+            // console.log(v1.purchasePrice * 1);
             listTotal += v1.purchasePrice * 1;
             listTotal =
               listTotal === 0 ? 0 : parseFloat(this.setNum(listTotal));
           });
-          console.log(this.scaleTotal, listTotal);
+          // console.log(this.scaleTotal, listTotal);
           // console.log(listTotal);
           const obj = JSON.parse(JSON.stringify(this.ruleForm));
           if (obj.account[obj.account.length - 1] !== "2") {

+ 21 - 14
src/views/purchase/orderRecord/components/proofreading.vue

@@ -101,7 +101,10 @@
                       ></el-input>
                     </template>
                   </el-table-column>
-                  <el-table-column fixed="right" label="操作" width="50">
+                  <el-table-column fixed="right" width="50">
+                    <template slot="header" slot-scope="scope">
+                      <el-button size="mini" @click="addGoods">新建</el-button>
+                    </template>
                     <template slot-scope="scope">
                       <el-tooltip effect="dark" content="删除" placement="top">
                         <i
@@ -278,21 +281,25 @@ export default {
         }
       });
     },
-
+    addGoods() {
+      let item = {
+        name: "",
+        specification: "",
+        unit: "",
+        quantity: "",
+        unit_price: "",
+        tax_rate: "",
+        tax: "",
+      };
+      this.examForm.item_list.push(item);
+      this.examForm.item_list.forEach((v1, i1) => {
+        this.$set(this.examForm.item_list, i1, v1);
+      });
+      this.$set(rows, index, rows[index]);
+    },
     deleteRow(index, rows) {
       rows.splice(index, 1);
       this.$set(rows, index, rows[index]);
-      // if (type === 1) {
-      //   this.invTableData.forEach((v1, i) => {
-      //     this.claimForm.invid += i === 0 ? v1.id : `,${v1.id}`;
-      //   });
-      // } else {
-      //   this.refundData.forEach((v4, i4) => {
-      //     this.claimForm.invid += i4 === 0 ? v4.refundNo : `,${v4.refundNo}`;
-      //   });
-      // }
-
-      // this.$refs.claimForm.validateField("invid");
     },
     async getData() {
       console.log(this.companyNo);
@@ -323,7 +330,7 @@ export default {
         res.data.invoice &&
         res.data.invoice.length > 0
       ) {
-        console.log("整合数据!");
+        // console.log("整合数据!");
         const data = res.data || [];
         this.oldItem.seller_address = data.old.seller_address;
         this.oldItem.seller_bank = data.old.seller_bank;