li.shaoyi 2 years ago
parent
commit
941fe57bdc

+ 2 - 0
src/business/search/index.ts

@@ -13,6 +13,7 @@ import {
     getFluorescenceTypeList,
     getCertTypeList,
     getStyleTypeList,
+    getFancyColorType3List,
 } from '@/constants/diamond'
 
 export function useSearch(category: Category) {
@@ -43,6 +44,7 @@ export function useSearch(category: Category) {
         fluorescenceTypeList: getFluorescenceTypeList(),
         certTypeList: getCertTypeList(),
         styleTypeList: getStyleTypeList(),
+        fancyColorType3List: getFancyColorType3List(),
     }
 
     // 记录上次选中的列表项索引

+ 1 - 1
src/packages/pc/views/search/fancy/index.vue

@@ -7,7 +7,7 @@
                     <app-multiple :data-list="enums.shapeTypeList" v-model="formData.zsshapetype" checkbox />
                 </el-form-item>
                 <el-form-item label="颜色">
-                    <app-multiple :data-list="enums.colorTypeList" v-model="formData.zscolortype" checkbox />
+                    <app-multiple :data-list="enums.fancyColorType3List" v-model="formData.zscolortype" checkbox />
                 </el-form-item>
                 <el-form-item label="净度">
                     <app-multiple :data-list="enums.clarityTypeList" v-model="formData.zsclaritytype" checkbox />

+ 3 - 3
src/packages/pc/views/trade/purchase/components/add/index.vue

@@ -38,9 +38,9 @@
                 <app-multiple class="el-form-item--col" :data-list="enums.clarityTypeList"
                     v-model="formData.ZSClarityType" />
             </el-form-item>
-            <el-form-item label="彩钻颜色" prop="ZSCZColor1Type" v-if="formData.ZSCategory === Category.Fancy">
+            <el-form-item label="彩钻颜色" prop="ZSCZColor3Type" v-if="formData.ZSCategory === Category.Fancy">
                 <app-multiple class="el-form-item--col" :data-list="enums.fancyColorType3List"
-                    v-model="formData.ZSCZColor1Type" />
+                    v-model="formData.ZSCZColor3Type" />
             </el-form-item>
             <el-form-item label="颜色" prop="ZSColorType" v-else>
                 <app-multiple class="el-form-item--col" :data-list="enums.colorTypeList"
@@ -154,7 +154,7 @@ const formRules: FormRules = {
             }
         }
     }],
-    ZSCZColor1Type: [{
+    ZSCZColor3Type: [{
         validator: (rule, value, callback) => {
             if (value.every((val: number) => Boolean(val + ''))) {
                 callback()

+ 5 - 0
src/packages/pc/views/trade/purchase/index.vue

@@ -16,6 +16,10 @@
             <template #header>
                 <app-auth-operation :menus="['trade_purchase_add']" @closed="onRefresh" />
             </template>
+            <!-- 颜色 -->
+            <template #zscolortypedisplay="{ row }">
+                {{ row.zscategory === Category.Fancy ? row.zsczcolor3typedisplay : row.zscolortypedisplay }}
+            </template>
             <!-- 操作 -->
             <template #operate="{ row }">
                 <app-auth-operation type="dropdown" :menus="handleOperateButtons(row)" :options="{ selectedRow: row }"
@@ -31,6 +35,7 @@
 
 <script lang="ts" setup>
 import { ElMessage } from 'element-plus'
+import { Category } from '@/constants/diamond'
 import { useDataFilter } from '@/hooks/datatable'
 import { usePurchaseOrder } from '@/business/trade/list'
 import { useComposeTable } from '@pc/components/base/table'