|
@ -4,15 +4,15 @@ |
|
|
<Search :schema="Workstation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
<Search :schema="Workstation.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
|
<TableHead |
|
|
<TableHead |
|
|
:HeadButttondata="HeadButttondata" |
|
|
:HeadButttondata="HeadButttondata" |
|
|
@button-base-click="buttonBaseClick" |
|
|
@button-base-click="buttonBaseClick" |
|
|
:routeName="routeName" |
|
|
:routeName="routeName" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@updataTableColumns="updataTableColumns" |
|
|
@searchFormClick="searchFormClick" |
|
|
@searchFormClick="searchFormClick" |
|
|
:allSchemas="Workstation.allSchemas" |
|
|
:allSchemas="Workstation.allSchemas" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
@ -51,26 +51,90 @@ |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="Workstation.allSchemas" /> |
|
|
<Detail ref="detailRef" |
|
|
|
|
|
:isBasic="false" |
|
|
|
|
|
:allSchemas="Workstation.allSchemas" |
|
|
|
|
|
:detailAllSchemas="detailAllSchemas" |
|
|
|
|
|
:detailAllSchemasRules="WorkstationRules" |
|
|
|
|
|
:apiPage="apiPage" |
|
|
|
|
|
:tabs="TabsList" |
|
|
|
|
|
@changeTabs="changeTabs" |
|
|
|
|
|
:buttondataTable="buttondataTable" |
|
|
|
|
|
@tableFormButton="tableFormButton" |
|
|
|
|
|
/> |
|
|
|
|
|
<!-- 记录子包装弹窗 --> |
|
|
|
|
|
<BasicForm |
|
|
|
|
|
ref="teamRef" |
|
|
|
|
|
@success="getList" |
|
|
|
|
|
:tableAllSchemas="Team.allSchemas" |
|
|
|
|
|
:tableData="selectTeamListTableData.tableList" |
|
|
|
|
|
:isBusiness="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="productionListRef" |
|
|
|
|
|
@success="getList" |
|
|
|
|
|
:tableAllSchemas="Production.allSchemas" |
|
|
|
|
|
:tableData="selectProductionListTableData.tableList" |
|
|
|
|
|
:isBusiness="true" |
|
|
|
|
|
:isShowButton="false" |
|
|
|
|
|
:isShowReduceButton="false" |
|
|
|
|
|
:isShowFooterButtton="false" |
|
|
|
|
|
/> |
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
<ImportForm ref="importFormRef" url="/mes/workstation/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import download from '@/utils/download' |
|
|
import download from '@/utils/download' |
|
|
import { Workstation,WorkstationRules } from './workstation.data' |
|
|
import { |
|
|
|
|
|
Equipment, |
|
|
|
|
|
Process, |
|
|
|
|
|
Production, |
|
|
|
|
|
TabsList, |
|
|
|
|
|
Team, |
|
|
|
|
|
Workstation, |
|
|
|
|
|
WorkstationRules |
|
|
|
|
|
} 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' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import { |
|
|
|
|
|
checkEquipmentPageList, checkProcessPageList, checkProductionPageList, |
|
|
|
|
|
checkTeamPageList, |
|
|
|
|
|
getEquipmentPage, getProcessPage, getProductionPage, getSelectEquipmentPage, |
|
|
|
|
|
getSelectTeamPage, |
|
|
|
|
|
goalParams, |
|
|
|
|
|
} from "@/api/mes/workstation"; |
|
|
|
|
|
import * as PurchasereceiptRecordDetailApi from "@/api/wms/purchasereceiptRecordDetail"; |
|
|
defineOptions({ name: 'Workstation' }) |
|
|
defineOptions({ name: 'Workstation' }) |
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
const message = useMessage() // 消息弹窗 |
|
|
const { t } = useI18n() // 国际化 |
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
const teamRef = ref() |
|
|
const route = useRoute() // 路由信息 |
|
|
const route = useRoute() // 路由信息 |
|
|
const routeName = ref() |
|
|
const routeName = ref() |
|
|
routeName.value = route.name |
|
|
routeName.value = route.name |
|
@ -135,7 +199,6 @@ const buttonBaseClick = (val, item) => { |
|
|
const butttondata = [ |
|
|
const butttondata = [ |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:workstation:update'}), // 编辑 |
|
|
defaultButtons.mainListEditBtn({hasPermi:'wms:workstation:update'}), // 编辑 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:workstation:delete'}), // 删除 |
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:workstation:delete'}), // 删除 |
|
|
defaultButtons.mainListBindBtn({hasPermi:'wms:workstation:update'}), // 绑定 |
|
|
|
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
@ -144,11 +207,8 @@ const buttonTableClick = async (val, row) => { |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
} else if (val == 'delete') { // 删除 |
|
|
await handleDelete(row.id) |
|
|
await handleDelete(row.id) |
|
|
}else if (val == 'bind') { // 删除 |
|
|
|
|
|
await detailRef.value.openDetail(row, '绑定', row.name, 'mesWorkstation') |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const basicFormRef = ref() |
|
|
const basicFormRef = ref() |
|
|
const openForm = (type: string, row?: any) => { |
|
|
const openForm = (type: string, row?: any) => { |
|
@ -179,11 +239,6 @@ const formsSuccess = async (formType,data) => { |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 详情操作 */ |
|
|
|
|
|
const detailRef = ref() |
|
|
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
/** 删除按钮操作 */ |
|
|
const handleDelete = async (id: number) => { |
|
|
const handleDelete = async (id: number) => { |
|
@ -243,5 +298,92 @@ onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|
importTemplateData.templateUrl = await WorkstationApi.importTemplate() |
|
|
importTemplateData.templateUrl = await WorkstationApi.importTemplate() |
|
|
}) |
|
|
}) |
|
|
|
|
|
/** 详情操作 */ |
|
|
|
|
|
const detailRef = ref() |
|
|
|
|
|
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
|
|
|
goalParams.workstationCode = row.code |
|
|
|
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') |
|
|
|
|
|
} |
|
|
|
|
|
// 子包装数据 |
|
|
|
|
|
const detailAllSchemas = ref(Team.allSchemas) |
|
|
|
|
|
const apiPage = ref(WorkstationApi.getTeamPage) |
|
|
|
|
|
const tableKey = ref("workstationDetail"); |
|
|
|
|
|
// tabs 切换事件 |
|
|
|
|
|
const changeTabs = (data) =>{ |
|
|
|
|
|
tableKey.value = data.prop |
|
|
|
|
|
if(data.prop == 'Team'){ |
|
|
|
|
|
apiPage.value = WorkstationApi.getTeamPage |
|
|
|
|
|
detailAllSchemas.value = Team.allSchemas |
|
|
|
|
|
}else if(data.prop == 'Equipment'){ |
|
|
|
|
|
apiPage.value = WorkstationApi.getEquipmentPage |
|
|
|
|
|
detailAllSchemas.value = Equipment.allSchemas |
|
|
|
|
|
}else if(data.prop == 'Process'){ |
|
|
|
|
|
apiPage.value = WorkstationApi.getProcessPage |
|
|
|
|
|
detailAllSchemas.value = Process.allSchemas |
|
|
|
|
|
}else if(data.prop == 'Production'){ |
|
|
|
|
|
apiPage.value = WorkstationApi.getProductionPage |
|
|
|
|
|
detailAllSchemas.value = Production.allSchemas |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const buttondataTable = ref([{ |
|
|
|
|
|
label: '取消关联', |
|
|
|
|
|
name: 'viewParentPickingNumber', |
|
|
|
|
|
hide: false, |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
icon: '', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '', |
|
|
|
|
|
link: true, // 文本展现按钮 |
|
|
|
|
|
}]) |
|
|
|
|
|
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 productionListRef = ref() |
|
|
|
|
|
const { tableObject: selectProductionListTableData, tableMethods: productionListTableMethods } = useTable({ |
|
|
|
|
|
getListApi: WorkstationApi.checkProductionPageList |
|
|
|
|
|
}) |
|
|
|
|
|
const { getList:selectProductionList } = productionListTableMethods |
|
|
|
|
|
|
|
|
|
|
|
const tableFormButton = async (val , row) => { |
|
|
|
|
|
if(val == 'Team'){ |
|
|
|
|
|
selectTeamListTableData.params = { |
|
|
|
|
|
workstationCode:row.workstationCode |
|
|
|
|
|
} |
|
|
|
|
|
await selectTeamList() |
|
|
|
|
|
teamListRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
|
|
|
}else if(val == 'Equipment'){ |
|
|
|
|
|
selectEquipmentListTableData.params = { |
|
|
|
|
|
workstationCode:row.workstationCode |
|
|
|
|
|
} |
|
|
|
|
|
await selectEquipmentList() |
|
|
|
|
|
equipmentListRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
|
|
|
}else if(val == 'Process'){ |
|
|
|
|
|
selectProcessListTableData.params = { |
|
|
|
|
|
workstationCode:row.workstationCode |
|
|
|
|
|
} |
|
|
|
|
|
await selectProcessListList() |
|
|
|
|
|
processListRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
|
|
|
}else if(val == 'Production'){ |
|
|
|
|
|
selectProductionListTableData.params = { |
|
|
|
|
|
workstationCode:row.workstationCode |
|
|
|
|
|
} |
|
|
|
|
|
await selectProductionList() |
|
|
|
|
|
productionListRef.value.open('create', row, null,'viewDetail')//查看明细数据 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|