| | |
| | | |
| | | # 本地环境接口地址 - 尾部无需带'/' |
| | | VITE_AXIOS_BASE_URL = 'http://36.133.126.111:7099' |
| | | VITE_FILE_PREVIEW_URL = 'http://36.133.126.111:7098' |
| | | # VITE_AXIOS_BASE_URL = 'http://36.139.126.109:7088' |
| | | |
| | | # 开发环境下跨域代理,请输入要跨域的api地址 - 尾部无需带'/' |
| | |
| | | VITE_BASE_PATH = '/trade-api' |
| | | # 开发环境下跨域代理,请输入要跨域的api地址 - 尾部无需带'/' |
| | | VITE_AXIOS_BASE_URL = 'http://36.133.126.111:7099' |
| | | VITE_FILE_PREVIEW_URL = 'http://36.133.126.111:7098' |
| | | #VITE_BI_URL = 'https://zynlpt.ccccltd.cn' |
| | | VITE_BI_URL = 'http://36.133.126.111:7099' |
| | | #跳转iframe地址 |
| | |
| | | if (config.url?.includes('common/filePreview')) { |
| | | return response |
| | | } |
| | | const isFile = response.headers['content-type'] === 'application/octet-stream' |
| | | if(isFile) { |
| | | return response |
| | | } |
| | | if (response.data && response.data.code == 200) { |
| | | return response.data |
| | | } else { |
| | |
| | | WAIT_APPROVAL_AUTHORIZE = '待审批授权', |
| | | WAIT_CONFIRM = '待交易确认', // 3 |
| | | COMPLETED = '已完成', // 4 |
| | | EVALUATED = '已评价' // 5 (最终状态) |
| | | EVALUATED = '已评价', // 5 (最终状态) |
| | | CANCELED = '已取消' |
| | | } |
| | | |
| | | // 操作类型枚举 |
| | |
| | | [OrderStatus.EVALUATED]: [ |
| | | { type: ActionType.VIEW, routeName: 'tradeOrderDetail' }, |
| | | { type: ActionType.TRACK } |
| | | ], |
| | | [OrderStatus.CANCELED]: [ |
| | | { type: ActionType.VIEW, routeName: 'tradeOrderDetail' }, |
| | | { type: ActionType.TRACK } |
| | | ] |
| | | }, |
| | | [PageType.BUYER_CENTER]: { |
| | |
| | | [OrderStatus.EVALUATED]: [ |
| | | { type: ActionType.VIEW, routeName: 'tradeOrderDetail' }, |
| | | { type: ActionType.TRACK } |
| | | ], |
| | | [OrderStatus.CANCELED]: [ |
| | | { type: ActionType.VIEW, routeName: 'tradeOrderDetail' }, |
| | | { type: ActionType.TRACK } |
| | | ] |
| | | }, |
| | | [PageType.SELLER_CENTER]: { |
| | |
| | | [OrderStatus.EVALUATED]: [ |
| | | { type: ActionType.VIEW, routeName: 'tradeOrderDetail' }, |
| | | { type: ActionType.TRACK } |
| | | ], |
| | | [OrderStatus.CANCELED]: [ |
| | | { type: ActionType.VIEW, routeName: 'tradeOrderDetail' }, |
| | | { type: ActionType.TRACK } |
| | | ] |
| | | } |
| | | } |
| | |
| | | [OrderStatus.WAIT_APPROVAL_AUTHORIZE]: OrderStatus.WAIT_CONFIRM, |
| | | [OrderStatus.WAIT_CONFIRM]: OrderStatus.COMPLETED, |
| | | [OrderStatus.COMPLETED]: OrderStatus.EVALUATED, |
| | | [OrderStatus.EVALUATED]: null // 最终状态,无下一状态 |
| | | [OrderStatus.EVALUATED]: null, // 最终状态,无下一状态 |
| | | [OrderStatus.CANCELED]: null |
| | | } |
| | | |
| | | /** |
| | |
| | | return OrderStatus.COMPLETED |
| | | case '已评价': |
| | | return OrderStatus.EVALUATED |
| | | case '已取消': |
| | | return OrderStatus.CANCELED |
| | | default: |
| | | console.warn(`未知的订单状态: ${serverStatus},默认返回待授权状态`) |
| | | return OrderStatus.WAIT_AUTHORIZE |
| | |
| | | import productApi from '@/api/productApi' |
| | | import sysUserService from "@/api/sysUser"; |
| | | import workFlowApi from "@/api/workFlowApi"; |
| | | import {queryUserDetail} from "@/api/userInfo"; |
| | | |
| | | const route = useRoute() |
| | | const router = useRouter() |
| | |
| | | const orderId = String(route.params.id || '') |
| | | console.log(route.params.taskId) |
| | | if (!orderId) return |
| | | |
| | | |
| | | // 获取用户信息 |
| | | if (!userStore.getUserId) { |
| | | try { |
| | | const res: any = await queryUserDetail() |
| | | if (res?.code === 200 && res.data) { |
| | | userStore.updateUserDetail(res.data) |
| | | } else { |
| | | ElMessage.error(res?.msg || '无法获取用户信息,请先登录') |
| | | return |
| | | } |
| | | } catch (e) { |
| | | console.error('获取用户详情失败:', e) |
| | | ElMessage.error('获取用户信息失败,请稍后重试') |
| | | return |
| | | } |
| | | } |
| | | |
| | | try { |
| | | // 并行获取订单详情和协议类型检查 |
| | | const [orderRes, agreementRes] = await Promise.all([ |
| | |
| | | const orderId = String(route.params.id || '') |
| | | console.log(String(route.params.taskId || '')) |
| | | const taskId1 = taskId.value |
| | | const userId = userStore.getUserId ? Number(userStore.getUserId) : undefined |
| | | const userId = userStore.getUserId ? userStore.getUserId : undefined |
| | | const comments = approvalForm.comments.trim() |
| | | |
| | | if (!orderId || !userId) { |
| | |
| | | }) |
| | | |
| | | const orderId = String(route.params.id || '') |
| | | const userId = userStore.getUserId ? Number(userStore.getUserId) : undefined |
| | | const userId = userStore.getUserId ? userStore.getUserId : undefined |
| | | const comments = approvalForm.comments.trim() |
| | | const taskId1 = String(route.params.taskId || '') |
| | | |
| | |
| | | // 检查响应格式 |
| | | const responseData = previewResponse as any |
| | | if (responseData && responseData.code === 200 && responseData.data) { |
| | | previewUrl = responseData.data |
| | | previewUrl = responseData.data.replaceAll('http://192.168.20.52:9000',import.meta.env.VITE_FILE_PREVIEW_URL) |
| | | console.log('使用预览URL:', previewUrl) |
| | | } else { |
| | | console.log('预览URL获取失败,使用下载方式') |
| | |
| | | <!-- 流水表格 --> |
| | | <div class="table-section"> |
| | | <el-table :data="flowList" stripe style="width: 100%" :height="440"> |
| | | <el-table-column prop="id" label="序号" width="80" align="center" /> |
| | | <el-table-column type="index" label="序号" width="80" align="center" /> |
| | | <el-table-column prop="dataCategory" label="数据类目" width="120"> |
| | | <template #default="{ row }"> |
| | | <span>{{ getCategoryLabel(row.dataCategory) }}</span> |
| | |
| | | <el-input |
| | | v-model="pointRuleDetial.pointsValue" |
| | | size="small" |
| | | style="width: 80px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | readonly |
| | | /> |
| | |
| | | <el-input |
| | | v-model="pointRuleDetial.dailyLimit" |
| | | size="small" |
| | | style="width: 80px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | readonly |
| | | v-if="pointRuleDetial.isLimit === 1" |
| | |
| | | <el-input |
| | | v-model="pointRuleDetials.pointsValue" |
| | | size="small" |
| | | style="width: 60px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | readonly |
| | | /> |
| | |
| | | <el-input |
| | | v-model="pointRuleDetials.dailyLimit" |
| | | size="small" |
| | | style="width: 80px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | readonly |
| | | v-if="pointRuleDetials.isLimit === 1" |
| | |
| | | |
| | | const res = await pointsApi.getPointsRuleById(formData) |
| | | if (res.code === 200 && res.data) { |
| | | res.data.getPointsRuleList.map(item => { |
| | | item.pointsRules.map(iitem => { |
| | | if(iitem.ruleDescription.indexOf('被') > -1){ |
| | | iitem.descSort = 0 |
| | | }else{ |
| | | iitem.descSort = 1 |
| | | } |
| | | return iitem |
| | | }) |
| | | item.pointsRules.sort((a,b) => { |
| | | if(a.ruleName === b.ruleName){ |
| | | return a.descSort - b.descSort |
| | | }else { |
| | | return a.ruleName.localeCompare(b.ruleName) |
| | | } |
| | | }) |
| | | }) |
| | | res.data.consumePointsRuleList.map(item => { |
| | | item.pointsRules.map(iitem => { |
| | | if(iitem.ruleDescription.indexOf('被') > -1){ |
| | | iitem.descSort = 0 |
| | | }else{ |
| | | iitem.descSort = 1 |
| | | } |
| | | return iitem |
| | | }) |
| | | item.pointsRules.sort((a,b) => { |
| | | if(a.ruleName === b.ruleName){ |
| | | return a.descSort - b.descSort |
| | | }else { |
| | | return a.ruleName.localeCompare(b.ruleName) |
| | | } |
| | | }) |
| | | }) |
| | | // 将后端数据映射到前端规则对象 |
| | | Object.assign(rules.value, res.data) |
| | | console.log(rules.value) |
| | | } |
| | | } else { |
| | | // 如果没有ruleId参数,则获取所有规则 |
| | |
| | | <el-input |
| | | v-model="pointRuleDetial.pointsValue" |
| | | size="small" |
| | | style="width: 80px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | /> |
| | | <span class="unit">积分</span> |
| | |
| | | <el-input |
| | | v-model="pointRuleDetial.dailyLimit" |
| | | size="small" |
| | | style="width: 80px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | v-if="pointRuleDetial.isLimit === 1" |
| | | /> |
| | |
| | | <el-input |
| | | v-model="pointRuleDetials.pointsValue" |
| | | size="small" |
| | | style="width: 60px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | /> |
| | | <span class="unit">积分</span> |
| | |
| | | <el-input |
| | | v-model="pointRuleDetials.dailyLimit" |
| | | size="small" |
| | | style="width: 80px;" |
| | | style="width: 50px;" |
| | | placeholder="请输入" |
| | | v-if="pointRuleDetials.isLimit === 1" |
| | | /> |
| | |
| | | |
| | | const res = await pointsApi.getPointsRuleById(formData) |
| | | if (res.code === 200 && res.data) { |
| | | res.data.getPointsRuleList.map(item => { |
| | | item.pointsRules.map(iitem => { |
| | | if(iitem.ruleDescription.indexOf('被') > -1){ |
| | | iitem.descSort = 0 |
| | | }else{ |
| | | iitem.descSort = 1 |
| | | } |
| | | return iitem |
| | | }) |
| | | item.pointsRules.sort((a,b) => { |
| | | if(a.ruleName === b.ruleName){ |
| | | return a.descSort - b.descSort |
| | | }else { |
| | | return a.ruleName.localeCompare(b.ruleName) |
| | | } |
| | | }) |
| | | }) |
| | | res.data.consumePointsRuleList.map(item => { |
| | | item.pointsRules.map(iitem => { |
| | | if(iitem.ruleDescription.indexOf('被') > -1){ |
| | | iitem.descSort = 0 |
| | | }else{ |
| | | iitem.descSort = 1 |
| | | } |
| | | return iitem |
| | | }) |
| | | item.pointsRules.sort((a,b) => { |
| | | if(a.ruleName === b.ruleName){ |
| | | return a.descSort - b.descSort |
| | | }else { |
| | | return a.ruleName.localeCompare(b.ruleName) |
| | | } |
| | | }) |
| | | }) |
| | | // 将后端数据映射到前端规则对象 |
| | | Object.assign(rules.value, res.data) |
| | | console.log(rules.value) |
| | |
| | | <td class="value">{{ statusText(orderStatus.status) }}</td> |
| | | <td></td> |
| | | <td class="value link"> |
| | | <el-link type="primary" @click="viewOrder">查看订单信息</el-link> |
| | | <!-- <el-link type="primary" @click="viewOrder">查看订单信息</el-link>--> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | |
| | | // 获取工作流参数 |
| | | const wkParamsRes: any = await workFlowApi.getWorkFlowParams({ |
| | | type: type, |
| | | unitId: '1', |
| | | // unitId: '1', |
| | | businessKey: type |
| | | }) |
| | | if(wkParamsRes?.code === 200 && wkParamsRes.data?.processTemplateId){ |
| | |
| | | [OrderStatus.WAIT_CONFIRM]: 'WAIT_CONFIRM', |
| | | [OrderStatus.COMPLETED]: 'COMPLETED', |
| | | [OrderStatus.EVALUATED]: 'EVALUATED', |
| | | [OrderStatus.CANCELED]: 'CANCELED' |
| | | } |
| | | |
| | | const formatDateTime = (val?: string) => { |
| | |
| | | WAIT_CONFIRM: 'warning', |
| | | COMPLETED: 'success', |
| | | EVALUATED: 'success', |
| | | CANCELED: 'danger' |
| | | } |
| | | return statusMap[status] || 'info' |
| | | } |
| | |
| | | import createAxios from '@/utils/axios' |
| | | import productApi from '@/api/productApi' |
| | | import sysUserService from '@/api/sysUser' |
| | | import {queryUserDetail} from "@/api/userInfo"; |
| | | |
| | | const route = useRoute() |
| | | const router = useRouter() |
| | |
| | | onMounted(async () => { |
| | | const orderId = String(route.params.id || '') |
| | | if (!orderId) return |
| | | |
| | | |
| | | // 获取用户信息 |
| | | if (!userStore.getUserId) { |
| | | try { |
| | | const res: any = await queryUserDetail() |
| | | if (res?.code === 200 && res.data) { |
| | | userStore.updateUserDetail(res.data) |
| | | } else { |
| | | ElMessage.error(res?.msg || '无法获取用户信息,请先登录') |
| | | return |
| | | } |
| | | } catch (e) { |
| | | console.error('获取用户详情失败:', e) |
| | | ElMessage.error('获取用户信息失败,请稍后重试') |
| | | return |
| | | } |
| | | } |
| | | |
| | | try { |
| | | const res = (await orderApi.getOrderDetail(orderId)) as any |
| | | const data = res?.data || {} |
| | |
| | | const submit = async () => { |
| | | try { |
| | | const orderId = String(route.params.id || '') |
| | | const userId = userStore.getUserId ? Number(userStore.getUserId) : undefined |
| | | const userId = userStore.getUserId ? userStore.getUserId : undefined |
| | | console.log(userId) |
| | | |
| | | if (!orderId || !userId) { |
| | | ElMessage.error('订单ID或用户ID不能为空') |
| | |
| | | // 检查响应格式 |
| | | const responseData = previewResponse as any |
| | | if (responseData && responseData.code === 200 && responseData.data) { |
| | | previewUrl = responseData.data |
| | | previewUrl = responseData.data.replaceAll("http://192.168.20.52:9000", import.meta.env.VITE_FILE_PREVIEW_URL) |
| | | // previewUrl = responseData.data |
| | | console.log('使用预览URL:', previewUrl) |
| | | } else { |
| | | console.log('预览URL获取失败,使用下载方式') |
| | |
| | | import orderApi from '@/api/orderApi' |
| | | import { useUserInfo } from '@/stores/modules/userInfo' |
| | | import createAxios from '@/utils/axios' |
| | | import {queryUserDetail} from "@/api/userInfo"; |
| | | import productApi from "@/api/productApi"; |
| | | import sysUserService from "@/api/sysUser"; |
| | | |
| | | const route = useRoute() |
| | | const router = useRouter() |
| | |
| | | onMounted(async () => { |
| | | const orderId = String(route.params.id || '') |
| | | if (!orderId) return |
| | | |
| | | // 获取用户信息 |
| | | if (!userStore.getUserId) { |
| | | try { |
| | | const res: any = await queryUserDetail() |
| | | if (res?.code === 200 && res.data) { |
| | | userStore.updateUserDetail(res.data) |
| | | } else { |
| | | ElMessage.error(res?.msg || '无法获取用户信息,请先登录') |
| | | return |
| | | } |
| | | } catch (e) { |
| | | console.error('获取用户详情失败:', e) |
| | | ElMessage.error('获取用户信息失败,请稍后重试') |
| | | return |
| | | } |
| | | } |
| | | try { |
| | | const res = (await orderApi.getOrderDetail(orderId)) as any |
| | | const data = res?.data || {} |
| | | |
| | | const statusName: string = data.orderStatus || '' |
| | | const uiStatus = statusServerToUi[statusName] || 'INFO' |
| | | |
| | | // 根据产品id获取产品信息,更新头部展示 |
| | | try { |
| | | if (data.productId) { |
| | | const detailRes: any = await productApi.getProductById({ id: data.productId }) |
| | | if (detailRes?.code === 200 && detailRes.data) { |
| | | // 用产品详情补全头信息 |
| | | data.productName = detailRes.data.name || data.productName |
| | | data.providerName = detailRes.data.submissionUnit || data.providerName |
| | | data.industry = detailRes.data.industrialChainName || data.industry |
| | | data.productDesc = detailRes.data.describe || data.productDesc |
| | | data.projectUnit = detailRes.data.importantAreaName || data.productDesc |
| | | data.productType = detailRes.data.typeName || data.productDesc |
| | | } |
| | | } |
| | | } 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 = { |
| | |
| | | const submit = async () => { |
| | | try { |
| | | const orderId = String(route.params.id || '') |
| | | const userId = userStore.getUserId ? Number(userStore.getUserId) : undefined |
| | | const userId = userStore.getUserId ? userStore.getUserId : undefined |
| | | |
| | | if (!orderId || !userId) { |
| | | ElMessage.error('订单ID或用户ID不能为空') |
| | |
| | | }) |
| | | |
| | | const orderId = String(route.params.id || '') |
| | | const userId = userStore.getUserId ? Number(userStore.getUserId) : undefined |
| | | const userId = userStore.getUserId ? userStore.getUserId : undefined |
| | | const content = evaluationForm.content.trim() |
| | | |
| | | if (!orderId || !userId) { |
| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { useUserInfo } from '@/stores/modules/userInfo' |
| | | import createAxios from '@/utils/axios' |
| | | import productApi from "@/api/productApi"; |
| | | import sysUserService from "@/api/sysUser"; |
| | | import {queryUserDetail} from "@/api/userInfo"; |
| | | |
| | | const route = useRoute() |
| | | const router = useRouter() |
| | |
| | | return |
| | | } |
| | | |
| | | // 获取用户信息 |
| | | if (!userStore.getUserId) { |
| | | try { |
| | | const res: any = await queryUserDetail() |
| | | if (res?.code === 200 && res.data) { |
| | | userStore.updateUserDetail(res.data) |
| | | } else { |
| | | ElMessage.error(res?.msg || '无法获取用户信息,请先登录') |
| | | return |
| | | } |
| | | } catch (e) { |
| | | console.error('获取用户详情失败:', e) |
| | | ElMessage.error('获取用户信息失败,请稍后重试') |
| | | return |
| | | } |
| | | } |
| | | |
| | | try { |
| | | const res = (await orderApi.getOrderDetail(orderId)) as any |
| | | const data = res?.data || {} |
| | | |
| | | const statusName: string = data.orderStatus || '' |
| | | const uiStatus = statusServerToUi[statusName] || 'INFO' |
| | | |
| | | // 根据产品id获取产品信息,更新头部展示 |
| | | try { |
| | | if (data.productId) { |
| | | const detailRes: any = await productApi.getProductById({ id: data.productId }) |
| | | if (detailRes?.code === 200 && detailRes.data) { |
| | | // 用产品详情补全头信息 |
| | | data.productName = detailRes.data.name || data.productName |
| | | data.providerName = detailRes.data.submissionUnit || data.providerName |
| | | data.industry = detailRes.data.industrialChainName || data.industry |
| | | data.productDesc = detailRes.data.describe || data.productDesc |
| | | data.projectUnit = detailRes.data.importantAreaName || data.productDesc |
| | | data.productType = detailRes.data.typeName || data.productDesc |
| | | } |
| | | } |
| | | } 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 = { |
| | |
| | | // 检查响应格式 |
| | | const responseData = previewResponse as any |
| | | if (responseData && responseData.code === 200 && responseData.data) { |
| | | previewUrl = responseData.data |
| | | previewUrl = responseData.data.replaceAll("http://192.168.20.52:9000", import.meta.env.VITE_FILE_PREVIEW_URL) |
| | | console.log('使用预览URL:', previewUrl) |
| | | } else { |
| | | console.log('预览URL获取失败,使用下载方式') |
| | |
| | | // target:'http://10.209.233.16/admin',//信创正式 |
| | | // target: 'http://36.133.126.111:7099/api', //测试 |
| | | // target: 'https://zynlpt.ccccltd.cn/admin', // 正式 (要打开changeOrigin和rewrite) |
| | | target: 'http://localhost:8089', |
| | | // target: 'http://36.133.126.111:7099/trade-api', |
| | | // target: 'http://localhost:8089', |
| | | target: 'http://36.133.126.111:7099/trade-api', |
| | | changeOrigin: true, // 允许跨域 |
| | | rewrite: (path) => path.replace(/^\/api/, '/'), //连测试环境要注释这行,连后端个人则打开 |
| | | }, |