|
|
@ -1,20 +1,23 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import * as ItemApi from '@/api/wms/itembasic' |
|
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
|
import * as SupplierApi from '@/api/wms/supplier' |
|
|
|
import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' |
|
|
|
import { validateInteger,validateTwoNum } from '@/utils/validator' |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const InspectionMainRules = reactive({ |
|
|
|
number: [required], |
|
|
|
applicationDate: [required], |
|
|
|
applicationTime: [required], |
|
|
|
supplierCode: [required], |
|
|
|
materialCode: [required], |
|
|
|
batch: [required], |
|
|
|
requestStartTime: [required], |
|
|
|
itemCode: [required], |
|
|
|
requestEndTime: [required], |
|
|
|
batch: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}], |
|
|
|
requestInspectionNum: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], |
|
|
|
referenceOrderCode: [required], |
|
|
|
referenceOrderRow: [required], |
|
|
|
inspectionSchemeCode: [required], |
|
|
|
inspectionStageCode: [required], |
|
|
|
inspectionLevel: [required], |
|
|
|
available: [required], |
|
|
|
referenceOrderRow: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}], |
|
|
|
referenceCertificateCode: [required], |
|
|
|
referenceCertificateRow: [required,{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}], |
|
|
|
inspectionType: [required], |
|
|
|
}) |
|
|
|
|
|
|
|
export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
@ -27,6 +30,11 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 200, |
|
|
|
fixed: 'left' |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
componentProps:{ |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -43,6 +51,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm:false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -68,6 +77,7 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm:false, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
@ -173,6 +183,16 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchTitle: '供应商信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法
|
|
|
|
multiple:false, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -182,6 +202,11 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
componentProps: { |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -191,6 +216,16 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchTitle: '物料信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchPage: ItemApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
|
|
multiple:false, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -200,6 +235,11 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
componentProps: { |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -264,15 +304,15 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 150 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '检验方案编码', |
|
|
|
field: 'inspectionSchemeCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
} |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '检验方案编码',
|
|
|
|
// field: 'inspectionSchemeCode',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// table: {
|
|
|
|
// width: 150
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '检验类型', |
|
|
|
field: 'inspectionType', |
|
|
@ -282,39 +322,6 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictClass: 'string', |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '检验阶段', |
|
|
|
field: 'inspectionStage', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0, |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 130 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '检验严格性', |
|
|
|
field: 'inspectionStringency', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
dictType: DICT_TYPE.INSPECTION_SEVERITY, |
|
|
|
dictClass: 'string', |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
@ -322,6 +329,38 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '检验阶段',
|
|
|
|
// field: 'inspectionStage',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// form: {
|
|
|
|
// component: 'InputNumber',
|
|
|
|
// value: 0,
|
|
|
|
// componentProps: {
|
|
|
|
// disabled: true
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// table: {
|
|
|
|
// width: 130
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '检验严格性',
|
|
|
|
// field: 'inspectionStringency',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// dictType: DICT_TYPE.INSPECTION_SEVERITY,
|
|
|
|
// dictClass: 'string',
|
|
|
|
// form: {
|
|
|
|
// componentProps: {
|
|
|
|
// disabled: true
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// table: {
|
|
|
|
// width: 150
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '检验申请包装列表',
|
|
|
|
// field: 'applicationPackageCode',
|
|
|
|
// sort: 'custom',
|
|
|
@ -330,26 +369,26 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
// width: 150
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '检验水平', |
|
|
|
field: 'inspectionLevel', |
|
|
|
dictType: DICT_TYPE.INSPECTION_LEVEL, |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'AQL值', |
|
|
|
field: 'aqlValue', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
dictType: DICT_TYPE.BASIC_AQL, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
} |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '检验水平',
|
|
|
|
// field: 'inspectionLevel',
|
|
|
|
// dictType: DICT_TYPE.INSPECTION_LEVEL,
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// table: {
|
|
|
|
// width: 150
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: 'AQL值',
|
|
|
|
// field: 'aqlValue',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// dictType: DICT_TYPE.BASIC_AQL,
|
|
|
|
// table: {
|
|
|
|
// width: 150
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '是否可用',
|
|
|
|
// field: 'available',
|
|
|
@ -370,6 +409,15 @@ export const InspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const InspectionRequestPackageRules = reactive({ |
|
|
|
packageCode: [required], |
|
|
|
packageSpecificationCode: [required], |
|
|
|
amount: [required,{ validator:validateTwoNum, message: '小数点后最多2位', trigger: 'blur'}], |
|
|
|
measuringUnit: [required], |
|
|
|
}) |
|
|
|
|
|
|
|
/** |
|
|
|
* @returns {Array} 检验申请包装 |
|
|
|
*/ |
|
|
@ -384,7 +432,8 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
table:{ |
|
|
|
width:200 |
|
|
|
} |
|
|
|
}, |
|
|
|
isTableForm:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '包装号', |
|
|
@ -392,7 +441,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
tableForm:{ |
|
|
|
disabled:true |
|
|
|
disabled:false |
|
|
|
}, |
|
|
|
table:{ |
|
|
|
width:200 |
|
|
@ -404,7 +453,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
tableForm:{ |
|
|
|
disabled:true |
|
|
|
disabled:false |
|
|
|
}, |
|
|
|
table:{ |
|
|
|
width:180 |
|
|
@ -414,13 +463,13 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '数量', |
|
|
|
field: 'amount', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
value: 0 |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
disabled:true |
|
|
|
disabled:false |
|
|
|
}, |
|
|
|
table:{ |
|
|
|
width:150 |
|
|
@ -432,7 +481,7 @@ export const InspectionRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
tableForm:{ |
|
|
|
disabled:true |
|
|
|
disabled:false |
|
|
|
}, |
|
|
|
table:{ |
|
|
|
width:150 |
|
|
|