|
|
|
|
@ -72,7 +72,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
|
|
|
|
<el-tab-pane label="所有" name="" />
|
|
|
|
|
|
|
|
|
|
<el-tab-pane label="制浆" name="zhijiang" />
|
|
|
|
|
<el-tab-pane label="成型" name="chengxing" />
|
|
|
|
|
<el-tab-pane label="烘干" name="honggan" />
|
|
|
|
|
@ -85,6 +85,7 @@
|
|
|
|
|
<el-tab-pane label="贴标" name="tiebiao" />
|
|
|
|
|
<el-tab-pane label="品印" name="pinyin" />
|
|
|
|
|
<el-tab-pane label="塑封" name="sufeng" />
|
|
|
|
|
<el-tab-pane label="所有" name="" />
|
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
@ -101,8 +102,8 @@
|
|
|
|
|
highlight-current-row
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column align="center" label="组织名称" prop="name" width="180px"/>
|
|
|
|
|
<!-- <el-table-column align="center" label="关联机台" prop="machineName" />-->
|
|
|
|
|
<el-table-column align="center" label="组织名称" prop="name" width="200px"/>
|
|
|
|
|
|
|
|
|
|
<el-table-column align="center" label="组织等级" prop="orgClass">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag v-if="notEmpty(scope.row.orgClass)" :type="DICT_TYPE.MES_ORG_CLASS" :value="scope.row.orgClass" />
|
|
|
|
|
@ -113,7 +114,7 @@
|
|
|
|
|
<dict-tag v-if="notEmpty(scope.row.orgType)" :type="DICT_TYPE.MES_ORG_TYPE" :value="scope.row.orgType" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column align="center" label="今日工人" prop="workerUserName" />
|
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="80">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
@ -121,7 +122,7 @@
|
|
|
|
|
v-hasPermi="['mes:organization:update']"
|
|
|
|
|
link
|
|
|
|
|
type="warning"
|
|
|
|
|
@click="openForm(scope.row.orgType, scope.row.id)"
|
|
|
|
|
@click="openForm(scope.row.orgType, scope.row.id,scope.row.name, scope.row.workerUserName)"
|
|
|
|
|
>
|
|
|
|
|
派工
|
|
|
|
|
</el-button>
|
|
|
|
|
@ -182,7 +183,7 @@ const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
loading.value = true
|
|
|
|
|
try {
|
|
|
|
|
const data = await OrganizationApi.getOrganizationList(queryParams)
|
|
|
|
|
const data = await OrganizationApi.getListOrgWorker(queryParams)
|
|
|
|
|
list.value = handleTree(data, 'id', 'parentId')
|
|
|
|
|
} finally {
|
|
|
|
|
loading.value = false
|
|
|
|
|
@ -229,10 +230,11 @@ const toggleExpandAll = async () => {
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
queryParams.orgType = 'chengxing'
|
|
|
|
|
await getList()
|
|
|
|
|
})
|
|
|
|
|
/** tab 切换 */
|
|
|
|
|
let activeName = ''
|
|
|
|
|
let activeName = 'chengxing'
|
|
|
|
|
const handleTabClick = (tab: TabsPaneContext) => {
|
|
|
|
|
queryParams.orgType = tab.paneName
|
|
|
|
|
handleQuery()
|
|
|
|
|
@ -252,7 +254,10 @@ const notEmpty = (str:string) => {
|
|
|
|
|
|
|
|
|
|
/** 派工操作 */
|
|
|
|
|
const formRef = ref()
|
|
|
|
|
const openForm = (type: string, id?: number) => {
|
|
|
|
|
const openForm =async (type: string, id?: number,orgName?:string,workerName?:string) => {
|
|
|
|
|
if(workerName != null && workerName.length > 0){
|
|
|
|
|
await message.confirm("工位:"+orgName+",今天已经派工,确定要重新派工吗?").then()
|
|
|
|
|
}
|
|
|
|
|
formRef.value.open(type, id)
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|