✨ 结算付款体验优化与合同/运单导入校验
付款申请汇票筛选与提示去重、结算菜单拆分与金蝶同步弹框、应收应付详情高度、合同计费与半月结调整,以及导入运单批量删除校验。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
<div class="fs-table-panel__toolbar">
|
||||
<div>
|
||||
<el-button
|
||||
v-if="hasPermission('formal_settlement_add')"
|
||||
v-if="hasPermission('add')"
|
||||
type="primary"
|
||||
@click="$emit('create')"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="hasPermission('formal_settlement_payment')"
|
||||
v-if="showPaymentAction && hasPermission('payment')"
|
||||
type="primary"
|
||||
plain
|
||||
:disabled="!selection.length"
|
||||
@@ -17,23 +17,23 @@
|
||||
>付款申请</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="hasPermission('formal_settlement_sync')"
|
||||
v-if="hasPermission('sync')"
|
||||
type="primary"
|
||||
plain
|
||||
:disabled="selection.length !== 1"
|
||||
:disabled="!selection.length"
|
||||
:loading="syncLoading"
|
||||
@click="$emit('sync')"
|
||||
>同步金蝶</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="hasPermission('formal_settlement_print')"
|
||||
v-if="hasPermission('print')"
|
||||
type="primary"
|
||||
plain
|
||||
@click="emitSingle('print')"
|
||||
>打印结算单</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="hasPermission('formal_settlement_export')"
|
||||
v-if="hasPermission('export')"
|
||||
type="primary"
|
||||
plain
|
||||
@click="$emit('export')"
|
||||
@@ -149,6 +149,9 @@ export default {
|
||||
hasPermission: { type: Function, required: true },
|
||||
mkEnabled: { type: Boolean, default: false },
|
||||
searchVisible: { type: Boolean, default: true },
|
||||
/** 是否展示付款申请按钮(仅付款结算单) */
|
||||
showPaymentAction: { type: Boolean, default: true },
|
||||
billLabel: { type: String, default: '结算单' },
|
||||
},
|
||||
emits: [
|
||||
'create',
|
||||
@@ -223,7 +226,7 @@ export default {
|
||||
},
|
||||
emitSingle(type) {
|
||||
if (this.selection.length !== 1) {
|
||||
this.$message.warning(`${type === 'print' ? '打印' : '操作'}需选择一条正式结算单`);
|
||||
this.$message.warning(`${type === 'print' ? '打印' : '操作'}需选择一条${this.billLabel}`);
|
||||
return;
|
||||
}
|
||||
this.$emit('action', { type, row: this.selection[0] });
|
||||
@@ -233,27 +236,26 @@ export default {
|
||||
},
|
||||
rowActions(row) {
|
||||
const actions = [];
|
||||
if (this.hasPermission('formal_settlement_view'))
|
||||
actions.push({ type: 'view', label: '查看' });
|
||||
if (this.hasPermission('formal_settlement_edit') && this.isEditable(row))
|
||||
if (this.hasPermission('view')) actions.push({ type: 'view', label: '查看' });
|
||||
if (this.hasPermission('edit') && this.isEditable(row))
|
||||
actions.push({ type: 'edit', label: '编辑' });
|
||||
if (this.hasPermission('formal_settlement_delete') && row.approvalStatus === 'draft')
|
||||
if (this.hasPermission('delete') && row.approvalStatus === 'draft')
|
||||
actions.push({ type: 'delete', label: '删除', danger: true });
|
||||
if (this.hasPermission('formal_settlement_submit') && this.isEditable(row))
|
||||
if (this.hasPermission('submit') && this.isEditable(row))
|
||||
actions.push({ type: 'submit', label: '提交' });
|
||||
if (
|
||||
this.mkEnabled &&
|
||||
this.hasPermission('formal_settlement_approve') &&
|
||||
this.hasPermission('approve') &&
|
||||
['reviewing', 'approved'].includes(row.approvalStatus)
|
||||
) {
|
||||
actions.push({ type: 'mkAudit', label: '流程' });
|
||||
}
|
||||
if (!this.mkEnabled && this.hasPermission('formal_settlement_approve') && row.approvalStatus === 'reviewing') {
|
||||
if (!this.mkEnabled && this.hasPermission('approve') && row.approvalStatus === 'reviewing') {
|
||||
actions.push({ type: 'approve', label: '通过' });
|
||||
actions.push({ type: 'return', label: '驳回', danger: true });
|
||||
}
|
||||
if (
|
||||
this.hasPermission('formal_settlement_void') &&
|
||||
this.hasPermission('void') &&
|
||||
row.approvalStatus === 'approved' &&
|
||||
row.kingdeeSyncStatus !== 'synced'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user