From b3fedd4221b807a07058be9d5d5d8ba8998adbcb Mon Sep 17 00:00:00 2001 From: Bang Hu <hu_bang@hotmail.com> Date: 星期四, 11 九月 2025 21:35:31 +0800 Subject: [PATCH] Bug修改代码提交 --- src/api/userInfo.ts | 2 vite.config.ts | 2 src/views/productManage/productOrderStatusDialog/index.vue | 23 ++- src/views/tradeManage/buyer/index.vue | 64 +++++----- src/views/tradeManage/seller/index.vue | 27 ++- components.d.ts | 5 src/views/productManage/productPriceViewer/index.vue | 90 ++++++-------- src/views/approveManage/tradeApproval/list.vue | 33 +++-- src/views/tradeManage/detail/index.vue | 74 ++++++++++++ src/api/workFlowApi.ts | 2 10 files changed, 205 insertions(+), 117 deletions(-) diff --git a/components.d.ts b/components.d.ts index 6eada8d..7cd8f42 100644 --- a/components.d.ts +++ b/components.d.ts @@ -13,6 +13,7 @@ ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCol: typeof import('element-plus/es')['ElCol'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] @@ -36,6 +37,8 @@ ElRadio: typeof import('element-plus/es')['ElRadio'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElRate: typeof import('element-plus/es')['ElRate'] + ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElStep: typeof import('element-plus/es')['ElStep'] @@ -46,6 +49,8 @@ ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElTooltip: typeof import('element-plus/es')['ElTooltip'] + ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] ElUpload: typeof import('element-plus/es')['ElUpload'] FileInfoPreview: typeof import('./src/components/fileInfoPreview/index.vue')['default'] FilePreview: typeof import('./src/components/filePreview/index.vue')['default'] diff --git a/src/api/userInfo.ts b/src/api/userInfo.ts index 7a2f1f3..9079292 100644 --- a/src/api/userInfo.ts +++ b/src/api/userInfo.ts @@ -14,7 +14,7 @@ // 鏌ョ湅涓汉淇℃伅 export function queryUserDetail(data: object = {}): ApiPromise { return createAxios({ - baseURL: '/api', + baseURL: '/api1', url: `/admin/common/userDetail`, headers: { 'Content-Type': 'application/json;charset=UTF-8' diff --git a/src/api/workFlowApi.ts b/src/api/workFlowApi.ts index da3e25a..8c8d107 100644 --- a/src/api/workFlowApi.ts +++ b/src/api/workFlowApi.ts @@ -4,7 +4,7 @@ const workFlowApi = { getWorkFlowParams(data: object = {}) : ApiPromise{ return createAxios({ - baseURL: '/api', + baseURL: '/api1', url: `/approval/templateRelation/relationByType`, headers: { 'Content-Type': 'application/json;charset=UTF-8' diff --git a/src/views/approveManage/tradeApproval/list.vue b/src/views/approveManage/tradeApproval/list.vue index 1ba6586..389e960 100644 --- a/src/views/approveManage/tradeApproval/list.vue +++ b/src/views/approveManage/tradeApproval/list.vue @@ -199,9 +199,9 @@ </el-table-column> </el-table-column> - <!-- 鎬讳环 --> - <el-table-column label="鎬讳环" align="center"> - <el-table-column label="鍗曚环" prop="unitPrice" width="90"> + <!-- 鍗曚环锛堜笌鈥滄湡闄�(骞�)鈥濅繚鎸佺浉鍚岀殑鐖跺瓙琛ㄥご缁撴瀯锛� --> + <el-table-column label="鍗曚环" align="center" width="80"> + <el-table-column label="" prop="unitPrice" width="80"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="price-info"> @@ -220,7 +220,11 @@ </div> </template> </el-table-column> - <el-table-column label="鏁伴噺" prop="quantity" width="50"> + </el-table-column> + + <!-- 鏁伴噺锛堜笌鈥滄湡闄�(骞�)鈥濅繚鎸佺浉鍚岀殑鐖跺瓙琛ㄥご缁撴瀯锛� --> + <el-table-column label="鏁伴噺" align="center" width="80"> + <el-table-column label="" prop="quantity" width="80" align="center"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="quantity">{{ row.quantity }}</div> @@ -230,7 +234,7 @@ <!-- 鏈熼檺(骞�) --> <el-table-column label="鏈熼檺(骞�)" align="center" width="80"> - <el-table-column label="" prop="period" width="80"> + <el-table-column label="" prop="period" width="80" align="center"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="period-info"> @@ -333,7 +337,7 @@ const router = useRouter() const userStore = useUserInfo() -const areaIdTreeRef=ref() +const areaIdTreeRef=ref<any>() // 鐘舵�侀�夐」锛堟洿鏂颁负鏂扮殑宸ヤ綔娴佺▼鐘舵�侊級 const statusOptions = [ @@ -356,13 +360,13 @@ const query = reactive({ productName: '', industry: '', - unitProject: [], + unitProject: [] as string[], productType: '', productSubType: '', - importantDistrictIdList: [], + importantDistrictIdList: [] as string[], orderNo: '', status: '', - dateRange: [], + dateRange: [] as string[], }) // 鍒嗛〉淇℃伅 @@ -417,7 +421,7 @@ const importantAreaCh=()=>{ let checkedKeys = areaIdTreeRef.value!.getCheckedNodes(false, true) if(checkedKeys&&checkedKeys.length>0&& query.unitProject.length>0){ - query.importantDistrictIdList=[] + query.importantDistrictIdList=[] as string[] checkedKeys.forEach((item:any)=>{ if(item.children&&item.children.length>0){ query.importantDistrictIdList.push(item.value) @@ -427,8 +431,8 @@ } const importantAreaClear=()=>{ - query.unitProject = [] - query.importantDistrictIdList = [] + query.unitProject = [] as string[] + query.importantDistrictIdList = [] as string[] areaIdTreeRef.value.setCheckedKeys([]) } @@ -531,7 +535,7 @@ // 澶勭悊琛屼笟棰嗗煙鍙樺寲 const handleIndustryChange = async (value: string) => { // 娓呯┖鍗曚綅宸ョ▼閫夋嫨 - query.unitProject = '' + query.unitProject = [] as string[] // 鑾峰彇瀵瑰簲鐨勫崟浣嶅伐绋嬮�夐」 await getUnitProjectOptions(value) } @@ -731,7 +735,7 @@ Object.assign(query, { productName: '', industry: '', - unitProject: '', + unitProject: [], productType: '', productSubType: '', orderNo: '', @@ -1018,6 +1022,7 @@ .period-info { display: flex; align-items: center; + justify-content: center; gap: 8px; font-size: 12px; diff --git a/src/views/productManage/productOrderStatusDialog/index.vue b/src/views/productManage/productOrderStatusDialog/index.vue index eecbacf..04b9e12 100644 --- a/src/views/productManage/productOrderStatusDialog/index.vue +++ b/src/views/productManage/productOrderStatusDialog/index.vue @@ -1,7 +1,7 @@ <template> <el-dialog v-model="visible" - title="浜у搧璁㈠崟" + title="浜у搧璁㈣喘" width="900px" destroy-on-close class="order-status-dialog" @@ -30,19 +30,22 @@ <table class="order-info-table"> <tbody> <tr> - <td class="label">璁㈠崟缂栧彿锛�</td> - <td class="value">{{ order.id }}</td> - <td class="label">鐢宠鏃堕棿锛�</td> + <td class="label">璁㈠崟缂栧彿</td> + <td class="value"> + {{ order.id }} + <el-link type="primary" @click="goBuyerCenter" style="margin-left: 8px">鍓嶅線涔板涓績</el-link> + </td> + <td class="label">鐢宠鏃堕棿</td> <td class="value">{{ order.applyTime }}</td> </tr> <tr> - <td class="label">浜у搧鍚嶇О锛�</td> + <td class="label">浜у搧鍚嶇О</td> <td class="value">{{ order.productName }}</td> - <td class="label">鎻愪緵鑰咃細</td> + <td class="label">鎻愪緵鑰�</td> <td class="value">{{ order.provider }}</td> </tr> <tr> - <td class="label">璁㈠崟鐘舵�侊細</td> + <td class="label">璁㈠崟鐘舵��</td> <td class="value">{{ statusText(order.status) }}</td> <td></td> <td class="value link"> @@ -65,6 +68,7 @@ <script setup lang="ts"> import { ref, computed, watch } from 'vue' +import { useRouter } from 'vue-router' interface Props { modelValue: boolean @@ -92,6 +96,7 @@ const loading = ref(false) const order = ref<OrderDetail | null>(null) +const router = useRouter() // 妯℃嫙璁㈠崟鏁版嵁 const mockOrders: Record<string, OrderDetail> = { @@ -158,6 +163,10 @@ // 浠呮紨绀� window.alert('杩欓噷鍙烦杞埌璁㈠崟璇︽儏椤碉紙绀轰緥锛�') } + +const goBuyerCenter = () => { + router.push({ name: 'tradeBuyerCenter', query: { t: String(Date.now()) } }) +} </script> <style scoped lang="scss"> diff --git a/src/views/productManage/productPriceViewer/index.vue b/src/views/productManage/productPriceViewer/index.vue index 38cada1..4caf97c 100644 --- a/src/views/productManage/productPriceViewer/index.vue +++ b/src/views/productManage/productPriceViewer/index.vue @@ -77,15 +77,7 @@ :colspan="getColspan(priceItem)" class="feature-value" > - <div class="order-methods"> - <span - v-for="method in priceItem.priceSettings" - :key="method" - class="method-item" - > - 鉁� {{ getPriceSettingText(method) }} - </span> - </div> + {{ priceItem.priceSettings.map((m:any) => getPriceSettingText(m)).join('銆�') }} </td> </tr> <tr> @@ -96,42 +88,7 @@ :colspan="getColspan(priceItem)" class="feature-value" > - <div class="price-info"> - <div - v-if="priceItem.priceSettings.includes('POINTS') && priceItem.pointsAmount > 0" - class="price-item" - > - <div class="price-lable-icon"> - <el-icon class="price-icon points"><Coin /></el-icon> - <span class="price-label">绉垎</span> - </div> - <span class="price-value points">{{ formatNumber(priceItem.pointsAmount) }} / {{ getPriceUnitText(priceItem.priceUnit) }}</span> - </div> - <div - v-if="priceItem.priceSettings.includes('CURRENCY') && priceItem.currencyAmount > 0" - class="price-item" - > - <div class="price-lable-icon"> - <span class="price-icon currency">楼</span> - <span class="price-label">璐у竵</span> - </div> - <span class="price-value currency">{{ formatNumber(priceItem.currencyAmount) }} / {{ getPriceUnitText(priceItem.priceUnit) }}</span> - </div> - <div - v-if="priceItem.priceSettings.includes('FREE')" - class="price-item" - > - <span class="price-label">璐圭敤</span> - <span class="price-value free">鍏嶈垂</span> - </div> - <div - v-if="priceItem.priceSettings.includes('AGREEMENT')" - class="price-item" - > - <span class="price-label">鍗忚:</span> - <span class="price-value agreement">姣弡{ getPriceUnitText(priceItem.priceUnit) }}</span> - </div> - </div> + {{ renderPrice(priceItem) }} </td> </tr> <tr> @@ -305,19 +262,22 @@ <table class="order-info-table"> <tbody> <tr> - <td class="label">璁㈠崟缂栧彿锛�</td> - <td class="value">{{ orderStatus.id }}</td> - <td class="label">鐢宠鏃堕棿锛�</td> + <td class="label">璁㈠崟缂栧彿</td> + <td class="value"> + {{ orderStatus.id }} + <el-link type="primary" @click="goBuyerCenter" style="margin-left: 8px">鐐瑰嚮鏌ョ湅</el-link> + </td> + <td class="label">鐢宠鏃堕棿</td> <td class="value">{{ orderStatus.applyTime }}</td> </tr> <tr> - <td class="label">浜у搧鍚嶇О锛�</td> + <td class="label">浜у搧鍚嶇О</td> <td class="value">{{ orderStatus.productName }}</td> - <td class="label">鎻愪緵鑰咃細</td> + <td class="label">鎻愪緵鑰�</td> <td class="value">{{ orderStatus.provider }}</td> </tr> <tr> - <td class="label">璁㈠崟鐘舵�侊細</td> + <td class="label">璁㈠崟鐘舵��</td> <td class="value">{{ statusText(orderStatus.status) }}</td> <td></td> <td class="value link"> @@ -348,6 +308,7 @@ <script setup lang="ts"> import { ref, watch, computed, onMounted } from 'vue' +import { useRouter } from 'vue-router' import { ElMessage } from 'element-plus' import { useRoute } from 'vue-router' import productPricingApi from '@/api/productPricingApi' @@ -359,6 +320,7 @@ import workFlowApi from '@/api/workFlowApi' const route = useRoute() +const router = useRouter() interface PriceItem { id: number @@ -475,6 +437,10 @@ const viewOrder = () => { window.alert('杩欓噷鍙烦杞埌璁㈠崟璇︽儏椤碉紙绀轰緥锛�') +} + +const goBuyerCenter = () => { + router.push({ name: 'tradeBuyerCenter', query: { t: String(Date.now()) } }) } const selectedCount = computed(() => orderSuites.value.filter(s => s.selected).length) @@ -1039,7 +1005,9 @@ PRIVATE_INCREMENT: '绉佹湁澧為噺鍖�', PUBLIC_INCREMENT: '鍏湁澧為噺鍖�', OTA: 'OTA鏈嶅姟', - CLOUD: '浜戞湇鍔�' + CLOUD: '浜戞湇鍔�', + RESOURCE_PACKAGE: '璧勬簮鍖�', + PERSONAL: '涓汉' } return map[salesForm] || salesForm } @@ -1115,6 +1083,24 @@ return map[unit] || unit } +// 缁熶竴娓叉煋浠锋牸锛氬幓闄も�滅Н鍒�/璐у竵/璐圭敤/鍗忚鈥濈瓑绫诲瀷鍓嶇紑锛屼粎杈撳嚭绾环鏍兼枃鏈� +const renderPrice = (priceItem: PriceItem) => { + const segments: string[] = [] + if (priceItem.priceSettings.includes('POINTS') && priceItem.pointsAmount > 0) { + segments.push(`${formatNumber(priceItem.pointsAmount)} / ${getPriceUnitText(priceItem.priceUnit)}`) + } + if (priceItem.priceSettings.includes('CURRENCY') && priceItem.currencyAmount > 0) { + segments.push(`${formatNumber(priceItem.currencyAmount)} / ${getPriceUnitText(priceItem.priceUnit)}`) + } + if (priceItem.priceSettings.includes('FREE')) { + segments.push('鍏嶈垂') + } + if (priceItem.priceSettings.includes('AGREEMENT')) { + segments.push(`姣�${getPriceUnitText(priceItem.priceUnit)}`) + } + return segments.join('锛�') +} + // 鑾峰彇鍒嗙粍鍚庣殑琛ㄥご鏁版嵁 const getGroupedHeaders = (tabData: PriceItem[]) => { const groups: Record<string, { count: number; productSuite: string }> = {} diff --git a/src/views/tradeManage/buyer/index.vue b/src/views/tradeManage/buyer/index.vue index a483ff1..596a765 100644 --- a/src/views/tradeManage/buyer/index.vue +++ b/src/views/tradeManage/buyer/index.vue @@ -154,28 +154,9 @@ </el-table-column> </el-table-column> - <!-- 鎬讳环 --> - <el-table-column label="鎬讳环" align="center"> - <el-table-column label="鍗曚环" prop="unitPrice" width="90"> - <template #default="{ row }"> - <div v-if="row.isSpacer" class="spacer-cell"></div> - <div v-else-if="!row.isMainOrder" class="price-info"> - <span v-if="row.priceType === 'points'" class="price-points"> - 绉垎 {{ row.unitPrice }} - </span> - <span v-else-if="row.priceType === 'currency'" class="price-currency"> - 璐у竵 {{ row.unitPrice }} - </span> - <span v-else-if="row.priceType === 'agreement'" class="price-agreement"> - 鍗忚 - </span> - <span v-else-if="row.priceType === 'free'" class="price-free"> - 鍏嶈垂 - </span> - </div> - </template> - </el-table-column> - <el-table-column label="鏁伴噺" prop="quantity" width="50"> + <!-- 鏁伴噺 --> + <el-table-column label="鏁伴噺" align="center" width="80"> + <el-table-column label="" prop="quantity" width="80" align="center"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="quantity">{{ row.quantity }}</div> @@ -185,7 +166,7 @@ <!-- 鏈熼檺(骞�) --> <el-table-column label="鏈熼檺(骞�)" align="center" width="80"> - <el-table-column label="" prop="period" width="80"> + <el-table-column label="" prop="period" width="80" align="center"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="period-info"> @@ -325,7 +306,19 @@ const productSubTypeOptions = ref<any[]>([]) // 鏌ヨ鏉′欢 -const query = reactive({ +type BuyerQuery = { + productName: string + industry: string + unitProject: string[] + productType: string + productSubType: string + importantDistrictIdList: string[] + orderNo: string + status: string + dateRange: string[] +} + +const query = reactive<BuyerQuery>({ productName: '', industry: '', unitProject: [], @@ -498,7 +491,8 @@ // 澶勭悊琛屼笟棰嗗煙鍙樺寲 const handleIndustryChange = async (value: string) => { // 娓呯┖鍗曚綅宸ョ▼閫夋嫨 - query.unitProject = '' + query.unitProject = [] + query.importantDistrictIdList = [] // 鑾峰彇瀵瑰簲鐨勫崟浣嶅伐绋嬮�夐」 await getUnitProjectOptions(value) } @@ -542,7 +536,7 @@ // 涓昏鍗曡锛屽悎骞舵墍鏈夊垪鏄剧ず璁㈠崟淇℃伅 if (columnIndex === 0) { // 绗竴鍒楋紝鍚堝苟鎵�鏈夊垪 return { - colspan: 8, // 鎬诲叡8鍒楋細璁㈠崟淇℃伅2鍒� + 璐拱鏂瑰紡2鍒� + 鎬讳环2鍒� + 鏈熼檺1鍒� + 鎿嶄綔1鍒� + colspan: 7, // 鎬诲叡7鍒楋細璁㈠崟淇℃伅2鍒� + 璐拱鏂瑰紡2鍒� + 鏁伴噺1鍒� + 鏈熼檺1鍒� + 鎿嶄綔1鍒� rowspan: 1 } } else { @@ -574,7 +568,7 @@ } } } - } else if (columnIndex === 7) { // 鎿嶄綔鍒楋紙绗�8鍒楋級 + } else if (columnIndex === 6) { // 鎿嶄綔鍒楋紙绗�7鍒楋級 // 鎵惧埌褰撳墠瀛愯鍗曟墍灞炵殑涓昏鍗� const parentOrder = row.parentOrder if (parentOrder && parentOrder.subOrders) { @@ -605,6 +599,7 @@ // 鎼滅储澶勭悊锛堟帴鍏ョ湡瀹炲悗绔級 const handleSearch = async () => { + const filterEvaluated = query.status === 'EVALUATED' const payload: any = { pageNum: page.current, pageSize: page.size, @@ -612,7 +607,9 @@ orderId: query.orderNo || undefined, userId: userStore.getUserId ? userStore.getUserId : undefined, } - if (query.status) payload.orderStatus = statusUiToServer[query.status] + if (query.status) { + payload.orderStatus = filterEvaluated ? OrderStatus.COMPLETED : statusUiToServer[query.status] + } if (Array.isArray(query.dateRange) && query.dateRange.length === 2) { payload.applyTimeStart = query.dateRange[0] payload.applyTimeEnd = query.dateRange[1] @@ -631,7 +628,11 @@ const res = (await apiMethod(payload)) as any const pageData = res?.data - const list: any[] = Array.isArray(pageData?.list) ? pageData.list : [] + let list: any[] = Array.isArray(pageData?.list) ? pageData.list : [] + // 鑻ョ瓫閫夆�滃凡璇勪环鈥濓紝鍏堜互宸插畬鎴愭煡璇紝鍐嶅湪鍓嶇鎸夊凡璇勪环杩囨护 + if (filterEvaluated) { + list = list.filter((order: any) => order?.isEvaluate === '宸茶瘎浠�') + } page.total = Number(pageData?.total || 0) const flatData: any[] = [] @@ -682,9 +683,10 @@ Object.assign(query, { productName: '', industry: '', - unitProject: '', + unitProject: [], productType: '', productSubType: '', + importantDistrictIdList: [], orderNo: '', status: '', dateRange: [], @@ -1000,6 +1002,7 @@ .period-info { display: flex; align-items: center; + justify-content: center; gap: 8px; font-size: 12px; @@ -1130,6 +1133,7 @@ font-size: 12px; color: #303133; font-weight: 500; + text-align: center; } .pagination-container { diff --git a/src/views/tradeManage/detail/index.vue b/src/views/tradeManage/detail/index.vue index d0cfb81..c5eb9b5 100644 --- a/src/views/tradeManage/detail/index.vue +++ b/src/views/tradeManage/detail/index.vue @@ -293,6 +293,53 @@ </div> </el-card> + + <!-- 浜ゆ槗璇勪环锛堝綋宸茶瘎浠锋椂鏄剧ず锛� --> + <el-card class="mt15" shadow="never" v-if="showEvaluation"> + <div class="title">浜ゆ槗璇勪环</div> + <div class="evaluation-content"> + <div class="evaluation-form"> + <div class="rating-section"> + <div class="rating-items"> + <div class="rating-row"> + <div class="rating-item"> + <label class="required">缁煎悎璇勫垎:</label> + <el-rate :model-value="evaluation.overallRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> + </div> + <div class="rating-item"> + <label class="required">鏈嶅姟璇勫垎:</label> + <el-rate :model-value="evaluation.serviceRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> + </div> + </div> + <div class="rating-row"> + <div class="rating-item"> + <label class="required">璐ㄩ噺璇勫垎:</label> + <el-rate :model-value="evaluation.qualityRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> + </div> + <div class="rating-item"> + <label class="required">閫熷害璇勫垎:</label> + <el-rate :model-value="evaluation.speedRating" :max="5" disabled :colors="['#99A9BF', '#F7BA2A', '#FF9900']" /> + </div> + </div> + </div> + </div> + + <div class="form-item"> + <label class="required">璇勪环鍐呭:</label> + <div class="eval-text">{{ evaluation.content || '-' }}</div> + </div> + + <div class="form-item"> + <label>鍏朵粬淇℃伅:</label> + <div class="eval-meta"> + <span>鏄惁鍖垮悕锛歿{ evaluation.isAnonymous ? '鏄�' : '鍚�' }}</span> + <span class="split">|</span> + <span>璇勪环鏃堕棿锛歿{ evaluation.evaluateTime || '-' }}</span> + </div> + </div> + </div> + </div> + </el-card> <!-- 杩斿洖鎸夐挳 --> <div class="action-buttons"> <el-button @click="goBack">杩斿洖</el-button> @@ -315,6 +362,15 @@ const route = useRoute() const router = useRouter() const detail = reactive<any>({ items: [], records: [], nodes: [] }) +const evaluation = reactive<any>({ + content: '', + overallRating: 0, + serviceRating: 0, + qualityRating: 0, + speedRating: 0, + isAnonymous: false, + evaluateTime: '' +}) const orderTableWrapRef = ref<HTMLElement | null>(null) const activeTab = ref('records') const userStore = useUserInfo() @@ -340,6 +396,11 @@ const statusOrder = ['WAIT_UPLOAD', 'WAIT_AUTHORIZE', 'WAIT_CONFIRM', 'COMPLETED', 'EVALUATED'] const currentStatus = statusServerToUi[statusName] return currentStatus && statusOrder.indexOf(currentStatus) >= statusOrder.indexOf('WAIT_CONFIRM') +}) + +// 鏄惁鏄剧ず璇勪环鍗$墖锛堝凡璇勪环鏃舵樉绀猴級 +const showEvaluation = computed(() => { + return (detail.isEvaluate === '宸茶瘎浠�') }) // 璁$畻琛ㄦ牸鏁版嵁锛屾坊鍔犳眹鎬昏 @@ -452,6 +513,7 @@ projectUnit: data.projectUnit || '-', productType: data.productType || '-', productDesc: data.productDesc || '-', + isEvaluate: data.isEvaluate || '鏈瘎浠�' } // 鏄庣粏椤规槧灏� @@ -488,6 +550,18 @@ workflowId: data.workflowId || data.processinstId || '' }) + // 鏄犲皠浜ゆ槗璇勪环淇℃伅锛堝鏋滃瓨鍦級 + if (data.evaluation) { + evaluation.content = data.evaluation.content || '' + evaluation.overallRating = Number(data.evaluation.rating || data.evaluation.overallRating || 0) + evaluation.serviceRating = Number(data.evaluation.serviceRating || 0) + evaluation.qualityRating = Number(data.evaluation.qualityRating || 0) + // 鍚庣涓� deliveryRating锛屽榻愬墠绔� speedRating 鍛藉悕 + evaluation.speedRating = Number(data.evaluation.deliveryRating || data.evaluation.speedRating || 0) + evaluation.isAnonymous = Boolean(data.evaluation.isAnonymous) + evaluation.evaluateTime = formatDateTime((data.evaluation.replyTime || data.evaluation.createdAt || data.evaluation.createTime) as any) + } + // 鍒濆鍖栦氦鏄撲俊鎭娉ㄦ暟鎹� remarkItems.value = (detail.items || []).map((item: any, index: number) => { // 璁$畻鎺堟潈缁撴潫鏃堕棿 diff --git a/src/views/tradeManage/seller/index.vue b/src/views/tradeManage/seller/index.vue index 8c4f3db..531b440 100644 --- a/src/views/tradeManage/seller/index.vue +++ b/src/views/tradeManage/seller/index.vue @@ -153,9 +153,9 @@ </el-table-column> </el-table-column> - <!-- 鎬讳环 --> - <el-table-column label="鎬讳环" align="center"> - <el-table-column label="鍗曚环" prop="unitPrice" width="90"> + <!-- 鍗曚环锛堜笌鈥滄湡闄�(骞�)鈥濅繚鎸佺浉鍚岀殑鐖跺瓙琛ㄥご缁撴瀯锛� --> + <el-table-column label="鍗曚环" align="center" width="80"> + <el-table-column label="" prop="unitPrice" width="80"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="price-info"> @@ -174,7 +174,11 @@ </div> </template> </el-table-column> - <el-table-column label="鏁伴噺" prop="quantity" width="50"> + </el-table-column> + + <!-- 鏁伴噺锛堜笌鈥滄湡闄�(骞�)鈥濅繚鎸佺浉鍚岀殑鐖跺瓙琛ㄥご缁撴瀯锛� --> + <el-table-column label="鏁伴噺" align="center" width="80"> + <el-table-column label="" prop="quantity" width="80" align="center"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="quantity">{{ row.quantity }}</div> @@ -184,7 +188,7 @@ <!-- 鏈熼檺(骞�) --> <el-table-column label="鏈熼檺(骞�)" align="center" width="80"> - <el-table-column label="" prop="period" width="80"> + <el-table-column label="" prop="period" width="80" align="center"> <template #default="{ row }"> <div v-if="row.isSpacer" class="spacer-cell"></div> <div v-else-if="!row.isMainOrder" class="period-info"> @@ -292,13 +296,13 @@ const query = reactive({ productName: '', industry: '', - unitProject: [], + unitProject: [] as string[], productType: '', productSubType: '', - importantDistrictIdList: [], + importantDistrictIdList: [] as string[], orderNo: '', status: '', - dateRange: [], + dateRange: [] as string[], }) // 鍒嗛〉淇℃伅 @@ -444,7 +448,7 @@ query.importantDistrictIdList=[] checkedKeys.forEach((item:any)=>{ if(item.children&&item.children.length>0){ - query.importantDistrictIdList.push(item.value) + query.importantDistrictIdList.push(String(item.value)) } }) } @@ -459,7 +463,7 @@ // 澶勭悊琛屼笟棰嗗煙鍙樺寲 const handleIndustryChange = async (value: string) => { // 娓呯┖鍗曚綅宸ョ▼閫夋嫨 - query.unitProject = '' + query.unitProject = [] // 鑾峰彇瀵瑰簲鐨勫崟浣嶅伐绋嬮�夐」 await getUnitProjectOptions(value) } @@ -502,7 +506,7 @@ // 涓昏鍗曡锛屽悎骞舵墍鏈夊垪鏄剧ず璁㈠崟淇℃伅 if (columnIndex === 0) { // 绗竴鍒楋紝鍚堝苟鎵�鏈夊垪 return { - colspan: 8, // 鎬诲叡8鍒楋細璁㈠崟淇℃伅2鍒� + 璐拱鏂瑰紡2鍒� + 鎬讳环2鍒� + 鏈熼檺1鍒� + 鎿嶄綔1鍒� + colspan: 8, // 鎬诲叡8鍒楋細璁㈠崟淇℃伅2鍒� + 璐拱鏂瑰紡2鍒� + 鍗曚环1鍒� + 鏁伴噺1鍒� + 鏈熼檺1鍒� + 鎿嶄綔1鍒� rowspan: 1 } } else { @@ -919,6 +923,7 @@ .period-info { display: flex; align-items: center; + justify-content: center; gap: 8px; font-size: 12px; diff --git a/vite.config.ts b/vite.config.ts index 79f3ce3..d37d451 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -33,7 +33,7 @@ // target:'http://10.209.233.16/admin',//淇″垱姝e紡 // target: 'http://36.133.126.111:7099/api', //娴嬭瘯 // target: 'https://zynlpt.ccccltd.cn/admin', // 姝e紡 (瑕佹墦寮�changeOrigin鍜宺ewrite) - // target: 'http://localhost:8089', + // target: 'http://localhost:8089', target: 'http://36.133.126.111:7099/trade-api', changeOrigin: true, // 鍏佽璺ㄥ煙 rewrite: (path) => path.replace(/^\/api/, '/'), //杩炴祴璇曠幆澧冭娉ㄩ噴杩欒锛岃繛鍚庣涓汉鍒欐墦寮� -- Gitblit v1.8.0