|
@ -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' } |
|
|
], |
|
|
], |
|
|