|
|
@ -1,42 +1,45 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter,dateFormatter2 } from '@/utils/formatTime' |
|
|
|
import type {CrudSchema} from '@/hooks/web/useCrudSchemas' |
|
|
|
import {dateFormatter, dateFormatter2} from '@/utils/formatTime' |
|
|
|
|
|
|
|
import * as ProductionMainApi from '@/api/wms/productionMain' |
|
|
|
import { ProductionMain } from '@/views/wms/productionManage/productionplan/productionMain/productionMain.data' |
|
|
|
import { |
|
|
|
ProductionMain |
|
|
|
} from '@/views/wms/productionManage/productionplan/productionMain/productionMain.data' |
|
|
|
|
|
|
|
import * as WorkshopApi from '@/api/wms/workshop' |
|
|
|
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' |
|
|
|
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 { |
|
|
|
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 {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 {Team} from '@/views/wms/basicDataManage/orderManage/team/team.data' |
|
|
|
|
|
|
|
import * as ProductionlineitemApi from '@/api/wms/productionlineitem' |
|
|
|
// import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/bom/bom.data'
|
|
|
|
|
|
|
|
// import * as BomApi from '@/api/wms/bom'
|
|
|
|
import { Bom } from '@/views/wms/basicDataManage/itemManage/bom/bom.data' |
|
|
|
import {Bom} from '@/views/wms/basicDataManage/itemManage/bom/bom.data' |
|
|
|
|
|
|
|
import * as WorkStationApi from '@/api/wms/workstation' |
|
|
|
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' |
|
|
|
import {Workstation} from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' |
|
|
|
|
|
|
|
import * as getPlansettingApi from '@/api/wms/plansetting/index' |
|
|
|
import * as getPlansettingApi from '@/api/wms/plansetting/index' |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
const {t} = useI18n() // 国际化
|
|
|
|
|
|
|
|
// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值
|
|
|
|
const queryParams = { |
|
|
|
pageSize:10, |
|
|
|
pageNo:1, |
|
|
|
code:'PreparetoissuePlan' |
|
|
|
pageSize: 10, |
|
|
|
pageNo: 1, |
|
|
|
code: 'PreparetoissuePlan' |
|
|
|
} |
|
|
|
const data = await getPlansettingApi.getPlansettingPage(queryParams) |
|
|
|
const plansettingData =data?.list[0]||{} |
|
|
|
const data = await getPlansettingApi.getPlansettingPage(queryParams) |
|
|
|
const plansettingData = data?.list[0] || {} |
|
|
|
|
|
|
|
/** |
|
|
|
* @returns {Array} 备料计划主表 |
|
|
@ -63,7 +66,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.PLAN_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
form: { |
|
|
|
value: '1', |
|
|
|
componentProps: { |
|
|
@ -182,7 +185,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
@ -203,7 +206,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
@ -228,12 +231,18 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchAllSchemas: ProductionMain.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ProductionMainApi.getProductionMainPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key:'status', |
|
|
|
value:'6', |
|
|
|
key: 'status', |
|
|
|
value: '6', |
|
|
|
isMainValue: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key:'available', |
|
|
|
value:'TRUE', |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'planType', |
|
|
|
value: 'predict', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
@ -253,7 +262,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'available', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
@ -290,7 +299,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
@ -311,7 +320,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
@ -332,7 +341,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isTable: false, |
|
|
|
isForm:false, |
|
|
|
isForm: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
@ -362,7 +371,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
@ -395,7 +404,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
@ -428,31 +437,31 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
//表单校验
|
|
|
|
export const PreparetoissueMainRules = reactive({ |
|
|
|
workshop: [ |
|
|
|
{ required: true, message: '请选择车间', trigger: 'change' } |
|
|
|
{required: true, message: '请选择车间', trigger: 'change'} |
|
|
|
], |
|
|
|
prodLine: [ |
|
|
|
{ required: true, message: '请选择生产线', trigger: 'change' } |
|
|
|
{required: true, message: '请选择生产线', trigger: 'change'} |
|
|
|
], |
|
|
|
shift: [ |
|
|
|
{ required: true, message: '请选择班次', trigger: 'change' } |
|
|
|
{required: true, message: '请选择班次', trigger: 'change'} |
|
|
|
], |
|
|
|
team: [ |
|
|
|
{ required: true, message: '请选择班组', trigger: 'change' } |
|
|
|
{required: true, message: '请选择班组', trigger: 'change'} |
|
|
|
], |
|
|
|
planDate: [ |
|
|
|
{ required: true, message: '请输入计划日期', trigger: 'change' } |
|
|
|
{required: true, message: '请输入计划日期', trigger: 'change'} |
|
|
|
], |
|
|
|
available: [ |
|
|
|
{ required: true, message: '请选择是否可用', trigger: 'change' } |
|
|
|
{required: true, message: '请选择是否可用', trigger: 'change'} |
|
|
|
], |
|
|
|
status: [ |
|
|
|
{ required: true, message: '请选择状态', trigger: 'change' } |
|
|
|
{required: true, message: '请选择状态', trigger: 'change'} |
|
|
|
], |
|
|
|
businessType: [ |
|
|
|
{ required: true, message: '请输入业务类型', trigger: 'blur' } |
|
|
|
{required: true, message: '请输入业务类型', trigger: 'blur'} |
|
|
|
], |
|
|
|
remark: [ |
|
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
|
remark: [ |
|
|
|
{max: 50, message: '不得超过50个字符', trigger: 'blur'} |
|
|
|
], |
|
|
|
}) |
|
|
|
|
|
|
@ -477,44 +486,44 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key:'productionLineCode', |
|
|
|
value:'prodLine', |
|
|
|
key: 'productionLineCode', |
|
|
|
value: 'prodLine', |
|
|
|
message: '请填写生产线代码!', |
|
|
|
isMainValue: true |
|
|
|
},{ |
|
|
|
key:'workshopCode', |
|
|
|
value:'workshop', |
|
|
|
}, { |
|
|
|
key: 'workshopCode', |
|
|
|
value: 'workshop', |
|
|
|
message: '请填写车间代码!', |
|
|
|
isMainValue: true |
|
|
|
},{ |
|
|
|
key:'available', |
|
|
|
value:'TRUE', |
|
|
|
}, { |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, |
|
|
|
searchListPlaceholder: '请选择工位', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '工位信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key:'productionLineCode', |
|
|
|
value:'prodLine', |
|
|
|
message: '请填写生产线代码!', |
|
|
|
isMainValue: true |
|
|
|
},{ |
|
|
|
key:'workshopCode', |
|
|
|
value:'workshop', |
|
|
|
message: '请填写车间代码!', |
|
|
|
isMainValue: true |
|
|
|
},{ |
|
|
|
key:'available', |
|
|
|
value:'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '工位信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'productionLineCode', |
|
|
|
value: 'prodLine', |
|
|
|
message: '请填写生产线代码!', |
|
|
|
isMainValue: true |
|
|
|
}, { |
|
|
|
key: 'workshopCode', |
|
|
|
value: 'workshop', |
|
|
|
message: '请填写车间代码!', |
|
|
|
isMainValue: true |
|
|
|
}, { |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
@ -534,14 +543,14 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key:'productionLineCode', |
|
|
|
value:'prodLine', |
|
|
|
key: 'productionLineCode', |
|
|
|
value: 'prodLine', |
|
|
|
message: '请填写生产线代码!', |
|
|
|
isMainValue: true |
|
|
|
}] |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, |
|
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
|
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
|
|
@ -549,8 +558,8 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchAllSchemas: Bom.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ProductionlineitemApi.getProductionlineitemPageByItemtype, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key:'productionLineCode', |
|
|
|
value:'prodLine', |
|
|
|
key: 'productionLineCode', |
|
|
|
value: 'prodLine', |
|
|
|
message: '请填写生产线代码!', |
|
|
|
isMainValue: true |
|
|
|
}] |
|
|
@ -566,7 +575,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'InputNumber', |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
type: 'InputNumber', |
|
|
|
min: 1, |
|
|
|
precision: 6 |
|
|
@ -589,7 +598,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
disabled: true |
|
|
|
}, |
|
|
@ -607,7 +616,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
}, |
|
|
@ -632,7 +641,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
@ -678,7 +687,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
@ -724,7 +733,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
style: {width:'100%'}, |
|
|
|
style: {width: '100%'}, |
|
|
|
type: 'datetime', |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
valueFormat: 'x', |
|
|
@ -738,14 +747,14 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'available', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isTable: true, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
hiddenInMain: true, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
default: 'TRUE' |
|
|
|
}, |
|
|
@ -760,42 +769,42 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|
hiddenInMain:true, |
|
|
|
hiddenInMain: true, |
|
|
|
field: 'action', |
|
|
|
isDetail: false, |
|
|
|
isForm: false , |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isTableForm:false, |
|
|
|
isTableForm: false, |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
|
//表单校验
|
|
|
|
export const PreparetoissueDetailRules = reactive({ |
|
|
|
available: [ |
|
|
|
{ required: true, message: '请选择是否可用', trigger: 'blur' } |
|
|
|
{required: true, message: '请选择是否可用', trigger: 'blur'} |
|
|
|
], |
|
|
|
uom: [ |
|
|
|
{ required: true, message: '请选择计量单位', trigger: 'change' } |
|
|
|
{required: true, message: '请选择计量单位', trigger: 'change'} |
|
|
|
], |
|
|
|
planQty: [ |
|
|
|
{ required: true, message: '请输入计划数量', trigger: 'blur' } |
|
|
|
{required: true, message: '请输入计划数量', trigger: 'blur'} |
|
|
|
], |
|
|
|
number: [ |
|
|
|
{ required: true, message: '请输入单据号', trigger: 'blur' } |
|
|
|
{required: true, message: '请输入单据号', trigger: 'blur'} |
|
|
|
], |
|
|
|
itemCode: [ |
|
|
|
{ required: true, message: '请选择物料代码', trigger: 'change' } |
|
|
|
{required: true, message: '请选择物料代码', trigger: 'change'} |
|
|
|
], |
|
|
|
workStation: [ |
|
|
|
{ required: true, message: '请选择工位', trigger: 'change' } |
|
|
|
{required: true, message: '请选择工位', trigger: 'change'} |
|
|
|
], |
|
|
|
remark: [ |
|
|
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' } |
|
|
|
remark: [ |
|
|
|
{max: 50, message: '不得超过50个字符', trigger: 'blur'} |
|
|
|
], |
|
|
|
dueTime: [ |
|
|
|
{ required: true, message: '请选择截止时间', trigger: 'change' } |
|
|
|
dueTime: [ |
|
|
|
{required: true, message: '请选择截止时间', trigger: 'change'} |
|
|
|
] |
|
|
|
}) |
|
|
|