From fc621495bc5a887b2654cc18d0ab7511f9a8d36a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 08 五月 2025 17:45:35 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/basicData/customerFile/index.vue |    7 ++-
 src/api/basicData/customerFile.js          |    7 ++-
 src/components/PIMTable/PIMTable.vue       |   84 +++++++++++++++++++++--------------------
 3 files changed, 52 insertions(+), 46 deletions(-)

diff --git a/src/api/basicData/customerFile.js b/src/api/basicData/customerFile.js
index 4386a80..c52b76e 100644
--- a/src/api/basicData/customerFile.js
+++ b/src/api/basicData/customerFile.js
@@ -42,10 +42,11 @@
     })
 }
 // 鍒犻櫎瀹㈡埛妗f
-export function delCustomer(id) {
+export function delCustomer(ids) {
     return request({
-        url: '/basic/customer/' + id,
-        method: 'delete'
+        url: '/basic/customer/delCustomer',
+        method: 'delete',
+        data: ids
     })
 }
 
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index 429e26a..2378c5e 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -1,21 +1,20 @@
 <template>
   <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData"
-            :header-cell-style="{ background: '#F0F1F5', color: '#333333' }" height="calc(100vh - 18.5em)"
-            :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle"
-            :row-key="rowKey" style="width: 100%" tooltip-effect="dark" @row-click="rowClick"
-            @current-change="currentChange" @selection-change="handleSelectionChange" class="lims-table">
+    :header-cell-style="{ background: '#F0F1F5', color: '#333333' }" height="calc(100vh - 18.5em)"
+    :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle" :row-key="rowKey"
+    style="width: 100%" tooltip-effect="dark" @row-click="rowClick" @current-change="currentChange"
+    @selection-change="handleSelectionChange" class="lims-table">
     <el-table-column align="center" type="selection" width="55" />
     <el-table-column align="center" label="搴忓彿" type="index" width="60" />
-    
+
     <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey"
-                     :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue"
-                     :filters="item.filters" :fixed="item.fixed" :label="item.label" :prop="item.prop"
-                     show-overflow-tooltip :align="item.align"
-                     :sortable="!!item.sortable" :type="item.type" :width="item.width">
+      :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue"
+      :filters="item.filters" :fixed="item.fixed" :label="item.label" :prop="item.prop" show-overflow-tooltip
+      :align="item.align" :sortable="!!item.sortable" :type="item.type" :width="item.width">
       <template v-if="item.hasOwnProperty('colunmTemplate')" #[item.colunmTemplate]="scope">
         <slot v-if="item.theadSlot" :name="item.theadSlot" :index="scope.$index" :row="scope.row" />
       </template>
-      
+
       <template #default="scope">
         <!-- 鎻掓Ы -->
         <div v-if="item.dataType == 'slot'">
@@ -27,56 +26,58 @@
         </div>
         <!-- 鍥剧墖 -->
         <div v-else-if="item.dataType == 'image'">
-          <img :src="javaApi + '/img/' + scope.row[item.prop]" alt="" style="width: 40px; height: 40px; margin-top: 10px" />
+          <img :src="javaApi + '/img/' + scope.row[item.prop]" alt=""
+            style="width: 40px; height: 40px; margin-top: 10px" />
         </div>
-        
+
         <!-- tag -->
         <div v-else-if="item.dataType == 'tag'">
           <el-tag v-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) === 'string'"
-                  :title="formatters(scope.row[item.prop], item.formatData)"
-                  :type="formatType(scope.row[item.prop], item.formatType)">
+            :title="formatters(scope.row[item.prop], item.formatData)"
+            :type="formatType(scope.row[item.prop], item.formatType)">
             {{ formatters(scope.row[item.prop], item.formatData) }}
           </el-tag>
-          
+
           <el-tag v-for="(tag, index) in dataTypeFn(scope.row[item.prop], item.formatData)"
-                  v-else-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) === 'object'"
-                  :key="index" :title="formatters(scope.row[item.prop], item.formatData)" :type="formatType(tag, item.formatType)">
+            v-else-if="typeof dataTypeFn(scope.row[item.prop], item.formatData) === 'object'" :key="index"
+            :title="formatters(scope.row[item.prop], item.formatData)" :type="formatType(tag, item.formatType)">
             {{ item.tagGroup ? tag[item.tagGroup.label] ?? tag : tag }}
           </el-tag>
-          
-          <el-tag v-else :title="formatters(scope.row[item.prop], item.formatData)" :type="formatType(scope.row[item.prop], item.formatType)">
+
+          <el-tag v-else :title="formatters(scope.row[item.prop], item.formatData)"
+            :type="formatType(scope.row[item.prop], item.formatType)">
             {{ formatters(scope.row[item.prop], item.formatData) }}
           </el-tag>
         </div>
