Browse Source

制品拆解申请修改

master
李胜楠 1 year ago
parent
commit
c2566a8226
  1. 36
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  2. 248
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

36
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -44,7 +44,6 @@
@success="getList" @success="getList"
:rules="ProductdismantleRequestMainRules" :rules="ProductdismantleRequestMainRules"
:formAllSchemas="ProductdismantleRequestMain.allSchemas" :formAllSchemas="ProductdismantleRequestMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="ProductdismantleRequestDetaila.allSchemas" :tableAllSchemas="ProductdismantleRequestDetaila.allSchemas"
:tableFormRules="ProductdismantleRequestDetailaRules" :tableFormRules="ProductdismantleRequestDetailaRules"
:tableData="tableData" :tableData="tableData"
@ -64,12 +63,12 @@
:allSchemas="ProductdismantleRequestMain.allSchemas" :allSchemas="ProductdismantleRequestMain.allSchemas"
:detailAllSchemas="ProductdismantleRequestDetaila.allSchemas" :detailAllSchemas="ProductdismantleRequestDetaila.allSchemas"
:detailAllSchemasRules="ProductdismantleRequestDetailaRules" :detailAllSchemasRules="ProductdismantleRequestDetailaRules"
:searchTableParams="searchTableParams"
:apiCreate="ProductdismantleRequestDetailApi.createProductdismantleRequestDetaila" :apiCreate="ProductdismantleRequestDetailApi.createProductdismantleRequestDetaila"
:apiUpdate="ProductdismantleRequestDetailApi.updateProductdismantleRequestDetaila" :apiUpdate="ProductdismantleRequestDetailApi.updateProductdismantleRequestDetaila"
:apiPage="ProductdismantleRequestDetailApi.getProductdismantleRequestDetailaPage" :apiPage="ProductdismantleRequestDetailApi.getProductdismantleRequestDetailaPage"
:apiDelete="ProductdismantleRequestDetailApi.deleteProductdismantleRequestDetaila" :apiDelete="ProductdismantleRequestDetailApi.deleteProductdismantleRequestDetaila"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -100,41 +99,28 @@ 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['batch'] = val[0]['toBatch']
//row['altBatch'] = val[0]['altBatch']
//row['itemCode'] = val[0]['itemCode']
//row['itemName'] = val[0]['itemName']
//row['itemDesc1'] = val[0]['itemDesc1']
//row['itemDesc2'] = val[0]['itemDesc2']
//row['projectCode'] = val[0]['projectCode']
//row['qty'] = val[0]['qty']
//row['uom'] = val[0]['uom']
} else { } else {
const setV = {} const setV = {}
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
//setV['ppNumber'] = val[0]['ppNumber']
//setV['supplierCode'] = val[0]['supplierCode']
formRef.setValues(setV) formRef.setValues(setV)
} }
}) })
} }
//
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 = []

248
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/productdismantleRequestMain.data.ts

