|
@ -8,120 +8,23 @@ const { t } = useI18n() // 国际化 |
|
|
/** |
|
|
/** |
|
|
* @returns {Array} 备件申请主表 |
|
|
* @returns {Array} 备件申请主表 |
|
|
*/ |
|
|
*/ |
|
|
export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const ItemOrderMain = useCrudSchemas( |
|
|
|
|
|
reactive<CrudSchema[]>([ |
|
|
{ |
|
|
{ |
|
|
label: '收货订单编号', |
|
|
label: '收货订单编号', |
|
|
field: 'number', |
|
|
field: 'number', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
table: { |
|
|
table: { |
|
|
width: 150, |
|
|
|
|
|
fixed: 'left' |
|
|
fixed: 'left' |
|
|
}, |
|
|
} |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '电话', |
|
|
|
|
|
field: 'phone', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '传真', |
|
|
|
|
|
field: 'fax', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '收货员', |
|
|
|
|
|
field: 'purchaser', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '供应商编号', |
|
|
label: '供应商编号', |
|
|
field: 'supplierNumber', |
|
|
field: 'supplierNumber', |
|
|
sort: 'custom', |
|
|
sort: 'custom' |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '供应商名称', |
|
|
|
|
|
field: 'supplierName', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '供应商地址', |
|
|
|
|
|
field: 'supplierAddress', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '发货至', |
|
|
|
|
|
field: 'shipTo', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '开票至', |
|
|
|
|
|
field: 'invoiceTo', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '联系人', |
|
|
|
|
|
field: 'contacts', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '联系电话', |
|
|
|
|
|
field: 'contactsPhone', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
// {
|
|
|
|
|
|
// label: '付款方式',
|
|
|
|
|
|
// field: 'paymentType',
|
|
|
|
|
|
// sort: 'custom',
|
|
|
|
|
|
// form: {
|
|
|
|
|
|
// component: 'Select'
|
|
|
|
|
|
// },
|
|
|
|
|
|
// },
|
|
|
|
|
|
{ |
|
|
|
|
|
label: '注册地', |
|
|
|
|
|
field: 'registLocation', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '开户行', |
|
|
|
|
|
field: 'bank', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ |
|
|
|
|
|
label: '账号', |
|
|
|
|
|
field: 'account', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '税号', |
|
|
|
|
|
field: 'dutyParagraph', |
|
|
|
|
|
sort: 'custom', |
|
|
|
|
|
}, |
|
|
|
|
|
// {
|
|
|
|
|
|
// label: '是否关闭',
|
|
|
|
|
|
// field: 'available',
|
|
|
|
|
|
// dictType: DICT_TYPE.TRUE_FALSE,
|
|
|
|
|
|
// dictClass: 'string',
|
|
|
|
|
|
// isSearch: false,
|
|
|
|
|
|
// isTable: true,
|
|
|
|
|
|
// sort: 'custom',
|
|
|
|
|
|
// table: {
|
|
|
|
|
|
// width: 150
|
|
|
|
|
|
// },
|
|
|
|
|
|
// tableForm: {
|
|
|
|
|
|
// type: 'Select',
|
|
|
|
|
|
// inactiveValue: 'FALSE',
|
|
|
|
|
|
// disabled: true
|
|
|
|
|
|
// },
|
|
|
|
|
|
// form: {
|
|
|
|
|
|
// component: 'Switch',
|
|
|
|
|
|
// value: 'FALSE',
|
|
|
|
|
|
// componentProps: {
|
|
|
|
|
|
// inactiveValue: 'FALSE',
|
|
|
|
|
|
// activeValue: 'TRUE'
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// },
|
|
|
|
|
|
{ |
|
|
{ |
|
|
label: '状态', |
|
|
label: '状态', |
|
|
field: 'status', |
|
|
field: 'status', |
|
@ -129,14 +32,14 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
dictType: DICT_TYPE.IS_COMPLETE, |
|
|
dictType: DICT_TYPE.IS_COMPLETE, |
|
|
dictClass: 'string', |
|
|
dictClass: 'string', |
|
|
isTable: true, |
|
|
isTable: true, |
|
|
isForm: true, |
|
|
isForm: false, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
type: 'Select' |
|
|
type: 'Select' |
|
|
}, |
|
|
}, |
|
|
form: { |
|
|
form: { |
|
|
value: 'INCOMPLETE', |
|
|
value: 'INCOMPLETE', |
|
|
componentProps: { |
|
|
componentProps: { |
|
|
disabled: true, |
|
|
disabled: true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -144,36 +47,17 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
label: '创建者', |
|
|
label: '创建者', |
|
|
field: 'creator', |
|
|
field: 'creator', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: false |
|
|
isSearch: false, |
|
|
|
|
|
isForm: false, |
|
|
|
|
|
table: {} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '创建时间', |
|
|
label: '创建时间', |
|
|
field: 'createTime', |
|
|
field: 'createTime', |
|
|
formatter: dateFormatter, |
|
|
|
|
|
detail: { |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
|
|
}, |
|
|
|
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isTable: true, |
|
|
formatter: dateFormatter, |
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
style: { width: '100%' }, |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
isForm: false, |
|
|
isForm: false, |
|
|
isSearch: true, |
|
|
table: {} |
|
|
search: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
type: 'daterange', |
|
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '操作', |
|
|
label: '操作', |
|
@ -185,27 +69,21 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
fixed: 'right' |
|
|
fixed: 'right' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
])) |
|
|
]) |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
//表单校验
|
|
|
//表单校验
|
|
|
export const ItemOrderMainRules = reactive({ |
|
|
export const ItemOrderMainRules = reactive({ |
|
|
available: [ |
|
|
available: [{ required: true, message: '请选择是否关闭', trigger: 'change' }], |
|
|
{ required: true, message: '请选择是否关闭', trigger: 'change' } |
|
|
number: [required, { max: 20, message: '请输入收货订单号', trigger: 'blur' }], |
|
|
], |
|
|
supplierNumber: [required, { max: 20, message: '请输入供应商编号', trigger: 'blur' }] |
|
|
number: [ |
|
|
|
|
|
required, |
|
|
|
|
|
{ max: 20, message: '请输入收货订单号', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
supplierNumber:[ |
|
|
|
|
|
required, |
|
|
|
|
|
{ max: 20, message: '请输入供应商编号', trigger: 'blur' } |
|
|
|
|
|
] |
|
|
|
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @returns {Array} 备件申请子表 |
|
|
* @returns {Array} 备件申请子表 |
|
|
*/ |
|
|
*/ |
|
|
export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const ItemOrderDetail = useCrudSchemas( |
|
|
|
|
|
reactive<CrudSchema[]>([ |
|
|
{ |
|
|
{ |
|
|
label: '备件编号', |
|
|
label: '备件编号', |
|
|
field: 'itemNumber', |
|
|
field: 'itemNumber', |
|
@ -218,13 +96,14 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
searchTitle: '备件信息', |
|
|
searchTitle: '备件信息', |
|
|
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
|
|
|
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
|
|
|
searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
|
|
|
searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
|
|
|
searchCondition: [{ |
|
|
searchCondition: [ |
|
|
|
|
|
{ |
|
|
key: 'available', |
|
|
key: 'available', |
|
|
value: 'TRUE', |
|
|
value: 'TRUE', |
|
|
isMainValue: false |
|
|
isMainValue: false |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '备件名称', |
|
|
label: '备件名称', |
|
@ -232,7 +111,7 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
table: { |
|
|
table: { |
|
|
width: 110, |
|
|
width: 110 |
|
|
}, |
|
|
}, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
disabled: true |
|
|
disabled: true |
|
@ -244,8 +123,8 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
table: { |
|
|
table: { |
|
|
width: 110, |
|
|
width: 110 |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '订单行', |
|
|
label: '订单行', |
|
@ -253,8 +132,8 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
table: { |
|
|
table: { |
|
|
width: 110, |
|
|
width: 110 |
|
|
}, |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '单价', |
|
|
label: '单价', |
|
@ -309,25 +188,16 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
type: 'InputNumber', |
|
|
type: 'InputNumber', |
|
|
min: 0, |
|
|
min: 0, |
|
|
precision: 2 |
|
|
precision: 2 |
|
|
}, |
|
|
} |
|
|
}, |
|
|
} |
|
|
])) |
|
|
]) |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
//表单校验
|
|
|
//表单校验
|
|
|
export const ItemOrderDetailRules = reactive({ |
|
|
export const ItemOrderDetailRules = reactive({ |
|
|
singlePrice: [ |
|
|
singlePrice: [{ required: true, message: '请输入备件单价', trigger: 'blur' }], |
|
|
{ required: true, message: '请输入备件单价', trigger: 'blur' }, |
|
|
serialNumber: [{ required: true, message: '请输入订单行', trigger: 'blur' }], |
|
|
], |
|
|
itemNumber: [{ required: true, message: '请输入备件编号', trigger: 'blur' }], |
|
|
serialNumber: [ |
|
|
itemName: [{ required: true, message: '请输入备件名称', trigger: 'blur' }], |
|
|
{ required: true, message: '请输入订单行', trigger: 'blur' }, |
|
|
uom: [{ required: true, message: '请输入备件单位', trigger: 'blur' }] |
|
|
], |
|
|
|
|
|
itemNumber: [ |
|
|
|
|
|
{ required: true, message: '请输入备件编号', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
itemName: [ |
|
|
|
|
|
{ required: true, message: '请输入备件名称', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
uom: [ |
|
|
|
|
|
{ required: true, message: '请输入备件单位', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
}) |
|
|
}) |
|
|