From d3ea99796e35f4be7d2a77957b0be57bee011663 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期五, 01 八月 2025 15:46:42 +0800
Subject: [PATCH] tj

---
 src/views/system/comp/index.vue |   68 +++++++++++++++++++++++++---------
 1 files changed, 50 insertions(+), 18 deletions(-)

diff --git a/src/views/system/comp/index.vue b/src/views/system/comp/index.vue
index 065367a..f29b2d6 100644
--- a/src/views/system/comp/index.vue
+++ b/src/views/system/comp/index.vue
@@ -185,7 +185,12 @@
                     :value="dict.value" />
                 </el-select>
               </el-form-item>
-
+              <el-form-item label="鏄惁鏇挎" prop="tj">
+                <el-select v-model="forms.tj" placeholder="璇烽�夋嫨鏄惁鏇挎" style="width: 120px" clearable>
+                  <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label"
+                    :value="dict.value" />
+                </el-select>
+              </el-form-item>
               <el-form-item label="骞撮緞娈�">
                 <el-col :span="7">
                   <el-input v-model="forms.ltAge" style="width: 53px" />
@@ -195,6 +200,7 @@
                   <el-input v-model="forms.gtAge" style="width: 54px" />
                 </el-col>
               </el-form-item>
+
             </el-form>
 
             <el-row :gutter="10" class="mb8">
@@ -246,7 +252,7 @@
               @submit.native.prevent>
               <el-form-item label="濂楅鍚嶇О" prop="pacName">
                 <el-input ref="inputName" v-model="queryParams.pacName" placeholder="璇疯緭鍏ュ椁愬悕绉�" clearable
-                  @keyup.enter.native="handleSearch" style="width: 140px" />
+                  @keyup.enter.native="handleSearch" @clear="handleClearSearch" style="width: 140px" />
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearch">鎼滅储</el-button>
@@ -417,7 +423,7 @@
               label-width="68px" @submit.native.prevent>
               <el-form-item label="椤圭洰鍚嶇О" prop="proName">
                 <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
-                  @keyup.enter.native="handleSearchFor" style="width: 140px" />
+                  @keyup.enter.native="handleSearchFor" @clear="handleClearSearch" style="width: 140px" />
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button>
@@ -511,7 +517,7 @@
               label-width="68px" @submit.native.prevent>
               <el-form-item label="椤圭洰鍚嶇О" prop="proName">
                 <el-input ref="inputName" v-model="queryParams1.proName" placeholder="璇疯緭鍏ラ」鐩悕绉�" clearable
-                  @keyup.enter.native="handleSearchFor" style="width: 140px" />
+                  @keyup.enter.native="handleSearchFor"  @clear="handleClearSearch" style="width: 140px" />
               </el-form-item>
               <el-form-item>
                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleSearchFor">鎼滅储</el-button>
@@ -728,7 +734,7 @@
     "dict_data_status",
     "sys_user_sex",
     "reservation_pay_type",
-    "sys_yes_no",
+    "sys_yes_no", "sys_normal_disable"
   ],
   data() {
     let checkPhoneNum = (rule, value, callback) => {
@@ -1299,7 +1305,7 @@
         });
       }
     },
-    handleSearchFor() {
+    /* handleSearchFor() {
       // 鍒ゆ柇鏄惁涓烘眽瀛�
       const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char);
       if (isChineseChar(this.queryParams1.proName)) {
@@ -1314,6 +1320,27 @@
           this.Treedata = response.data;
         });
       }
+    }, */
+     handleSearchFor() {
+      // 鍒ゆ柇鏄惁涓烘眽瀛�
+      const keyword = this.queryParams1.proName?.trim() || '';
+      const isChineseChar = /[\u4E00-\u9FA5]/.test(keyword);
+      const query = {
+      ...this.queryParams1,
+      proName: isChineseChar ? keyword : null,
+      pym: isChineseChar ? null : keyword
+     };
+      getProjectList(query).then((response) => {
+          this.Treedata = response.data;
+      });
+    },
+    handleClearSearch() {
+      this.queryParams1.proName = '';
+      this.queryParams1.pym = null;
+      // 閲嶆柊鍔犺浇琛ㄦ牸鏁版嵁
+      getProjectList({}).then((response) => {
+          this.Treedata = response.data;
+        });
     },
     // 鍗曢」鏁版嵁鑾峰彇
     handleChangesingle(selection) {
@@ -1551,7 +1578,9 @@
         });
     },
     xiangmuWh() {
-      if (!this.forms.groupingName || !this.forms.sex || !this.forms.payType) {
+      if (!this.forms.groupingName ||
+        !this.forms.sex ||
+        !this.forms.payType) {
         this.$modal.msgError("璇峰厛濉啓鎵�鏈夊繀濉」!");
         return; // Stop execution if any required field is empty
       }
@@ -1559,6 +1588,9 @@
       this.title = "鍒嗙粍椤圭洰缁存姢";
       this.OnenewpacName = [];
       this.queryParams.price = 0;
+      // 娓呯┖椤圭洰鍚嶇О鎼滅储妗�
+      this.queryParams1.proName = '';
+      this.queryParams1.pym = null;
       this.loading = true;
       if (this.groupList[0]) {
         let id = this.groupList[0].id || "";
@@ -1620,14 +1652,14 @@
     handleGroup() {
       // 濡傛灉娌℃湁閫変腑浠讳綍閮ㄩ棬锛堝嵆娌℃湁 selectionList锛夛紝鍙互鐩存帴浠� OnenewpacName 鑾峰彇鏁版嵁
       let mapList = [];
-      this.OnenewpacName.forEach((item) => {
-        mapList.push({
-          proName: item.proName,
-          proId: item.proId,
-          proPrice: item.proPrice,
-        });
-      });
-
+      // this.OnenewpacName.forEach((item) => {
+      //   mapList.push({
+      //     proName: item.proName,
+      //     proId: item.proId,
+      //     proPrice: item.proPrice,
+      //   });
+      // });
+      console.log(this.groupList)
       let data = {
         groupingName: this.forms.groupingName,
         gtAge: this.forms.gtAge,
@@ -1768,7 +1800,7 @@
       if (val == 0) {
         this.getList()
       } else {
-       this.handleQuerydanwen() 
+        this.handleQuerydanwen()
       }
     },
 
@@ -1837,7 +1869,7 @@
 
       // 鑾峰彇閫変腑鐨勫椁愰」鐩垪琛�
       const newProjects = this.selectedPackage.tjProjectList || [];
-      console.log(newProjects,22222)
+      console.log(newProjects, 22222)
       // 灏嗛�変腑鐨勫椁愰」鐩坊鍔犲埌宸︿晶琛ㄦ牸
       this.loading = true;
       newProjects.forEach((project) => {
@@ -1876,7 +1908,7 @@
     },
 
     handleSelectionChange1(selection) {
-    console.log(selection,11111)
+      console.log(selection, 11111)
       // 瀹炵幇鍗曢�夐�昏緫
       if (selection.length > 1) {
         const lastSelected = selection[selection.length - 1];

--
Gitblit v1.8.0