Browse Source

1、增加工位操作步骤关联

master_hella_20240701
bjang03 8 months ago
parent
commit
d24f970861
  1. 19
      src/api/mes/workstation/index.ts
  2. 6
      src/views/mes/workstation/index.vue

19
src/api/mes/workstation/index.ts

@ -50,7 +50,6 @@ export const importTemplate = () => {
return request.download({ url: '/mes/workstation/get-import-template' })
}// 查询班组列表
export const getTeamPage = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
@ -89,7 +88,6 @@ export const deleteTeamRelation = async (teamCodes:string[]) => {
return await request.post({ url: `/mes/team/deleteRelation`, data })
}
export const getEquipmentPage = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
@ -101,7 +99,6 @@ export const getEquipmentPage = async (params) => {
}
// 查询选择设备列表
export const checkEquipmentPageList = async (params) => {
console.log(goalParams.workstationCode)
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
@ -130,6 +127,7 @@ export const deleteEquipmentRelation = async (equipmentCodes:string[]) => {
return await request.post({ url: `/mes/equipment/deleteRelation`, data })
}
export const getProcessPage = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
@ -139,6 +137,7 @@ export const getProcessPage = async (params) => {
}
}
export const checkProcessPageList = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
@ -167,21 +166,23 @@ export const deleteProcessRelation = async (processCodes:string[]) => {
export const getOperstepsPage = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/workstation-opersteps/senior', data })
return await request.post({ url: '/strategy/workstation-opersteps/senior', data })
} else {
return await request.get({ url: `/mes/workstation-opersteps/pageListByWorkstationCode`, params })
return await request.get({ url: `/strategy/workstation-opersteps/pageListByWorkstationCode`, params })
}
}
export const checkOperstepsPageList = async (params) => {
params.workstationCode = goalParams.workstationCode
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/workstation-opersteps/senior', data })
return await request.post({ url: '/strategy/workstation-opersteps/senior', data })
} else {
return await request.get({ url: `/mes/workstation-opersteps/pageCheckListByWorkstationCode`, params })
return await request.get({ url: `/strategy/workstation-opersteps/pageCheckListByWorkstationCode`, params })
}
}
// 添加操作步骤关联
@ -190,7 +191,7 @@ export const createOperstepsRelation = async (processCodes:string[]) => {
workstationCode : goalParams.workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/workstation-opersteps/createRelation`, data })
return await request.post({ url: `/strategy/workstation-opersteps/createRelation`, data })
}
// 删除操作步骤关联
@ -199,5 +200,5 @@ export const deleteOperstepsRelation = async (processCodes:string[]) => {
workstationCode : goalParams.workstationCode,
processCodes : processCodes
}
return await request.post({ url: `/mes/workstation-opersteps/deleteRelation`, data })
return await request.post({ url: `/strategy/workstation-opersteps/deleteRelation`, data })
}

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

@ -67,7 +67,7 @@
/>
<!-- 记录子包装弹窗 -->
<BasicForm
ref="teamRef"
ref="teamListRef"
@success="getList"
:tableAllSchemas="Team.allSchemas"
:tableData="selectTeamListTableData.tableList"
@ -355,7 +355,7 @@ const { tableObject: selectProcessListTableData, tableMethods: processListTableM
})
const { getList:selectProcessListList } = processListTableMethods
const OperstepsListRef = ref()
const operstepsListRef = ref()
const { tableObject: selectOperstepsListTableData, tableMethods: OperstepsListTableMethods } = useTable({
getListApi: WorkstationApi.checkOperstepsPageList
})
@ -385,7 +385,7 @@ const tableFormButton = async (val , row) => {
workstationCode:row.workstationCode
}
await selectOperstepsList()
OperstepsListRef.value.open('create', row, null,'viewDetail')//
operstepsListRef.value.open('create', row, null,'viewDetail')//
}
}
</script>

Loading…
Cancel
Save