fd5b1484e6
2、调整业务模块 3、调整客商模块
80 lines
2.6 KiB
JavaScript
80 lines
2.6 KiB
JavaScript
export const settlementTypeOptions = [
|
|
{ label: '应收', value: 'receivable' },
|
|
{ label: '应付', value: 'payable' },
|
|
];
|
|
|
|
export const preSettlementFormFields = [
|
|
{ label: '预结算单号', prop: 'preSettlementNo', readonly: true },
|
|
{ label: '合同名称', prop: 'contractId', type: 'contract', required: true },
|
|
{ label: '合同编号', prop: 'contractNo', readonly: true },
|
|
{ label: '项目名称', prop: 'projectName', readonly: true },
|
|
{ label: '收款方', prop: 'payeeName', readonly: true },
|
|
{ label: '付款方', prop: 'payerName', readonly: true },
|
|
{ label: '结算类型', prop: 'settlementType', readonly: true },
|
|
{ label: '结算金额', prop: 'settlementAmount', readonly: true, money: true },
|
|
{ label: '汇率日期', prop: 'exchangeRateDate', type: 'date' },
|
|
{ label: '结算汇率', prop: 'exchangeRate', type: 'number' },
|
|
{ label: '本位币合计', prop: 'localSettlementAmount', readonly: true, money: true },
|
|
{ label: '创建人', prop: 'createUserName', readonly: true },
|
|
{ label: '创建日期', prop: 'createTime', readonly: true },
|
|
{ label: '备注', prop: 'remark', type: 'textarea', span: 24, maxlength: 200 },
|
|
];
|
|
|
|
export const preSettlementFormRules = {
|
|
contractId: [{ required: true, message: '请选择合同名称', trigger: 'change' }],
|
|
exchangeRateDate: [
|
|
{
|
|
validator: (_rule, value, callback, source) => {
|
|
if (source.currency && source.currency !== 'RMB' && !value) {
|
|
callback(new Error('外币结算请选择汇率日期'));
|
|
return;
|
|
}
|
|
callback();
|
|
},
|
|
trigger: 'change',
|
|
},
|
|
],
|
|
exchangeRate: [
|
|
{
|
|
validator: (_rule, value, callback, source) => {
|
|
if (source.currency && source.currency !== 'RMB' && (!value || Number(value) <= 0)) {
|
|
callback(new Error('外币结算请输入大于0的结算汇率'));
|
|
return;
|
|
}
|
|
callback();
|
|
},
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
remark: [{ max: 200, message: '备注不能超过200个字符', trigger: 'blur' }],
|
|
};
|
|
|
|
export const emptyPreSettlementForm = () => ({
|
|
id: '',
|
|
preSettlementNo: '',
|
|
contractId: '',
|
|
contractNo: '',
|
|
contractName: '',
|
|
projectId: '',
|
|
projectName: '',
|
|
deptId: '',
|
|
deptName: '',
|
|
payeeName: '',
|
|
payerName: '',
|
|
settlementType: 'payable',
|
|
currency: 'RMB',
|
|
settlementAmount: 0,
|
|
localCurrency: 'RMB',
|
|
localSettlementAmount: 0,
|
|
exchangeRateDate: '',
|
|
exchangeRate: 1,
|
|
approvalStatus: 'draft',
|
|
approvalStatusName: '草稿',
|
|
currentNode: '草稿',
|
|
currentProcessor: '',
|
|
createUserName: '',
|
|
createTime: '',
|
|
attachmentsJson: '[]',
|
|
remark: '',
|
|
});
|