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

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
@@ -172,6 +172,12 @@
<el-table-column v-if="isColVisible('cooperationStatus')" label="合作状态" align="center" prop="cooperationStatus">
<template #default="scope">{{ formatOption(cooperationStatusOptions, scope.row.cooperationStatus) }}</template>
</el-table-column>
<el-table-column v-if="isColVisible('dataSource')" label="数据来源" align="center" prop="dataSource" width="110">
<template #default="scope">
<dict-tag v-if="scope.row.dataSource" :options="bms_supplier_data_source" :value="scope.row.dataSource" />
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column v-if="isColVisible('channelIds')" label="绑定渠道" align="center" prop="channelIds" min-width="200" show-overflow-tooltip>
<template #default="scope">
<span v-if="channelNames(scope.row.channelIds)">{{ channelNames(scope.row.channelIds) }}</span>
@@ -179,9 +185,10 @@
</template>
</el-table-column>
<el-table-column v-if="isColVisible('remark')" label="备注说明" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="270" fixed="right">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['customersupplier:supplierinfo:edit']">修改</el-button>
<el-button link type="primary" icon="Connection" @click="openBind(scope.row)" v-hasPermi="['customersupplier:supplierinfo:bindChannel']">绑定渠道</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['customersupplier:supplierinfo:remove']">删除</el-button>
</template>
</el-table-column>
@@ -195,6 +202,8 @@
@pagination="getList"
/>
<channel-select ref="channelSelectRef" v-model="bindChannelIds" :show-trigger="false" @change="saveBind" />
<!-- 右键复制列值 -->
<table-copy-menu
ref="copyMenuRef"
@@ -206,7 +215,7 @@
</template>
<script setup name="Supplier">
import { listSupplier, delSupplier } from "@/api/customersuppliermanagement/supplierinfo/supplier.js"
import { bindSupplierChannels, listSupplier, delSupplier } from "@/api/customersuppliermanagement/supplierinfo/supplier.js"
import { useChannels, parseChannelCodes } from '@/components/ChannelSelect/useChannels'
import { useUsers } from '@/components/UserSelect/useUsers'
import { useColumnSettings } from '@/utils/columnSettings'
@@ -245,6 +254,7 @@ const columnDefs = [
{ key: 'cooperationStartDate', label: '合作开始日期' },
{ key: 'contractEndDate', label: '合同结束时间' },
{ key: 'cooperationStatus', label: '合作状态' },
{ key: 'dataSource', label: '数据来源' },
{ key: 'channelIds', label: '绑定渠道' },
{ key: 'remark', label: '备注说明' }
]
@@ -258,7 +268,7 @@ const single = ref(true)
const multiple = ref(true)
const total = ref(0)
const { sys_normal_disable, settlement_type, bms_supplier_type: supplierTypeOptions } = useDict("sys_normal_disable", "settlement_type", "bms_supplier_type")
const { sys_normal_disable, settlement_type, bms_supplier_type: supplierTypeOptions, bms_supplier_data_source } = useDict("sys_normal_disable", "settlement_type", "bms_supplier_type", "bms_supplier_data_source")
const invoiceTypeOptions = ref([
{ value: "1", label: "增值税普通发票" },
{ value: "2", label: "增值税专用发票" },
@@ -318,6 +328,7 @@ const copyColumns = computed(() => [
{ key: 'cooperationStartDate', label: '合作开始日期', get: r => formatDateOnly(r.cooperationStartDate) },
{ key: 'contractEndDate', label: '合同结束时间', get: r => formatDateOnly(r.contractEndDate) },
{ key: 'cooperationStatus', label: '合作状态', get: r => formatOption(cooperationStatusOptions.value, r.cooperationStatus) },
{ key: 'dataSource', label: '数据来源', get: r => proxy.selectDictLabel(bms_supplier_data_source.value, r.dataSource) },
{ key: 'channelIds', label: '绑定渠道', get: r => channelNames(r.channelIds) },
{ key: 'remark', label: '备注说明', get: r => r.remark || '' }
])
@@ -415,6 +426,36 @@ function handleUpdate(row) {
})
}
const channelSelectRef = ref(null)
const bindRow = ref(null)
const bindChannelIds = ref('')
/** 打开和编辑页相同的选择渠道弹框,确定后只保存这一家的渠道 */
function openBind(row) {
if (!row || !row.supplierId) {
return
}
bindRow.value = row
bindChannelIds.value = row.channelIds || ''
nextTick(() => {
channelSelectRef.value && channelSelectRef.value.open()
})
}
function saveBind() {
const row = bindRow.value
if (!row || !row.supplierId) {
return
}
const channelIds = bindChannelIds.value || ''
bindSupplierChannels(row.supplierId, { channelIds }).then(() => {
proxy.$modal.msgSuccess('渠道已绑定')
getList()
}).catch(() => {
bindChannelIds.value = row.channelIds || ''
})
}
/** 删除按钮操作 */
function handleDelete(row) {
const _supplierIds = row.supplierId || ids.value