应付模块菜单调整,新增应付费用编辑等

This commit is contained in:
liuminghui
2026-11-16 15:50:51 +08:00
parent 5b8d4de262
commit 49f24a6b1b
66 changed files with 3247 additions and 119 deletions
@@ -1,7 +1,7 @@
<template>
<div v-if="panes.length" class="pay-detail">
<section v-for="pane in panes" :key="pane.key" class="pay-product">
<div class="pay-product-title">{{ pane.item.productName || '未命名产品' }}</div>
<div class="pay-product-title">{{ pane.item.productName || '未命名服务商渠道' }}</div>
<el-descriptions :column="3" border size="small" class="pay-summary">
<el-descriptions-item label="价卡归属">{{ pane.item.supplierName || '-' }}</el-descriptions-item>
<el-descriptions-item label="生效日期">{{ pane.item.effectiveDate || '-' }}</el-descriptions-item>
+94 -3
View File
@@ -11,6 +11,9 @@
scrollbar-always-on
>
<template #toolbar="{ selection, ids }">
<el-col :span="1.5">
<el-button type="primary" plain icon="Link" :disabled="selection.length !== 1" @click="openBind(selection)" v-hasPermi="['price:pay:bind']">绑定渠道</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="Upload" @click="importRef.open()" v-hasPermi="['price:pay:import']">导入价卡</el-button>
</el-col>
@@ -64,6 +67,32 @@
</basic-table>
<pay-import-dialog ref="importRef" @saved="tableRef.refresh()" />
<el-dialog v-model="bindVisible" title="绑定渠道" width="640px" append-to-body @closed="resetBind">
<el-form label-width="70px">
<el-form-item label="产品">
<el-select v-model="bindForm.productId" disabled style="width: 100%">
<el-option :label="bindForm.productName" :value="bindForm.productId" />
</el-select>
</el-form-item>
<el-form-item label="渠道">
<el-select
v-model="bindForm.channelIds"
class="bind-channel-select"
multiple
filterable
clearable
placeholder="输入渠道编码或名称搜索,勾选后显示在框内"
style="width: 100%"
>
<el-option v-for="item in channelOptions" :key="item.id" :label="channelLabel(item)" :value="item.id" />
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="bindVisible = false">取消</el-button>
<el-button type="primary" :loading="bindSaving" @click="submitBind">确认</el-button>
</template>
</el-dialog>
<pay-surcharge-rule-dialog ref="ruleRef" />
<el-drawer v-model="historyVisible" :title="historyTitle" size="980px" append-to-body destroy-on-close>
@@ -192,7 +221,8 @@
</template>
<script setup name="PricePay">
import { listPay, getPay, delPay, updatePay, listPayTerm, updatePayTerm, changePayTermStatus, comparePay, listPaySurchargeRuleLog } from '@/api/price/pay'
import { listPay, getPay, delPay, updatePay, listPayTerm, updatePayTerm, changePayTermStatus, comparePay, listPaySurchargeRuleLog, batchBindChannelPay } from '@/api/price/pay'
import { listChannelOptions } from '@/api/masterdata/serviceChannel'
import PayImportDialog from './components/PayImportDialog.vue'
import PayConfigDetail from './components/PayConfigDetail.vue'
import PaySurchargeRuleDialog from './components/PaySurchargeRuleDialog.vue'
@@ -233,6 +263,10 @@ const detailTitle = computed(() => {
const termVisible = ref(false)
const termSaving = ref(false)
const termForm = reactive({ termId: null, productId: null, effectiveStart: '', effectiveEnd: '' })
const bindVisible = ref(false)
const bindSaving = ref(false)
const channelOptions = ref([])
const bindForm = reactive({ productId: null, productName: '', channelIds: [] })
const statusOptions = [
{ label: '已识别', value: 'OK' },
@@ -241,7 +275,7 @@ const statusOptions = [
]
const columns = [
{ label: '产品名称', prop: 'productName', align: 'center', minWidth: 180, showOverflowTooltip: true, fixed: 'left' },
{ label: '服务商渠道名称', prop: 'productName', align: 'center', minWidth: 180, showOverflowTooltip: true, fixed: 'left' },
{ label: '价卡归属', prop: 'supplierName', align: 'center', width: 100 },
{ label: '国家/口岸', prop: 'countryScope', align: 'center', minWidth: 120, showOverflowTooltip: true },
{ label: '费用类型', prop: 'chargeType', align: 'center', width: 110 },
@@ -261,7 +295,7 @@ const columns = [
]
const searchColumns = [
{ label: '产品名称', prop: 'productName', component: 'input', placeholder: '产品名称', width: '180px' },
{ label: '服务商渠道名称', prop: 'productName', component: 'input', placeholder: '产品名称', width: '180px' },
{ label: '价卡归属', prop: 'supplierName', component: 'input', placeholder: '威狮、易德、GWE', width: '160px' },
{ label: '来源文件', prop: 'sourceFile', component: 'input', placeholder: '文件名', width: '180px' },
{ label: '报价工作表', prop: 'sheetName', component: 'input', placeholder: '工作表', width: '160px' },
@@ -331,6 +365,57 @@ function openRule(selection) {
ruleRef.value?.open(selection || [])
}
function channelLabel(item) {
const code = item?.channelCode || ''
const name = item?.channelName || ''
return [code, name].filter(Boolean).join(' ')
}
function openBind(selection) {
if (!selection || selection.length !== 1) return
const row = selection[0]
if (!row?.productId) {
proxy.$modal.msgWarning('这个产品没有编号,不能绑定渠道')
return
}
bindForm.productId = row.productId
bindForm.productName = row.productName || ''
bindForm.channelIds = []
bindVisible.value = true
if (!channelOptions.value.length) {
listChannelOptions().then(res => {
channelOptions.value = res.data || []
})
}
}
function resetBind() {
bindForm.productId = null
bindForm.productName = ''
bindForm.channelIds = []
}
function submitBind() {
if (!bindForm.productId) {
proxy.$modal.msgWarning('请选择一个产品')
return
}
if (!bindForm.channelIds.length) {
proxy.$modal.msgWarning('请选择渠道')
return
}
bindSaving.value = true
batchBindChannelPay({
channelIds: bindForm.channelIds,
apProductId: bindForm.productId
}).then(res => {
proxy.$modal.msgSuccess(typeof res.data === 'string' ? res.data : (res.msg || '绑定成功'))
bindVisible.value = false
}).finally(() => {
bindSaving.value = false
})
}
function openDetail(row) {
detailVisible.value = true
savingRowKey.value = ''
@@ -596,4 +681,10 @@ function statusType(status) {
.compare-panel :deep(tr.compare-removed:hover > td.el-table__cell) {
background: var(--el-color-danger-light-8);
}
.bind-channel-select :deep(.el-select__wrapper),
.bind-channel-select :deep(.el-input__wrapper) {
min-height: 168px;
align-items: flex-start;
padding-top: 8px;
}
</style>