提交
This commit is contained in:
1 parent
c4cc7009e3
commit
bb8c981afd
41 files changed
+15391
-13004
No files matched your search
@@ -29,7 +29,7 @@
|
||||
<el-form-item label="渠道名称">
|
||||
<el-input
|
||||
v-model="searchForm.keyword"
|
||||
placeholder="渠道名称/部门名称"
|
||||
placeholder="渠道名称/订单名称/部门名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -102,6 +102,7 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderName" label="订单名称" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="channelName" label="渠道名称" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="createTime" label="创建时间" min-width="170" align="center" />
|
||||
@@ -262,6 +263,14 @@
|
||||
<span class="confirm-flow-kv__label">{{ txnAmountLabel(currentRow.txnType) }}</span>
|
||||
<span class="confirm-flow-kv__value amount-text">¥{{ formatAmount(currentRow.amount) }}</span>
|
||||
</div>
|
||||
<div v-if="currentRow.orderName" class="confirm-flow-kv">
|
||||
<span class="confirm-flow-kv__label">订单名称</span>
|
||||
<span class="confirm-flow-kv__value">{{ currentRow.orderName }}</span>
|
||||
</div>
|
||||
<div v-if="currentRow.channelName" class="confirm-flow-kv">
|
||||
<span class="confirm-flow-kv__label">渠道名称</span>
|
||||
<span class="confirm-flow-kv__value">{{ currentRow.channelName }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="currentRow.financeSubmitByName || currentRow.financeSubmitBy"
|
||||
class="confirm-flow-kv"
|
||||
@@ -692,6 +701,7 @@
|
||||
{ label: '流水类型', value: txnTypeLabel(d.txnType), tagType: txnTypeTagType(d.txnType) },
|
||||
{ label: '金额(元)', value: `¥${formatAmount(d.amount)}` },
|
||||
{ label: '状态', value: txnStatusLabel(d.txnStatus), tagType: txnStatusTagType(d.txnStatus) },
|
||||
{ label: '订单名称', value: d.orderName },
|
||||
{ label: '渠道名称', value: d.channelName },
|
||||
{ label: '创建人', value: d.createByName || d.createBy },
|
||||
{ label: '创建时间', value: d.createTime },
|
||||
|
||||
@@ -77,6 +77,10 @@
|
||||
</el-tag>
|
||||
</dd>
|
||||
</div>
|
||||
<div v-if="txn.orderName" class="txn-card__kv">
|
||||
<dt>订单名称</dt>
|
||||
<dd>{{ txn.orderName }}</dd>
|
||||
</div>
|
||||
<div v-if="txn.channelName" class="txn-card__kv">
|
||||
<dt>渠道名称</dt>
|
||||
<dd>{{ txn.channelName }}</dd>
|
||||
@@ -593,16 +597,22 @@ const innerVisible = computed({
|
||||
})
|
||||
|
||||
const dialogTitle = computed(() => {
|
||||
const name = props.order?.channelName || '渠道服务订单'
|
||||
const orderName = (props.order?.orderName || '').trim()
|
||||
const channelName = props.order?.channelName || ''
|
||||
const name = orderName || channelName || '渠道服务订单'
|
||||
return `${name} · 操作流水`
|
||||
})
|
||||
|
||||
const orderSummary = computed(() => {
|
||||
const o = props.order
|
||||
if (!o) return ''
|
||||
const typeLabel = channelServiceOrderTypeLabel(o.orderType)
|
||||
const dept = o.deptName ? ` / ${o.deptName}` : ''
|
||||
return `${typeLabel}${dept}`
|
||||
const parts: string[] = []
|
||||
const orderName = (o.orderName || '').trim()
|
||||
if (orderName) parts.push(orderName)
|
||||
parts.push(channelServiceOrderTypeLabel(o.orderType))
|
||||
if (o.deptName) parts.push(o.deptName)
|
||||
if (o.channelName) parts.push(o.channelName)
|
||||
return parts.join(' / ')
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<el-form-item label="渠道名称">
|
||||
<el-input
|
||||
v-model="searchForm.keyword"
|
||||
placeholder="渠道名称/部门名称"
|
||||
placeholder="渠道名称/订单名称/部门名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -101,6 +101,7 @@
|
||||
:index="index => (pagination.page - 1) * pagination.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column prop="channelName" label="渠道名称" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="orderName" label="订单名称" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="deptName" label="部门名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="orderType" label="订单类型" min-width="130" align="center">
|
||||
<template #default="{ row }">
|
||||
@@ -139,7 +140,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间" min-width="170" align="center" />
|
||||
<el-table-column label="操作" min-width="520" fixed="right" align="center" header-align="center">
|
||||
<el-table-column label="操作" min-width="720" fixed="right" align="center" header-align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button class="btn-op-item primary" @click="handleView(row)">
|
||||
<el-icon><View /></el-icon>查看
|
||||
@@ -154,8 +155,8 @@
|
||||
<el-button
|
||||
class="btn-op-item"
|
||||
v-if="
|
||||
(row.orderType === 'yfk' && row.orderStatus === 'dsx') ||
|
||||
(row.orderType === 'gmcp' && (row.orderStatus === 'dsx' || row.orderStatus === 'sxz'))
|
||||
(row.orderType === 'yfk' || row.orderType === 'gmcp') &&
|
||||
(row.orderStatus === 'dsx' || row.orderStatus === 'sxz')
|
||||
"
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
@@ -239,7 +240,7 @@
|
||||
|
||||
<SystemViewDialog
|
||||
v-model:visible="viewVisible"
|
||||
:title="viewData.channelName || '订单详情'"
|
||||
:title="viewData.orderName || viewData.channelName || '订单详情'"
|
||||
:icon="Document"
|
||||
:code="viewData.id"
|
||||
code-label="订单编号"
|
||||
@@ -338,6 +339,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单名称" prop="orderName">
|
||||
<el-input v-model="formData.orderName" placeholder="请输入服务订单名称" maxlength="200" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input v-model="formData.deptName" placeholder="请输入部门名称" />
|
||||
</el-form-item>
|
||||
@@ -390,6 +394,7 @@
|
||||
|
||||
<!-- 发起充值弹窗 -->
|
||||
<el-dialog v-model="rechargeVisible" title="发起充值" width="560px" destroy-on-close :close-on-click-modal="false">
|
||||
<p v-if="currentOrderForTxn" class="order-context-bar">{{ formatOrderContext(currentOrderForTxn) }}</p>
|
||||
<el-form label-position="top">
|
||||
<el-form-item label="充值金额(元)">
|
||||
<AmountInput
|
||||
@@ -481,6 +486,7 @@
|
||||
|
||||
<!-- 申请退款弹窗 -->
|
||||
<el-dialog v-model="refundTxnVisible" title="申请退款" width="640px" destroy-on-close :close-on-click-modal="false">
|
||||
<p v-if="currentOrderForTxn" class="order-context-bar">{{ formatOrderContext(currentOrderForTxn) }}</p>
|
||||
<el-form label-position="top">
|
||||
<el-form-item>
|
||||
<template #label>退款金额(元)<span class="form-label-tip">当前余额:¥{{ formatAmount(currentOrderForTxn?.currentBalance) }}</span></template>
|
||||
@@ -574,6 +580,7 @@
|
||||
|
||||
<!-- 购买产品弹窗 -->
|
||||
<el-dialog v-model="purchaseVisible" title="购买产品" width="880px" destroy-on-close :close-on-click-modal="false">
|
||||
<p v-if="currentOrderForTxn" class="order-context-bar">{{ formatOrderContext(currentOrderForTxn) }}</p>
|
||||
<el-form label-position="top">
|
||||
<div class="product-detail-table-wrap">
|
||||
<el-table :data="purchaseForm.items" stripe size="small" class="list-table inner-table">
|
||||
@@ -627,6 +634,7 @@
|
||||
|
||||
<!-- 退订产品弹窗 -->
|
||||
<el-dialog v-model="unsubscribeVisible" title="退订产品" width="860px" destroy-on-close :close-on-click-modal="false">
|
||||
<p v-if="currentOrderForTxn" class="order-context-bar">{{ formatOrderContext(currentOrderForTxn) }}</p>
|
||||
<el-form label-position="top">
|
||||
<div class="product-detail-table-wrap">
|
||||
<el-table v-if="unsubscribeForm.items.length" :data="unsubscribeForm.items" stripe size="small" class="list-table inner-table">
|
||||
@@ -793,6 +801,16 @@ const formatChannelLabel = (ch: any) => {
|
||||
return `${name}${code}`
|
||||
}
|
||||
|
||||
const formatOrderContext = (order: any) => {
|
||||
if (!order) return ''
|
||||
const parts: string[] = []
|
||||
const orderName = (order.orderName || '').trim()
|
||||
if (orderName) parts.push(`订单:${orderName}`)
|
||||
if (order.channelName) parts.push(`渠道:${order.channelName}`)
|
||||
if (order.deptName) parts.push(`部门:${order.deptName}`)
|
||||
return parts.join(' · ')
|
||||
}
|
||||
|
||||
const formatAgreementLabel = (ag: any) => {
|
||||
const type = agreementTypeLabel(ag?.agreementType || '')
|
||||
const period = [ag?.effectiveDate, ag?.expiryDate].filter(Boolean).join(' ~ ')
|
||||
@@ -903,6 +921,7 @@ const viewSections = computed((): ViewSection[] => {
|
||||
{
|
||||
title: '基本信息',
|
||||
fields: [
|
||||
{ label: '订单名称', value: d.orderName },
|
||||
{ label: '渠道名称', value: d.channelName },
|
||||
{ label: '部门名称', value: d.deptName },
|
||||
{
|
||||
@@ -1005,6 +1024,7 @@ const formAgreementEditable = ref(true)
|
||||
const initFormData = () => ({
|
||||
orderType: 'yfk',
|
||||
channelId: '',
|
||||
orderName: '',
|
||||
deptName: '',
|
||||
channelAgreementId: '',
|
||||
items: [] as any[],
|
||||
@@ -1238,13 +1258,11 @@ const handleEdit = async (row: any) => {
|
||||
const detail = res?.data ?? res ?? {}
|
||||
formData.orderType = detail.orderType || 'yfk'
|
||||
formData.channelId = detail.channelId || ''
|
||||
formData.orderName = detail.orderName || ''
|
||||
formData.deptName = detail.deptName || ''
|
||||
formData.channelAgreementId = detail.channelAgreementId || ''
|
||||
formData.remark = detail.remark || ''
|
||||
formAgreementEditable.value =
|
||||
formData.orderType === 'gmcp'
|
||||
? detail.agreementEditable !== false
|
||||
: detail.orderStatus === 'dsx'
|
||||
formAgreementEditable.value = detail.agreementEditable !== false
|
||||
|
||||
if (detail.channelId) {
|
||||
await handleChannelSearch(detail.channelName || '')
|
||||
@@ -1274,6 +1292,7 @@ const handleFormSubmit = async () => {
|
||||
const payload: Record<string, any> = {
|
||||
orderType: formData.orderType,
|
||||
channelId: formData.channelId,
|
||||
orderName: formData.orderName?.trim() || undefined,
|
||||
deptName: formData.deptName,
|
||||
channelAgreementId: formData.channelAgreementId,
|
||||
remark: formData.remark
|
||||
@@ -1282,6 +1301,7 @@ const handleFormSubmit = async () => {
|
||||
ElMessage.success('创建成功')
|
||||
} else {
|
||||
const payload: Record<string, any> = {
|
||||
orderName: formData.orderName?.trim() || undefined,
|
||||
deptName: formData.deptName,
|
||||
remark: formData.remark
|
||||
}
|
||||
@@ -1829,6 +1849,16 @@ onMounted(() => {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.order-context-bar {
|
||||
margin: 0 0 12px;
|
||||
padding: 8px 12px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
background: var(--primary-bg, #ecfdf5);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.channel-balance-hint {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<el-descriptions-item label="渠道名称">
|
||||
{{ displayValue(applicationDetail.channelName) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="关联服务订单">
|
||||
<el-descriptions-item label="服务订单名称">
|
||||
{{ displayValue(applicationDetail.serviceOrderNo) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="channelName" label="渠道名称" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column label="关联服务订单" min-width="180" show-overflow-tooltip>
|
||||
<el-table-column label="服务订单名称" min-width="180" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span v-if="row.serviceOrderNo">{{ row.serviceOrderNo }}</span>
|
||||
<span v-else>-</span>
|
||||
@@ -312,6 +312,7 @@ import {
|
||||
applicationStatusTagType,
|
||||
channelServiceOrderTypeLabel,
|
||||
} from '@/utils/status-tag-registry'
|
||||
import { fetchAllPagedRecords } from '@/utils/fetch-paged-list'
|
||||
|
||||
defineOptions({ name: 'PilotApplicationManagement' })
|
||||
|
||||
@@ -322,17 +323,13 @@ const displayValue = (v: any): string => {
|
||||
}
|
||||
|
||||
const formatServiceOrderLabel = (so: any) => {
|
||||
const no = so.orderNo || so.id || ''
|
||||
const name = (so.orderName || '').trim()
|
||||
const typeLabel = channelServiceOrderTypeLabel(so.orderType)
|
||||
if (name) return `${name}(${typeLabel})`
|
||||
const no = so.id ? String(so.id).slice(-8) : ''
|
||||
return `${no}(${typeLabel})`
|
||||
}
|
||||
|
||||
const unwrapApiList = (res: any): any[] => {
|
||||
const d = res?.data ?? res
|
||||
if (Array.isArray(d)) return d
|
||||
return d?.list ?? d?.records ?? []
|
||||
}
|
||||
|
||||
// ── 状态筛选 ──────────────────────────────────────────────────────────
|
||||
const statusFilters = [
|
||||
{ label: '全部', value: '' },
|
||||
@@ -369,8 +366,9 @@ const onChannelSelectFocus = () => {
|
||||
const loadChannelOptions = async () => {
|
||||
channelLoading.value = true
|
||||
try {
|
||||
const res: any = await fetchChannelList({ page: 1, pageSize: 200 })
|
||||
channelOptions.value = unwrapApiList(res)
|
||||
channelOptions.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchChannelList({ page, pageSize })
|
||||
)
|
||||
channelLoaded.value = true
|
||||
} catch {
|
||||
channelOptions.value = []
|
||||
@@ -395,12 +393,9 @@ const handleSearchChannelChange = () => {
|
||||
const loadSearchServiceOrders = async (channelId: string) => {
|
||||
serviceOrderLoading.value = true
|
||||
try {
|
||||
const res: any = await fetchChannelServiceOrderList({
|
||||
channelId,
|
||||
page: 1,
|
||||
pageSize: 200,
|
||||
})
|
||||
serviceOrderOptions.value = unwrapApiList(res)
|
||||
serviceOrderOptions.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchChannelServiceOrderList({ channelId, page, pageSize })
|
||||
)
|
||||
} catch {
|
||||
serviceOrderOptions.value = []
|
||||
} finally {
|
||||
@@ -490,8 +485,9 @@ const onDialogChannelFocus = () => {
|
||||
const loadDialogChannelOptions = async () => {
|
||||
dialogChannelLoading.value = true
|
||||
try {
|
||||
const res: any = await fetchChannelList({ page: 1, pageSize: 200 })
|
||||
dialogChannelOptions.value = unwrapApiList(res)
|
||||
dialogChannelOptions.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchChannelList({ page, pageSize })
|
||||
)
|
||||
dialogChannelLoaded.value = true
|
||||
} catch {
|
||||
dialogChannelOptions.value = []
|
||||
@@ -510,12 +506,9 @@ const handleDialogChannelChange = async (channelId: string) => {
|
||||
if (!channelId) return
|
||||
dialogServiceOrderLoading.value = true
|
||||
try {
|
||||
const res: any = await fetchChannelServiceOrderList({
|
||||
channelId,
|
||||
page: 1,
|
||||
pageSize: 200,
|
||||
})
|
||||
dialogServiceOrderOptions.value = unwrapApiList(res)
|
||||
dialogServiceOrderOptions.value = await fetchAllPagedRecords((page, pageSize) =>
|
||||
fetchChannelServiceOrderList({ channelId, page, pageSize })
|
||||
)
|
||||
} catch {
|
||||
dialogServiceOrderOptions.value = []
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user