From c3b53e3dd1923e851e8c618b13e428422376bc60 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期四, 28 九月 2023 13:42:39 +0800
Subject: [PATCH] feat: 服务回访单列表配置列显隐控制

---
 src/views/other/payment/saleInvoice/addSaleInvoice.vue |   58 +++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/src/views/other/payment/saleInvoice/addSaleInvoice.vue b/src/views/other/payment/saleInvoice/addSaleInvoice.vue
index db82aa3..70c635f 100644
--- a/src/views/other/payment/saleInvoice/addSaleInvoice.vue
+++ b/src/views/other/payment/saleInvoice/addSaleInvoice.vue
@@ -54,7 +54,7 @@
                       class="common-select-btn"
                       @click="clearupClient('client')"
                     >
-                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                      <i class="el-icon-remove-outline" title="娓呴櫎"></i>
                     </div>
                   </div>
                 </el-form-item>
@@ -133,7 +133,7 @@
                       class="common-select-btn"
                       @click="clearupClient('serviceContract')"
                     >
-                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                      <i class="el-icon-remove-outline" title="娓呴櫎"></i>
                     </div>
                   </div>
                 </el-form-item>
@@ -159,7 +159,7 @@
                       class="common-select-btn"
                       @click="clearupClient('contract')"
                     >
-                      <i class="el-icon-edit-outline" title="娓呴櫎"></i>
+                      <i class="el-icon-remove-outline" title="娓呴櫎"></i>
                     </div>
                   </div>
                 </el-form-item>
@@ -403,7 +403,7 @@
         show: true,
         total: true,
         sumProp: ["Amount", "Unit", "total"],
-        mergeNumber: 3
+        mergeNumber: 2
       },
       editSelectClientConfig: {
         editVisible: false,
@@ -481,26 +481,38 @@
       this.$refs[formName].validate((valid) => {
         if (valid) {
           console.log(this.editConfig.infomation)
-          const params = this.saveParams()
-          console.log(params)
-          if (this.editConfig.title === "鏂板缓") {
-            addInvoice(params).then((res) => {
-              console.log(res)
-              this.editConfig.visible = false
-              if (res.code === 200) {
-                this.$message.success("娣诲姞鎴愬姛")
-                this.$parent.getData()
-              }
-            })
+          for (let i = 0; i < this.tableData.length; i++) {
+            if (this.tableData[i].name.length === 0) {
+              this.isNoProduct = true
+              break
+            } else {
+              this.isNoProduct = false
+            }
+          }
+          if (this.isNoProduct) {
+            this.$message.error("浜у搧鍚嶇О涓嶈兘涓虹┖")
           } else {
-            // getUpdateServiceContract(params).then((res) => {
-            //   console.log(res)
-            //   this.editConfig.visible = false
-            //   if (res.code === 200) {
-            //     this.$message.success("缂栬緫鎴愬姛")
-            //     this.$parent.getData()
-            //   }
-            // })
+            const params = this.saveParams()
+            console.log(params)
+            if (this.editConfig.title === "鏂板缓") {
+              addInvoice(params).then((res) => {
+                console.log(res)
+                this.editConfig.visible = false
+                if (res.code === 200) {
+                  this.$message.success("娣诲姞鎴愬姛")
+                  this.$parent.getData()
+                }
+              })
+            } else {
+              // getUpdateServiceContract(params).then((res) => {
+              //   console.log(res)
+              //   this.editConfig.visible = false
+              //   if (res.code === 200) {
+              //     this.$message.success("缂栬緫鎴愬姛")
+              //     this.$parent.getData()
+              //   }
+              // })
+            }
           }
         } else {
           console.log("error submit")

--
Gitblit v1.8.0