Browse Source

制品收货申请修改

master
李胜楠 1 year ago
parent
commit
90ed46d64a
  1. 24
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 244
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/productreceiptRequestMain.data.ts

24
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -44,7 +44,6 @@
@success="getList" @success="getList"
:rules="ProductreceiptRequestMainRules" :rules="ProductreceiptRequestMainRules"
:formAllSchemas="ProductreceiptRequestMain.allSchemas" :formAllSchemas="ProductreceiptRequestMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="ProductreceiptRequestDetail.allSchemas" :tableAllSchemas="ProductreceiptRequestDetail.allSchemas"
:tableFormRules="ProductreceiptRequestDetailRules" :tableFormRules="ProductreceiptRequestDetailRules"
:tableData="tableData" :tableData="tableData"
@ -64,12 +63,12 @@
:allSchemas="ProductreceiptRequestMain.allSchemas" :allSchemas="ProductreceiptRequestMain.allSchemas"
:detailAllSchemas="ProductreceiptRequestDetail.allSchemas" :detailAllSchemas="ProductreceiptRequestDetail.allSchemas"
:detailAllSchemasRules="ProductreceiptRequestDetailRules" :detailAllSchemasRules="ProductreceiptRequestDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="ProductreceiptRequestDetailApi.createProductreceiptRequestDetail" :apiCreate="ProductreceiptRequestDetailApi.createProductreceiptRequestDetail"
:apiUpdate="ProductreceiptRequestDetailApi.updateProductreceiptRequestDetail" :apiUpdate="ProductreceiptRequestDetailApi.updateProductreceiptRequestDetail"
:apiPage="ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage" :apiPage="ProductreceiptRequestDetailApi.getProductreceiptRequestDetailPage"
:apiDelete="ProductreceiptRequestDetailApi.deleteProductreceiptRequestDetail" :apiDelete="ProductreceiptRequestDetailApi.deleteProductreceiptRequestDetail"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -99,22 +98,12 @@ const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
} }
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
// //
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
//row[formField] = val[0][searchField] row[formField] = val[0][searchField]
//row['poLine'] = val[0]['poLine'] //row['poLine'] = val[0]['poLine']
//row['batch'] = val[0]['toBatch'] //row['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch'] //row['altBatch'] = val[0]['altBatch']
@ -134,6 +123,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
} }
}) })
} }
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
// //
// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] // const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom']
const Echo = [] const Echo = []

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

