From a0010bcabbfbc3771aa05d54094f5d02bcdd5609 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期一, 15 十二月 2025 08:42:50 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI

---
 src/views/component/CustomerTypeDialog/index.vue |  132 ++++++++++++++++++++++----------------------
 1 files changed, 66 insertions(+), 66 deletions(-)

diff --git a/src/views/component/CustomerTypeDialog/index.vue b/src/views/component/CustomerTypeDialog/index.vue
index 4e7b048..23bfe60 100644
--- a/src/views/component/CustomerTypeDialog/index.vue
+++ b/src/views/component/CustomerTypeDialog/index.vue
@@ -10,21 +10,21 @@
       <el-card class="search-card">
         <div slot="header" class="clearfix">
           <span>鏌ヨ鏉′欢</span>
-          <el-button 
-            style="float: right; padding: 3px 0" 
+          <el-button
+            style="float: right; padding: 3px 0"
             type="text"
             @click="toggleCollapse"
           >
             {{ collapse ? '灞曞紑' : '鏀惰捣' }}
           </el-button>
         </div>
-        
+
         <el-form :model="queryParams" ref="queryForm" :inline="true">
           <el-row :gutter="20">
             <el-col :span="8">
               <el-form-item label="瀹㈡埛鍒嗙被浠g爜">
-                <el-input 
-                  v-model="queryParams.HNumber" 
+                <el-input
+                  v-model="queryParams.HNumber"
                   placeholder="璇疯緭鍏ュ鎴峰垎绫讳唬鐮�"
                   clearable
                   @keyup.enter.native="handleQuery"
@@ -33,8 +33,8 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="瀹㈡埛鍒嗙被鍚嶇О">
-                <el-input 
-                  v-model="queryParams.HName" 
+                <el-input
+                  v-model="queryParams.HName"
                   placeholder="璇疯緭鍏ュ鎴峰垎绫诲悕绉�"
                   clearable
                   @keyup.enter.native="handleQuery"
@@ -84,8 +84,8 @@
                 </el-col>
                 <el-col :span="8">
                   <el-form-item label="鍐呭">
-                    <el-input 
-                      v-model="queryParams.ColContent" 
+                    <el-input
+                      v-model="queryParams.ColContent"
                       placeholder="璇疯緭鍏ュ唴瀹�"
                       clearable
                     />
@@ -127,8 +127,8 @@
                 </el-col>
                 <el-col :span="8">
                   <el-form-item label="鍐呭">
-                    <el-input 
-                      v-model="queryParams.ColContent1" 
+                    <el-input
+                      v-model="queryParams.ColContent1"
                       placeholder="璇疯緭鍏ュ唴瀹�"
                       clearable
                     />
@@ -169,8 +169,8 @@
                 </el-col>
                 <el-col :span="8">
                   <el-form-item label="鍐呭">
-                    <el-input 
-                      v-model="queryParams.ColContent2" 
+                    <el-input
+                      v-model="queryParams.ColContent2"
                       placeholder="璇疯緭鍏ュ唴瀹�"
                       clearable
                     />
@@ -230,7 +230,7 @@
             @selection-change="handleSelectionChange"
           >
             <el-table-column type="selection" width="55" align="center" />
-            <el-table-column 
+            <el-table-column
               v-for="column in tableColumns"
               :key="column.field"
               :prop="column.field"
@@ -292,7 +292,7 @@
       collapse: false,
       loading: false,
       treeLoading: false,
-      
+
       // 鏌ヨ鍙傛暟
       queryParams: {
         HNumber: '',
@@ -307,35 +307,35 @@
         Comparator2: '0',
         ColContent2: ''
       },
-      
+
       // 鏍戝舰鏁版嵁
       treeData: [],
       treeProps: {
         children: 'children',
         label: 'title'
       },
-      
+
       // 琛ㄦ牸鏁版嵁
       tableData: [],
       tableColumns: [],
       selectedRow: null,
       multipleSelection: [],
-      
+
       // 鍒嗛〉
       pagination: {
         page: 1,
         size: 50,
         total: 0
       },
-      
+
       // 杩囨护鏂规
       currentFilterScheme: '',
       HInterID_Choose: 0,
-      
+
       // 闅愯棌瀛楁
       hiddenFields: ["HItemID"],
