From 287ebd61bb900d52fa968fc7eaf525728cc848fb Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期四, 24 七月 2025 10:49:01 +0800
Subject: [PATCH] qx

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

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index 340ff8c..7ecfeea 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -284,7 +284,7 @@
     <el-dialog title="閫夋嫨濂楅" :visible.sync="taocan" width="70%" height="700px" :close-on-click-modal="false">
       <el-tabs type="border-card" style="height: 560px; margin: 0 10px; width: 100%" v-model="activeNames"
         @tab-click="handleClick">
-        <el-tab-pane label="濂楅" name="first">
+        <el-tab-pane label="濂楅" name="first" :disabled ="form.sftj == 'Y'|| form.sftj == 'y'">
           <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto"
             @submit.native.prevent="handle">
             <el-form-item label="濂楅鍚嶇О" prop="pacName">
@@ -306,7 +306,7 @@
             </div>
           </div>
         </el-tab-pane>
-        <el-tab-pane label="缁勫悎" name="third">
+        <el-tab-pane label="缁勫悎" name="third" :disabled ="form.sftj == 'Y'|| form.sftj == 'y'">
           <el-row :gutter="20" style="width: 100%">
             <el-col :span="6" style="min-width: 200px">
               <div style="text-align: center; margin-bottom: 10px; margin-top: 10px;">
@@ -367,7 +367,7 @@
             </el-col>
           </el-row>
         </el-tab-pane>
-        <el-tab-pane label="鍗曢」" name="second">
+        <el-tab-pane label="鍗曢」" name="second" :disabled ="form.sftj == 'Y'|| form.sftj == 'y'">
           <el-row :gutter="20" style="width: 100%">
             <el-col :span="6" style="min-width: 200px">
               <div style="text-align: center; margin-bottom: 10px; margin-top: 10px;">
@@ -421,7 +421,7 @@
             </el-col>
           </el-row>
         </el-tab-pane>
-        <el-tab-pane label="浜插睘濂楅" name="four">
+        <el-tab-pane label="浜插睘濂楅" name="four" :disabled ="form.sftj == 'N'|| form.sftj == 'n'">
           <el-form :model="queryParam" ref="queryForm" size="small" :inline="true" v-if="showSearch" label-width="auto"
             @submit.native.prevent="handle">
             <el-form-item label="濮撳悕" prop="pacName">
@@ -452,7 +452,6 @@
         <el-button type="primary" @click="submit">纭� 瀹�</el-button>
       </span>
     </el-dialog>
-    <!-- -->
     <el-row v-if="tcShow">
       <el-col :span="15">
         <div class="grid-content bg-purple">
@@ -508,7 +507,11 @@
                   @blur="numberChangeXianPrice(discount, discount)" />
               </el-form-item>
               <el-form-item label="鏄惁鏇挎" v-if="tjtype">
-                <el-input placeholder="鏄惁鏇挎" v-model="sftj" style="width: 150px"></el-input>
+                <!-- <el-input placeholder="鏄惁鏇挎" v-model="sftj" style="width: 150px"></el-input> -->
+                 <el-select  v-model="form.sftj" placeholder="鏄惁鏇挎" style="width: 150px">
+                  <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
+                    :value="dict.value"></el-option>
+                </el-select>
               </el-form-item>
               <br />
 
@@ -1975,7 +1978,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;
@@ -2123,7 +2126,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) {
@@ -2408,6 +2417,11 @@
           });
         } else if (!this.form.firmId && this.form.firmName) {
           this.taocan = true;
+          if(this.form.sftj == "Y" || this.form.sftj == "y"){
+            this.activeNames = "four"
+          }else{
+            this.activeNames = "first"
+          }
           this.loading = true;
           deptTreeSelect(cusSex).then((response) => {
             this.newpacName = response.rows;
@@ -2433,6 +2447,11 @@
 
         else {
           this.taocan = true;
+            if(this.form.sftj == "Y" || this.form.sftj == "y"){
+            this.activeNames = "four"
+          }else{
+            this.activeNames = "first"
+          }
           this.loading = true;
           tuantiSelect(param).then((res) => {
             this.newpacName = res.data;
@@ -2457,6 +2476,11 @@
         }
       } else {
         this.taocan = true;
+          if(this.form.sftj == "Y" || this.form.sftj == "y"){
+            this.activeNames = "four"
+          }else{
+            this.activeNames = "first"
+          }
         this.loading = true;
         deptTreeSelect(cusSex).then((response) => {
           this.newpacName = response.rows;

--
Gitblit v1.8.0