Merge remote-tracking branch 'refs/remotes/origin/master' into feature/bfi-api-rate

# Conflicts:
#	pnpm-lock.yaml
#	src/axios.js
#	src/views/settlement/formal-settlement.vue
#	src/views/vehicle/customer-archive.vue
This commit is contained in:
刘泉佳
2026-10-01 13:46:44 +08:00
139 changed files with 10731 additions and 2593 deletions
+7
View File
@@ -146,6 +146,13 @@ export const createOption = () => ({
showWordLimit: true,
rules: [{ max: 200, message: '备注不能超过200个字', trigger: 'blur' }],
},
{
label: '创建人',
prop: 'createUserName',
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '更新时间',
prop: 'updateTime',
+143 -139
View File
@@ -35,26 +35,7 @@ export const formatCargoValue = value => {
};
export const option = createCrudOption([
{
label: '一级货物类型',
prop: 'firstCargoTypeName',
formslot: true,
order: 60,
span: 12,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
},
{
label: '二级货物类型',
prop: 'secondCargoTypeName',
formslot: true,
order: 59,
span: 12,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
},
// ---------- 列表字段(顺序即表格展示顺序) ----------
{
label: '货物名称',
prop: 'cargoName',
@@ -79,12 +60,24 @@ export const option = createCrudOption([
],
},
{
label: '一级货物类型编码',
prop: 'firstCargoTypeCode',
hide: true,
display: false,
addDisplay: false,
label: '一级货物类型',
prop: 'firstCargoTypeName',
formslot: true,
order: 60,
span: 12,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
},
{
label: '二级货物类型',
prop: 'secondCargoTypeName',
formslot: true,
order: 59,
span: 12,
minWidth: 150,
editDisabled: true,
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
},
{
label: '二级货物类型编码',
@@ -92,9 +85,132 @@ export const option = createCrudOption([
display: false,
addDisplay: false,
editDisabled: true,
minWidth: 180,
minWidth: 160,
},
// 搜索字段与表格、表单字段独立,避免筛选配置影响数据展示和编辑布局。
{
label: '包装',
prop: 'packageType',
type: 'select',
dicData: packageOptions,
order: 39,
span: 12,
minWidth: 100,
},
{
label: '品牌',
prop: 'brand',
search: false,
order: 40,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('品牌', 50),
},
{
label: '规格',
prop: 'specification',
order: 29,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('规格', 50),
},
{
label: '型号',
prop: 'model',
order: 19,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('型号', 50, true),
},
{
label: '单价',
prop: 'cargoValue',
formslot: true,
order: 30,
formatter: row => formatCargoValue(row.cargoValue),
minWidth: 120,
rules: [
{
validator: (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
callback();
return;
}
if (!/^\d+(\.\d{1,2})?$/.test(String(value))) {
callback(new Error('单价只能输入数字,最多保留2位小数'));
return;
}
callback();
},
trigger: 'blur',
},
],
},
{
label: '计价单位',
prop: 'priceUnit',
type: 'select',
dicData: [],
display: false,
minWidth: 120,
},
{
label: '尺寸',
prop: 'sizeText',
minWidth: 120,
addDisplay: false,
editDisplay: false,
rules: textRule('尺寸', 100),
},
{
label: '说明',
prop: 'descriptionOne',
order: 20,
span: 12,
minWidth: 160,
placeholder: '请输入',
rules: textRule('说明', 100),
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
order: 10,
minRows: 2,
span: 24,
maxlength: 200,
showWordLimit: true,
placeholder: '请输入',
rules: textRule('备注', 200),
},
{
label: '组织',
prop: 'deptName',
minWidth: 150,
addDisplay: false,
editDisplay: false,
},
...auditColumns
.filter(column => ['createUserName', 'createTime', 'updateTime'].includes(column.prop))
.sort(
(first, second) =>
['createUserName', 'createTime', 'updateTime'].indexOf(first.prop) -
['createUserName', 'createTime', 'updateTime'].indexOf(second.prop)
),
// ---------- 表单隐藏字段 ----------
{
label: '一级货物类型编码',
prop: 'firstCargoTypeCode',
hide: true,
display: false,
addDisplay: false,
editDisabled: true,
},
// ---------- 搜索字段(与表格、表单独立) ----------
{
label: '货物名称',
prop: 'searchCargoName',
@@ -186,118 +302,6 @@ export const option = createCrudOption([
editDisplay: false,
viewDisplay: false,
},
{
label: '包装',
prop: 'packageType',
type: 'select',
dicData: packageOptions,
order: 39,
span: 12,
minWidth: 100,
},
{
label: '品牌',
prop: 'brand',
search: false,
order: 40,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('品牌', 50),
},
{
label: '规格',
prop: 'specification',
order: 29,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('规格', 50),
},
{
label: '货值',
prop: 'cargoValue',
formslot: true,
order: 30,
formatter: row => formatCargoValue(row.cargoValue),
minWidth: 120,
rules: [
{
validator: (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
callback();
return;
}
if (!/^\d+(\.\d{1,2})?$/.test(String(value))) {
callback(new Error('货值只能输入数字,最多保留2位小数'));
return;
}
callback();
},
trigger: 'blur',
},
],
},
{
label: '计价单位',
prop: 'priceUnit',
type: 'select',
dicData: [],
display: false,
minWidth: 120,
},
{
label: '型号',
prop: 'model',
order: 19,
span: 12,
minWidth: 120,
placeholder: '请输入',
rules: textRule('型号', 50, true),
},
{
label: '尺寸',
prop: 'sizeText',
minWidth: 120,
addDisplay: false,
editDisplay: false,
rules: textRule('尺寸', 100),
},
{
label: '说明',
prop: 'descriptionOne',
order: 20,
span: 12,
minWidth: 160,
placeholder: '请输入',
rules: textRule('说明', 100),
},
{
label: '备注',
prop: 'remark',
type: 'textarea',
order: 10,
minRows: 2,
span: 24,
maxlength: 200,
showWordLimit: true,
placeholder: '请输入',
rules: textRule('备注', 200),
},
{
label: '组织',
prop: 'deptName',
minWidth: 150,
addDisplay: false,
editDisplay: false,
},
...auditColumns
.filter(column => ['updateTime', 'createTime'].includes(column.prop))
.sort(
(first, second) =>
['updateTime', 'createTime'].indexOf(first.prop) -
['updateTime', 'createTime'].indexOf(second.prop)
),
]);
// 搜索栏标签统一加宽,给较长的货物类型字段预留足够展示空间。
+2 -3
View File
@@ -281,14 +281,13 @@ export const option = {
filterable: true,
},
...auditColumns
.filter(column => column.prop !== 'createUserName')
.map(column =>
['createTime', 'updateTime'].includes(column.prop) ? { ...column, minWidth: 190 } : column
)
.sort(
(first, second) =>
['updateUserName', 'updateTime', 'createTime'].indexOf(first.prop) -
['updateUserName', 'updateTime', 'createTime'].indexOf(second.prop)
['createUserName', 'updateUserName', 'createTime', 'updateTime'].indexOf(first.prop) -
['createUserName', 'updateUserName', 'createTime', 'updateTime'].indexOf(second.prop)
),
]),
dialogCustomClass: 'avue-dialog--common-route',
+10 -3
View File
@@ -114,7 +114,7 @@ export const config = {
operations: [
{
action: 'flow',
label: '查看流程',
label: '流程',
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
stage: ['temporary', 'formal'],
@@ -206,7 +206,7 @@ export const config = {
},
{
action: 'flow',
label: '查看流程',
label: '流程',
statusProp: 'approvalStatus',
status: ['approved', 'change_approved'],
stage: ['formal', 'terminated'],
@@ -532,6 +532,13 @@ export const option = createCrudOption([
order: 30,
minWidth: 110,
},
{
label: '创建人',
prop: 'createUserName',
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '创建时间',
prop: 'createTime',
@@ -730,7 +737,7 @@ export const option = createCrudOption([
labelWidth: 0,
},
...auditColumns
.filter(column => column.prop !== 'createTime')
.filter(column => !['createTime', 'createUserName'].includes(column.prop))
.map(column => ({ ...column, hide: true })),
]);
+2 -1
View File
@@ -31,7 +31,7 @@ export const loadingManageConfig = {
exportColumns: [
{ prop: 'loadingNo', label: '配载单号' },
{ prop: 'loadingSubNos', label: '配载子单号' },
{ prop: 'vehicleNo', label: '车牌号/航班号/船号/班列号' },
{ prop: 'vehicleNo', label: '车牌号/船班号/船次号/班次号' },
{ prop: 'driverName', label: '司机' },
{ prop: 'driverPhone', label: '联系电话' },
{ prop: 'carrierType', label: '承运类型' },
@@ -41,6 +41,7 @@ export const loadingManageConfig = {
{ prop: 'carrierName', label: '承运商' },
{ prop: 'transportType', label: '运输方式' },
{ prop: 'dataSource', label: '数据来源' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
{ prop: 'updateTime', label: '更新时间' },
{ prop: 'currentProcessNode', label: '过程节点' },
+3 -3
View File
@@ -112,12 +112,12 @@ export const option = {
editDisplay: false,
},
...auditColumns
.filter(column => ['updateTime', 'createTime'].includes(column.prop))
.filter(column => ['createUserName', 'createTime', 'updateTime'].includes(column.prop))
.map(column => ({ ...column, minWidth: 190 }))
.sort(
(first, second) =>
['updateTime', 'createTime'].indexOf(first.prop) -
['updateTime', 'createTime'].indexOf(second.prop)
['createUserName', 'createTime', 'updateTime'].indexOf(first.prop) -
['createUserName', 'createTime', 'updateTime'].indexOf(second.prop)
),
{
label: '项目ID集合',
+17 -3
View File
@@ -57,16 +57,24 @@ export const config = {
action: 'submitApproval',
label: '提交',
statusProp: 'approvalStatus',
status: ['draft'],
status: ['draft', 'rejected', 'withdrawn'],
permission: 'project_apply_submit',
},
{
action: 'withdraw',
label: '撤回',
statusProp: 'approvalStatus',
status: ['reviewing'],
status: ['draft', 'reviewing'],
permission: 'project_apply_withdraw',
},
{
action: 'mkAudit',
label: '流程',
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
permission: 'project_apply_approve',
mkOnly: true,
},
{
action: 'approve',
label: '通过',
@@ -74,6 +82,7 @@ export const config = {
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
permission: 'project_apply_approve',
localOnly: true,
},
{
action: 'reject',
@@ -82,6 +91,7 @@ export const config = {
statusProp: 'approvalStatus',
status: ['reviewing', 'change_reviewing'],
permission: 'project_apply_reject',
localOnly: true,
},
{
action: 'startChange',
@@ -442,5 +452,9 @@ export const option = createCrudOption([
span: 24,
hide: true,
},
...auditColumns.map(column => ({ ...column, hide: true })),
...auditColumns.map(column =>
['createUserName', 'createTime'].includes(column.prop)
? column
: { ...column, hide: true }
),
]);
@@ -332,7 +332,11 @@ export const option = {
addDisplay: false,
editDisplay: false,
},
...auditColumns.map(column => ({ ...column, hide: true })),
...auditColumns.map(column =>
['createUserName', 'createTime'].includes(column.prop)
? column
: { ...column, hide: true }
),
])),
dialogWidth: 1100,
menuFixed: 'right',
+5 -1
View File
@@ -249,9 +249,10 @@ export const config = {
title: '其它信息',
fields: [
['remark', '备注'],
['createUserName', '创建人'],
['createTime', '创建时间'],
['updateUserName', '更新人'],
['updateTime', '更新时间'],
['createTime', '创建时间'],
],
},
],
@@ -457,6 +458,9 @@ export const option = {
showWordLimit: true,
rules: textRule('备注', 200),
},
{
...auditColumn('createUserName'),
},
{
...auditColumn('updateUserName'),
},
+18 -2
View File
@@ -565,10 +565,10 @@ export const option = {
display: false,
},
{
label: '车牌号/航班号/船号/班列号',
label: '车牌号/船班号/船次号/班次号',
prop: 'vehicleNo',
search: true,
searchLabel: '车/船/航班/班列',
searchLabel: '车牌号/船班号/船次号/班次号',
searchOrder: 13,
minWidth: 210,
display: false,
@@ -738,6 +738,19 @@ export const option = {
span: 6,
order: 870,
minWidth: 150,
formatter: row => {
const value = row?.planName;
if (
value === undefined ||
value === null ||
value === '' ||
String(value) === '-1' ||
Number(value) === -1
) {
return '';
}
return value;
},
},
{
label: '货物类型',
@@ -870,6 +883,9 @@ export const option = {
viewDisplay: false,
display: false,
},
{
...auditColumn('createUserName'),
},
{
...auditColumn('createTime'),
},
@@ -106,7 +106,7 @@ export const generateWaybillColumns = [
{ label: '运单号', prop: 'waybillNo', minWidth: 160, link: true },
{ label: '项目名称', prop: 'projectName', minWidth: 160 },
{ label: '客户/委托方', prop: 'customerName', minWidth: 160 },
{ label: '车牌号/航班号/船号/班列号', prop: 'vehicleNo', minWidth: 190 },
{ label: '车牌号/船班号/船次号/班次号', prop: 'vehicleNo', minWidth: 190 },
{ label: '司机', prop: 'driverName', minWidth: 120 },
{ label: '承运商', prop: 'carrierName', minWidth: 160 },
{ label: '运输类型', prop: 'transportType', minWidth: 130 },
+17
View File
@@ -125,6 +125,23 @@ export const option = {
slot: true,
minWidth: 160,
},
{
label: '创建人',
prop: 'createUserName',
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '创建时间',
prop: 'createTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
minWidth: 170,
addDisplay: false,
editDisplay: false,
},
{
label: '准驾车型',
prop: 'drivingType',
@@ -91,6 +91,23 @@ export const option = {
minWidth: 140,
align: 'center',
},
{
label: '创建人',
prop: 'createUserName',
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '创建时间',
prop: 'createTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
minWidth: 170,
addDisplay: false,
editDisplay: false,
},
{
label: '',
prop: 'expireStatus',
@@ -151,6 +151,23 @@ export const option = {
minWidth: 130,
align: 'center',
},
{
label: '创建人',
prop: 'createUserName',
minWidth: 120,
addDisplay: false,
editDisplay: false,
},
{
label: '创建时间',
prop: 'createTime',
type: 'datetime',
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
minWidth: 170,
addDisplay: false,
editDisplay: false,
},
{
label: '',
prop: 'expireStatus',
+16 -1
View File
@@ -1,7 +1,7 @@
import { formatUpdateUserName } from '@/utils/audit';
const validateNonNegative = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null || value === '' || Number(value) === -1) {
callback();
} else if (Number(value) < 0) {
callback(new Error('不能小于 0'));
@@ -10,6 +10,9 @@ const validateNonNegative = (rule, value, callback) => {
}
};
const formatEmptySentinel = (row, value) =>
value === undefined || value === null || value === '' || Number(value) === -1 ? '' : value;
export const vehicleTypeDic = [
{ label: '车辆', value: '车辆' },
{ label: '船舶', value: '船舶' },
@@ -135,6 +138,7 @@ export const option = {
minWidth: 140,
span: 12,
placeholder: '请输入',
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -146,6 +150,7 @@ export const option = {
minWidth: 140,
span: 12,
placeholder: '请输入',
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -204,6 +209,14 @@ export const option = {
editDisplay: false,
viewDisplay: false,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -281,6 +294,8 @@ export const exportColumns = [
{ prop: 'insuranceClaimAmount', label: '保险理赔金额' },
{ prop: 'accidentReasonDamage', label: '事故原因及损坏情况' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+15 -1
View File
@@ -1,7 +1,7 @@
import { formatUpdateUserName } from '@/utils/audit';
const validateNonNegative = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null || value === '' || Number(value) === -1) {
callback();
} else if (Number(value) < 0) {
callback(new Error('不能小于 0'));
@@ -10,6 +10,9 @@ const validateNonNegative = (rule, value, callback) => {
}
};
const formatEmptySentinel = (row, value) =>
value === undefined || value === null || value === '' || Number(value) === -1 ? '' : value;
export const vehicleTypeDic = [
{ label: '车辆', value: '车辆' },
{ label: '船舶', value: '船舶' },
@@ -159,6 +162,7 @@ export const option = {
minWidth: 100,
span: 12,
placeholder: '请输入',
formatter: formatEmptySentinel,
rules: [
{ required: true, message: '请输入费用', trigger: 'blur' },
{ validator: validateNonNegative, trigger: 'blur' },
@@ -206,6 +210,14 @@ export const option = {
editDisplay: false,
viewDisplay: false,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -282,6 +294,8 @@ export const exportColumns = [
{ prop: 'fee', label: '费用(元)' },
{ prop: 'assessmentUnit', label: '评定(复核)单位' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+11
View File
@@ -147,6 +147,15 @@ export const option = {
viewDisplay: false,
minWidth: 170,
},
{
label: '创建人',
prop: 'createUserName',
display: false,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -224,6 +233,8 @@ export const exportColumns = [
{ prop: 'specificationModel', label: '规格型号' },
{ prop: 'remark', label: '备注' },
{ prop: 'originalEquipmentNo', label: '原厂设备号' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+10
View File
@@ -172,6 +172,14 @@ export const option = {
editDisplay: false,
viewDisplay: false,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -218,6 +226,8 @@ export const exportColumns = [
{ prop: 'exitStation', label: '出口站' },
{ prop: 'dataSource', label: '数据来源' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+15 -1
View File
@@ -1,7 +1,7 @@
import { formatUpdateUserName } from '@/utils/audit';
const validateNonNegative = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null || value === '' || Number(value) === -1) {
callback();
} else if (Number(value) < 0) {
callback(new Error('不能小于 0'));
@@ -141,6 +141,7 @@ export const option = {
formslot: true,
append: '元',
minWidth: 120,
formatter: (row, value) => (value === undefined || value === null || value === '' || Number(value) === -1 ? '' : value),
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -150,6 +151,7 @@ export const option = {
formslot: true,
append: '元',
minWidth: 120,
formatter: (row, value) => (value === undefined || value === null || value === '' || Number(value) === -1 ? '' : value),
rules: [
{ required: true, message: '请输入保费', trigger: 'blur' },
{ validator: validateNonNegative, trigger: 'blur' },
@@ -159,6 +161,7 @@ export const option = {
label: '发票号',
prop: 'invoiceNo',
minWidth: 150,
formatter: (row, value) => (value === undefined || value === null || value === '' || String(value) === '-1' ? '' : value),
rules: [{ max: 80, message: '最多 80 个字符', trigger: 'blur' }],
},
{
@@ -168,6 +171,7 @@ export const option = {
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
minWidth: 120,
formatter: (row, value) => (value === undefined || value === null || value === '' || String(value) === '-1' ? '' : value),
},
{
label: '备注',
@@ -178,6 +182,14 @@ export const option = {
hide: true,
rules: [{ max: 200, message: '备注最多 200 个字', trigger: 'blur' }],
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -256,6 +268,8 @@ export const exportColumns = [
{ prop: 'invoiceNo', label: '发票号' },
{ prop: 'invoiceDate', label: '开票日期' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+18 -1
View File
@@ -1,6 +1,7 @@
import { formatUpdateUserName } from '@/utils/audit';
const isEmpty = value => value === undefined || value === null || value === '';
const isEmpty = value =>
value === undefined || value === null || value === '' || Number(value) === -1;
const validateNonNegative = (rule, value, callback) => {
if (isEmpty(value)) {
@@ -12,6 +13,8 @@ const validateNonNegative = (rule, value, callback) => {
}
};
const formatEmptySentinel = (row, value) => (isEmpty(value) ? '' : value);
export const option = {
height: 'auto',
calcHeight: 32,
@@ -60,6 +63,7 @@ export const option = {
append: 'km',
minWidth: 210,
slot: true,
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -70,6 +74,7 @@ export const option = {
append: 'km',
minWidth: 210,
slot: true,
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -80,6 +85,7 @@ export const option = {
append: 'km',
minWidth: 170,
slot: true,
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -90,6 +96,7 @@ export const option = {
append: 'km',
minWidth: 170,
slot: true,
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -133,6 +140,14 @@ export const option = {
editDisplay: false,
viewDisplay: false,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -208,6 +223,8 @@ export const exportColumns = [
{ prop: 'monthlyMileage', label: '本月行驶里程数' },
{ prop: 'totalMileage', label: '累计行驶里程数' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+18 -1
View File
@@ -1,6 +1,7 @@
import { formatUpdateUserName } from '@/utils/audit';
const isEmpty = value => value === undefined || value === null || value === '';
const isEmpty = value =>
value === undefined || value === null || value === '' || Number(value) === -1;
const validateNonNegative = (rule, value, callback) => {
if (isEmpty(value)) {
@@ -12,6 +13,8 @@ const validateNonNegative = (rule, value, callback) => {
}
};
const formatEmptySentinel = (row, value) => (isEmpty(value) ? '' : value);
export const vehicleTypeDic = [
{ label: '车辆', value: '车辆' },
{ label: '船舶', value: '船舶' },
@@ -124,6 +127,7 @@ export const option = {
type: 'input',
formslot: true,
minWidth: 110,
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -133,6 +137,7 @@ export const option = {
formslot: true,
append: '元/升',
minWidth: 120,
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -141,6 +146,7 @@ export const option = {
type: 'input',
formslot: true,
minWidth: 130,
formatter: formatEmptySentinel,
rules: [
{ required: true, message: '请输入交易金额', trigger: 'blur' },
{ validator: validateNonNegative, trigger: 'blur' },
@@ -152,6 +158,7 @@ export const option = {
type: 'input',
formslot: true,
minWidth: 110,
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -225,6 +232,14 @@ export const option = {
editDisplay: false,
viewDisplay: false,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -304,6 +319,8 @@ export const exportColumns = [
{ prop: 'balance', label: '余额' },
{ prop: 'station', label: '站点' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
@@ -165,6 +165,14 @@ export const option = {
editDisplay: false,
viewDisplay: false,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -209,6 +217,8 @@ export const exportColumns = [
{ prop: 'amount', label: '金额' },
{ prop: 'dataSource', label: '数据来源' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+17 -2
View File
@@ -1,7 +1,7 @@
import { formatUpdateUserName } from '@/utils/audit';
const validateNonNegative = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null || value === '' || Number(value) === -1) {
callback();
} else if (Number(value) < 0) {
callback(new Error('不能小于 0'));
@@ -11,7 +11,7 @@ const validateNonNegative = (rule, value, callback) => {
};
const validatePositiveInteger = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null || value === '' || Number(value) === -1) {
callback();
} else if (!Number.isInteger(Number(value)) || Number(value) <= 0) {
callback(new Error('换胎数量必须为正整数'));
@@ -20,6 +20,9 @@ const validatePositiveInteger = (rule, value, callback) => {
}
};
const formatEmptySentinel = (row, value) =>
value === undefined || value === null || value === '' || Number(value) === -1 ? '' : value;
export const option = {
height: 'auto',
calcHeight: 32,
@@ -98,6 +101,7 @@ export const option = {
minWidth: 110,
span: 12,
placeholder: '请输入',
formatter: formatEmptySentinel,
rules: [{ validator: validatePositiveInteger, trigger: 'blur' }],
},
{
@@ -108,6 +112,7 @@ export const option = {
minWidth: 120,
span: 12,
placeholder: '请输入',
formatter: formatEmptySentinel,
rules: [
{ required: true, message: '请输入换胎费用', trigger: 'blur' },
{ validator: validateNonNegative, trigger: 'blur' },
@@ -142,6 +147,14 @@ export const option = {
slot: true,
formslot: true,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -217,6 +230,8 @@ export const exportColumns = [
{ prop: 'replacementCost', label: '换胎费用' },
{ prop: 'replacementDescription', label: '换胎说明' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
@@ -97,6 +97,14 @@ export const option = {
slot: true,
formslot: true,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -169,6 +177,8 @@ export const exportColumns = [
{ prop: 'changeItem', label: '变更事项' },
{ prop: 'changeContent', label: '变更内容' },
{ prop: 'remark', label: '备注' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {
+17 -2
View File
@@ -1,7 +1,7 @@
import { formatUpdateUserName } from '@/utils/audit';
const validateNonNegative = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null || value === '' || Number(value) === -1) {
callback();
} else if (Number(value) < 0) {
callback(new Error('不能小于 0'));
@@ -11,7 +11,7 @@ const validateNonNegative = (rule, value, callback) => {
};
const validateDeductPoints = (rule, value, callback) => {
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null || value === '' || Number(value) === -1) {
callback();
} else if (!Number.isInteger(Number(value)) || Number(value) < 0 || Number(value) > 15) {
callback(new Error('被扣分数范围为 0-15 分'));
@@ -20,6 +20,9 @@ const validateDeductPoints = (rule, value, callback) => {
}
};
const formatEmptySentinel = (row, value) =>
value === undefined || value === null || value === '' || Number(value) === -1 ? '' : value;
export const vehicleTypeDic = [
{ label: '车辆', value: '车辆' },
{ label: '船舶', value: '船舶' },
@@ -150,6 +153,7 @@ export const option = {
minWidth: 100,
span: 12,
placeholder: '请输入',
formatter: formatEmptySentinel,
rules: [{ validator: validateNonNegative, trigger: 'blur' }],
},
{
@@ -160,6 +164,7 @@ export const option = {
minWidth: 110,
span: 12,
placeholder: '请输入',
formatter: formatEmptySentinel,
rules: [{ validator: validateDeductPoints, trigger: 'blur' }],
},
{
@@ -216,6 +221,14 @@ export const option = {
slot: true,
formslot: true,
},
{
label: '创建人',
prop: 'createUserName',
addDisplay: false,
editDisplay: false,
display: false,
minWidth: 120,
},
{
label: '创建时间',
prop: 'createTime',
@@ -294,6 +307,8 @@ export const exportColumns = [
{ prop: 'processStatus', label: '状态' },
{ prop: 'processDescription', label: '过程描述' },
{ prop: 'processResult', label: '处理结果' },
{ prop: 'createUserName', label: '创建人' },
{ prop: 'createTime', label: '创建时间' },
];
export const excelOption = {