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. 213
      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'
export interface ProductionDetailVO {
woNumber: string
woLine: string
bomVersion: string
goodQty: number
notGoodQty: number

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

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

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

@ -44,7 +44,6 @@
@success="getList"
:rules="ProductionMainRules"
:formAllSchemas="ProductionMain.allSchemas"
:searchTableParams="searchTableParams"
:tableAllSchemas="ProductionDetail.allSchemas"
:tableFormRules="ProductionDetailRules"
:tableData="tableData"
@ -64,12 +63,12 @@
:allSchemas="ProductionMain.allSchemas"
:detailAllSchemas="ProductionDetail.allSchemas"
:detailAllSchemasRules="ProductionDetailRules"
:searchTableParams="searchTableParams"
:apiCreate="ProductionDetailApi.createProductionDetail"
:apiUpdate="ProductionDetailApi.updateProductionDetail"
:apiPage="ProductionDetailApi.getProductionDetailPage"
:apiDelete="ProductionDetailApi.deleteProductionDetail"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
<!-- 导入 -->
@ -99,22 +98,12 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const searchTableParams = ref([
//{
// formField: 'productItemCode',
// searchTableTitle: '',
// searchTableAllSchemas: Itembasic.allSchemas,
// searchTablePage: ItembasicApi.getItembasicPage
//}
])
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => {
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']
@ -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 = []

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

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

Loading…
Cancel
Save