-      
-      baseURL: process.env.VUE_APP_BASE_URL || 'http://47.96.97.237/API/',
+
+      baseURL: process.env.VUE_APP_BASE_API || 'http://47.96.97.237/API/',
       user: 'admin',
       HModName: 'Gy_CusType',
       HModuleName: '瀹㈡埛鍒嗙被鍒楄〃缁存姢'
@@ -372,13 +372,13 @@
       this.loadTableData()
       this.getDefaultFilterScheme()
     },
-    
+
     // 鍔犺浇鏍戝舰鏁版嵁
     async loadTreeData() {
       this.treeLoading = true
       try {
         const response = await axios.get(`${this.baseURL}/Gy_BadReason/Gy_CusTypeTreeListByLevel`)
-        
+
         if (response.data.count === 1) {
           this.treeData = JSON.parse(response.data.data)
         } else {
@@ -391,13 +391,13 @@
         this.treeLoading = false
       }
     },
-    
+
     // 鍔犺浇琛ㄦ牸鏁版嵁
     async loadTableData() {
       this.loading = true
       try {
         const sWhere = this.buildQueryCondition()
-        
+
         const response = await axios.get(`${this.baseURL}/Gy_BadReason/Gy_CusTypeList`, {
           params: {
             sWhere: sWhere,
@@ -406,7 +406,7 @@
             size: this.pagination.size
           }
         })
-        
+
         if (response.data.count === 1) {
           this.tableData = response.data.data
           this.pagination.total = response.data.total || response.data.data.length
@@ -421,11 +421,11 @@
         this.loading = false
       }
     },
-    
+
     // 鏋勫缓鏌ヨ鏉′欢
     buildQueryCondition() {
       let sWhere = ""
-      
+
       // 鍩烘湰鏌ヨ鏉′欢
       if (this.queryParams.HNumber) {
         sWhere += ` and 瀹㈡埛鍒嗙被浠g爜 like '%${this.queryParams.HNumber}%'`
@@ -433,16 +433,16 @@
       if (this.queryParams.HName) {
         sWhere += ` and 瀹㈡埛鍒嗙被鍚嶇О like '%${this.queryParams.HName}%'`
       }
-      
+
       // 澶勭悊涓夌粍杩囨护鏉′欢
       const filterGroups = [
         { colName: this.queryParams.ColName, comparator: this.queryParams.Comparator, content: this.queryParams.ColContent },
         { colName: this.queryParams.ColName1, comparator: this.queryParams.Comparator1, content: this.queryParams.ColContent1 },
         { colName: this.queryParams.ColName2, comparator: this.queryParams.Comparator2, content: this.queryParams.ColContent2 }
       ]
-      
+
       filterGroups.forEach(filter => {
-        if (filter.colName && filter.colName !== "0" && 
+        if (filter.colName && filter.colName !== "0" &&
             filter.comparator && filter.comparator !== "0") {
           let com = ""
           switch (filter.comparator) {
@@ -465,26 +465,26 @@
           sWhere += ` and ${filter.colName} ${com}`
         }
       })
-      
+
       // 娣诲姞鎵撳紑绫诲瀷鐨勮繃婊ゆ潯浠�
       sWhere += this.addSWhereByOpenType()
-      
+
       return sWhere
     },
-    
+
     // 鏍规嵁鎵撳紑绫诲瀷娣诲姞鏉′欢
     addSWhereByOpenType() {
       // 杩欓噷鍙互鏍规嵁闇�瑕佹坊鍔犵壒瀹氱殑杩囨护鏉′欢
       return " and 绂佺敤鏍囧織 = '鍚�' and 瀹℃牳浜� != ''"
     },
-    
+
     // 鐢熸垚琛ㄦ牸鍒�
     generateTableColumns(columnList) {
       this.tableColumns = []
-      
+
       // 娣诲姞閫夋嫨鍒�
       this.tableColumns.push({ type: 'selection', fixed: 'left' })
-      
+
       // 鍔ㄦ�佺敓鎴愬垪
       if (columnList && columnList.length > 0) {
         columnList.forEach(item => {
@@ -496,12 +496,12 @@
               sortable: true,
               width: 200
             }
-            
+
             // 鏍规嵁瀛楁绫诲瀷璁剧疆涓嶅悓鐨勬ā鏉�
             if (item.ColmType === 'DateTime') {
               column.formatter = this.formatDate
             }
-            
+
             this.tableColumns.push(column)
           }
         })
@@ -519,7 +519,7 @@
         this.tableColumns = [...this.tableColumns, ...defaultColumns]
       }
     },
-    
+
     handleTreeNodeClick(data) {
       let sWhere = ""
       if (data.id !== '0') {
@@ -527,7 +527,7 @@
       }
       this.loadTableDataWithCondition(sWhere)
     },
-    
+
     async loadTableDataWithCondition(sWhere) {
       this.loading = true
       try {
@@ -537,7 +537,7 @@
             user: this.user
           }
         })
-        
+
         if (response.data.count === 1) {
           this.tableData = response.data.data
           this.pagination.total = response.data.total || response.data.data.length
@@ -548,12 +548,12 @@
         this.loading = false
       }
     },
-    
+
     handleQuery() {
       this.pagination.page = 1
       this.loadTableData()
     },
-    
+
     handleReset() {
       this.queryParams = {
         HNumber: '',
@@ -571,44 +571,44 @@
       this.pagination.page = 1
       this.loadTableData()
     },
-    
+
     // 鍒锋柊
     handleRefresh() {
       this.loadTreeData()
       this.loadTableData()
     },
-    
+
 
     toggleCollapse() {
       this.collapse = !this.collapse
     },
-    
+
     // 琛屽弻鍑讳簨浠�
     handleRowDblClick(row) {
       this.selectedRow = row
       this.confirmSelection()
     },
-    
+
     // 琛岀偣鍑讳簨浠�
     handleRowClick(row) {
       this.$refs.table.toggleRowSelection(row)
       this.selectedRow = row
     },
-    
+
     handleCustomerTypeCodeClick(row) {
       console.log('鐐瑰嚮瀹㈡埛鍒嗙被浠g爜:', row)
       this.selectedRow = row
       this.confirmSelection()
     },
-    
-    
+
+
     handleSelectionChange(selection) {
       this.multipleSelection = selection
       if (selection.length === 1) {
         this.selectedRow = selection[0]
       }
     },
-    
+
 
     confirmSelection() {
       if (this.selectedRow) {
@@ -621,12 +621,12 @@
         this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�')
       }
     },
-    
+
     // 閫�鍑�
     handleExit() {
       this.dialogVisible = false
     },
-    
+
     // 鍏抽棴瀵硅瘽妗�
     handleClose(done) {
       this.$confirm('纭鍏抽棴锛�')
@@ -635,20 +635,20 @@
         })
         .catch(_ => {})
     },
