From 33de1cf5576373b99dc2a6ed4be097f4d6ad0892 Mon Sep 17 00:00:00 2001
From: lkk <364857242@qq.com>
Date: 星期三, 30 七月 2025 10:58:03 +0800
Subject: [PATCH] 1111

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

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index ba6cde8..01c0f03 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,6 +1791,7 @@
             _this.isDisabled = true;
             _this.top = false;
           }).catch((error) => {
+             _this.butopen = false;
             this.$modal.msgError("鐧昏澶辫触锛岃妫�鏌ユ暟鎹�");
             console.error("Error in addCustomer:", error);
           });
@@ -1978,7 +1982,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 +2130,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