|
@ -69,24 +69,19 @@ |
|
|
@detailOpenForm="detailOpenForm" |
|
|
@detailOpenForm="detailOpenForm" |
|
|
/> |
|
|
/> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="teamListRef" |
|
|
ref="tmpPopListRef" |
|
|
:formAllSchemas="tmpPopList" |
|
|
:formAllSchemas="tmpPopList" |
|
|
:isBusiness="false" |
|
|
:isBusiness="false" |
|
|
/> |
|
|
/> |
|
|
<!-- 导入 --> |
|
|
|
|
|
<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 { |
|
|
import { |
|
|
Equipment, |
|
|
Equipment, |
|
|
Process, |
|
|
|
|
|
Opersteps, |
|
|
Opersteps, |
|
|
TabsList, |
|
|
TabsList, |
|
|
Team, |
|
|
|
|
|
Workstation, |
|
|
Workstation, |
|
|
WorkstationRules,equipmentPopList,processPopList,stepPopList |
|
|
WorkstationRules,equipmentPopList,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' |
|
@ -130,8 +125,8 @@ const { getList, setSearchParams } = tableMethods |
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:workstation:create'}), // 新增 |
|
|
defaultButtons.defaultAddBtn({hasPermi:'wms:workstation:create'}), // 新增 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:workstation:import'}), // 导入 |
|
|
// defaultButtons.defaultImportBtn({hasPermi:'wms:workstation:import'}), // 导入 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:workstation:export'}), // 导出 |
|
|
// defaultButtons.defaultExportBtn({hasPermi:'wms:workstation:export'}), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
@ -148,11 +143,7 @@ const HeadButttondata = [ |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'add') { // 新增 |
|
|
if (val == 'add') { // 新增 |
|
|
openForm('create') |
|
|
openForm('create') |
|
|
} else if (val == 'import') { // 导入 |
|
|
}else if (val == 'refresh') { // 刷新 |
|
|
handleImport() |
|
|
|
|
|
} else if (val == 'export') { // 导出 |
|
|
|
|
|
handleExport() |
|
|
|
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
|
|
|
getList() |
|
|
getList() |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else { // 其他按钮 |
|
|
} else { // 其他按钮 |
|
@ -218,37 +209,6 @@ const handleDelete = async (id: number) => { |
|
|
} catch {} |
|
|
} catch {} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
|
|
const handleExport = async () => { |
|
|
|
|
|
try { |
|
|
|
|
|
// 导出的二次确认 |
|
|
|
|
|
await message.exportConfirm() |
|
|
|
|
|
// 发起导出 |
|
|
|
|
|
exportLoading.value = true |
|
|
|
|
|
const data = await WorkstationApi.exportWorkstation(tableObject.params) |
|
|
|
|
|
download.excel(data, '工位.xlsx') |
|
|
|
|
|
} catch { |
|
|
|
|
|
} finally { |
|
|
|
|
|
exportLoading.value = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|
|
|
const importFormRef = ref() |
|
|
|
|
|
const handleImport = () => { |
|
|
|
|
|
importFormRef.value.open() |
|
|
|
|
|
} |
|
|
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
|
|
const importTemplateData = reactive({ |
|
|
|
|
|
templateUrl: '', |
|
|
|
|
|
templateTitle: '工位导入模版.xlsx' |
|
|
|
|
|
}) |
|
|
|
|
|
// 导入成功之后 |
|
|
|
|
|
const importSuccess = () => { |
|
|
|
|
|
getList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 筛选提交 |
|
|
// 筛选提交 |
|
|
const searchFormClick = (searchData) => { |
|
|
const searchFormClick = (searchData) => { |
|
|
tableObject.params = { |
|
|
tableObject.params = { |
|
@ -261,7 +221,6 @@ const searchFormClick = (searchData) => { |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|
importTemplateData.templateUrl = await WorkstationApi.importTemplate() |
|
|
|
|
|
}) |
|
|
}) |
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|
const detailRef = ref() |
|
|
const detailRef = ref() |
|
@ -270,7 +229,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') |
|
|
detailRef.value.openDetail(row, titleName, titleValue, 'basicWorkstation') |
|
|
} |
|
|
} |
|
|
// 子包装数据 |
|
|
// 子包装数据 |
|
|
const detailAllSchemas = ref(Team.allSchemas) |
|
|
const detailAllSchemas = ref(Equipment.allSchemas) |
|
|
const apiPage = ref(WorkstationApi.getEquipmentPage) |
|
|
const apiPage = ref(WorkstationApi.getEquipmentPage) |
|
|
const tableKey = ref("Team"); |
|
|
const tableKey = ref("Team"); |
|
|
let tmpPopList = equipmentPopList.allSchemas |
|
|
let tmpPopList = equipmentPopList.allSchemas |
|
@ -283,12 +242,6 @@ const changeTabs = (data) =>{ |
|
|
tabsDeleteApi = WorkstationApi.deleteEquipmentRelation |
|
|
tabsDeleteApi = WorkstationApi.deleteEquipmentRelation |
|
|
tabsCreateApi = WorkstationApi.createEquipmentRelation |
|
|
tabsCreateApi = WorkstationApi.createEquipmentRelation |
|
|
tmpPopList = equipmentPopList.allSchemas |
|
|
tmpPopList = equipmentPopList.allSchemas |
|
|
}else if(data.prop == 'Process'){ |
|
|
|
|
|
apiPage.value = WorkstationApi.getProcessPage |
|
|
|
|
|
detailAllSchemas.value = Process.allSchemas |
|
|
|
|
|
tabsDeleteApi = WorkstationApi.deleteProcessRelation |
|
|
|
|
|
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 |
|
@ -297,9 +250,9 @@ const changeTabs = (data) =>{ |
|
|
tmpPopList = stepPopList.allSchemas |
|
|
tmpPopList = stepPopList.allSchemas |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
const teamListRef = ref() |
|
|
const tmpPopListRef = ref() |
|
|
|
|
|
|
|
|
const detailOpenForm = async (type, params) => { |
|
|
const detailOpenForm = async (type, params) => { |
|
|
teamListRef.value.open('create', null, null, 'viewDetail')//查看明细数据 |
|
|
tmpPopListRef.value.open('create', null, null, 'viewDetail')//查看明细数据 |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|