@ -3,6 +3,19 @@ import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as ShiftApi from '@/api/wms/shift'
import { Shift } from '@/views/wms/basicDataManage/orderManage/shift/shift.data'
import * as TeamApi from '@/api/wms/team'
import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data'
import * as WorkstationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
import * as ProcessApi from '@/api/wms/process'
import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize:10,
@ -29,6 +42,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
isForm: false,
}, },
{ {
label: '车间代码', label: '车间代码',
@ -38,6 +52,17 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
isSearch: true, isSearch: true,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择车间',
searchField: 'code',
searchTitle: '车间信息',
searchAllSchemas: Workshop.allSchemas,
searchPage: WorkshopApi.getWorkshopPage
}
}
}, },
{ {
label: '班组', label: '班组',
@ -46,6 +71,17 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择班组',
searchField: 'code',
searchTitle: '班组信息',
searchAllSchemas: Team.allSchemas,
searchPage: TeamApi.getTeamPage
}
}
}, },
{ {
label: '班次', label: '班次',
@ -54,6 +90,17 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择班次',
searchField: 'code',
searchTitle: '班次信息',
searchAllSchemas: Shift.allSchemas,
searchPage: ShiftApi.getShiftPage
}
}
}, },
{ {
label: '到仓库代码', label: '到仓库代码',
@ -62,6 +109,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isForm: false,
}, },
{ {
label: '到库位类型范围', label: '到库位类型范围',
@ -73,6 +121,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isForm: false,
}, },
{ {
label: '到库区代码范围', label: '到库区代码范围',
@ -81,6 +130,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
isForm: false,
}, },
{ {
label: '单据号', label: '单据号',
@ -105,7 +155,8 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
} },
isForm: false,
}, },
{ {
label: '备注', label: '备注',
@ -130,6 +181,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -160,11 +212,13 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
} }
}, },
isForm: false
}, },
{ {
label: '截止时间', label: '截止时间',
@ -180,6 +234,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -232,6 +287,7 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -342,15 +398,15 @@ export const ProductreceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const ProductreceiptRequestMainRules = reactive({ export const ProductreceiptRequestMainRules = reactive({
toWarehouseCode: [ // toWarehouseCode: [
{ required: true, message: '请输入到仓库代码', trigger: 'blur' } // { required: true, message: '请输入到仓库代码', trigger: 'blur' }
], // ],
toLocationTypes: [ // toLocationTypes: [
{ required: true, message: '请选择到库位类型范围', trigger: 'change' } // { required: true, message: '请选择到库位类型范围', trigger: 'change' }
], // ],
toAreaCodes: [ // toAreaCodes: [
{ required: true, message: '请输入到库区代码范围', trigger: 'blur' } // { required: true, message: '请输入到库区代码范围', trigger: 'blur' }
], // ],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],
@ -366,9 +422,9 @@ export const ProductreceiptRequestMainRules = reactive({
directCreateRecord: [ directCreateRecord: [
{ required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' }
], ],
businessType: [ // businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' } // { required: true, message: '请输入业务类型', trigger: 'blur' }
], // ],
}) })
/** /**
@ -382,6 +438,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '工位代码', label: '工位代码',
@ -390,6 +448,25 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',
searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择工位代码',
searchField: 'code',
searchTitle: '工位信息',
searchAllSchemas: Workstation.allSchemas,
searchPage: WorkstationApi.getWorkstationPage
}
}
}, },
{ {
label: '工序代码', label: '工序代码',
@ -398,6 +475,25 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
searchTitle: '工序信息',
searchAllSchemas: Process.allSchemas,
searchPage: ProcessApi.getProcessPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择工序代码',
searchField: 'code',
searchTitle: '工序信息',
searchAllSchemas: Process.allSchemas,
searchPage: ProcessApi.getProcessPage
}
}
}, },
{ {
label: '包装号', label: '包装号',
@ -406,6 +502,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '器具号', label: '器具号',
@ -414,6 +512,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '批次', label: '批次',
@ -442,6 +542,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
valueFormat: 'x', valueFormat: 'x',
} }
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '过期日期', label: '过期日期',
@ -462,6 +564,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
valueFormat: 'x', valueFormat: 'x',
} }
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '库存状态', label: '库存状态',
@ -473,6 +577,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '订单号', label: '订单号',
@ -481,6 +587,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '订单行', label: '订单行',
@ -489,6 +597,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '标包数量', label: '标包数量',
@ -499,7 +609,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} },
isTableForm: false,
isForm: false
}, },
{ {
label: '标包单位', label: '标包单位',
@ -511,6 +623,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '到货主代码', label: '到货主代码',
@ -519,6 +633,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '单据号', label: '单据号',
@ -541,6 +657,25 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择物品代码',
searchField: 'code',
searchTitle: '物品基础信息信息',
searchAllSchemas: Itembasic.allSchemas,
searchPage: ItembasicApi.getItembasicPage
}
}
}, },
{ {
label: '备注', label: '备注',
@ -564,6 +699,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -589,6 +725,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '物品描述1', label: '物品描述1',
@ -597,6 +735,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '物品描述2', label: '物品描述2',
@ -605,6 +745,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '项目代码', label: '项目代码',
@ -613,6 +755,8 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false
}, },
{ {
label: '数量', label: '数量',
@ -621,6 +765,18 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
},
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
}, },
{ {
label: '计量单位', label: '计量单位',
@ -632,6 +788,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
tableForm: {
type: 'Select'
}
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -647,6 +806,7 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
form: { form: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
style: {width: '100%'},
type: 'datetime', type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x', valueFormat: 'x',
@ -680,38 +840,38 @@ export const ProductreceiptRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
//表单校验 //表单校验
export const ProductreceiptRequestDetailRules = reactive({ export const ProductreceiptRequestDetailRules = reactive({
productionLineCode: [ // productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' } // { required: true, message: '请选择生产线代码', trigger: 'change' }
], // ],
packingNumber: [ // packingNumber: [
{ required: true, message: '请输入包装号', trigger: 'change' } // { required: true, message: '请输入包装号', trigger: 'change' }
], // ],
batch: [ batch: [
{ required: true, message: '请输入批次', trigger: 'blur' } { required: true, message: '请输入批次', trigger: 'blur' }
], ],
produceDate: [ // produceDate: [
{ required: true, message: '请选择生产日期', trigger: 'change' } // { required: true, message: '请选择生产日期', trigger: 'change' }
], // ],
expireDate: [ // expireDate: [
{ required: true, message: '请选择过期日期', trigger: 'change' } // { required: true, message: '请选择过期日期', trigger: 'change' }
], // ],
inventoryStatus: [ // inventoryStatus: [
{ required: true, message: '请选择库存状态', trigger: 'change' } // { required: true, message: '请选择库存状态', trigger: 'change' }
], // ],
woNumber: [ // woNumber: [
{ required: true, message: '请输入订单号', trigger: 'blur' } // { required: true, message: '请输入订单号', trigger: 'blur' }
], // ],
woLine: [ // woLine: [
{ required: true, message: '请输入订单行', trigger: 'blur' } // { required: true, message: '请输入订单行', trigger: 'blur' }
], // ],
stdPackQty: [ // stdPackQty: [
{ required: true, message: '请输入标包数量', trigger: 'blur' } // { required: true, message: '请输入标包数量', trigger: 'blur' }
], // ],
stdPackUnit: [ // stdPackUnit: [
{ required: true, message: '请选择标包单位', trigger: 'change' } // { required: true, message: '请选择标包单位', trigger: 'change' }
], // ],
itemCode: [ itemCode: [
{ required: true, message: '请输入物品代码', trigger: 'blur' } { required: true, message: '请选择物品代码', trigger: 'change' }
], ],
}) })

Loading…
Cancel
Save