Browse Source

解决代码缺失

master_hella_20240701
wangyufei 5 months ago
parent
commit
475d42e7cc
  1. 409
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

409
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts

@ -556,10 +556,18 @@ export const SupplierdeliverRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
//表单校验
export const SupplierdeliverRequestMainRules = reactive({
supplierCode: [{ required: true, message: '请输入供应商代码', trigger: 'blur' }],
ppNumber: [{ required: true, message: '请输入要货计划单号', trigger: 'blur' }],
asnNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
contactName: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
supplierCode: [
{ required: true, message: '请输入供应商代码', trigger: 'blur' }
],
ppNumber: [
{ required: true, message: '请输入要货计划单号', trigger: 'blur' }
],
asnNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactName: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
contactPhone: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateHanset, message: '请输入正确的手机号', trigger: 'blur' }
@ -568,20 +576,36 @@ export const SupplierdeliverRequestMainRules = reactive({
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateEmail, message: '请输入正确的邮箱地址', trigger: 'blur' }
],
carrierCode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
transferMode: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
vehiclePlateNumber: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }],
planArriveTime: [{ required: true, message: '请输入计划到货时间', trigger: 'blur' }],
carrierCode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
transferMode: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
vehiclePlateNumber: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
planArriveTime: [
{ required: true, message: '请输入计划到货时间', trigger: 'blur' }
],
// departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' }
// ],
autoCommit: [{ required: true, message: '请选择是否自动提交', trigger: 'change' }],
autoAgree: [{ required: true, message: '请选择是否自动通过', trigger: 'change' }],
autoExecute: [{ required: true, message: '请选择是否自动执行', trigger: 'change' }],
autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' }
],
autoAgree: [
{ required: true, message: '请选择是否自动通过', trigger: 'change' }
],
autoExecute: [
{ required: true, message: '请选择是否自动执行', trigger: 'change' }
],
directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
]
],
// businessType: [
// { required: true, message: '请输入业务类型', trigger: 'blur' }
// ],
@ -591,70 +615,7 @@ export const SupplierdeliverRequestMainRules = reactive({
* @returns {Array}
*/
export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
},
{
key: 'flag',
value: '1',
isMainValue: false
},
{
key: 'isAll',
value: '1',
isMainValue: false
}]
}
},
{
label: '订单行',
field: 'poLine',
@ -679,7 +640,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 150
},
sortTableDefault:2,
sortTableDefault:3,
form: {
componentProps: {
disabled: true
@ -690,26 +651,24 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
}
},
{
label: '批次',
field: 'batch',
label: '申请发货数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
tableForm: {
disabled: true
sortTableDefault:4,
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: false
type: 'InputNumber',
min: 1,
precision: 6
}
},
{
@ -723,6 +682,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
table: {
width: 180
},
sortTableDefault:7,
form: {
component: 'DatePicker',
componentProps: {
@ -738,6 +698,73 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
valueFormat: 'x',
}
},
{
label: '供应商批次',
field: 'supplierBatch',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:8,
tableForm: {
disabled: false
}
},
{
label: '发货批次',
field: 'batch',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
tableForm: {
disabled: true
}
},
{
label: '计划数量',
field: 'planQty',
sort: 'custom',
table: {
width: 150
},
isTable:false,
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 6
},
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
{
label: '已发货数量',
field: 'shippedQty',
sort: 'custom',
table: {
width: 150
},
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 6
},
isTable: false,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
}
},
// {
// label: '替代批次',
@ -784,6 +811,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
hiddenInMain:true,
field: 'expireDate',
formatter: dateFormatter2,
isTableForm:false,
detail: {
dateFormat: 'YYYY-MM-DD'
},
@ -810,27 +838,27 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
disabled: true
}
},
{
label: '发货数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
sortTableDefault:2,
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
// {
// label: '发货数量',
// field: 'qty',
// sort: 'custom',
// table: {
// width: 150
// },
// sortTableDefault:2,
// form: {
// component: 'InputNumber',
// componentProps: {
// min: 1,
// precision: 6
// }
// },
// tableForm: {
// type: 'InputNumber',
// min: 1,
// precision: 6
// }
// },
{
label: '订单数量',
field: 'orderQty',
@ -838,6 +866,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
width: 150
},
hiddenInMain:true,
isTableForm: false,
form: {
component: 'InputNumber',
componentProps: {
@ -938,7 +967,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sortTableDefault:3,
sortTableDefault:5,
table: {
width: 150
},
@ -947,7 +976,83 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
type: 'Select'
}
},
{
label: '采购订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
sortTableDefault:10,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
disabled:true,
// isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'flag',
value: 1,
isMainValue: false
},
{
key: 'isAll',
value: '1',
isMainValue: false
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
]
}
},
tableForm: {
disabled:true,
isInpuFocusShow: false,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '要货计划信息',
searchAllSchemas: PurchasePlanDetail.allSchemas,
searchPage: PurchasePlanDetailApi.getPurchasePlanDetailPage,
searchCondition: [
{
key: 'number',
value: 'ppNumber',
message: '请填写要货计划单号!',
isMainValue: true
},
{
key: 'flag',
value: 1,
isMainValue: false
},
{
key: 'isAll',
value: '1',
isMainValue: false
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
{
label: '从货主代码',
field: 'fromOwnerCode',
@ -1088,6 +1193,7 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
label: '备注',
field: 'remark',
sort: 'custom',
isTable: false,
hiddenInMain:true,
table: {
width: 150
@ -1109,14 +1215,14 @@ export const SupplierdeliverRequestDetail = useCrudSchemas(reactive<CrudSchema[]
// 批次校验
const validateBatch = (rule: any, value: any, callback: any) => {
const reg = /^[_a-zA-Z0-9]+$/
const reg = /^[_a-zA-Z0-9]+$/;
if (value == '' || value == undefined || value == null) {
callback()
callback();
} else {
if (!reg.test(value)) {
callback(new Error('英文字母、数字或下划线'))
callback(new Error('英文字母、数字或下划线'));
} else {
callback()
callback();
}
}
}
@ -1135,29 +1241,46 @@ export const SupplierdeliverRequestDetailRules = reactive({
// { required: true, message: '请输入包装号', trigger: 'blur' }
// ],
qty:[
{ required: true, message: '请输入发货数量', trigger: 'change' },
{ required: true, message: '请输入发货数量1', trigger: 'change' },
// { validator: validateQty, trigger: 'change' },
],
batch: [
{ required: true, message: '请输入批次', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' },
{ validator: validateBatch, trigger: 'change' }
],
produceDate: [{ required: true, message: '请输入生产日期', trigger: 'blur' }],
produceDate: [
{ required: true, message: '请输入生产日期', trigger: 'blur' }
],
packQty: [
{ required: true, message: '请输入包装数量', trigger: 'blur' }
// { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
{ required: true, message: '请输入包装数量', trigger: 'blur' },
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
poNumber: [
{ required: true, message: '请选择订单号', trigger: 'change' }
],
poLine: [
{ required: true, message: '请选择订单行', trigger: 'change' }
],
packUnit: [
{ required: true, message: '请选择包装规格', trigger: 'change' }
],
secondPackUnit: [
{ required: false, message: '请选择包装规格2', trigger: 'change' }
],
poNumber: [{ required: true, message: '请选择订单号', trigger: 'change' }],
poLine: [{ required: true, message: '请选择订单行', trigger: 'change' }],
packUnit: [{ required: true, message: '请选择包装规格', trigger: 'change' }],
secondPackUnit: [{ required: false, message: '请选择包装规格2', trigger: 'change' }],
secondPackQty: [
{ required: false, message: '请输入包装数量2', trigger: 'blur' }
// { validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
{ required: false, message: '请输入包装数量2', trigger: 'blur' },
{ validator: validateInteger, message: '请输入正确的整数', trigger: 'blur' }
],
convertRate: [
{ required: true, message: '请输入转换率', trigger: 'blur' }
],
itemCode: [
{ required: true, message: '请选择物料代码', trigger: 'change' }
],
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
convertRate: [{ required: true, message: '请输入转换率', trigger: 'blur' }],
itemCode: [{ required: true, message: '请选择物料代码', trigger: 'change' }],
remark: [{ max: 50, message: '不得超过50个字符', trigger: 'blur' }]
// secondPackQty:[{ validator:validateInteger, message: '请输入正确的整数', trigger: 'blur'}]
})
@ -1505,8 +1628,6 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
},
tableForm: {
type: 'Select',
labelField: 'packName',
valueField: 'packUnit',
initOptions: [{
label: '',
value: ''
@ -1536,8 +1657,6 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
},
tableForm: {
type: 'Select',
labelField: 'packName',
valueField: 'packUnit',
initOptions: [{
label: '',
value: ''
@ -1559,6 +1678,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
disabled:true
}
},
{
label: '物料名称',
field: 'itemName',
@ -1601,8 +1721,7 @@ export const SupplierdeliverRequestDetailLabel = useCrudSchemas(reactive<CrudSch
},
]))
export const SupplierdeliverRequestPackage = useCrudSchemas(
reactive<CrudSchema[]>([
export const SupplierdeliverRequestPackage = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '包装号',
field: 'number',
@ -1610,27 +1729,30 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(
isSearch: true,
table: {
fixed: 'left'
}
},
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {}
table: {
},
},
{
label: '批次',
field: 'batch',
sort: 'custom',
isSearch: true,
table: {}
table: {
},
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {}
table: {
},
},
{
label: '计量单位',
@ -1641,7 +1763,8 @@ export const SupplierdeliverRequestPackage = useCrudSchemas(
form: {
component: 'SelectV2'
},
table: {}
}
])
)
table: {
},
},
]))

Loading…
Cancel
Save