Browse Source

发料申请 1.新增时添加明细后删除,没有校验直接新增成功,但是页面中没有该数据 2.同时生产线代码时必填项 但是未标识,补料申请明细中应该删除无意义的字段

hella_online_20240829
zhang_li 4 months ago
parent
commit
5c126c4b3c
  1. 4
      src/components/BasicForm/src/BasicForm.vue
  2. 3
      src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts
  3. 254
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts
  4. 3
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts
  5. 3
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts
  6. 3
      src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

4
src/components/BasicForm/src/BasicForm.vue

@ -615,14 +615,12 @@ const submitForm = async () => {
formLoading.value = true formLoading.value = true
if (formType.value == 'create') { if (formType.value == 'create') {
const validateForm = await tableFormRef.value.validateForm() const validateForm = await tableFormRef.value.validateForm()
if (!validateForm && props.tableFormDataLength) { if (props.tableFormDataLength) {
if (props.tableData.length == 0) { if (props.tableData.length == 0) {
message.warning('请填写明细信息!') message.warning('请填写明细信息!')
formLoading.value = false formLoading.value = false
return return
} }
formLoading.value = false
return
} }
// //
try { try {

3
src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts

@ -560,6 +560,9 @@ export const IssueRequestMainRules = reactive({
workshopCode: [ workshopCode: [
{ required: true, message: '请选择车间代码', trigger: 'change' } { required: true, message: '请选择车间代码', trigger: 'change' }
], ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
// fromWarehouseCode: [ // fromWarehouseCode: [
// { required: true, message: '请选择从仓库代码', trigger: 'change' } // { required: true, message: '请选择从仓库代码', trigger: 'change' }
// ], // ],

254
src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts

@ -471,6 +471,122 @@ export const RepleinshRequestMainRules = reactive({
* @returns {Array} * @returns {Array}
*/ */
export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
sortSearchDefault:2,
sortTableDefault:3,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key : 'businessTypeCode',
value: queryParams.businessTypeCode
}]
},
},
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
sortTableDefault:4,
isTableForm: false,
isForm: false,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
isTableForm: false,
isForm: false,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
isTableForm: false,
isForm: false,
},
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:9,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{ {
label: '到库位代码', label: '到库位代码',
field: 'toLocationCode', field: 'toLocationCode',
@ -541,7 +657,8 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'inventoryStatus', field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS, dictType: DICT_TYPE.INVENTORY_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTableForm: false,
isTable:false,
sort: 'custom', sort: 'custom',
form: { form: {
value: 'OK', value: 'OK',
@ -557,6 +674,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isTableForm:false,
tableForm: { tableForm: {
type: 'Select', type: 'Select',
default: 'OK', default: 'OK',
@ -573,63 +691,23 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
hiddenInMain:true, hiddenInMain:true,
isTableForm: false, isTableForm: false,
isTable:false,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true
} }
} }
}, },
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
table: {
width: 150
},
isSearch:true,
sortSearchDefault:2,
sortTableDefault:3,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
},
tableForm:{
enterSearch:true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
searchCondition:[{
key: 'available',
value: 'TRUE',
isMainValue: false
},{
key : 'businessTypeCode',
value: queryParams.businessTypeCode
}]
},
},
{ {
label: '备注', label: '备注',
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
isTableForm:false,
table: { table: {
width: 150 width: 150
}, },
isTable:false,
hiddenInMain:true, hiddenInMain:true,
}, },
{ {
@ -667,36 +745,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
isForm: false isForm: false
}, },
{
label: '物料名称',
field: 'itemName',
sort: 'custom',
sortTableDefault:4,
isTableForm: false,
isForm: false,
},
{
label: '物料描述1',
field: 'itemDesc1',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
isTableForm: false,
isForm: false,
},
{
label: '物料描述2',
field: 'itemDesc2',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
isTableForm: false,
isForm: false,
},
{ {
label: '项目代码', label: '项目代码',
field: 'projectCode', field: 'projectCode',
@ -706,50 +755,10 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
hiddenInMain:true, hiddenInMain:true,
isTableForm: false, isTableForm: false,
isTable:false,
isForm: false, isForm: false,
}, },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
hiddenInMain:true,
form: {
component: 'InputNumber',
componentProps: {
min: 0,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 0,
precision: 6
}
},
{
label: '计量单位',
field: 'uom',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
isTable: true,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:9,
tableForm: {
type: 'Select',
disabled: true
},
form: {
componentProps: {
disabled: true
}
}
},
{ {
label: '采购订单号', label: '采购订单号',
field: 'poNumber', field: 'poNumber',
@ -760,6 +769,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
hiddenInMain:true, hiddenInMain:true,
isTableForm: false, isTableForm: false,
sortTableDefault:1, sortTableDefault:1,
isTable:false,
}, },
{ {
label: '订单行', label: '订单行',
@ -771,6 +781,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
hiddenInMain:true, hiddenInMain:true,
isTableForm: false, isTableForm: false,
sortTableDefault:2, sortTableDefault:2,
isTable:false,
}, },
{ {
@ -783,6 +794,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
hiddenInMain:true, hiddenInMain:true,
isTable:false,
}, },
{ {
label: '到货主代码', label: '到货主代码',
@ -794,6 +806,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm: false, isTableForm: false,
isForm: false, isForm: false,
hiddenInMain:true, hiddenInMain:true,
isTable:false,
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -829,6 +842,7 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTableForm: false, isTableForm: false,
hiddenInMain:true, hiddenInMain:true,
isTable:false,
isForm: false isForm: false
}, },
{ {
@ -847,9 +861,9 @@ export const RepleinshRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const RepleinshRequestDetailRules = reactive({ export const RepleinshRequestDetailRules = reactive({
inventoryStatus: [ // inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' } // { required: true, message: '请选择库存状态', trigger: 'change' }
], // ],
toLocationCode: [ toLocationCode: [
{ required: true, message: '请输入到库位代码', trigger: 'blur' } { required: true, message: '请输入到库位代码', trigger: 'blur' }
], ],

3
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

@ -535,6 +535,9 @@ export const ProductreceiptRequestMainRules = reactive({
// departmentCode: [ // departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' } // { required: true, message: '请输入部门', trigger: 'blur' }
// ], // ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
autoCommit: [ autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' } { required: true, message: '请选择是否自动提交', trigger: 'change' }
], ],

3
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts

@ -536,6 +536,9 @@ export const ProductreceiptRequestMainRules = reactive({
// departmentCode: [ // departmentCode: [
// { required: true, message: '请输入部门', trigger: 'blur' } // { required: true, message: '请输入部门', trigger: 'blur' }
// ], // ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
autoCommit: [ autoCommit: [
{ required: true, message: '请选择是否自动提交', trigger: 'change' } { required: true, message: '请选择是否自动提交', trigger: 'change' }
], ],

3
src/views/wms/productionManage/productscrap/productscrapRequestMain/productscrapRequestMain.data.ts

@ -500,6 +500,9 @@ export const ProductscrapRequestMainRules = reactive({
// dueTime: [ // dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' } // { required: true, message: '请选择截止时间', trigger: 'change' }
// ], // ],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],

Loading…
Cancel
Save