1、完善项目

2、完善合同
3、完善费用项
4、司机管理对接OCR
5、完善运输计划
6、完善临时额度
This commit is contained in:
2026-08-04 12:17:49 +08:00
parent 81c98f6ad8
commit f9f8221870
34 changed files with 7887 additions and 983 deletions

View File

@@ -4,98 +4,156 @@ import {
contractCategoryOptions,
contractStageOptions,
createCrudOption,
effectiveTypeOptions,
selectRule,
settlementModeOptions,
signTypeOptions,
textRule,
} from './common';
const listDicFormatter = res => {
const data = res?.data || res;
if (Array.isArray(data)) return data;
if (Array.isArray(data?.records)) return data.records;
if (Array.isArray(data?.data)) return data.data;
if (Array.isArray(data?.data?.records)) return data.data.records;
return [];
};
export const config = {
title: '合同管理',
permission: 'contract_manage',
exportUrl: '/blade-transport/contract-manage/export-contract-manage',
exportName: '合同管理',
enableAllDept: true,
enableAllDept: false,
batchDelete: false,
enableContractForm: true,
enableProjectSelect: true,
enableContractPeriod: true,
enableContractFileUpload: true,
enableCurrentUserHandler: true,
enableBillingPlan: true,
enableSettlementRule: true,
enableReconciliation: true,
enableAttachmentTable: true,
enableChangeRecord: true,
enableOrganizationSelect: true,
enableContractCreateActions: true,
actions: ['copy'],
statusProp: 'approvalStatus',
statusTextProp: 'approvalStatusName',
customMenuActions: true,
editLabelStatusMap: {
change_rejected: '编辑变更内容',
},
deleteStatus: ['draft'],
deleteStage: ['draft'],
editStatus: ['draft', 'rejected', 'change_rejected'],
operations: [
{
action: 'toTemporary',
label: '转临时',
action: 'flow',
label: '查看流程',
statusProp: 'approvalStatus',
status: ['draft'],
stage: ['draft'],
permission: 'contract_manage_temp',
},
{
action: 'submitFormal',
label: '转正式',
statusProp: 'approvalStatus',
status: ['draft', 'rejected', 'approved'],
stage: ['temporary'],
permission: 'contract_manage_formal',
status: ['reviewing', 'change_reviewing'],
stage: ['temporary', 'formal'],
permission: 'contract_manage_view',
},
{
action: 'withdraw',
label: '撤回',
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
status: ['reviewing'],
stage: ['temporary'],
permission: 'contract_manage_withdraw',
},
{
action: 'approve',
label: '审批通过',
type: 'success',
action: 'submitFormal',
label: '重新提交转正',
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
permission: 'contract_manage_approve',
},
{
action: 'reject',
label: '审批驳回',
type: 'warning',
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
permission: 'contract_manage_reject',
status: ['rejected'],
stage: ['temporary'],
permission: 'contract_manage_formal',
},
{
action: 'startChange',
label: '发起变更',
statusProp: 'approvalStatus',
status: ['approved', 'change_approved'],
status: ['approved'],
stage: ['formal'],
permission: 'contract_manage_change',
prompt: '请输入变更内容与原因',
},
{
action: 'terminate',
label: '终止',
type: 'danger',
action: 'startChange',
label: '再次发起变更',
statusProp: 'approvalStatus',
status: ['change_approved'],
stage: ['formal'],
permission: 'contract_manage_change',
prompt: '请输入变更内容与原因',
},
{
action: 'attachmentUpload',
label: '附件上传',
statusProp: 'approvalStatus',
status: ['approved', 'change_approved'],
stage: ['formal'],
permission: 'contract_manage_terminate',
prompt: '请输入终止原因',
permission: 'contract_manage_edit',
},
{
action: 'flow',
label: '查看流程',
statusProp: 'approvalStatus',
status: ['approved', 'change_approved'],
stage: ['formal', 'terminated'],
permission: 'contract_manage_view',
},
{
action: 'withdraw',
label: '撤回变更',
statusProp: 'approvalStatus',
status: ['change_reviewing'],
stage: ['formal'],
permission: 'contract_manage_withdraw',
},
{
action: 'startChange',
label: '重新提交变更',
statusProp: 'approvalStatus',
status: ['change_rejected'],
stage: ['formal'],
permission: 'contract_manage_change',
prompt: '请输入变更内容与原因',
},
],
};
export const option = createCrudOption([
{
label: '',
prop: 'basicInfoTitle',
formslot: true,
span: 24,
order: 200,
hide: true,
labelWidth: 0,
},
{
label: '合同编号',
prop: 'contractNo',
search: true,
searchOrder: 6,
order: 185,
disabled: true,
placeholder: '不填写,则系统自动生成',
minWidth: 160,
addDisplay: false,
editDisabled: true,
},
{
label: '合同名称',
prop: 'contractName',
search: true,
searchOrder: 7,
order: 180,
minWidth: 180,
rules: textRule('合同名称', 100, true),
},
@@ -103,26 +161,54 @@ export const option = createCrudOption([
label: '所属项目',
prop: 'projectName',
search: true,
searchOrder: 8,
searchType: 'select',
formslot: true,
order: 140,
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
dicFormatter: listDicFormatter,
props: {
label: 'projectName',
value: 'projectName',
},
filterable: true,
minWidth: 160,
rules: selectRule('所属项目'),
},
{
label: '所属项目ID',
prop: 'projectId',
hide: true,
display: false,
},
{
label: '所属组织',
prop: 'organizationName',
search: true,
searchOrder: 3,
searchType: 'cascader',
formslot: true,
order: 120,
dicData: [],
props: {
label: 'label',
value: 'id',
children: 'children',
},
checkStrictly: true,
emitPath: false,
showAllLevels: false,
filterable: true,
minWidth: 150,
addDisplay: false,
editDisabled: true,
rules: selectRule('所属组织'),
},
{
label: '合同类别',
prop: 'contractCategory',
type: 'select',
search: true,
searchOrder: 9,
order: 170,
dicData: contractCategoryOptions,
minWidth: 130,
rules: selectRule('合同类别'),
@@ -132,18 +218,60 @@ export const option = createCrudOption([
prop: 'signType',
type: 'select',
search: true,
searchOrder: 1,
span: 24,
order: 190,
dicData: signTypeOptions,
minWidth: 120,
rules: selectRule('签约类型'),
},
{
label: '生效类型',
prop: 'effectiveType',
type: 'select',
search: true,
searchOrder: 5,
dicData: effectiveTypeOptions,
hide: true,
display: false,
},
{
label: '甲方',
prop: 'partyA',
type: 'select',
order: 160,
dicUrl: '/blade-transport/customer-archive/list?current=1&size=9999&approvalStatus=approved',
dicFormatter: listDicFormatter,
props: {
label: 'fullName',
value: 'fullName',
},
filterable: true,
minWidth: 160,
rules: selectRule('甲方'),
},
{
label: '乙方',
prop: 'partyB',
type: 'select',
order: 150,
dicUrl: '/blade-transport/customer-archive/list?current=1&size=9999&approvalStatus=approved',
dicFormatter: listDicFormatter,
props: {
label: 'fullName',
value: 'fullName',
},
filterable: true,
minWidth: 160,
rules: selectRule('乙方'),
},
{
label: '合同期限',
prop: 'contractPeriod',
formslot: true,
order: 130,
hide: true,
rules: [{ required: true, message: '请选择合同期限', trigger: 'change' }],
},
{
label: '开始日期',
@@ -152,6 +280,8 @@ export const option = createCrudOption([
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
minWidth: 130,
addDisplay: false,
editDisplay: false,
},
{
label: '结束日期',
@@ -160,6 +290,8 @@ export const option = createCrudOption([
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
minWidth: 130,
addDisplay: false,
editDisplay: false,
},
{
label: '临时效力起',
@@ -168,6 +300,8 @@ export const option = createCrudOption([
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
minWidth: 130,
addDisplay: false,
editDisplay: false,
},
{
label: '临时效力止',
@@ -176,11 +310,16 @@ export const option = createCrudOption([
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
minWidth: 130,
addDisplay: false,
editDisplay: false,
},
{
label: '经办人',
prop: 'handlerUserName',
order: 110,
disabled: true,
minWidth: 120,
rules: textRule('经办人', 50, true),
},
{
label: '签订日期',
@@ -188,14 +327,20 @@ export const option = createCrudOption([
type: 'date',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
hide: true,
order: 100,
minWidth: 130,
rules: [{ required: true, message: '请选择签订日期', trigger: 'change' }],
},
{
label: '结算方式',
prop: 'settlementMode',
type: 'select',
dicData: settlementModeOptions,
hide: true,
order: 90,
minWidth: 120,
rules: selectRule('结算方式'),
},
{
label: '合同格式',
@@ -205,54 +350,74 @@ export const option = createCrudOption([
{ label: '电子合同', value: '电子合同' },
{ label: '纸质合同', value: '纸质合同' },
],
hide: true,
order: 80,
minWidth: 120,
rules: selectRule('合同格式'),
},
{
label: '法人章',
label: '是否需要加盖法人章',
prop: 'legalSealFlag',
type: 'switch',
type: 'select',
dicData: [
{ label: '否', value: 0 },
{ label: '是', value: 1 },
],
value: 0,
hide: true,
order: 70,
minWidth: 100,
rules: selectRule('是否需要加盖法人章'),
},
{
label: '一式份数',
label: '一式',
prop: 'copyCount',
type: 'number',
formslot: true,
hide: true,
order: 60,
minWidth: 110,
},
{
label: '回款账期(天)',
label: '回款账期',
prop: 'paymentDays',
type: 'number',
formslot: true,
hide: true,
order: 50,
minWidth: 130,
},
{
label: '创建时间',
prop: 'createTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
minWidth: 160,
addDisplay: false,
editDisplay: false,
},
{
label: '合同阶段',
prop: 'contractStage',
type: 'select',
search: true,
searchOrder: 2,
slot: true,
dicData: contractStageOptions,
minWidth: 120,
addDisplay: false,
editDisplay: false,
fixed: 'right',
},
{
label: '审核状态',
prop: 'approvalStatus',
type: 'select',
search: true,
searchOrder: 4,
slot: true,
dicData: contractApprovalStatusOptions,
minWidth: 130,
addDisplay: false,
editDisplay: false,
fixed: 'right',
},
{
label: '当前节点',
@@ -276,53 +441,133 @@ export const option = createCrudOption([
{ label: '关闭', value: 0 },
{ label: '开启', value: 1 },
],
value: 0,
value: 1,
hide: true,
display: false,
minWidth: 110,
},
{
label: '合同主文件JSON',
prop: 'contractFileJson',
type: 'textarea',
span: 24,
hide: true,
},
{
label: '其它附件JSON',
prop: 'attachmentsJson',
type: 'textarea',
span: 24,
hide: true,
},
{
label: '计费方案JSON',
prop: 'billingPlanJson',
type: 'textarea',
span: 24,
hide: true,
},
{
label: '结算生成规则JSON',
prop: 'settlementRuleJson',
type: 'textarea',
span: 24,
hide: true,
},
{
label: '对账配置JSON',
prop: 'reconciliationJson',
type: 'textarea',
span: 24,
hide: true,
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
span: 24,
hide: true,
order: 40,
maxlength: 2000,
showWordLimit: true,
rules: textRule('备注', 2000),
},
...auditColumns,
{
label: '',
prop: 'contractFileTitle',
formslot: true,
span: 24,
order: 30,
hide: true,
labelWidth: 0,
},
{
label: '附件',
prop: 'contractFileJson',
formslot: true,
span: 24,
order: 20,
hide: true,
},
{
label: '',
prop: 'billingInfoTitle',
formslot: true,
span: 24,
order: 10,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'billingPlanJson',
formslot: true,
span: 24,
order: 0,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'settlementRuleTitle',
formslot: true,
span: 24,
order: -10,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'settlementRuleJson',
formslot: true,
span: 24,
order: -20,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'reconciliationTitle',
formslot: true,
span: 24,
order: -30,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'reconciliationJson',
formslot: true,
span: 24,
order: -40,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'attachmentTitle',
formslot: true,
span: 24,
order: -50,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'attachmentsJson',
formslot: true,
span: 24,
order: -60,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'changeRecordTitle',
formslot: true,
span: 24,
order: -70,
hide: true,
labelWidth: 0,
},
{
label: '',
prop: 'changeRecordJson',
formslot: true,
span: 24,
order: -80,
hide: true,
labelWidth: 0,
},
...auditColumns
.filter(column => column.prop !== 'createTime')
.map(column => ({ ...column, hide: true })),
]);
option.span = 8;
option.dialogWidth = 1480;