@ -1,8 +1,30 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
const { t } = useI18n() // 国际化
import * as getRequestsettingApi from '@/api/wms/requestsetting/index' import * as getRequestsettingApi from '@/api/wms/requestsetting/index'
import * as ProcessApi from '@/api/wms/process'
import { Process } from '@/views/wms/basicDataManage/factoryModeling/process/process.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
import * as WorkstationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
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 ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
const { t } = useI18n() // 国际化
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 // 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
const queryParams = { const queryParams = {
pageSize:10, pageSize:10,
@ -29,6 +51,17 @@ export const ProductdismantleRequestMain = 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: '班组',
@ -37,6 +70,17 @@ export const ProductdismantleRequestMain = 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: '班次',
@ -45,6 +89,17 @@ export const ProductdismantleRequestMain = 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: '从仓库代码',
@ -53,6 +108,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isForm: false
}, },
{ {
label: '从库位类型范围', label: '从库位类型范围',
@ -64,6 +120,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isForm: false
}, },
{ {
label: '从库区代码范围', label: '从库区代码范围',
@ -72,6 +129,7 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive<CrudSchema[]>
table: { table: {
width: 150 width: 150
}, },
isForm: false
}, },
{ {
label: '单据号', label: '单据号',
@ -96,7 +154,8 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive<CrudSchema[]>
componentProps: { componentProps: {
disabled: true disabled: true
} }
} },
isForm: false
}, },
{ {
label: '备注', label: '备注',
@ -121,6 +180,7 @@ export const ProductdismantleRequestMain = 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',
@ -151,11 +211,13 @@ export const ProductdismantleRequestMain = 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: '截止时间',
@ -171,6 +233,7 @@ export const ProductdismantleRequestMain = 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',
@ -223,6 +286,7 @@ export const ProductdismantleRequestMain = 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',
@ -333,15 +397,15 @@ export const ProductdismantleRequestMain = useCrudSchemas(reactive<CrudSchema[]>
//表单校验 //表单校验
export const ProductdismantleRequestMainRules = reactive({ export const ProductdismantleRequestMainRules = reactive({
fromWarehouseCode: [ // fromWarehouseCode: [
{ required: true, message: '请选择从仓库代码', trigger: 'change' } // { required: true, message: '请选择从仓库代码', trigger: 'change' }
], // ],
fromLocationTypes: [ // fromLocationTypes: [
{ required: true, message: '请选择从库位类型范围', trigger: 'change' } // { required: true, message: '请选择从库位类型范围', trigger: 'change' }
], // ],
fromAreaCodes: [ // fromAreaCodes: [
{ required: true, message: '请选择从库区代码范围', trigger: 'change' } // { required: true, message: '请选择从库区代码范围', trigger: 'change' }
], // ],
departmentCode: [ departmentCode: [
{ required: true, message: '请输入部门', trigger: 'blur' } { required: true, message: '请输入部门', trigger: 'blur' }
], ],
@ -357,9 +421,9 @@ export const ProductdismantleRequestMainRules = 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' }
], // ],
}) })
/** /**
@ -373,6 +437,25 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm:{
isInpuFocusShow: true,
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage // 查询弹窗所需分页方法
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择生产线代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '生产线信息', // 查询弹窗标题
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
searchPage: ProductionlineApi.getProductionlinePage // 查询弹窗所需分页方法
}
}
}, },
{ {
label: '工位代码', label: '工位代码',
@ -381,6 +464,25 @@ export const ProductdismantleRequestDetaila = 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: '工序代码',
@ -389,6 +491,25 @@ export const ProductdismantleRequestDetaila = 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: '包装号',
@ -397,6 +518,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '器具号', label: '器具号',
@ -405,6 +528,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '批次', label: '批次',
@ -428,11 +553,14 @@ export const ProductdismantleRequestDetaila = 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',
} }
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '过期日期', label: '过期日期',
@ -448,11 +576,14 @@ export const ProductdismantleRequestDetaila = 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',
} }
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '库存状态', label: '库存状态',
@ -464,6 +595,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '标包数量', label: '标包数量',
@ -472,6 +605,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '标包单位', label: '标包单位',
@ -483,6 +618,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '从货主代码', label: '从货主代码',
@ -491,6 +628,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '单据号', label: '单据号',
@ -513,6 +652,26 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm:{
isInpuFocusShow: true,
isSearchList: 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: '备注',
@ -536,6 +695,7 @@ export const ProductdismantleRequestDetaila = 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',
@ -561,6 +721,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '物品描述1', label: '物品描述1',
@ -569,6 +731,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '物品描述2', label: '物品描述2',
@ -577,6 +741,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '项目代码', label: '项目代码',
@ -585,6 +751,8 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
isTableForm: false,
isForm: false,
}, },
{ {
label: '数量', label: '数量',
@ -593,6 +761,18 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm:{
type: 'InputNumber',
min: 1,
precision: 6
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
}
}, },
{ {
label: '计量单位', label: '计量单位',
@ -604,6 +784,9 @@ export const ProductdismantleRequestDetaila = useCrudSchemas(reactive<CrudSchema
table: { table: {
width: 150 width: 150
}, },
tableForm: {
type: 'Select'
}
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -619,6 +802,7 @@ export const ProductdismantleRequestDetaila = 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',
@ -655,27 +839,27 @@ export const ProductdismantleRequestDetailaRules = 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' }
], // ],
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: 'change' } { required: true, message: '请选择物品代码', trigger: 'change' }
], ],

Loading…
Cancel
Save