-    
+
     // 鍒嗛〉澶у皬鏀瑰彉
     handleSizeChange(size) {
       this.pagination.size = size
       this.pagination.page = 1
       this.loadTableData()
     },
-    
+
     // 褰撳墠椤垫敼鍙�
     handleCurrentChange(page) {
       this.pagination.page = page
       this.loadTableData()
     },
-    
+
     // 鏍煎紡鍖栨棩鏈�
     formatDate(dateString) {
       if (!dateString) return ''
@@ -659,7 +659,7 @@
         return dateString
       }
     },
-    
+
     // 鑾峰彇榛樿杩囨护鏂规
     async getDefaultFilterScheme() {
       try {
@@ -671,12 +671,12 @@
             Type: "Default"
           }
         })
-        
+
         if (response.data.count === 1) {
           const data = response.data.data[0]
           this.HInterID_Choose = data.hmainid
           this.currentFilterScheme = `褰撳墠杩囨护鏂规锛�${data.鏂规鍚嶇О} (${data.澶囨敞})`
-          
+
           // 搴旂敤杩囨护鏉′欢
           this.applyFilterConditions(response.data.data)
         }
@@ -684,7 +684,7 @@
         console.error('鑾峰彇杩囨护鏂规澶辫触:', error)
       }
     },
-    
+
     // 搴旂敤杩囨护鏉′欢
     applyFilterConditions(filterData) {
       filterData.forEach(item => {
@@ -693,17 +693,17 @@
         }
       })
     },
-    
+
     // 淇濆瓨杩囨护鏂规
     handleSaveScheme() {
       this.$message.info('淇濆瓨鏂规鍔熻兘')
     },
-    
+
     // 璇诲彇杩囨护鏂规
     handleReadScheme() {
       this.$message.info('璇诲彇鏂规鍔熻兘')
     },
-    
+
     // 鍒楄缃�
     handleColumnSetting() {
       this.$message.info('鍒楄缃姛鑳�')
@@ -791,4 +791,4 @@
 .el-tree >>> .el-tree-node.is-current > .el-tree-node__content {
   background-color: #aef0f7;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.1