1、大量页面调整
2、完善运力模块 3、完善规范、需求卡
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
import {
|
||||
auditColumns,
|
||||
createCrudOption,
|
||||
nonNegativeRule,
|
||||
packageOptions,
|
||||
priceUnitOptions,
|
||||
selectRule,
|
||||
textRule,
|
||||
} from './common';
|
||||
|
||||
@@ -15,67 +13,81 @@ export const config = {
|
||||
exportName: '常用货物',
|
||||
importUrl: '/blade-transport/common-cargo/import-common-cargo',
|
||||
templateUrl: '/blade-transport/common-cargo/export-template',
|
||||
enableAllDept: true,
|
||||
enableAllDept: false,
|
||||
};
|
||||
|
||||
export const option = createCrudOption([
|
||||
{
|
||||
label: '组织',
|
||||
prop: 'deptName',
|
||||
search: true,
|
||||
minWidth: 150,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: '一级货物类型',
|
||||
prop: 'firstCargoTypeName',
|
||||
formslot: true,
|
||||
search: true,
|
||||
searchOrder: 3,
|
||||
minWidth: 150,
|
||||
editDisabled: true,
|
||||
rules: textRule('一级货物类型', 100, true),
|
||||
rules: [{ required: true, message: '请选择一级货物类型', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '一级货物类型编码',
|
||||
prop: 'firstCargoTypeCode',
|
||||
hide: true,
|
||||
display: false,
|
||||
addDisplay: false,
|
||||
editDisabled: true,
|
||||
},
|
||||
{
|
||||
label: '二级货物类型',
|
||||
prop: 'secondCargoTypeName',
|
||||
formslot: true,
|
||||
search: true,
|
||||
searchOrder: 4,
|
||||
minWidth: 150,
|
||||
editDisabled: true,
|
||||
rules: textRule('二级货物类型', 100, true),
|
||||
rules: [{ required: true, message: '请选择二级货物类型', trigger: 'change' }],
|
||||
},
|
||||
{
|
||||
label: '二级货物类型编码',
|
||||
prop: 'secondCargoTypeCode',
|
||||
search: true,
|
||||
minWidth: 150,
|
||||
hide: true,
|
||||
display: false,
|
||||
addDisplay: false,
|
||||
editDisabled: true,
|
||||
rules: textRule('二级货物类型编码', 20, true),
|
||||
},
|
||||
{
|
||||
label: '货物名称',
|
||||
prop: 'cargoName',
|
||||
search: true,
|
||||
searchOrder: 1,
|
||||
minWidth: 150,
|
||||
rules: textRule('货物名称', 100, true),
|
||||
},
|
||||
{
|
||||
label: '货物编号',
|
||||
prop: 'cargoCode',
|
||||
formslot: true,
|
||||
search: true,
|
||||
searchOrder: 2,
|
||||
minWidth: 120,
|
||||
editDisabled: true,
|
||||
rules: textRule('货物编号', 20, true),
|
||||
maxlength: 20,
|
||||
showWordLimit: true,
|
||||
rules: [
|
||||
{ required: true, message: '请输入货物编号', trigger: 'blur' },
|
||||
{ max: 20, message: '货物编号不能超过20个字符', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '组织',
|
||||
prop: 'deptName',
|
||||
search: true,
|
||||
searchOrder: 5,
|
||||
minWidth: 150,
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
},
|
||||
{
|
||||
label: '品牌',
|
||||
prop: 'brand',
|
||||
search: true,
|
||||
search: false,
|
||||
minWidth: 120,
|
||||
rules: textRule('品牌', 50),
|
||||
},
|
||||
@@ -89,11 +101,32 @@ export const option = createCrudOption([
|
||||
{
|
||||
label: '货值',
|
||||
prop: 'cargoValue',
|
||||
type: 'number',
|
||||
precision: 2,
|
||||
min: 0,
|
||||
formslot: true,
|
||||
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: priceUnitOptions,
|
||||
display: false,
|
||||
minWidth: 120,
|
||||
rules: [nonNegativeRule('货值')],
|
||||
},
|
||||
{
|
||||
label: '规格',
|
||||
@@ -101,13 +134,6 @@ export const option = createCrudOption([
|
||||
minWidth: 120,
|
||||
rules: textRule('规格', 50),
|
||||
},
|
||||
{
|
||||
label: '计价单位',
|
||||
prop: 'priceUnit',
|
||||
type: 'select',
|
||||
dicData: priceUnitOptions,
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
label: '型号',
|
||||
prop: 'model',
|
||||
@@ -115,22 +141,10 @@ export const option = createCrudOption([
|
||||
rules: textRule('型号', 50),
|
||||
},
|
||||
{
|
||||
label: '说明1',
|
||||
label: '说明',
|
||||
prop: 'descriptionOne',
|
||||
minWidth: 160,
|
||||
rules: textRule('说明1', 100),
|
||||
},
|
||||
{
|
||||
label: '尺寸',
|
||||
prop: 'sizeText',
|
||||
minWidth: 120,
|
||||
rules: textRule('尺寸', 50),
|
||||
},
|
||||
{
|
||||
label: '说明2',
|
||||
prop: 'descriptionTwo',
|
||||
minWidth: 160,
|
||||
rules: textRule('说明2', 100),
|
||||
rules: textRule('说明', 100),
|
||||
},
|
||||
{
|
||||
label: '数据来源',
|
||||
|
||||
Reference in New Issue
Block a user