Browse Source

制品返修申请 返修生产线代码是必填项但是未标识,补料申请应该控制只能添加一条明细

hella_online_20240829
zhang_li 5 months ago
parent
commit
4808ead460
  1. 9
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue
  2. 7
      src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

9
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -118,6 +118,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['itemCode'] = item['code'] newRow['itemCode'] = item['code']
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
newRow['id'] = item['id'] newRow['id'] = item['id']
newRow['toLocationCode'] = formRef.formModel['toLocationCode']
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
} else { } else {
@ -359,6 +360,7 @@ const tableData = ref([])
// //
const handleAddTable = () => { const handleAddTable = () => {
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
} }
// //
const handleDeleteTable = (item, index) => { const handleDeleteTable = (item, index) => {
@ -376,10 +378,11 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
tableData.value.forEach(item=>{
item.toLocationCode = data.toLocationCode
})
data.subList = tableData.value // data.subList = tableData.value //
if( data.subList.length>1){
message.warning('明细只能选择一条数据')
return;
}
if(tableData.value.find(item => (item.qty <= 0))) { if(tableData.value.find(item => (item.qty <= 0))) {
message.warning('数量必须大于0') message.warning('数量必须大于0')
formRef.value.formLoading = false formRef.value.formLoading = false

7
src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts

@ -118,7 +118,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
sortTableDefault:4, sortTableDefault:4,
tableForm:{ tableForm:{
isInpuFocusShow: true, isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
@ -138,7 +138,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题 searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
@ -501,6 +501,9 @@ export const ProductrepairRequestMainRules = reactive({
workshopCode: [ workshopCode: [
{ required: true, message: '请选择车间代码', trigger: 'change' } { required: true, message: '请选择车间代码', trigger: 'change' }
], ],
productionLineCode: [
{ required: true, message: '请选择返修生产线', trigger: 'change' }
],
// dueTime: [ // dueTime: [
// { required: true, message: '请选择截止时间', trigger: 'change' } // { required: true, message: '请选择截止时间', trigger: 'change' }
// ], // ],

Loading…
Cancel
Save