1、完善项目
2、完善合同 3、完善费用项 4、司机管理对接OCR 5、完善运输计划 6、完善临时额度
This commit is contained in:
@@ -1,23 +1,61 @@
|
||||
import { approvalStatusOptions, auditColumns, createCrudOption, nonNegativeRule, textRule } from './common';
|
||||
import {
|
||||
approvalStatusOptions,
|
||||
auditColumns,
|
||||
createCrudOption,
|
||||
nonNegativeRule,
|
||||
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 [];
|
||||
};
|
||||
|
||||
const userDicFormatter = res =>
|
||||
listDicFormatter(res).map(user => ({
|
||||
...user,
|
||||
realName: user.realName || user.name || user.account,
|
||||
}));
|
||||
|
||||
export const config = {
|
||||
title: '临时额度管理',
|
||||
permission: 'temporary_credit_limit',
|
||||
exportUrl: '/blade-transport/temporary-credit-limit/export-temporary-credit-limit',
|
||||
exportName: '临时额度申请',
|
||||
enableAllDept: true,
|
||||
enableAllDept: false,
|
||||
enableProjectSelect: true,
|
||||
enableAttachmentTable: true,
|
||||
enableDraftSave: true,
|
||||
saveAsDraft: true,
|
||||
defaultForm: {
|
||||
usedFundLimit: 0,
|
||||
remainingFundLimit: 0,
|
||||
},
|
||||
statusProp: 'approvalStatus',
|
||||
statusTextProp: 'approvalStatusName',
|
||||
deleteStatus: ['draft', 'withdrawn', 'rejected'],
|
||||
editStatus: ['draft', 'withdrawn', 'rejected'],
|
||||
deleteStatus: ['draft', 'withdrawn', 'rejected', '草稿'],
|
||||
editStatus: ['draft', 'withdrawn', 'rejected', '草稿', '已撤回'],
|
||||
ignoreReadonlyEditStatus: ['draft', 'withdrawn', '草稿', '已撤回'],
|
||||
ignoreReadonlyDeleteStatus: ['draft', '草稿'],
|
||||
operations: [
|
||||
{
|
||||
action: 'submitApproval',
|
||||
label: '提交审批',
|
||||
label: '提交',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['draft', 'withdrawn', 'rejected'],
|
||||
permission: 'temporary_credit_limit_submit',
|
||||
},
|
||||
{
|
||||
action: 'flow',
|
||||
label: '流程',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing'],
|
||||
permission: 'temporary_credit_limit_view',
|
||||
},
|
||||
{
|
||||
action: 'withdraw',
|
||||
label: '撤回',
|
||||
@@ -44,145 +82,184 @@ export const config = {
|
||||
],
|
||||
};
|
||||
|
||||
export const option = createCrudOption([
|
||||
{
|
||||
label: '申请单号',
|
||||
prop: 'applicationNo',
|
||||
search: true,
|
||||
minWidth: 160,
|
||||
addDisplay: false,
|
||||
editDisabled: true,
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
search: true,
|
||||
minWidth: 180,
|
||||
rules: textRule('项目名称', 100, true),
|
||||
},
|
||||
{
|
||||
label: '项目ID',
|
||||
prop: 'projectId',
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: '项目编号',
|
||||
prop: 'projectCode',
|
||||
minWidth: 150,
|
||||
rules: textRule('项目编号', 50, true),
|
||||
},
|
||||
{
|
||||
label: '承办部门',
|
||||
prop: 'undertakeDeptName',
|
||||
minWidth: 150,
|
||||
rules: textRule('承办部门', 50, true),
|
||||
},
|
||||
{
|
||||
label: '项目资金使用额度(万元)',
|
||||
prop: 'projectFundLimit',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
minWidth: 200,
|
||||
editDisabled: true,
|
||||
rules: [nonNegativeRule('项目资金使用额度')],
|
||||
},
|
||||
{
|
||||
label: '已使用项目资金额度(万元)',
|
||||
prop: 'usedFundLimit',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
minWidth: 220,
|
||||
value: 0,
|
||||
editDisabled: true,
|
||||
rules: [nonNegativeRule('已使用项目资金额度')],
|
||||
},
|
||||
{
|
||||
label: '剩余项目资金使用额度(万元)',
|
||||
prop: 'remainingFundLimit',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
minWidth: 230,
|
||||
editDisabled: true,
|
||||
rules: [nonNegativeRule('剩余项目资金使用额度')],
|
||||
},
|
||||
{
|
||||
label: '申请临时额度(万元)',
|
||||
prop: 'applyLimit',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
minWidth: 180,
|
||||
rules: [
|
||||
{ required: true, message: '请输入申请临时额度', trigger: 'blur' },
|
||||
nonNegativeRule('申请临时额度'),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '申请有效期至',
|
||||
prop: 'validUntil',
|
||||
type: 'date',
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
minWidth: 140,
|
||||
rules: [{ required: true, message: '请选择申请有效期至', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '申请部门',
|
||||
prop: 'applyDeptName',
|
||||
search: true,
|
||||
minWidth: 150,
|
||||
addDisplay: false,
|
||||
editDisabled: true,
|
||||
},
|
||||
{
|
||||
label: '申请人',
|
||||
prop: 'applicantName',
|
||||
search: true,
|
||||
minWidth: 120,
|
||||
addDisplay: false,
|
||||
editDisabled: true,
|
||||
},
|
||||
{
|
||||
label: '审批状态',
|
||||
prop: 'approvalStatus',
|
||||
type: 'select',
|
||||
search: true,
|
||||
slot: true,
|
||||
dicData: approvalStatusOptions,
|
||||
minWidth: 130,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
{
|
||||
label: '当前节点',
|
||||
prop: 'currentNode',
|
||||
minWidth: 140,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: '当前处理人',
|
||||
prop: 'currentProcessor',
|
||||
minWidth: 130,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: '附件JSON',
|
||||
prop: 'attachmentsJson',
|
||||
type: 'textarea',
|
||||
span: 24,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
prop: 'remark',
|
||||
type: 'textarea',
|
||||
span: 24,
|
||||
hide: true,
|
||||
maxlength: 500,
|
||||
showWordLimit: true,
|
||||
rules: textRule('备注', 500),
|
||||
},
|
||||
...auditColumns,
|
||||
]);
|
||||
export const option = {
|
||||
...createCrudOption([
|
||||
{
|
||||
label: '申请单号',
|
||||
prop: 'applicationNo',
|
||||
search: true,
|
||||
searchOrder: 5,
|
||||
minWidth: 160,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
editDisabled: true,
|
||||
},
|
||||
{
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
search: true,
|
||||
searchOrder: 4,
|
||||
searchType: 'select',
|
||||
formslot: true,
|
||||
dicUrl: '/blade-transport/project-apply/list?current=1&size=9999',
|
||||
dicFormatter: listDicFormatter,
|
||||
props: {
|
||||
label: 'projectName',
|
||||
value: 'projectName',
|
||||
},
|
||||
filterable: true,
|
||||
minWidth: 180,
|
||||
rules: textRule('项目名称', 100, true),
|
||||
},
|
||||
{
|
||||
label: '项目ID',
|
||||
prop: 'projectId',
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: '项目编号',
|
||||
prop: 'projectCode',
|
||||
hide: true,
|
||||
disabled: true,
|
||||
minWidth: 150,
|
||||
rules: textRule('项目编号', 50, true),
|
||||
},
|
||||
{
|
||||
label: '承办部门',
|
||||
prop: 'undertakeDeptName',
|
||||
hide: true,
|
||||
disabled: true,
|
||||
minWidth: 150,
|
||||
rules: textRule('承办部门', 50, true),
|
||||
},
|
||||
{
|
||||
label: '项目资金使用额度(万元)',
|
||||
prop: 'projectFundLimit',
|
||||
hide: true,
|
||||
disabled: true,
|
||||
minWidth: 200,
|
||||
rules: [nonNegativeRule('项目资金使用额度')],
|
||||
},
|
||||
{
|
||||
label: '已使用项目资金使用额度(万元)',
|
||||
prop: 'usedFundLimit',
|
||||
hide: true,
|
||||
disabled: true,
|
||||
minWidth: 220,
|
||||
value: 0,
|
||||
rules: [nonNegativeRule('已使用项目资金额度')],
|
||||
},
|
||||
{
|
||||
label: '剩余项目资金使用额度(万元)',
|
||||
prop: 'remainingFundLimit',
|
||||
hide: true,
|
||||
disabled: true,
|
||||
minWidth: 230,
|
||||
value: 0,
|
||||
rules: [nonNegativeRule('剩余项目资金使用额度')],
|
||||
},
|
||||
{
|
||||
label: '申请临时额度(万元)',
|
||||
prop: 'applyLimit',
|
||||
formslot: true,
|
||||
minWidth: 180,
|
||||
rules: [
|
||||
{ required: true, message: '请输入申请临时额度', trigger: 'blur' },
|
||||
nonNegativeRule('申请临时额度'),
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '申请有效期至',
|
||||
prop: 'validUntil',
|
||||
type: 'date',
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
minWidth: 140,
|
||||
rules: [{ required: true, message: '请选择申请有效期至', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '申请部门',
|
||||
prop: 'applyDeptName',
|
||||
search: true,
|
||||
searchOrder: 2,
|
||||
searchType: 'select',
|
||||
dicUrl: '/blade-system/dept/select',
|
||||
props: {
|
||||
label: 'deptName',
|
||||
value: 'deptName',
|
||||
},
|
||||
filterable: true,
|
||||
minWidth: 150,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
editDisabled: true,
|
||||
},
|
||||
{
|
||||
label: '申请人',
|
||||
prop: 'applicantName',
|
||||
search: true,
|
||||
searchOrder: 3,
|
||||
searchType: 'select',
|
||||
dicUrl: '/blade-system/user/user-list',
|
||||
dicFormatter: userDicFormatter,
|
||||
props: {
|
||||
label: 'realName',
|
||||
value: 'realName',
|
||||
},
|
||||
filterable: true,
|
||||
minWidth: 120,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
editDisabled: true,
|
||||
},
|
||||
{
|
||||
label: '审批状态',
|
||||
searchLabel: '状态',
|
||||
prop: 'approvalStatus',
|
||||
type: 'select',
|
||||
search: true,
|
||||
searchOrder: 1,
|
||||
slot: true,
|
||||
dicData: approvalStatusOptions,
|
||||
minWidth: 130,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
{
|
||||
label: '当前节点',
|
||||
prop: 'currentNode',
|
||||
minWidth: 140,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: '当前处理人',
|
||||
prop: 'currentProcessor',
|
||||
minWidth: 130,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: '备注',
|
||||
prop: 'remark',
|
||||
type: 'textarea',
|
||||
span: 24,
|
||||
hide: true,
|
||||
maxlength: 200,
|
||||
showWordLimit: true,
|
||||
rules: textRule('备注', 200),
|
||||
},
|
||||
{
|
||||
label: '附件',
|
||||
prop: 'attachmentsJson',
|
||||
formslot: true,
|
||||
span: 24,
|
||||
hide: true,
|
||||
},
|
||||
...auditColumns.map(column => ({ ...column, hide: true })),
|
||||
]),
|
||||
dialogWidth: 1480,
|
||||
index: false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user