From 7ae3f52d904c8f3fdf1ba5fc015da54d7ab782e5 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期三, 26 三月 2025 17:44:20 +0800
Subject: [PATCH] 修改

---
 src/views/system/tijian/index.vue |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index ad39758..f1d88a9 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -1225,11 +1225,9 @@
       this.open1 = true;
       this.title = "娣诲姞浣撴鍗曚綅淇℃伅缁存姢";
     },
-    idFn1(value) {
-      if (value) {
-        // console.log(value);
+    idFn1() {
+      if (this.form.firmName) {
         const originalCompId = this.form.firmId;
-        this.form.firmName = value;
         this.CompanyList.forEach((item) => {
           if (item.cnName == this.form.firmName) {
             this.form.firmId = item.drugManufacturerId;
@@ -1239,10 +1237,15 @@
         if (this.form.firmId === originalCompId) {
           this.form.firmId = "";
         }
-        if (this.form.firmId) {
-          this.form.tjType = "1";
-        }
+       
       }
+
+      if (this.form.firmName) {
+          this.form.tjType = this.dict.type.dict_team[1].value;
+        }else{
+          this.form.tjType = this.dict.type.dict_team[0].value;
+        }
+      
     },
     getCurrentDateTime() {
       const currentDate = new Date();
@@ -1703,6 +1706,9 @@
     /** 鐧昏鎻愪氦鎸夐挳 */
 submitForm() {
   let _this = this;
+  if(!this.form.cusPhone || !this.form.cusName){
+        this.$message.warning("璇峰~閫夊繀濉」");
+      }else{
   this.$refs["form"].validate((valid) => {
     if (valid) {
       // 鍒涘缓琛ㄥ崟鏁版嵁鐨勫壇鏈苟鍘婚櫎绌烘牸
@@ -1727,6 +1733,7 @@
 
       addCustomer(formData).then((response) => {
         this.responseList = response.data;
+        this.form.tjType = this.dict.type.dict_team[0].value;
         this.$modal.msgSuccess("鏂板鎴愬姛");
         _this.tcShow = true;
         _this.isDisabled = true;
@@ -1734,6 +1741,7 @@
       });
     }
   });
+}
 },
 
     getmailType() {
@@ -1772,7 +1780,12 @@
             if (this.form.reservationId != null) {
               if (this.form.groupingId) {
                 this.form.firmName = this.form.compName;
-                this.form.tjType = "1";
+                this.dict.type.dict_team.forEach((item)=> {
+                  if(item.label == "鍥㈤槦"){
+                    this.form.tjType = item.value;
+                  }
+                })
+                // this.form.tjType = this.dict.type.dict_team[1].value;
                 this.CompanyList.forEach((item) => {
                   if (item.cnName == this.form.firmName) {
                     this.form.firmId = item.drugManufacturerId;
@@ -2326,6 +2339,11 @@
 
     Package() {
       this.activeNames = "first";
+      if (this.form.cusSex == "鐢�") {
+            this.form.cusSex = 0;
+          } else  if (this.form.cusSex == "濂�"){
+            _this.form.cusSex = 1;
+          }
       let cusSex = this.form.cusSex;
       this.datekey = Date.now();
       //鍏ㄩ儴濂楅
@@ -3261,6 +3279,7 @@
             discount: item.discount,
             parentProId: item.parentProId,
             cusIdCard: item.cusId,
+            yhj: item.nowPrice
           })); // 鍒涘缓鏂扮殑瀵硅薄锛屽寘鍚� discount 鍜� id
         gaibianzhekou(newArray).then((res) => {
           this.loadingSubmit = false;

--
Gitblit v1.8.0