Ver código fonte

修改验证

戴艳蓉 3 anos atrás
pai
commit
e99ee5f903

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/index.html


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/chunk-90d245fc.5c43df5a.css


BIN
dist/static/css/chunk-667d1ace.388fdff7.css.gz → dist/static/css/chunk-90d245fc.5c43df5a.css.gz


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.d611fe2b.js


BIN
dist/static/js/app.cec9db1a.js.gz → dist/static/js/app.d611fe2b.js.gz


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-667d1ace.55417cef.js


BIN
dist/static/js/chunk-667d1ace.55417cef.js.gz


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-90d245fc.f745fae1.js


BIN
dist/static/js/chunk-90d245fc.f745fae1.js.gz


+ 41 - 38
src/views/purchase/orderRecord/components/InvoiceHead.vue

@@ -137,7 +137,17 @@ import asyncRequest from "@/apis/service/purchase/orderRecord";
 import resToken from "@/mixins/resToken";
 export default {
   name: "orderRecord",
-  props: ["newTime", "oldItem", "newItem", "isDetail", "img", "ratioItem","id",  "payNo", "companyNo"],
+  props: [
+    "newTime",
+    "oldItem",
+    "newItem",
+    "isDetail",
+    "img",
+    "ratioItem",
+    "id",
+    "payNo",
+    "companyNo",
+  ],
   mixins: [resToken],
   data() {
     return {
@@ -217,7 +227,6 @@ export default {
   },
   methods: {
     async initForm() {
-      // console.log(this.payNo);
       this.loading = true;
       await this.resetForm();
 
@@ -225,7 +234,7 @@ export default {
       this.loading = false;
     },
     async abnormal() {
-      console.log(this.id,this.payNo);
+      console.log(this.id, this.payNo);
       this.loading = true;
       let model1 = {
         sid: this.id,
@@ -255,32 +264,26 @@ export default {
         if (this.$refs.examForm) {
           this.$refs.examForm.resetFields();
           this.$refs.examForm.clearValidate();
-          if (this.newItem.buyer_address) {
-            this.examForm.buyer_address = JSON.parse(
-              JSON.stringify(this.newItem.buyer_address)
-            );
-            this.examForm.buyer_bank = JSON.parse(
-              JSON.stringify(this.newItem.buyer_bank)
-            );
-            this.examForm.buyer_id = JSON.parse(
-              JSON.stringify(this.newItem.buyer_id)
-            );
-            this.examForm.buyer_name = JSON.parse(
-              JSON.stringify(this.newItem.buyer_name)
-            );
+          const {
+            buyer_address,
+            buyer_bank,
+            buyer_id,
+            buyer_name,
 
-            this.examForm.seller_address = JSON.parse(
-              JSON.stringify(this.newItem.seller_address)
-            );
-            this.examForm.seller_bank = JSON.parse(
-              JSON.stringify(this.newItem.seller_bank)
-            );
-            this.examForm.seller_id = JSON.parse(
-              JSON.stringify(this.newItem.seller_id)
-            );
-            this.examForm.seller_name = JSON.parse(
-              JSON.stringify(this.newItem.seller_name)
-            );
+            seller_address,
+            seller_bank,
+            seller_id,
+            seller_name,
+          } = this.newItem;
+          if (buyer_address) {
+            this.examForm.buyer_address = buyer_address;
+            this.examForm.buyer_bank = buyer_bank;
+            this.examForm.buyer_id = buyer_id;
+            this.examForm.buyer_name = buyer_name;
+            this.examForm.seller_address = seller_address;
+            this.examForm.seller_bank = seller_bank;
+            this.examForm.seller_id = seller_id;
+            this.examForm.seller_name = seller_name;
           }
         }
       });
@@ -290,23 +293,23 @@ export default {
       await this.$refs.examForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
+          const { buyer_name, buyer_id, buyer_bank, buyer_address } =
+            this.oldItem;
           const obj = JSON.parse(JSON.stringify(this.examForm));
-          if (obj.buyer_address !== this.oldItem.buyer_address) {
-            console.log(obj.buyer_address);
-            console.log(this.oldItem.buyer_address);
-            this.$message.error("购买方地址、电话不正确!");
+          if (obj.buyer_name !== buyer_name) {
+            this.$message.error("购买方单位名称不正确!");
             return;
           }
-          if (obj.buyer_bank !== this.oldItem.buyer_bank) {
-            this.$message.error("购买方开户行及帐号不正确!");
+          if (obj.buyer_id !== buyer_id) {
+            this.$message.error("购买方纳税人识别号不正确!");
             return;
           }
-          if (obj.buyer_id !== this.oldItem.buyer_id) {
-            this.$message.error("购买方纳税人识别号不正确!");
+          if (obj.buyer_bank !== buyer_bank) {
+            this.$message.error("购买方开户行及帐号不正确!");
             return;
           }
-          if (obj.buyer_name !== this.oldItem.buyer_name) {
-            this.$message.error("购买方单位名称不正确!");
+          if (obj.buyer_address !== buyer_address) {
+            this.$message.error("购买方地址、电话不正确!");
             return;
           }
           let arr = [];

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff