Browse Source

1、绑定设备

master_hella_20240701
bjang03 8 months ago
parent
commit
65ee27e41e
  1. 27
      src/api/mes/workstation/index.ts
  2. 7
      src/views/mes/workstation/index.vue
  3. 48
      src/views/mes/workstation/workstation.data.ts

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

@ -57,3 +57,30 @@ export const getTeamPage = async (params) => {
return await request.get({ url: `/wms/team/page`, params }) return await request.get({ url: `/wms/team/page`, params })
} }
} }
export const getEquipmentPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/mes/equipment/senior', data })
} else {
return await request.get({ url: `/mes/equipment/page`, params })
}
}
export const getProcessPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/process/senior', data })
} else {
return await request.get({ url: `/wms/process/page`, params })
}
}
export const getProductionPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/production/senior', data })
} else {
return await request.get({ url: `/wms/production/page`, params })
}
}

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

@ -78,6 +78,7 @@ import {
} from "@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data"; } from "@/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data";
import {PurchasereceiptRequestTabsList} from "@/utils/disposition/tabsList"; import {PurchasereceiptRequestTabsList} from "@/utils/disposition/tabsList";
import * as PurchasereceiptRecordDetailApi from "@/api/wms/purchasereceiptRecordDetail"; import * as PurchasereceiptRecordDetailApi from "@/api/wms/purchasereceiptRecordDetail";
import {getEquipmentPage, getProcessPage, getProductionPage} from "@/api/mes/workstation";
defineOptions({ name: 'Workstation' }) defineOptions({ name: 'Workstation' })
const message = useMessage() // const message = useMessage() //
@ -267,13 +268,13 @@ const changeTabs = (data) =>{
apiPage.value = WorkstationApi.getTeamPage apiPage.value = WorkstationApi.getTeamPage
detailAllSchemas.value = Team.allSchemas detailAllSchemas.value = Team.allSchemas
}else if(data.prop == 'Equipment'){ }else if(data.prop == 'Equipment'){
apiPage.value = PurchasereceiptRecordDetailApi.getScarceGoodsDetailPage apiPage.value = WorkstationApi.getEquipmentPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}else if(data.prop == 'Process'){ }else if(data.prop == 'Process'){
apiPage.value = PurchasereceiptRecordDetailApi.getScarceGoodsDetailPage apiPage.value = WorkstationApi.getProcessPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
}else if(data.prop == 'Production'){ }else if(data.prop == 'Production'){
apiPage.value = PurchasereceiptRecordDetailApi.getScarceGoodsDetailPage apiPage.value = WorkstationApi.getProductionPage
detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas
} }
tabeKey.value = data.prop tabeKey.value = data.prop

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

@ -120,3 +120,51 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false isForm: false
} }
])) ]))
export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))
export const Process = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))
export const Production = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))

Loading…
Cancel
Save