1、完善项目
2、完善合同 3、完善费用项 4、司机管理对接OCR 5、完善运输计划 6、完善临时额度
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
selectRule,
|
||||
settlementModeOptions,
|
||||
textRule,
|
||||
transportTypeOptions,
|
||||
} from './common';
|
||||
|
||||
const amountRules = label => [
|
||||
@@ -18,12 +17,24 @@ const amountRules = label => [
|
||||
nonNegativeRule(label),
|
||||
];
|
||||
|
||||
const userDicFormatter = res => {
|
||||
const list = Array.isArray(res)
|
||||
? res
|
||||
: Array.isArray(res.data)
|
||||
? res.data
|
||||
: res.data?.records || [];
|
||||
return list.map(user => ({
|
||||
...user,
|
||||
realName: user.realName || user.name || user.account,
|
||||
}));
|
||||
};
|
||||
|
||||
export const config = {
|
||||
title: '项目管理',
|
||||
permission: 'project_apply',
|
||||
exportUrl: '/blade-transport/project-apply/export-project-apply',
|
||||
exportName: '项目立项',
|
||||
enableAllDept: true,
|
||||
enableAllDept: false,
|
||||
statusProp: 'approvalStatus',
|
||||
statusTextProp: 'approvalStatusName',
|
||||
deleteStatus: ['draft', 'withdrawn', 'rejected'],
|
||||
@@ -31,9 +42,9 @@ export const config = {
|
||||
operations: [
|
||||
{
|
||||
action: 'submitApproval',
|
||||
label: '提交审批',
|
||||
label: '提交',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['draft', 'withdrawn', 'rejected'],
|
||||
status: ['draft'],
|
||||
permission: 'project_apply_submit',
|
||||
},
|
||||
{
|
||||
@@ -45,7 +56,7 @@ export const config = {
|
||||
},
|
||||
{
|
||||
action: 'approve',
|
||||
label: '审批通过',
|
||||
label: '通过',
|
||||
type: 'success',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing', 'change_reviewing'],
|
||||
@@ -61,11 +72,10 @@ export const config = {
|
||||
},
|
||||
{
|
||||
action: 'startChange',
|
||||
label: '发起变更',
|
||||
label: '变更',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['approved', 'change_approved'],
|
||||
status: ['approved'],
|
||||
permission: 'project_apply_change',
|
||||
prompt: '请输入变更内容与原因',
|
||||
},
|
||||
{
|
||||
action: 'voidProject',
|
||||
@@ -84,6 +94,7 @@ export const option = createCrudOption([
|
||||
label: '立项申请单号',
|
||||
prop: 'applyNo',
|
||||
search: true,
|
||||
searchOrder: 7,
|
||||
minWidth: 160,
|
||||
addDisplay: false,
|
||||
editDisabled: true,
|
||||
@@ -99,6 +110,7 @@ export const option = createCrudOption([
|
||||
label: '项目名称',
|
||||
prop: 'projectName',
|
||||
search: true,
|
||||
searchOrder: 6,
|
||||
minWidth: 180,
|
||||
maxlength: 50,
|
||||
rules: textRule('项目名称', 50, true),
|
||||
@@ -106,6 +118,7 @@ export const option = createCrudOption([
|
||||
{
|
||||
label: '项目简称',
|
||||
prop: 'projectShortName',
|
||||
hide: true,
|
||||
minWidth: 140,
|
||||
maxlength: 20,
|
||||
rules: textRule('项目简称', 20, true),
|
||||
@@ -115,13 +128,27 @@ export const option = createCrudOption([
|
||||
prop: 'projectType',
|
||||
type: 'select',
|
||||
search: true,
|
||||
searchOrder: 3,
|
||||
dicData: projectTypeOptions,
|
||||
minWidth: 120,
|
||||
rules: selectRule('项目类型'),
|
||||
},
|
||||
{
|
||||
label: '客户名称',
|
||||
prop: 'customerNames',
|
||||
minWidth: 180,
|
||||
rules: textRule('客户名称', 255, true),
|
||||
},
|
||||
{
|
||||
label: '下游承运商',
|
||||
prop: 'carrierNames',
|
||||
minWidth: 180,
|
||||
rules: textRule('下游承运商', 255, true),
|
||||
},
|
||||
{
|
||||
label: '业务部门',
|
||||
prop: 'businessDeptName',
|
||||
hide: true,
|
||||
minWidth: 150,
|
||||
rules: textRule('业务部门', 50, true),
|
||||
},
|
||||
@@ -129,6 +156,8 @@ export const option = createCrudOption([
|
||||
label: '承办部门',
|
||||
prop: 'undertakeDeptName',
|
||||
search: true,
|
||||
searchLabel: '承办单位',
|
||||
searchOrder: 5,
|
||||
minWidth: 150,
|
||||
rules: textRule('承办部门', 50, true),
|
||||
},
|
||||
@@ -140,13 +169,29 @@ export const option = createCrudOption([
|
||||
{
|
||||
label: '项目负责人',
|
||||
prop: 'principalUserName',
|
||||
search: true,
|
||||
minWidth: 130,
|
||||
rules: textRule('项目负责人', 50, true),
|
||||
},
|
||||
{
|
||||
label: '项目负责人',
|
||||
prop: 'principalUserId',
|
||||
type: 'select',
|
||||
search: true,
|
||||
searchOrder: 4,
|
||||
filterable: true,
|
||||
dicUrl: '/blade-system/user/user-list',
|
||||
dicFormatter: userDicFormatter,
|
||||
props: {
|
||||
label: 'realName',
|
||||
value: 'id',
|
||||
},
|
||||
hide: true,
|
||||
display: false,
|
||||
},
|
||||
{
|
||||
label: '项目经办人',
|
||||
prop: 'handlerUserName',
|
||||
hide: true,
|
||||
minWidth: 130,
|
||||
rules: textRule('项目经办人', 50, true),
|
||||
},
|
||||
@@ -156,6 +201,7 @@ export const option = createCrudOption([
|
||||
type: 'select',
|
||||
dicData: projectSourceOptions,
|
||||
value: '商务洽谈',
|
||||
hide: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
@@ -163,6 +209,7 @@ export const option = createCrudOption([
|
||||
prop: 'fundLimit',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
hide: true,
|
||||
minWidth: 190,
|
||||
rules: amountRules('项目资金使用额度'),
|
||||
},
|
||||
@@ -171,6 +218,7 @@ export const option = createCrudOption([
|
||||
prop: 'receivableLimit',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
hide: true,
|
||||
minWidth: 200,
|
||||
rules: amountRules('项目应收账款额度'),
|
||||
},
|
||||
@@ -178,6 +226,7 @@ export const option = createCrudOption([
|
||||
label: '应收账款回款期限(天)',
|
||||
prop: 'receivableDays',
|
||||
type: 'number',
|
||||
hide: true,
|
||||
minWidth: 190,
|
||||
rules: [{ required: true, message: '请输入应收账款回款期限', trigger: 'blur' }],
|
||||
},
|
||||
@@ -185,30 +234,20 @@ export const option = createCrudOption([
|
||||
label: '回款账期(天)',
|
||||
prop: 'paymentDays',
|
||||
type: 'number',
|
||||
hide: true,
|
||||
minWidth: 140,
|
||||
rules: [{ required: true, message: '请输入回款账期', trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
label: '客户名称',
|
||||
prop: 'customerNames',
|
||||
search: true,
|
||||
minWidth: 180,
|
||||
rules: textRule('客户名称', 255, true),
|
||||
},
|
||||
{
|
||||
label: '下游承运商',
|
||||
prop: 'carrierNames',
|
||||
minWidth: 180,
|
||||
rules: textRule('下游承运商', 255, true),
|
||||
},
|
||||
{
|
||||
label: '货物类型',
|
||||
prop: 'cargoType',
|
||||
hide: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
label: '预估货物数量',
|
||||
prop: 'cargoQuantity',
|
||||
hide: true,
|
||||
minWidth: 150,
|
||||
maxlength: 100,
|
||||
},
|
||||
@@ -218,6 +257,7 @@ export const option = createCrudOption([
|
||||
type: 'date',
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
hide: true,
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
@@ -226,11 +266,13 @@ export const option = createCrudOption([
|
||||
type: 'date',
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
hide: true,
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
label: '运输线路',
|
||||
prop: 'transportRoute',
|
||||
hide: true,
|
||||
minWidth: 180,
|
||||
maxlength: 100,
|
||||
},
|
||||
@@ -238,7 +280,12 @@ export const option = createCrudOption([
|
||||
label: '运输类型',
|
||||
prop: 'transportType',
|
||||
type: 'select',
|
||||
dicData: transportTypeOptions,
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=transport_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
value: 'dictKey',
|
||||
},
|
||||
hide: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
@@ -246,6 +293,7 @@ export const option = createCrudOption([
|
||||
prop: 'businessType',
|
||||
type: 'select',
|
||||
dicData: businessTypeOptions,
|
||||
hide: true,
|
||||
minWidth: 130,
|
||||
},
|
||||
{
|
||||
@@ -253,6 +301,7 @@ export const option = createCrudOption([
|
||||
prop: 'projectScale',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
hide: true,
|
||||
minWidth: 150,
|
||||
rules: [nonNegativeRule('项目规模')],
|
||||
},
|
||||
@@ -261,6 +310,7 @@ export const option = createCrudOption([
|
||||
prop: 'estimatedProfit',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
hide: true,
|
||||
minWidth: 150,
|
||||
rules: [nonNegativeRule('预计利润')],
|
||||
},
|
||||
@@ -269,6 +319,7 @@ export const option = createCrudOption([
|
||||
prop: 'fundDemand',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
hide: true,
|
||||
minWidth: 150,
|
||||
rules: [nonNegativeRule('资金需求')],
|
||||
},
|
||||
@@ -277,6 +328,7 @@ export const option = createCrudOption([
|
||||
prop: 'settlementMode',
|
||||
type: 'select',
|
||||
dicData: settlementModeOptions,
|
||||
hide: true,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
@@ -284,12 +336,12 @@ export const option = createCrudOption([
|
||||
prop: 'approvalStatus',
|
||||
type: 'select',
|
||||
search: true,
|
||||
searchOrder: 2,
|
||||
slot: true,
|
||||
dicData: projectApprovalStatusOptions,
|
||||
minWidth: 130,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
fixed: 'right',
|
||||
},
|
||||
{
|
||||
label: '当前节点',
|
||||
@@ -310,6 +362,7 @@ export const option = createCrudOption([
|
||||
prop: 'effectiveType',
|
||||
type: 'select',
|
||||
search: true,
|
||||
searchOrder: 1,
|
||||
dicData: effectiveTypeOptions,
|
||||
value: 'temporary',
|
||||
minWidth: 110,
|
||||
@@ -349,5 +402,5 @@ export const option = createCrudOption([
|
||||
span: 24,
|
||||
hide: true,
|
||||
},
|
||||
...auditColumns,
|
||||
...auditColumns.map(column => ({ ...column, hide: true })),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user