Browse Source

备料,补料申请

hella_online_20240829
zhang_li 4 months ago
parent
commit
51672c18cb
  1. 7
      src/api/wms/business/inputBlur.ts
  2. 5
      src/api/wms/workstation/index.ts
  3. 2
      src/components/BasicForm/src/BasicForm.vue
  4. 4
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  5. 101
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts
  6. 11
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/repleinshRequestMain.data.ts

7
src/api/wms/business/inputBlur.ts

@ -807,6 +807,9 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
console.log(999, verificationParams)
if (verificationParams && verificationParams.length > 0) {
for (let i = 0; i < verificationParams.length; i++) {
if (verificationParams[i].key == 'code') {
verificationParams[i].key = 'codes'
}
params.value[verificationParams[i].key] = val
}
}
@ -814,7 +817,7 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
list.value = res ? res : []
let arr1 = val.split(',').map(item => item.trim())
if (arr1.length != res.length) {
let arr2 = res.map((item) => item[field])
let arr2 = res.map((item) => item[headerItem.tableForm.searchField])
let str = [
...arr1.filter((item) => !arr2.includes(item)),
...arr2.filter((item) => !arr1.includes(item))
@ -828,7 +831,7 @@ export const getListByBottonInput = async (headerItem, val, row, routeName, form
const findIndex = arr1.findIndex(valItem => valItem == item[field])
if (findIndex > -1) {
arr1.splice(findIndex, 1)
repeatCode.push(item.itemCode)
repeatCode.push(item[field])
}
})
}

5
src/api/wms/workstation/index.ts

@ -76,4 +76,9 @@ export const selectAreaTypeToLocation = async (params) => {
// 查询工位列表
export const getWorkstationNoPage = async (params) => {
return await request.get({ url: `/wms/workstation/noPage`, params })
}
// 根据code获取数据列表
export const getWorkstationByCodes = async (params) => {
return await request.get({ url: `/wms/workstation/listByCodes`, params })
}

2
src/components/BasicForm/src/BasicForm.vue

@ -883,7 +883,7 @@ const batchAdd = async (val) => {
emit(
'searchTableSuccess',
headerItem.field,
'itemCode',
headerItem.tableForm.searchField,
list,
formRef.value,
'tableForm',

4
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue

@ -122,6 +122,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['toLocationCode'] = item['rawLocationCode']
tableData.value.push(newRow)
})
console.log(77,formField)
console.log(66,searchField)
console.log(88,tableData.value)
console.log(99,val)
} else {
row[formField] = val[0][searchField]
}

101
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

@ -84,12 +84,21 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '车间信息', // 查询弹窗标题
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
searchPage: WorkshopApi.getWorkshopPage // 查询弹窗所需分页方法
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -103,12 +112,21 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
labelMessage: '该生产线会影响明细中的物料代码,工位',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage // 查询弹窗所需分页方法
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -122,12 +140,21 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选班组', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '班组信息', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchPage: TeamApi.getTeamPage // 查询弹窗所需分页方法
searchPage: TeamApi.getTeamPage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -141,12 +168,21 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选班次', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '班次信息', // 查询弹窗标题
searchAllSchemas: Shift.allSchemas, // 查询弹窗所需类
searchPage: ShiftApi.getShiftPage // 查询弹窗所需分页方法
searchPage: ShiftApi.getShiftPage, // 查询弹窗所需分页方法
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -224,6 +260,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
labelMessage: '同时影响车间 生产线 班组 班次',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产计划', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段
@ -244,7 +281,15 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'planType',
value: 'predict',
isMainValue: false
}]
}],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
@ -479,6 +524,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -499,10 +545,20 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm: {
enterSearch: true,
isShowTableFormSearch:true,
multiple: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位', // 输入框占位文本
@ -510,6 +566,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法
verificationPage: WorkStationApi.getWorkstationByCodes,// 失去焦点校验输入框的数据内容存在
searchCondition: [{
key: 'productionLineCode',
value: 'prodLine',
@ -524,7 +581,15 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
},
{
@ -537,6 +602,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
@ -548,10 +614,19 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
value: 'prodLine',
message: '请填写生产线代码!',
isMainValue: true
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm: {
enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchField: 'itemCode', // 查询弹窗赋值字段
@ -563,7 +638,15 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
value: 'prodLine',
message: '请填写生产线代码!',
isMainValue: true
}]
}],
verificationParams: [{
key: 'componentItemCode',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
},
{

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

@ -222,6 +222,7 @@ export const RepleinshRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择到库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
@ -232,7 +233,15 @@ export const RepleinshRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
},
tableForm:{

Loading…
Cancel
Save