Просмотр исходного кода

feat(订单管理): 添加催单筛选并修复回收折扣字段名

- 在订单搜索组件中添加“是否催单”筛选条件
- 修复订单项组件中回收折扣字段名从 discount 改为 recycleDiscount
- 在高投诉商品页面添加平台标签显示功能,支持多平台样式区分
ylong 1 месяц назад
Родитель
Сommit
a847a62367

+ 31 - 0
src/views/goods/highComplaintBooks/index.vue

@@ -11,6 +11,14 @@
                 </div>
                 </div>
             </template>
             </template>
 
 
+            <template #platform="{ row }">
+                <div class="flex flex-wrap gap-2">
+                    <template v-for="item in (Array.isArray(row.platformList) ? row.platformList : (row.platformList ? row.platformList.split(',') : []))" :key="item">
+                        <span class="platform-tag" :style="getPlatformStyle(item)">{{ item }}</span>
+                    </template>
+                </div>
+            </template>
+
             <!-- 操作列 -->
             <!-- 操作列 -->
             <template #action="{ row }">
             <template #action="{ row }">
                 <el-button link type="primary" @click="handleEdit(row)">[编辑]</el-button>
                 <el-button link type="primary" @click="handleEdit(row)">[编辑]</el-button>
@@ -85,4 +93,27 @@
     const handleExport = () => {
     const handleExport = () => {
         pageRef.value?.exportData();
         pageRef.value?.exportData();
     };
     };
+
+    const getPlatformStyle = (platform) => {
+        const styleMap = {
+            '拼多多': { backgroundColor: '#FF0000', color: '#FFFFFF' },
+            '淘宝': { backgroundColor: '#E6A23C', color: '#FFFFFF' },
+            '孔网': { backgroundColor: '#B22222', color: '#FFFFFF' },
+            '小程序': { backgroundColor: '#4CAF50', color: '#FFFFFF' }
+        };
+        return styleMap[platform] || { backgroundColor: '#909399', color: '#FFFFFF' };
+    };
 </script>
 </script>
+
+<style scoped>
+.platform-tag {
+    display: inline-flex;
+    align-items: center;
+    justify-content: center;
+    padding: 2px 10px;
+    border-radius: 4px;
+    font-size: 13px;
+    line-height: 22px;
+    white-space: nowrap;
+}
+</style>

+ 1 - 1
src/views/mallOrder/all/components/order-item.vue

@@ -42,7 +42,7 @@
                             </div>
                             </div>
                             <div class="product-tags">
                             <div class="product-tags">
                                 <span class="tag">回收折扣: <span style="color: #67c23a; font-weight: bold;">{{
                                 <span class="tag">回收折扣: <span style="color: #67c23a; font-weight: bold;">{{
-                                        product.discount || 1 }}折</span></span>
+                                        product.recycleDiscount || 1 }}折</span></span>
                                 <span class="tag">(回收状态: <span style="color: #67c23a; font-weight: bold;">{{
                                 <span class="tag">(回收状态: <span style="color: #67c23a; font-weight: bold;">{{
                                         getRecycleStatusText(product.recycleStatus) }}</span>)</span>
                                         getRecycleStatusText(product.recycleStatus) }}</span>)</span>
                             </div>
                             </div>

+ 1 - 0
src/views/mallOrder/all/components/page-search.vue

@@ -22,6 +22,7 @@ const formItems = reactive([
     { type: 'input', label: '收件人手机号', prop: 'receiverMobile' },
     { type: 'input', label: '收件人手机号', prop: 'receiverMobile' },
     { type: 'input', label: '发货物流单号', prop: 'waybillCode' },
     { type: 'input', label: '发货物流单号', prop: 'waybillCode' },
     { type: 'input', label: '退货物流单号', prop: 'refundWaybillCode' },
     { type: 'input', label: '退货物流单号', prop: 'refundWaybillCode' },
+    { type: 'select', label: '是否催单', prop: 'urgeStatus', options: [{ label: '是', value: 1 }, { label: '否', value: 0 }] },
     { 
     { 
         type: 'dictSelect', 
         type: 'dictSelect', 
         label: '全部订单状态', 
         label: '全部订单状态',