Browse Source

生产计划修改

master
李胜楠 1 year ago
parent
commit
7c7d1b7c70
  1. 2
      src/api/wms/productionDetail/index.ts
  2. 2
      src/api/wms/productionMain/index.ts
  3. 24
      src/views/wms/productionManage/productionplan/productionMain/index.vue
  4. 217
      src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

2
src/api/wms/productionDetail/index.ts

@ -1,8 +1,6 @@
import request from '@/config/axios' import request from '@/config/axios'
export interface ProductionDetailVO { export interface ProductionDetailVO {
woNumber: string
woLine: string
bomVersion: string bomVersion: string
goodQty: number goodQty: number
notGoodQty: number notGoodQty: number

2
src/api/wms/productionMain/index.ts

@ -18,6 +18,8 @@ export interface ProductionMainVO {
updateTime: Date updateTime: Date
updater: string updater: string
available: string available: string
woNumber: string
woLine: string
} }
// 查询生产计划主列表 // 查询生产计划主列表

24
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -44,7 +44,6 @@
@success="getList" @success="getList"
:rules="ProductionMainRules" :rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas" :formAllSchemas="ProductionMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="ProductionDetail.allSchemas" :tableAllSchemas="ProductionDetail.allSchemas"
:tableFormRules="ProductionDetailRules" :tableFormRules="ProductionDetailRules"
:tableData="tableData" :tableData="tableData"
@ -64,12 +63,12 @@
:allSchemas="ProductionMain.allSchemas" :allSchemas="ProductionMain.allSchemas"
:detailAllSchemas="ProductionDetail.allSchemas" :detailAllSchemas="ProductionDetail.allSchemas"
:detailAllSchemasRules="ProductionDetailRules" :detailAllSchemasRules="ProductionDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="ProductionDetailApi.createProductionDetail" :apiCreate="ProductionDetailApi.createProductionDetail"
:apiUpdate="ProductionDetailApi.updateProductionDetail" :apiUpdate="ProductionDetailApi.updateProductionDetail"
:apiPage="ProductionDetailApi.getProductionDetailPage" :apiPage="ProductionDetailApi.getProductionDetailPage"
:apiDelete="ProductionDetailApi.deleteProductionDetail" :apiDelete="ProductionDetailApi.deleteProductionDetail"
: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 = []

217
src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts

@ -1,5 +1,18 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
import * as WorkMainApi from '@/api/wms/workMain'
import * as WorkDetailApi from '@/api/wms/workDetail'
import { WorkDetail, WorkMain } from '../workMain/workMain.data'
import * as WorkshopApi from '@/api/wms/workshop'
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
import * as ProductionlineApi from '@/api/wms/productionline'
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.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'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
/** /**
@ -32,6 +45,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择车间',
searchField: 'code',
searchTitle: '车间信息',
searchAllSchemas: Workshop.allSchemas,
searchPage: WorkshopApi.getWorkshopPage
}
}
}, },
{ {
label: '生产线', label: '生产线',
@ -40,6 +64,17 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择生产线',
searchField: 'code',
searchTitle: '生产线信息',
searchAllSchemas: Productionline.allSchemas,
searchPage: ProductionlineApi.getProductionlinePage
}
}
}, },
{ {
label: '班次', label: '班次',
@ -48,6 +83,17 @@ export const ProductionMain = 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: '班组',
@ -56,6 +102,17 @@ export const ProductionMain = 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: '计划日期',
@ -71,13 +128,13 @@ export const ProductionMain = 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',
} }
}, },
}, },
{ {
label: '业务类型', label: '业务类型',
field: 'businessType', field: 'businessType',
@ -90,7 +147,8 @@ export const ProductionMain = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
} },
isForm: false,
}, },
{ {
label: '备注', label: '备注',
@ -124,6 +182,7 @@ export const ProductionMain = 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',
@ -163,11 +222,13 @@ export const ProductionMain = 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: '结束时间',
@ -183,11 +244,51 @@ export const ProductionMain = 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: '订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单号',
searchField: 'number',
searchTitle: '生产订单信息',
searchAllSchemas: WorkMain.allSchemas,
searchPage: WorkMainApi.getWorkMainPage
}
}
},
{
label: '订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true,
searchListPlaceholder: '请选择订单行',
searchField: 'lineNumber',
searchTitle: '生产订单信息',
searchAllSchemas: WorkDetail.allSchemas,
searchPage: WorkDetailApi.getWorkDetailPage
}
}
}, },
{ {
label: '最后更新者', label: '最后更新者',
@ -212,6 +313,7 @@ export const ProductionMain = 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',
@ -269,7 +371,7 @@ export const ProductionMainRules = reactive({
{ required: true, message: '请选择班组', trigger: 'change' } { required: true, message: '请选择班组', trigger: 'change' }
], ],
planDate: [ planDate: [
{ required: true, message: '请输入计划日期', trigger: 'change' } { required: true, message: '请输入计划日期', trigger: 'blur' }
], ],
available: [ available: [
{ required: true, message: '请选择是否可用', trigger: 'change' } { required: true, message: '请选择是否可用', trigger: 'change' }
@ -277,31 +379,15 @@ export const ProductionMainRules = reactive({
status: [ status: [
{ required: true, message: '请选择状态', trigger: 'change' } { required: true, message: '请选择状态', trigger: 'change' }
], ],
businessType: [ // businessType: [
{ required: true, message: '请输入业务类型', trigger: 'blur' } // { required: true, message: '请输入业务类型', trigger: 'blur' }
], // ],
}) })
/** /**
* @returns {Array} * @returns {Array}
*/ */
export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '订单号',
field: 'woNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: '订单行',
field: 'woLine',
sort: 'custom',
table: {
width: 150
},
},
{ {
label: 'Bom版本', label: 'Bom版本',
field: 'bomVersion', field: 'bomVersion',
@ -319,7 +405,18 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
},
isTableForm: false,
isForm: false
}, },
{ {
label: '不合格数量', label: '不合格数量',
@ -330,7 +427,18 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
} componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
},
isTableForm: false,
isForm: false
}, },
{ {
label: '单据号', label: '单据号',
@ -353,6 +461,25 @@ export const ProductionDetail = 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: '备注',
@ -376,6 +503,7 @@ export const ProductionDetail = 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',
@ -403,6 +531,15 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
form: { form: {
component: 'InputNumber', component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}, },
}, },
{ {
@ -416,6 +553,9 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
tableForm:{
type: 'Select'
}
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
@ -431,6 +571,7 @@ export const ProductionDetail = 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',
@ -467,7 +608,12 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
inactiveValue: 'FALSE', inactiveValue: 'FALSE',
activeValue: 'TRUE' activeValue: 'TRUE'
} }
} },
tableForm: {
type: 'Select'
},
isTableForm: false,
isForm: false
}, },
{ {
label: '操作', label: '操作',
@ -484,21 +630,18 @@ export const ProductionDetail = useCrudSchemas(reactive<CrudSchema[]>([
//表单校验 //表单校验
export const ProductionDetailRules = reactive({ export const ProductionDetailRules = reactive({
woNumber: [
{ required: true, message: '请选择订单号', trigger: 'change' }
],
bomVersion: [ bomVersion: [
{ required: true, message: '请输入Bom版本', trigger: 'blur' } { required: true, message: '请输入Bom版本', trigger: 'blur' }
], ],
goodQty: [ // goodQty: [
{ required: true, message: '请输入合格数量', trigger: 'blur' } // { required: true, message: '请输入合格数量', trigger: 'blur' }
], // ],
notGoodQty: [ // notGoodQty: [
{ required: true, message: '请输入不合格数量', trigger: 'blur' } // { required: true, message: '请输入不合格数量', trigger: 'blur' }
], // ],
available: [ // available: [
{ required: true, message: '请选择是否可用', trigger: 'change' } // { required: true, message: '请选择是否可用', trigger: 'change' }
], // ],
uom: [ uom: [
{ required: true, message: '请选择计量单位', trigger: 'change' } { required: true, message: '请选择计量单位', trigger: 'change' }
], ],

Loading…
Cancel
Save