Browse Source

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

master_hella_20240701
bjang03 8 months ago
parent
commit
1443846cac
  1. 93
      src/views/mes/workstation/index.vue
  2. 27
      src/views/mes/workstation/workstation.data.ts

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

@ -67,45 +67,8 @@
/>
<!-- 记录子包装弹窗 -->
<BasicForm
ref="teamListRef"
@success="getList"
:tableAllSchemas="Team.allSchemas"
:tableData="WorkstationApi.checkTeamPageList"
:isBusiness="true"
:isOpenSearchTable="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<BasicForm
ref="equipmentListRef"
@success="getList"
:tableAllSchemas="Equipment.allSchemas"
:tableData="selectEquipmentListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<BasicForm
ref="processListRef"
@success="getList"
:tableAllSchemas="Process.allSchemas"
:tableData="selectProcessListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
/>
<BasicForm
ref="operstepsListRef"
@success="getList"
:tableAllSchemas="Opersteps.allSchemas"
:tableData="selectOperstepsListTableData.tableList"
:isBusiness="true"
:isShowButton="false"
:isShowReduceButton="false"
:isShowFooterButtton="false"
ref="popCheckListRef"
:tableAllSchemas="popCheckList.allSchemas"
/>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -120,7 +83,7 @@ import {
TabsList,
Team,
Workstation,
WorkstationRules
WorkstationRules, popCheckList
} from './workstation.data'
import * as WorkstationApi from '@/api/mes/workstation'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
@ -328,54 +291,8 @@ const changeTabs = (data) =>{
tabsDeleteApi = WorkstationApi.deleteOperstepsRelation
}
}
const teamListRef = ref()
const { tableObject: selectTeamListTableData, tableMethods: selectTeamListTableMethods } = useTable({
getListApi: WorkstationApi.checkTeamPageList
})
const { getList:selectTeamList } = selectTeamListTableMethods
const equipmentListRef = ref()
const { tableObject: selectEquipmentListTableData, tableMethods: selectEquipmentListTableMethods } = useTable({
getListApi: WorkstationApi.checkEquipmentPageList
})
const { getList:selectEquipmentList } = selectEquipmentListTableMethods
const processListRef = ref()
const { tableObject: selectProcessListTableData, tableMethods: processListTableMethods } = useTable({
getListApi: WorkstationApi.checkProcessPageList
})
const { getList:selectProcessListList } = processListTableMethods
const operstepsListRef = ref()
const { tableObject: selectOperstepsListTableData, tableMethods: OperstepsListTableMethods } = useTable({
getListApi: WorkstationApi.checkOperstepsPageList
})
const { getList:selectOperstepsList } = OperstepsListTableMethods
const popCheckListRef = ref()
const detailOpenForm = async (type, params) => {
if (tableKey.value == 'Team') {
selectTeamListTableData.params = {
workstationCode: params.code
}
await selectTeamList()
teamListRef.value.open('viewDetail', params, null, 'viewDetail')//
} else if (tableKey.value == 'Equipment') {
selectEquipmentListTableData.params = {
workstationCode: params.code
}
await selectEquipmentList()
equipmentListRef.value.open('viewDetail', params.code, null, 'viewDetail')//
} else if (tableKey.value == 'Process') {
selectProcessListTableData.params = {
workstationCode: params.code
}
await selectProcessListList()
processListRef.value.open('viewDetail', params.code, null, 'viewDetail')//
} else if (tableKey.value == 'Production') {
selectOperstepsListTableData.params = {
workstationCode: params.code
}
await selectOperstepsList()
operstepsListRef.value.open('viewDetail', params.code, null, 'viewDetail')//
}
popCheckListRef.value.open('create', params.code, null, 'viewDetail')
}
</script>

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

@ -1,5 +1,7 @@
import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
import {dateFormatter} from '@/utils/formatTime'
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
import * as WarehouseApi from "@/api/wms/warehouse";
// 表单校验
export const WorkstationRules = reactive({
@ -213,3 +215,28 @@ export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm:true,
}
]))
export const popCheckList = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '多选列表',
field: 'popCheckList',
sort: 'custom',
isSearch: true,
isForm: false,
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '仓库信息', // 查询弹窗标题
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
searchCondition: [{
key: 'available',
value: 'TRUE',
isMainValue: false
}]
}
}
}
]))

Loading…
Cancel
Save