| | |
| | | <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" |
| | |
| | | <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> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | |
| | | <!-- 购买方式 --> |
| | | <el-table-column label="购买方式" align="center"> |
| | | <el-table-column label="销售形式/账户数量" width="150"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | |
| | | <!-- 总价 --> |
| | | <el-table-column label="总价" align="center"> |
| | | <el-table-column label="单价" prop="unitPrice" width="90"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | |
| | | <!-- 期限(年) --> |
| | | <el-table-column label="期限(年)" align="center" width="80"> |
| | | <el-table-column label="" prop="period" width="80"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> |
| | | |
| | | |
| | | <!-- 操作 --> |
| | | <el-table-column label="操作" align="center" width="120" class="operation-column"> |
| | | <el-table-column label="" width="120"> |
| | |
| | | <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 |
| | | v-else-if="action.type === ActionType.EVALUATE" |
| | | type="primary" |
| | | link |
| | | size="small" |
| | | <el-button |
| | | v-else-if="action.type === ActionType.EVALUATE && row.parentOrder.isEvaluate === '未评价'" |
| | | 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)" |
| | | > |
| | | 取消订单 |
| | |
| | | /> |
| | | </div> |
| | | </el-card> |
| | | |
| | | |
| | | <!-- 订单状态对话框 --> |
| | | <!-- <ProductOrderStatusDialog |
| | | v-model="orderStatusDialogVisible" |
| | | :order-id="currentOrderId" |
| | | <!-- <ProductOrderStatusDialog |
| | | v-model="orderStatusDialogVisible" |
| | | :order-id="currentOrderId" |
| | | /> --> |
| | | </div> |
| | | </template> |
| | |
| | | <script setup lang="ts"> |
| | | import { onMounted, reactive, ref } from 'vue' |
| | | import { useRouter } from 'vue-router' |
| | | import { Search, Refresh } from '@element-plus/icons-vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import orderApi from '@/api/orderApi' |
| | | import productApi from '@/api/productApi' |
| | | import { useUserInfo } from '@/stores/modules/userInfo' |
| | | import ProductOrderStatusDialog from '@/views/productManage/productOrderStatusDialog/index.vue' |
| | | import { OrderWorkflowController, OrderStatus, ActionType, PageType, StatusMapper } from '@/utils/orderWorkflow' |
| | | import { queryUserDetail } from '@/api/userInfo' |
| | | |
| | |
| | | [OrderStatus.WAIT_CONFIRM]: 'WAIT_CONFIRM', |
| | | [OrderStatus.COMPLETED]: 'COMPLETED', |
| | | [OrderStatus.EVALUATED]: 'EVALUATED', |
| | | [OrderStatus.CANCELED]: 'CANCELED' |
| | | } |
| | | |
| | | const formatDateTime = (val?: string) => { |
| | |
| | | // 获取产品类型选项 |
| | | 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, |
| | |
| | | // 清空产品子级选择 |
| | | query.productSubType = '' |
| | | // 获取对应的产品子级选项 |
| | | await getProductSubTypeOptions(value) |
| | | // await getProductSubTypeOptions(value) |
| | | } |
| | | |
| | | // 获取状态类型 |
| | |
| | | WAIT_CONFIRM: 'warning', |
| | | COMPLETED: 'success', |
| | | EVALUATED: 'success', |
| | | CANCELED: 'danger' |
| | | } |
| | | return statusMap[status] || 'info' |
| | | } |
| | |
| | | payload.applyTimeStart = query.dateRange[0] |
| | | payload.applyTimeEnd = query.dateRange[1] |
| | | } |
| | | |
| | | |
| | | // 添加产品条件查询 |
| | | if (query.industry) payload.industryId = query.industry |
| | | if (query.unitProject) payload.unitProjectId = query.unitProject |
| | |
| | | // 根据是否有产品条件选择不同的API |
| | | 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 : [] |
| | |
| | | status: uiStatus, |
| | | statusName: order.orderStatus || '', |
| | | orderStatus: StatusMapper.toUIStatus(order.orderStatus), // 转换为标准状态枚举 |
| | | workFlowId: order.workflowId || '' |
| | | workFlowId: order.workflowId || '', |
| | | isEvaluate: order.isEvaluate || '' |
| | | } |
| | | const subOrders: any[] = Array.isArray(order?.orderDetails) |
| | | ? order.orderDetails.map((d: any, i: number) => ({ |
| | |
| | | type: 'warning', |
| | | confirmButtonClass: 'el-button--danger' |
| | | }) |
| | | |
| | | |
| | | const res = await orderApi.cancelOrder(order.id) |
| | | |
| | | |
| | | if (res && res.code === 200) { |
| | | ElMessage.success('订单取消成功') |
| | | handleSearch() // 刷新列表 |
| | |
| | | return |
| | | } |
| | | } |
| | | |
| | | |
| | | // 获取初始选项数据 |
| | | await Promise.all([ |
| | | getIndustryOptions(), |
| | | getProductTypeOptions() |
| | | ]) |
| | | |
| | | |
| | | // 执行搜索 |
| | | handleSearch() |
| | | }) |
| | |
| | | border-bottom: 2px solid #e4e7ed; // 与分隔行一致的下边框 |
| | | } |
| | | } |
| | | |
| | | |
| | | // 调整表头高度 |
| | | tr:first-child { |
| | | th { |
| | |
| | | |
| | | .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; } |
| | |
| | | .el-form-item { |
| | | margin-bottom: 16px; |
| | | margin-right: 20px; |
| | | |
| | | |
| | | &:last-child { |
| | | margin-right: 0; |
| | | } |
| | |
| | | .table-container { |
| | | position: relative; |
| | | z-index: 1; |
| | | |
| | | |
| | | .custom-table { |
| | | // 表头第二行文字大小调整 |
| | | .el-table__header-wrapper { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 确保表头所有行的文字大小一致 |
| | | .el-table__header { |
| | | th { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | .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; |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | .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; |
| | |
| | | align-items: center; |
| | | gap: 8px; |
| | | font-size: 12px; |
| | | |
| | | |
| | | .permanent { |
| | | color: #909399; |
| | | font-size: 12px; |
| | |
| | | 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; |
| | |
| | | color: #303133; |
| | | text-align: center; |
| | | line-height: 1.4; |
| | | |
| | | |
| | | .all-actions { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | justify-content: center; |
| | | gap: 6px; |
| | | width: 100%; |
| | | |
| | | |
| | | .action-item { |
| | | width: 100%; |
| | | |
| | | |
| | | .action-buttons { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 100%; |
| | | |
| | | |
| | | .el-button { |
| | | width: 100%; |
| | | text-align: center; |
| | |
| | | height: auto; |
| | | line-height: 1.2; |
| | | } |
| | | |
| | | |
| | | .op-text { |
| | | margin: 4px 0; |
| | | text-align: center; |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | .el-table__fixed-right { |
| | | z-index: 2 !important; |
| | | } |
| | | |
| | | |
| | | .el-table__fixed-right-patch { |
| | | z-index: 2 !important; |
| | | } |
| | | |
| | | |
| | | // 操作列样式优化 |
| | | .operation-column { |
| | | .cell { |