From 761f4ac65d86778b6fcf21db3d6ff78610830a90 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期四, 31 七月 2025 18:03:00 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb_region

---
 src/views/system/tijian/index.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index ba6cde8..20355f0 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -248,7 +248,7 @@
                 <el-button v-show="lishi" type="primary" @click="cope" size="mini">涓�閿鍒�</el-button>
                 <el-button type="primary" @click="inputChanges" v-show="lishi" size="mini"
                   :disabled="confirm">鍘嗗彶浣撴璁板綍</el-button>
-                <el-button :disabled="isDisabled" type="primary" size="mini" @click="submitForm">鐧昏</el-button>
+                <el-button :disabled="butopen" type="primary" size="mini" @click="submitForm">鐧昏</el-button>
                 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" @queryTable="getList">閲嶇疆</el-button>
               </div>
             </el-col>
@@ -943,6 +943,7 @@
       // 闈炲崟涓鐢�
       single: true,
       cardreader: false,
+      butopen:false,
       // 闈炲涓鐢�
       multiple: true,
       nodeobj: {},
@@ -1745,6 +1746,7 @@
     /** 鐧昏鎻愪氦鎸夐挳 */
     submitForm() {
       let _this = this;
+      _this.butopen = true;
       if (!this.form.cusPhone || !this.form.cusName) {
         this.$message.warning("璇峰~閫夊繀濉」");
         return;
@@ -1781,6 +1783,7 @@
           // }
 
           addCustomer(formData).then((response) => {
+             _this.butopen = false;
             this.responseList = response.data;
             this.form.tjType = this.dict.type.dict_team[0].value;
             this.$modal.msgSuccess("鏂板鎴愬姛");
@@ -1788,8 +1791,8 @@
             _this.isDisabled = true;
             _this.top = false;
           }).catch((error) => {
+             _this.butopen = false;
             this.$modal.msgError("鐧昏澶辫触锛岃妫�鏌ユ暟鎹�");
-            console.error("Error in addCustomer:", error);
           });
         }
       });
@@ -1978,7 +1981,7 @@
         if (isChineseChar(resultObj.data.sex)) {
           _this.form.cusSex = resultObj.data.sex == "濂�" ? 1 : 0
         } else {
-          _this.form.cusSex = resultObj.data.sex;
+          _this.form.cusSex = resultObj.data.sex ==  "1" ? 0 : 1;
         }
         _this.form.cusNational = resultObj.data.mz;
         _this.form.cusBrithday = resultObj.data.csrq;
@@ -2126,7 +2129,13 @@
         websocket.onmessage = function (event) {
           var resultObj = JSON.parse(event.data);
           _this.form.cusName = resultObj.data.name;
-          _this.form.cusSex = resultObj.data.sex;
+            const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char)
+          // _this.form.cusSex = resultObj.data.sex;
+           if (isChineseChar(resultObj.data.sex)) {
+          _this.form.cusSex = resultObj.data.sex == "濂�" ? 1 : 0
+        } else {
+          _this.form.cusSex = resultObj.data.sex ==  "1" ? 0 : 1;
+        }
           _this.form.cusNational = resultObj.data.mz;
           _this.form.cusBrithday = resultObj.data.csrq;
           if (_this.form.cusBrithday) {

--
Gitblit v1.8.0