-        
+
         <!-- 鎸夐挳 -->
         <div v-else-if="item.dataType == 'action'">
           <template v-for="(o, key) in item.operation" :key="key">
             <el-button v-show="o.type != 'upload'" size="small" v-if="o.showHide ? o.showHide(scope.row) : true"
-                       :disabled="o.disabled ? o.disabled(scope.row) : false" :plain="o.plain" type="primary"
-                       :style="{ color: (o.name === '鍒犻櫎' || o.name === 'delete') ? '#f56c6c' : o.color }" link
-                       @click="o.clickFun(scope.row)" :key="key">
+              :disabled="o.disabled ? o.disabled(scope.row) : false" :plain="o.plain" type="primary"
+              :style="{ color: (o.name === '鍒犻櫎' || o.name === 'delete') ? '#f56c6c' : o.color }" link
+              @click="o.clickFun(scope.row)" :key="key">
               {{ o.name }}
             </el-button>
             <el-upload :action="javaApi + o.url + '?id=' + (o.uploadIdFun ? o.uploadIdFun(scope.row) : scope.row.id)"
-                       ref="uploadRef" size="small" :multiple="o.multiple ? o.multiple : false" :limit="1"
-                       :disabled="o.disabled ? o.disabled(scope.row) : false"
-                       :accept="o.accept ? o.accept : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'"
-                       v-if="o.type == 'upload'" style="display: inline-block; width: 50px"
-                       v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader"
-                       :before-upload="(file) => beforeUpload(file, scope.$index)"
-                       :on-change="(file, fileList) => handleChange(file, fileList, scope.$index)"
-                       :on-error="(error, file, fileList) => onError(error, file, fileList, scope.$index)"
-                       :on-success="(response, file, fileList) => handleSuccessUp(response, file, fileList, scope.$index)"
-                       :on-exceed="onExceed" :show-file-list="false">
+              ref="uploadRef" size="small" :multiple="o.multiple ? o.multiple : false" :limit="1"
+              :disabled="o.disabled ? o.disabled(scope.row) : false"
+              :accept="o.accept ? o.accept : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'"
+              v-if="o.type == 'upload'" style="display: inline-block; width: 50px"
+              v-show="o.showHide ? o.showHide(scope.row) : true" :headers="uploadHeader"
+              :before-upload="(file) => beforeUpload(file, scope.$index)"
+              :on-change="(file, fileList) => handleChange(file, fileList, scope.$index)"
+              :on-error="(error, file, fileList) => onError(error, file, fileList, scope.$index)"
+              :on-success="(response, file, fileList) => handleSuccessUp(response, file, fileList, scope.$index)"
+              :on-exceed="onExceed" :show-file-list="false">
               <el-button :size="o.size ? o.size : 'small'" link type="primary"
-                         :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
+                :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button>
             </el-upload>
           </template>
         </div>
         <!-- 鍙偣鍑荤殑鏂囧瓧 -->
         <div v-else-if="item.dataType == 'link'" class="cell link" style="width: 100%"
-             @click="goLink(scope.row, item.linkMethod)">
+          @click="goLink(scope.row, item.linkMethod)">
           <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
         </div>
         <!-- 榛樿绾睍绀烘暟鎹� -->
@@ -87,8 +88,8 @@
       </template>
     </el-table-column>
   </el-table>
-  <pagination v-show="total > 0" :total="total" :layout="page.layout" :page="page.current"
-              :limit="page.size" @pagination="paginationSearch" />
+  <pagination v-show="total > 0" :total="total" :layout="page.layout" :page="page.current" :limit="page.size"
+    @pagination="paginationSearch" />
 </template>
 
 <script setup>
@@ -120,15 +121,15 @@
   },
   handleSelectionChange: {
     type: Function,
-    default: () => {}
+    default: () => { }
   },
   rowClick: {
     type: Function,
-    default: () => {}
+    default: () => { }
   },
   currentChange: {
     type: Function,
-    default: () => {}
+    default: () => { }
   },
   border: {
     type: Boolean,
@@ -274,9 +275,10 @@
 </script>
 
 <style scoped lang="scss">
->>>.cell {
+:deep(.cell) {
   padding: 0 !important;
 }
+
 .cell {
   white-space: nowrap;
   overflow: hidden;
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 6bfd099..827b8e9 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -282,16 +282,19 @@
   }
   ElMessageBox.confirm(
       '閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�',
-      '瀵煎嚭', {
+      '鍒犻櫎鎻愮ず', {
         confirmButtonText: '纭',
         cancelButtonText: '鍙栨秷',
         type: 'warning',
       }
   ).then(() => {
+    tableLoading.value = true
     delCustomer(ids).then(res => {
       proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+      getList()
+    }).finally(() => {
+      tableLoading.value = false
     })
-    getList()
   }).catch(() => {
     proxy.$modal.msg("宸插彇娑�")
   })

--
Gitblit v1.9.3