From 83d5b2be8fdf0ac0b59cacf6b344c8815ab4d040 Mon Sep 17 00:00:00 2001 From: seatonwan9 Date: 星期二, 02 九月 2025 19:58:11 +0800 Subject: [PATCH] 提交源码 --- src/api/userInfo.ts | 4 src/views/tradeManage/buyer/index.vue | 159 ++++++++++--------- src/views/tradeManage/seller/index.vue | 120 +++++++------- .env.production | 12 + src/views/pointsManage/personal/index.vue | 36 ++-- src/router/index.ts | 16 + src/views/tradeManage/detail/index.vue | 104 +++++++----- 7 files changed, 240 insertions(+), 211 deletions(-) diff --git a/.env.production b/.env.production index 6fd1798..83e72cc 100644 --- a/.env.production +++ b/.env.production @@ -1,10 +1,14 @@ # 绾夸笂鐜 ENV = 'production' # base璺緞 -VITE_BASE_PATH = '/admin' +#VITE_BASE_PATH = '/admin' +VITE_BASE_PATH = '/trade-api' # 寮�鍙戠幆澧冧笅璺ㄥ煙浠g悊锛岃杈撳叆瑕佽法鍩熺殑api鍦板潃 - 灏鹃儴鏃犻渶甯�'/' -VITE_BI_URL = 'https://zynlpt.ccccltd.cn' +VITE_AXIOS_BASE_URL = 'http://36.133.126.111:7099' +#VITE_BI_URL = 'https://zynlpt.ccccltd.cn' +VITE_BI_URL = 'http://36.133.126.111:7099' #璺宠浆iframe鍦板潃 -VITE_IFREAM_URL='https://zynlpt.ccccltd.cn' +#VITE_IFREAM_URL='https://zynlpt.ccccltd.cn' +VITE_IFREAM_URL='http://36.133.126.111:7099' # 鎵爜鐧诲綍椤靛湴鍧� 鐧诲綍瀹屼細鑷姩璺宠浆鍒板ぇ灞� -VITE_BASE_LOGIN_URL='https://portal.ccccltd.cn/sso_sys?cb=http://zynlpt.ccccltd.cn' \ No newline at end of file +VITE_BASE_LOGIN_URL='https://portal.ccccltd.cn/sso_sys?cb=http://zynlpt.ccccltd.cn' diff --git a/src/api/userInfo.ts b/src/api/userInfo.ts index 6e85b61..7a2f1f3 100644 --- a/src/api/userInfo.ts +++ b/src/api/userInfo.ts @@ -1,5 +1,4 @@ import createAxios from '@/utils/axios' -let url = '/test' // 淇敼瀵嗙爜 export function updatePassw(data: object = {}): ApiPromise { @@ -15,7 +14,8 @@ // 鏌ョ湅涓汉淇℃伅 export function queryUserDetail(data: object = {}): ApiPromise { return createAxios({ - url: `${url}/admin/common/userDetail`, + baseURL: '/api', + url: `/admin/common/userDetail`, headers: { 'Content-Type': 'application/json;charset=UTF-8' }, diff --git a/src/router/index.ts b/src/router/index.ts index e4dce3f..29dfb48 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -32,7 +32,7 @@ const commonStore = useCommonInfo() commonStore.updateActiveMenu(to.path) const navStore = useNavTabs() - + // 寮�鍙戞ā寮忎笅璺宠繃鐧诲綍楠岃瘉 if (import.meta.env.DEV) { // 濡傛灉璁块棶鐧诲綍椤甸潰锛岀洿鎺ヨ烦杞埌棣栭〉 @@ -51,13 +51,23 @@ screenToken: '', } userStore.updateUserInfo(obj) - } + }else { + if (to.query.token) { + const token = to.query.token as string + localStorage.setItem('lastRecordTime', new Date().getTime().toString()) + const obj: any = { + adminToken: token, + screenToken: '', + } + userStore.updateUserInfo(obj) + } + } } } next() return } - + // 鐢熶骇鐜淇濇寔鍘熸湁閫昏緫 if (to.path == '/login' || to.path == '/loginT') { // 濡傛灉璺緞鏄� /login 鍒欐甯告墽琛� diff --git a/src/views/pointsManage/personal/index.vue b/src/views/pointsManage/personal/index.vue index 1449cf4..6d0bfd5 100644 --- a/src/views/pointsManage/personal/index.vue +++ b/src/views/pointsManage/personal/index.vue @@ -58,11 +58,11 @@ <span class="filter-label">鏁版嵁绫荤洰:</span> <el-select v-model="queryParams.dataCategory" placeholder="鍏ㄩ儴" clearable> <el-option label="鍏ㄩ儴" value="" /> - <el-option - v-for="category in categoryList" - :key="category" - :label="getCategoryLabel(category)" - :value="category" + <el-option + v-for="category in categoryList" + :key="category" + :label="getCategoryLabel(category)" + :value="category" /> </el-select> </div> @@ -103,7 +103,7 @@ <!-- 娴佹按琛ㄦ牸 --> <div class="table-section"> - <el-table :data="flowList" stripe style="width: 100%"> + <el-table :data="flowList" stripe style="width: 100%" :height="440"> <el-table-column prop="id" label="搴忓彿" width="80" align="center" /> <el-table-column prop="dataCategory" label="鏁版嵁绫荤洰" width="120"> <template #default="{ row }"> @@ -145,15 +145,15 @@ <script setup lang="ts"> import { ref, reactive, onMounted, computed } from 'vue' import { dayjs, ElMessage } from 'element-plus' -import { - ArrowLeft, - Refresh, - Setting, - Close, - Money, - Plus, - Minus, - Search +import { + ArrowLeft, + Refresh, + Setting, + Close, + Money, + Plus, + Minus, + Search } from '@element-plus/icons-vue' import pointsApi from '@/api/pointsApi' import type { PointsStats, PointsFlow, PointsQueryParams } from '@/types/points' @@ -369,7 +369,7 @@ cursor: pointer; color: #409eff; font-size: 18px; - + &:hover { color: #66b1ff; } @@ -391,7 +391,7 @@ cursor: pointer; color: #909399; font-size: 16px; - + &:hover { color: #409eff; } @@ -585,7 +585,7 @@ :deep(.el-select), :deep(.el-date-picker) { width: 100%; - + @media (min-width: 768px) { width: auto; min-width: 120px; diff --git a/src/views/tradeManage/buyer/index.vue b/src/views/tradeManage/buyer/index.vue index 4c67314..51ea821 100644 --- a/src/views/tradeManage/buyer/index.vue +++ b/src/views/tradeManage/buyer/index.vue @@ -35,11 +35,11 @@ <el-option v-for="item in productTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> </el-select> </el-form-item> - <el-form-item label="" class="col-17"> - <el-select v-model="query.productSubType" placeholder="璇烽�夋嫨浜у搧绫诲瀷瀛愮骇" clearable style="width: 100%"> - <el-option v-for="item in productSubTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> - </el-select> - </el-form-item> +<!-- <el-form-item label="" class="col-17">--> +<!-- <el-select v-model="query.productSubType" placeholder="璇烽�夋嫨浜у搧绫诲瀷瀛愮骇" clearable style="width: 100%">--> +<!-- <el-option v-for="item in productSubTypeOptions" :key="item.value" :label="item.label" :value="item.value" />--> +<!-- </el-select>--> +<!-- </el-form-item>--> <el-form-item label="鐢宠鏃堕棿" class="col-30"> <el-date-picker v-model="query.dateRange" @@ -74,7 +74,7 @@ <template #default="{ row }"> <div v-if="row.isMainOrder" class="main-order-info"> <div class="order-header"> - + <div class="order-item"> <span class="label">鐢宠鏃堕棿:</span> <span class="value">{{ row.applyTime }}</span> @@ -103,7 +103,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 璐拱鏂瑰紡 --> <el-table-column label="璐拱鏂瑰紡" align="center"> <el-table-column label="閿�鍞舰寮�/璐︽埛鏁伴噺" width="150"> @@ -137,7 +137,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 鎬讳环 --> <el-table-column label="鎬讳环" align="center"> <el-table-column label="鍗曚环" prop="unitPrice" width="90"> @@ -166,7 +166,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 鏈熼檺(骞�) --> <el-table-column label="鏈熼檺(骞�)" align="center" width="80"> <el-table-column label="" prop="period" width="80"> @@ -179,7 +179,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 鎿嶄綔 --> <el-table-column label="鎿嶄綔" align="center" width="120" class="operation-column"> <el-table-column label="" width="120"> @@ -190,56 +190,56 @@ <div class="action-item"> <div class="action-buttons"> <template v-for="action in getAvailableActions(row.parentOrder)" :key="action.type"> - <el-button + <el-button v-if="action.type === ActionType.VIEW" - type="primary" - link - size="small" + type="primary" + link + size="small" @click="handleAction(action, row.parentOrder)" > 鏌ョ湅 </el-button> - <el-button + <el-button v-else-if="action.type === ActionType.TRACK" - type="primary" - link - size="small" + type="primary" + link + size="small" @click="handleAction(action, row.parentOrder)" > 杩借釜 </el-button> - <el-button + <el-button v-else-if="action.type === ActionType.UPLOAD_FILE" - type="primary" - link - size="small" + type="primary" + link + size="small" @click="handleAction(action, row.parentOrder)" > 鎻愪氦鏂囦欢 </el-button> - <el-button + <el-button v-else-if="action.type === ActionType.CONFIRM_TRADE" - type="primary" - link - size="small" + type="primary" + link + size="small" @click="handleAction(action, row.parentOrder)" > 浜ゆ槗纭 </el-button> - <el-button + <el-button v-else-if="action.type === ActionType.EVALUATE" - type="primary" - link - size="small" + type="primary" + link + size="small" @click="handleAction(action, row.parentOrder)" > 璇勪环 </el-button> - <el-button + <el-button v-else-if="action.type === ActionType.CANCEL_ORDER" - type="danger" - link - size="small" + type="danger" + link + size="small" @click="handleAction(action, row.parentOrder)" > 鍙栨秷璁㈠崟 @@ -268,11 +268,11 @@ /> </div> </el-card> - + <!-- 璁㈠崟鐘舵�佸璇濇 --> - <!-- <ProductOrderStatusDialog - v-model="orderStatusDialogVisible" - :order-id="currentOrderId" + <!-- <ProductOrderStatusDialog + v-model="orderStatusDialogVisible" + :order-id="currentOrderId" /> --> </div> </template> @@ -379,7 +379,8 @@ // 鑾峰彇浜у搧绫诲瀷閫夐」 const getProductTypeOptions = async () => { try { - const res = await productApi.getCategoryByParent({ parentCode: 'product_type' }) + // product_type + const res = await productApi.getCategoryByParent({ parentCode: 'ProductTechnologyType' }) if (res?.code === 200 && res.data) { productTypeOptions.value = res.data.map((item: any) => ({ label: item.name, @@ -444,7 +445,7 @@ // 娓呯┖浜у搧瀛愮骇閫夋嫨 query.productSubType = '' // 鑾峰彇瀵瑰簲鐨勪骇鍝佸瓙绾ч�夐」 - await getProductSubTypeOptions(value) + // await getProductSubTypeOptions(value) } // 鑾峰彇鐘舵�佺被鍨� @@ -552,7 +553,7 @@ payload.applyTimeStart = query.dateRange[0] payload.applyTimeEnd = query.dateRange[1] } - + // 娣诲姞浜у搧鏉′欢鏌ヨ if (query.industry) payload.industryId = query.industry if (query.unitProject) payload.unitProjectId = query.unitProject @@ -562,7 +563,7 @@ // 鏍规嵁鏄惁鏈変骇鍝佹潯浠堕�夋嫨涓嶅悓鐨凙PI const hasProductConditions = query.industry || query.unitProject || query.productType || query.productSubType const apiMethod = hasProductConditions ? orderApi.getBuyerOrderPageWithProductConditions : orderApi.getBuyerOrderPage - + const res = (await apiMethod(payload)) as any const pageData = res?.data const list: any[] = Array.isArray(pageData?.list) ? pageData.list : [] @@ -690,9 +691,9 @@ type: 'warning', confirmButtonClass: 'el-button--danger' }) - + const res = await orderApi.cancelOrder(order.id) - + if (res && res.code === 200) { ElMessage.success('璁㈠崟鍙栨秷鎴愬姛') handleSearch() // 鍒锋柊鍒楄〃 @@ -724,13 +725,13 @@ return } } - + // 鑾峰彇鍒濆閫夐」鏁版嵁 await Promise.all([ getIndustryOptions(), getProductTypeOptions() ]) - + // 鎵ц鎼滅储 handleSearch() }) @@ -768,7 +769,7 @@ border-bottom: 2px solid #e4e7ed; // 涓庡垎闅旇涓�鑷寸殑涓嬭竟妗� } } - + // 璋冩暣琛ㄥご楂樺害 tr:first-child { th { @@ -785,18 +786,18 @@ .search-card { margin-bottom: 20px; - + .query-form { .form-row { display: flex; gap: 0; width: 100%; margin-bottom: 8px; - + &.actions { justify-content: flex-end; } - + .el-form-item { margin-right: 0 !important; } > .el-form-item { padding-right: 8px; } > .el-form-item:last-child { padding-right: 0; } @@ -810,7 +811,7 @@ .el-form-item { margin-bottom: 16px; margin-right: 20px; - + &:last-child { margin-right: 0; } @@ -821,7 +822,7 @@ .table-container { position: relative; z-index: 1; - + .custom-table { // 琛ㄥご绗簩琛屾枃瀛楀ぇ灏忚皟鏁� .el-table__header-wrapper { @@ -834,7 +835,7 @@ } } } - + // 纭繚琛ㄥご鎵�鏈夎鐨勬枃瀛楀ぇ灏忎竴鑷� .el-table__header { th { @@ -844,23 +845,23 @@ } } } - + .el-table { position: relative; z-index: 1; - + .main-order-row { background-color: #f8f9fa; font-weight: 600; - + td { border-bottom: 2px solid #e4e7ed; } } - + .sub-order-row { background-color: #ffffff; - + td { border-bottom: 1px solid #ebeef5; } @@ -886,14 +887,14 @@ gap: 8px; flex-shrink: 0; flex: 1; - + .label { color: #909399; font-size: 12px; min-width: 60px; flex-shrink: 0; } - + .value { color: #303133; font-size: 12px; @@ -908,22 +909,22 @@ .price-info { font-size: 12px; - + .price-points { color: #e6a23c; font-weight: 500; } - + .price-currency { color: #67c23a; font-weight: 500; } - + .price-agreement { color: #409eff; font-weight: 500; } - + .price-free { color: #909399; font-style: italic; @@ -935,7 +936,7 @@ align-items: center; gap: 8px; font-size: 12px; - + .permanent { color: #909399; font-size: 12px; @@ -967,18 +968,18 @@ display: flex; align-items: center; margin-bottom: 4px; - + &:last-child { margin-bottom: 0; } - + .label { color: #909399; font-size: 12px; min-width: 60px; flex-shrink: 0; } - + .value { color: #303133; font-size: 12px; @@ -999,7 +1000,7 @@ color: #303133; text-align: center; line-height: 1.4; - + .all-actions { display: flex; flex-direction: column; @@ -1007,10 +1008,10 @@ justify-content: center; gap: 6px; width: 100%; - + .action-item { width: 100%; - + .action-buttons { display: flex; flex-direction: column; @@ -1018,7 +1019,7 @@ align-items: center; justify-content: center; width: 100%; - + .el-button { width: 100%; text-align: center; @@ -1030,7 +1031,7 @@ height: auto; line-height: 1.2; } - + .op-text { margin: 4px 0; text-align: center; @@ -1050,12 +1051,12 @@ flex-wrap: wrap; } -.op-text { - color: #606266; +.op-text { + color: #606266; font-size: 12px; } -.op-text.warning { - color: #f59e0b; +.op-text.warning { + color: #f59e0b; font-size: 12px; } @@ -1076,11 +1077,11 @@ .el-table__fixed-right { z-index: 2 !important; } - + .el-table__fixed-right-patch { z-index: 2 !important; } - + // 鎿嶄綔鍒楁牱寮忎紭鍖� .operation-column { .cell { diff --git a/src/views/tradeManage/detail/index.vue b/src/views/tradeManage/detail/index.vue index 7882083..0189854 100644 --- a/src/views/tradeManage/detail/index.vue +++ b/src/views/tradeManage/detail/index.vue @@ -24,7 +24,7 @@ <el-tag :type="getStatusType(detail.status)" size="small">{{ detail.statusName }}</el-tag> </el-descriptions-item> </el-descriptions> - + <!-- 鐢宠浜轰俊鎭紙涓庤鍗曚俊鎭悓鍗$墖锛屽鐢ㄥ垎闅旀爣棰樻牱寮忥級 --> <el-descriptions :column="2" @@ -74,7 +74,7 @@ <div class="desc-wrap">{{ detail.productDesc }}</div> </el-descriptions-item> </el-descriptions> - + <!-- 璁㈠崟璇︽儏锛堢Щ鍔ㄥ埌浜ゆ槗鍐呭涓嬮潰锛屽悓涓�鍗$墖鍐咃級 --> <div ref="orderTableWrapRef"> <el-table @@ -228,7 +228,7 @@ <!-- 瀹℃壒杩借釜 --> <el-card class="mt15" shadow="never"> <div class="title">瀹℃壒杩借釜</div> - + <!-- 鏍囩椤� --> <!-- <el-tabs v-model="activeTab" class="approval-tabs"> <el-tab-pane label="瀹℃壒璁板綍" name="records"> @@ -280,12 +280,12 @@ </el-table> </el-tab-pane> </el-tabs> --> - + <!-- 澶栭儴绯荤粺瀹℃壒杞ㄨ抗 iframe --> <div class="iframe-wrap" v-if="workflowIframeUrl"> <iframe :src="workflowIframeUrl" class="workflow-iframe" referrerpolicy="no-referrer"></iframe> </div> - + </el-card> <!-- 杩斿洖鎸夐挳 --> <div class="action-buttons"> @@ -302,6 +302,7 @@ import orderApi from '@/api/orderApi' import createAxios from '@/utils/axios' import productApi from '@/api/productApi' +import sysUserService from '@/api/sysUser' import { useUserInfo } from '@/stores/modules/userInfo' const hostUrl = import.meta.env.VITE_AXIOS_BASE_URL @@ -376,17 +377,17 @@ onMounted(async () => { const orderId = String(route.params.id || '') if (!orderId) return - + try { // 骞惰鑾峰彇璁㈠崟璇︽儏鍜屽崗璁被鍨嬫鏌� const [orderRes, agreementRes] = await Promise.all([ orderApi.getOrderDetail(orderId), orderApi.checkAgreementPriceType(orderId) ]) - + const res = orderRes as any const data = res?.data || {} - + // 璁剧疆鏄惁涓哄崗璁鍗� const agreementResult = agreementRes as any isAgreementOrder.value = agreementResult?.data === true @@ -411,8 +412,21 @@ } catch (e) { // 蹇界暐浜у搧璇︽儏澶辫触锛屼笉闃诲璁㈠崟璇︽儏 } - + // 鑾峰彇鐢ㄦ埛淇℃伅 + try { + const userRes: any = await sysUserService.getUserdetail({ userId: data.userId }) + if (userRes?.code === 200 && userRes.data) { + // 鐢ㄤ骇鍝佽鎯呰ˉ鍏ㄥご淇℃伅 + data.unitName = userRes.data.unitName || data.unitName + data.userName = userRes.data.name || data.userName + data.userDept = userRes.data.departmentName || data.userDept + data.userPhone = userRes.data.phone || data.userPhone + data.userAccount = userRes.data.username || data.userAccount + } + }catch (e){ + + } // 鏄犲皠璁㈠崟璇︽儏澶撮儴淇℃伅 const head = { @@ -479,11 +493,11 @@ endDateObj.setFullYear(endDateObj.getFullYear() + item.period) endDate = endDateObj.toISOString().split('T')[0] // 鏍煎紡鍖栦负 YYYY-MM-DD } - - return { + + return { name: item.name, start: data.applyTime ? data.applyTime.split('T')[0] : '', // 浣跨敤璁㈠崟鐢宠鏃堕棿 - end: endDate, + end: endDate, forever: item.period === 0, // 鏈熼檺涓�0鏃惰缃负姘镐箙 remark: item.remarks || '' // 浣跨敤濂椾欢淇℃伅涓殑remarks瀛楁 } @@ -546,7 +560,7 @@ } // 琛ㄥご鏂囧瓧灞呬腑锛屼絾绗竴琛岀殑"璇︽儏"鏂囧瓧闈犲乏瀵归綈 -const headerCenterStyle: CSSProperties = { +const headerCenterStyle: CSSProperties = { textAlign: 'center', fontSize: '14px', background: '#f3f6fb' @@ -556,7 +570,7 @@ const bodyCellStyle: CSSProperties = { fontSize: '12px' } // 瀹℃壒杩借釜琛ㄦ牸鏍峰紡 -const recordTableHeaderStyle: CSSProperties = { +const recordTableHeaderStyle: CSSProperties = { textAlign: 'center', fontSize: '14px', background: '#f3f6fb' @@ -564,7 +578,7 @@ const recordTableCellStyle: CSSProperties = { fontSize: '12px' } // 鏂囦欢鍒楄〃琛ㄦ牸琛ㄥご鏂囧瓧灞呬腑锛屼絾绗竴鍒楃殑"浜ゆ槗鏂囦欢"鏂囧瓧闈犲乏瀵归綈 -const fileTableHeaderStyle: CSSProperties = { +const fileTableHeaderStyle: CSSProperties = { textAlign: 'center', fontSize: '14px', background: '#f3f6fb' @@ -623,23 +637,23 @@ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', // .xlsx 'application/vnd.openxmlformats-officedocument.presentationml.presentation', // .pptx ] - + // 濡傛灉MIME绫诲瀷鍖归厤锛岀洿鎺ヨ繑鍥瀟rue if (previewableTypes.includes(file.type || '')) { return true } - + // 濡傛灉MIME绫诲瀷涓虹┖鎴栦笉鍖归厤锛屾牴鎹枃浠舵墿灞曞悕鍒ゆ柇 const fileName = file.name || '' const fileExtension = fileName.toLowerCase().split('.').pop() - + const previewableExtensions = [ 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'txt', 'html', 'htm', 'css', 'js', 'pdf', 'docx', 'xlsx', 'pptx' ] - + return previewableExtensions.includes(fileExtension) } @@ -655,13 +669,13 @@ ElMessage.warning('鏂囦欢閾炬帴涓嶅瓨鍦�') return } - + // 鑾峰彇鏂囦欢鎵╁睍鍚� const fileName = file.name || '' const fileExtension = fileName.toLowerCase().split('.').pop() - + let previewUrl = file.url - + // 濡傛灉鏂囦欢瀛樺偍鍦∕inIO锛屼紭鍏堜娇鐢ㄩ瑙圲RL if (file.url.includes('order-attachments')) { try { @@ -673,9 +687,9 @@ fileName: file.url } }) - + console.log('棰勮URL鍝嶅簲:', previewResponse) - + // 妫�鏌ュ搷搴旀牸寮� const responseData = previewResponse as any if (responseData && responseData.code === 200 && responseData.data) { @@ -693,7 +707,7 @@ originalName: file.name } }) - + // 鍒涘缓棰勮URL const blob = new Blob([response as any]) previewUrl = window.URL.createObjectURL(blob) @@ -705,30 +719,30 @@ return } } - + // 鍥剧墖鏂囦欢鐩存帴鍦ㄦ柊绐楀彛鎵撳紑 - if ((file.type && file.type.startsWith('image/')) || + if ((file.type && file.type.startsWith('image/')) || ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp'].includes(fileExtension)) { console.log('棰勮鍥剧墖鏂囦欢:', previewUrl) window.open(previewUrl, '_blank') return } - + // PDF鏂囦欢鍦ㄦ柊绐楀彛鎵撳紑 if (file.type === 'application/pdf' || fileExtension === 'pdf') { console.log('棰勮PDF鏂囦欢:', previewUrl) window.open(previewUrl, '_blank') return } - + // 鏂囨湰鏂囦欢鍦ㄦ柊绐楀彛鎵撳紑 - if ((file.type && file.type.startsWith('text/')) || + if ((file.type && file.type.startsWith('text/')) || ['txt', 'html', 'htm', 'css', 'js'].includes(fileExtension)) { console.log('棰勮鏂囨湰鏂囦欢:', previewUrl) window.open(previewUrl, '_blank') return } - + // Office鏂囨。鍜屽叾浠栨枃浠剁被鍨嬶紝灏濊瘯鍦ㄦ柊绐楀彛鎵撳紑 try { console.log('棰勮鍏朵粬鏂囦欢:', previewUrl) @@ -745,14 +759,14 @@ ElMessage.warning('鏂囦欢閾炬帴涓嶅瓨鍦�') return } - + console.log('寮�濮嬩笅杞芥枃浠�:', file.name, 'URL:', file.url) - + try { // 濡傛灉鏂囦欢瀛樺偍鍦∕inIO锛屼娇鐢ㄥ悗绔洿鎺ヤ笅杞紸PI if (file.url.includes('order-attachments')) { console.log('浣跨敤MinIO涓嬭浇API') - + // 浣跨敤axios閫氳繃浠g悊璁块棶鍚庣API const response = await createAxios({ url: `/admin/file/download`, @@ -763,28 +777,28 @@ originalName: file.name } }) - + console.log('涓嬭浇鍝嶅簲:', response) - + // 鍒涘缓涓嬭浇閾炬帴 const blob = new Blob([response as any]) const downloadUrl = window.URL.createObjectURL(blob) - + console.log('鍒涘缓涓嬭浇閾炬帴:', downloadUrl) - + const link = document.createElement('a') link.href = downloadUrl link.download = file.name || 'download' link.target = '_blank' link.rel = 'noopener noreferrer' - + document.body.appendChild(link) link.click() document.body.removeChild(link) - + // 娓呯悊URL瀵硅薄 window.URL.revokeObjectURL(downloadUrl) - + ElMessage.success('鏂囦欢涓嬭浇鎴愬姛') } else { console.log('浣跨敤鐩存帴URL涓嬭浇') @@ -794,11 +808,11 @@ link.download = file.name || 'download' link.target = '_blank' link.rel = 'noopener noreferrer' - + document.body.appendChild(link) link.click() document.body.removeChild(link) - + ElMessage.success('寮�濮嬩笅杞芥枃浠�') } } catch (error) { @@ -1052,7 +1066,7 @@ gap: 8px; align-items: center; justify-content: center; - + .preview-btn { color: #409eff; &:hover { @@ -1063,7 +1077,7 @@ cursor: not-allowed; } } - + .download-btn { color: #67c23a; &:hover { diff --git a/src/views/tradeManage/seller/index.vue b/src/views/tradeManage/seller/index.vue index 3735a6f..b3dfeb3 100644 --- a/src/views/tradeManage/seller/index.vue +++ b/src/views/tradeManage/seller/index.vue @@ -35,11 +35,11 @@ <el-option v-for="s in statusOptions" :key="s.value" :label="s.label" :value="s.value" /> </el-select> </el-form-item> - <el-form-item label="" class="col-17"> - <el-select v-model="query.productSubType" placeholder="璇烽�夋嫨浜у搧绫诲瀷瀛愮骇" clearable style="width: 100%"> - <el-option v-for="item in productSubTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> - </el-select> - </el-form-item> +<!-- <el-form-item label="" class="col-17">--> +<!-- <el-select v-model="query.productSubType" placeholder="璇烽�夋嫨浜у搧绫诲瀷瀛愮骇" clearable style="width: 100%">--> +<!-- <el-option v-for="item in productSubTypeOptions" :key="item.value" :label="item.label" :value="item.value" />--> +<!-- </el-select>--> +<!-- </el-form-item>--> <el-form-item label="鐢宠鏃堕棿" class="col-30"> <el-date-picker v-model="query.dateRange" @@ -102,7 +102,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 璐拱鏂瑰紡 --> <el-table-column label="璐拱鏂瑰紡" align="center"> <el-table-column label="閿�鍞舰寮�/璐︽埛鏁伴噺" width="150"> @@ -136,7 +136,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 鎬讳环 --> <el-table-column label="鎬讳环" align="center"> <el-table-column label="鍗曚环" prop="unitPrice" width="90"> @@ -165,7 +165,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 鏈熼檺(骞�) --> <el-table-column label="鏈熼檺(骞�)" align="center" width="80"> <el-table-column label="" prop="period" width="80"> @@ -178,7 +178,7 @@ </template> </el-table-column> </el-table-column> - + <!-- 鎿嶄綔 --> <el-table-column label="鎿嶄綔" align="center" width="120" class="operation-column"> <el-table-column label="" width="120"> @@ -189,20 +189,20 @@ <div class="action-item"> <div class="action-buttons"> <template v-for="action in getAvailableActions(row.parentOrder)" :key="action.type"> - <el-button + <el-button v-if="action.type === ActionType.VIEW" - type="primary" - link - size="small" + type="primary" + link + size="small" @click="handleAction(action, row.parentOrder)" > 鏌ョ湅 </el-button> - <!-- <el-button + <!-- <el-button v-else-if="action.type === ActionType.TRACK" - type="primary" - link - size="small" + type="primary" + link + size="small" @click="handleAction(action, row.parentOrder)" > 杩借釜 @@ -231,11 +231,11 @@ /> </div> </el-card> - + <!-- 璁㈠崟鐘舵�佸璇濇 --> - <ProductOrderStatusDialog - v-model="orderStatusDialogVisible" - :order-id="currentOrderId" + <ProductOrderStatusDialog + v-model="orderStatusDialogVisible" + :order-id="currentOrderId" /> </div> </template> @@ -342,7 +342,7 @@ // 鑾峰彇浜у搧绫诲瀷閫夐」 const getProductTypeOptions = async () => { try { - const res = await productApi.getCategoryByParent({ parentCode: 'product_type' }) + const res = await productApi.getCategoryByParent({ parentCode: 'ProductTechnologyType' }) if (res?.code === 200 && res.data) { productTypeOptions.value = res.data.map((item: any) => ({ label: item.name, @@ -407,7 +407,7 @@ // 娓呯┖浜у搧瀛愮骇閫夋嫨 query.productSubType = '' // 鑾峰彇瀵瑰簲鐨勪骇鍝佸瓙绾ч�夐」 - await getProductSubTypeOptions(value) + // await getProductSubTypeOptions(value) } @@ -532,7 +532,7 @@ // 鏍规嵁鏄惁鏈変骇鍝佹潯浠堕�夋嫨涓嶅悓鐨凙PI const hasProductConditions = query.industry || query.unitProject || query.productType || query.productSubType const apiMethod = hasProductConditions ? orderApi.getSellerOrderPageWithProductConditions : orderApi.getSellerOrderPage - + const res = (await apiMethod(payload)) as any const pageData = res?.data const list: any[] = Array.isArray(pageData?.list) ? pageData.list : [] @@ -652,13 +652,13 @@ return } } - + // 鑾峰彇鍒濆閫夐」鏁版嵁 await Promise.all([ getIndustryOptions(), getProductTypeOptions() ]) - + // 鎵ц鎼滅储 handleSearch() }) @@ -696,7 +696,7 @@ border-bottom: 2px solid #e4e7ed; // 涓庡垎闅旇涓�鑷寸殑涓嬭竟妗� } } - + // 璋冩暣琛ㄥご楂樺害 tr:first-child { th { @@ -713,18 +713,18 @@ .search-card { margin-bottom: 20px; - + .query-form { .form-row { display: flex; gap: 0; width: 100%; margin-bottom: 8px; - + &.actions { justify-content: flex-end; } - + .el-form-item { margin-right: 0 !important; } > .el-form-item { padding-right: 8px; } > .el-form-item:last-child { padding-right: 0; } @@ -738,7 +738,7 @@ .el-form-item { margin-bottom: 16px; margin-right: 20px; - + &:last-child { margin-right: 0; } @@ -749,7 +749,7 @@ .table-container { position: relative; z-index: 1; - + .custom-table { // 琛ㄥご绗簩琛屾枃瀛楀ぇ灏忚皟鏁� .el-table__header-wrapper { @@ -762,7 +762,7 @@ } } } - + // 纭繚琛ㄥご鎵�鏈夎鐨勬枃瀛楀ぇ灏忎竴鑷� .el-table__header { th { @@ -772,23 +772,23 @@ } } } - + .el-table { position: relative; z-index: 1; - + .main-order-row { background-color: #f8f9fa; font-weight: 600; - + td { border-bottom: 2px solid #e4e7ed; } } - + .sub-order-row { background-color: #ffffff; - + td { border-bottom: 1px solid #ebeef5; } @@ -805,20 +805,20 @@ gap: 20px; align-items: center; overflow: hidden; - + .order-item { display: flex; align-items: center; gap: 8px; flex-shrink: 0; - + .label { color: #909399; font-size: 12px; min-width: 60px; flex-shrink: 0; } - + .value { color: #303133; font-size: 12px; @@ -833,22 +833,22 @@ .price-info { font-size: 12px; - + .price-points { color: #e6a23c; font-weight: 500; } - + .price-currency { color: #67c23a; font-weight: 500; } - + .price-agreement { color: #409eff; font-weight: 500; } - + .price-free { color: #909399; font-style: italic; @@ -860,7 +860,7 @@ align-items: center; gap: 8px; font-size: 12px; - + .permanent { color: #909399; font-size: 12px; @@ -892,18 +892,18 @@ display: flex; align-items: center; margin-bottom: 4px; - + &:last-child { margin-bottom: 0; } - + .label { color: #909399; font-size: 12px; min-width: 60px; flex-shrink: 0; } - + .value { color: #303133; font-size: 12px; @@ -924,7 +924,7 @@ color: #303133; text-align: center; line-height: 1.4; - + .all-actions { display: flex; flex-direction: column; @@ -932,10 +932,10 @@ justify-content: center; gap: 6px; width: 100%; - + .action-item { width: 100%; - + .action-buttons { display: flex; flex-direction: column; @@ -943,7 +943,7 @@ align-items: center; justify-content: center; width: 100%; - + .el-button { width: 100%; text-align: center; @@ -955,7 +955,7 @@ height: auto; line-height: 1.2; } - + .op-text { margin: 4px 0; text-align: center; @@ -975,12 +975,12 @@ flex-wrap: wrap; } -.op-text { - color: #606266; +.op-text { + color: #606266; font-size: 12px; } -.op-text.warning { - color: #f59e0b; +.op-text.warning { + color: #f59e0b; font-size: 12px; } @@ -1001,11 +1001,11 @@ .el-table__fixed-right { z-index: 2 !important; } - + .el-table__fixed-right-patch { z-index: 2 !important; } - + // 鎿嶄綔鍒楁牱寮忎紭鍖� .operation-column { .cell { -- Gitblit v1.8.0