Browse Source

1、增加月度计划主表管理功能

master_hella_20240701
bjang03 8 months ago
parent
commit
4fc4829929
  1. 3
      src/views/mes/workstation/components/Detail.vue
  2. 13
      src/views/mes/workstation/index.vue
  3. 85
      src/views/mes/workstation/workstation.data.ts

3
src/views/mes/workstation/components/Detail.vue

@ -655,13 +655,12 @@ const openForm = async (type: string, row?: number) => {
} }
// form // form
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
console.log('submitForm',data)
try { try {
// detailValidate // detailValidate
const rs = (await props.detailValidate) ? await props.detailValidate(data) : true const rs = (await props.detailValidate) ? await props.detailValidate(data) : true
if (!rs) return if (!rs) return
if (formType === 'create') { if (formType === 'create') {
await props.apiCreate(data) await props.apiCreate(data.list.split(","))
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await props.apiUpdate(data) await props.apiUpdate(data)

13
src/views/mes/workstation/index.vue

@ -58,7 +58,7 @@
:apiDelete="tabsDeleteApi" :apiDelete="tabsDeleteApi"
:allSchemas="Workstation.allSchemas" :allSchemas="Workstation.allSchemas"
:detailAllSchemas="detailAllSchemas" :detailAllSchemas="detailAllSchemas"
:searchTableSchema="popList.allSchemas" :searchTableSchema="tmpPopList"
:detailAllSchemasRules="WorkstationRules" :detailAllSchemasRules="WorkstationRules"
:apiPage="apiPage" :apiPage="apiPage"
:tabs="TabsList" :tabs="TabsList"
@ -70,7 +70,7 @@
/> />
<BasicForm <BasicForm
ref="teamListRef" ref="teamListRef"
:formAllSchemas="popList.allSchemas" :formAllSchemas="tmpPopList"
:isBusiness="false" :isBusiness="false"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -86,7 +86,7 @@ import {
TabsList, TabsList,
Team, Team,
Workstation, Workstation,
WorkstationRules, popList WorkstationRules, teamPopList,equipmentPopList,processPopList,stepPopList
} from './workstation.data' } from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation' import * as WorkstationApi from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -273,6 +273,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
const detailAllSchemas = ref(Team.allSchemas) const detailAllSchemas = ref(Team.allSchemas)
const apiPage = ref(WorkstationApi.getTeamPage) const apiPage = ref(WorkstationApi.getTeamPage)
const tableKey = ref("Team"); const tableKey = ref("Team");
let tmpPopList = teamPopList.allSchemas
// tabs // tabs
const changeTabs = (data) =>{ const changeTabs = (data) =>{
tableKey.value = data.prop tableKey.value = data.prop
@ -281,23 +282,25 @@ const changeTabs = (data) =>{
detailAllSchemas.value = Team.allSchemas detailAllSchemas.value = Team.allSchemas
tabsDeleteApi = WorkstationApi.deleteTeamRelation tabsDeleteApi = WorkstationApi.deleteTeamRelation
tabsCreateApi = WorkstationApi.createTeamRelation tabsCreateApi = WorkstationApi.createTeamRelation
tmpPopList = teamPopList.allSchemas
}else if(data.prop == 'Equipment'){ }else if(data.prop == 'Equipment'){
apiPage.value = WorkstationApi.getEquipmentPage apiPage.value = WorkstationApi.getEquipmentPage
detailAllSchemas.value = Equipment.allSchemas detailAllSchemas.value = Equipment.allSchemas
tabsDeleteApi = WorkstationApi.deleteEquipmentRelation tabsDeleteApi = WorkstationApi.deleteEquipmentRelation
tabsCreateApi = WorkstationApi.createEquipmentRelation tabsCreateApi = WorkstationApi.createEquipmentRelation
tmpPopList = equipmentPopList.allSchemas
}else if(data.prop == 'Process'){ }else if(data.prop == 'Process'){
apiPage.value = WorkstationApi.getProcessPage apiPage.value = WorkstationApi.getProcessPage
detailAllSchemas.value = Process.allSchemas detailAllSchemas.value = Process.allSchemas
tabsDeleteApi = WorkstationApi.deleteProcessRelation tabsDeleteApi = WorkstationApi.deleteProcessRelation
tabsCreateApi = WorkstationApi.createProcessRelation tabsCreateApi = WorkstationApi.createProcessRelation
tmpPopList = processPopList.allSchemas
}else if(data.prop == 'Opersteps'){ }else if(data.prop == 'Opersteps'){
apiPage.value = WorkstationApi.getOperstepsPage apiPage.value = WorkstationApi.getOperstepsPage
detailAllSchemas.value = Opersteps.allSchemas detailAllSchemas.value = Opersteps.allSchemas
tabsDeleteApi = WorkstationApi.deleteOperstepsRelation tabsDeleteApi = WorkstationApi.deleteOperstepsRelation
tabsCreateApi = WorkstationApi.createOperstepsRelation tabsCreateApi = WorkstationApi.createOperstepsRelation
tmpPopList = stepPopList.allSchemas
} }
} }
const teamListRef = ref() const teamListRef = ref()

85
src/views/mes/workstation/workstation.data.ts

@ -214,19 +214,19 @@ export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm:true, isTableForm:true,
} }
])) ]))
export const popList = useCrudSchemas(reactive<CrudSchema[]>([ export const teamPopList = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '多选列表', label: '选择班组',
field: 'popCheckList', field: 'list',
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
form: { form: {
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本 searchListPlaceholder: '请选择选择班组', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段 searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题 searchTitle: '选择班组', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类 searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkTeamPageList, // 查询弹窗所需分页方法 searchPage: WorkstationApi.checkTeamPageList, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
@ -238,3 +238,78 @@ export const popList = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
])) ]))
export const equipmentPopList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '选择设备',
field: 'list',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '选择设备', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择设备', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkEquipmentPageList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}
]))
export const processPopList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '选择工序',
field: 'list',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '选择工序', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择工序', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkProcessPageList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}
]))
export const stepPopList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '选择操作步骤',
field: 'list',
sort: 'custom',
isSearch: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
multiple:true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '选择操作步骤', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '选择操作步骤', // 查询弹窗标题
searchAllSchemas: Team.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.checkOperstepsPageList, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}
]))

Loading…
Cancel
Save