Browse Source

工序报产修改HL-3797

hella_online_20240829
zhaoxuebing 2 months ago
parent
commit
b8b4a256a8
  1. 12
      src/api/wms/processproductionRequestMain/index.ts
  2. 36
      src/views/wms/productionManage/processproduction/processproductionRequest/index.vue
  3. 227
      src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts

12
src/api/wms/processproductionRequestMain/index.ts

@ -26,6 +26,18 @@ export const getProcessproductionRequestMainPage = async (params) => {
}
}
// 查询工序报产子物料
export const getProcessproductionChildBomPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/processproduction-request-main/queryChildItemByParentCodeSenior', data })
} else {
return await request.get({ url: `/wms/processproduction-request-main/queryChildItemByParentCodePage`, params })
}
}
// 查询工序报产申请主详情
export const getProcessproductionRequestMain = async (id: number) => {
return await request.get({ url: `/wms/processproduction-request-main/get?id=` + id })

36
src/views/wms/productionManage/processproduction/processproductionRequest/index.vue

@ -98,7 +98,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as BomApi from "@/api/wms/bom";
defineOptions({ name: 'ProcessproductionRequestMain' })
@ -119,20 +119,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return
const newRow = JSON.parse(JSON.stringify(tableFormKeys))
newRow['productionLine'] = item['productionLineCode']
const param1 = {
productItemCode: formRef.formModel['itemCode'],
available: 'TRUE',
pageSize: 20,
pageNo: 1,
sort: '',
by: 'ASC',
}
await BomApi.getBomPage(param1).then(res => {
console.log(res)
if(res?.list?.length>0){
newRow['componentItemCode'] = res.list[0].componentItemCode
}
})
// const param1 = {
// productItemCode: formRef.formModel['itemCode'],
// available: 'TRUE',
// pageSize: 20,
// pageNo: 1,
// sort: '',
// by: 'ASC',
// }
// await BomApi.getBomPage(param1).then(res => {
// console.log(res)
// if(res?.list?.length>0){
// newRow['componentItemCode'] = res.list[0].componentItemCode
// }
// })
tableData.value.push(newRow)
})
}else if(formField === 'processCode'){
@ -140,7 +140,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}else if(formField === 'locationCode'){
row['locationCode']=val[0]['code']
}else if(formField === 'componentItemCode'){
row['componentItemCode']=val[0]['componentItemCode']
row['componentItemCode']=val[0]['itemCode']
row['locationCode']=val[0]['locationCode']
row['batch']=val[0]['batch']
row['componentItemcodeQty']=val[0]['qty']
row['effectiveDate']=val[0]['produceDate']
} else {
row[formField] = val[0][searchField]
}

227
src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts

@ -10,6 +10,10 @@ import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data";
import * as BomApi from "@/api/wms/bom";
import * as BalanceApi from '@/api/wms/balance'
import * as ProcessproductionRequestMainApi from '@/api/wms/processproductionRequestMain'
import { Balance } from '@/views/wms/inventoryManage/balance/balance.data'
import { fa } from 'element-plus/es/locale'
export const ProcessproductionRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -447,63 +451,6 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
}
}
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
tableForm: {
enterSearch: true,
multiple:true,//多选
isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
multiple:true,//多选
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '库位基础信息', // 查询弹窗标题
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
{
label: '子物料代码',
field: 'componentItemCode',
@ -513,13 +460,13 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
width: 150
},
tableForm:{
enterSearch: true,
// enterSearch: true,
isInpuFocusShow: true,
searchListPlaceholder: '请选择子物料代码版本', // 输入框占位文本
searchField: 'componentItemCode', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择子物料代码',
searchField: 'componentItemCode',
searchTitle: '库存余额物料清单信息',
searchAllSchemas: Balance.allSchemas,
searchPage: ProcessproductionRequestMainApi.getProcessproductionChildBomPage,
searchCondition: [{
key:'productItemCode',
value:'itemCode',
@ -544,11 +491,11 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
searchField: 'componentItemCode', // 查询弹窗赋值字段
searchTitle: '物料清单信息', // 查询弹窗标题
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
searchListPlaceholder: '请选择子物料代码',
searchField: 'componentItemCode',
searchTitle: '库存余额物料清单信息',
searchAllSchemas: Balance.allSchemas,
searchPage: ProcessproductionRequestMainApi.getProcessproductionChildBomPage,
searchCondition: [{
key:'productItemCode',
value:'itemCode',
@ -568,7 +515,129 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
isFormModel: true,
}], // 失去焦点校验参数
}
}
// tableForm: {
// enterSearch: true,
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择子物料代码版本', // 输入框占位文本
// searchField: 'componentItemCode', // 查询弹窗赋值字段
// searchTitle: '物料清单信息', // 查询弹窗标题
// searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
// searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'productItemCode',
// value:'itemCode',
// message: '请填写物料代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'componentItemCode',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择Bom版本', // 输入框占位文本
// searchField: 'componentItemCode', // 查询弹窗赋值字段
// searchTitle: '物料清单信息', // 查询弹窗标题
// searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
// searchPage: BomApi.getBomPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key:'productItemCode',
// value:'itemCode',
// message: '请填写物料代码!',
// isMainValue: true
// },{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'componentItemCode',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// }
// },
},
{
label: '库位代码',
field: 'locationCode',
sort: 'custom',
table: {
width: 150
},
tableForm:{
disabled:true,
},
form: {
componentProps: {
disabled:true,
}
}
// tableForm: {
// enterSearch: true,
// multiple:true,//多选
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位基础信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// enterSearch: true,
// isSearchList: true, // 开启查询弹窗
// multiple:true,//多选
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '库位基础信息', // 查询弹窗标题
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
// searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// }
// }
},
{
label: '批次',
@ -577,6 +646,14 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: {
width: 150
},
tableForm:{
disabled:true,
},
form: {
componentProps: {
disabled:true,
}
}
},
{
label: '子物料数量',
@ -610,6 +687,7 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
width: 150
},
form: {
disabled:true,
component: 'DatePicker',
componentProps: {
style: {width: '100%'},
@ -619,10 +697,11 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
}
},
tableForm:{
disabled:true,
type:'FormDate',
placeholder: '请选择生产日期',
valueFormat: 'x',
},
}
},
{
label: '是否可用',
@ -669,8 +748,10 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive<CrudSchema
table: {
width: 130
},
isSearch: false,
isForm: false,
isTable: true
isTable: false,
isTableForm: false,
},
{
label: '删除时间',
@ -775,9 +856,9 @@ export const ProcessproductionRequestDetailRules = reactive({
productionLine: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
],
processCode: [
{ required: true, message: '请选择工序代码', trigger: 'change' }
],
// processCode: [
// { required: true, message: '请选择工序代码', trigger: 'change' }
// ],
locationCode: [
{ required: true, message: '请选择库位代码', trigger: 'change' }
],

Loading…
Cancel
Save