|
|
@ -12,72 +12,109 @@ |
|
|
|
{{ titleValueRef }} <span class="ml-20px font-size-16px">{{ titleNameRef }}</span> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 默认单表展现 --> |
|
|
|
<ContentWrap v-if="!isBasic"> |
|
|
|
<Descriptions |
|
|
|
:data="detailData" |
|
|
|
labelClassName="label-class-name" |
|
|
|
label-align="left" |
|
|
|
direction="vertical" |
|
|
|
:column="8" |
|
|
|
:schema="allSchemas.detailSchema" |
|
|
|
:columns="2" |
|
|
|
width="200px" |
|
|
|
/> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<Tabs :tabsList="TabsList" :current="current" @change="change" /> |
|
|
|
<Tabs :tabsList="tabsList" :current="current" @change="change" /> |
|
|
|
<div class="flex"> |
|
|
|
<!-- 详情 --> |
|
|
|
<ContentWrap class="w-[100%]"> |
|
|
|
<ContentWrap class="w-[73%]"> |
|
|
|
<!-- 列表头部 --> |
|
|
|
<TableHead |
|
|
|
v-if="!isBasic" |
|
|
|
:HeadButttondata="HeadButttondata" |
|
|
|
:masterId="masterParmas.masterId" |
|
|
|
@button-base-click="buttonBaseClick" |
|
|
|
:routeName="routeName" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="detailAllSchemas" |
|
|
|
/> |
|
|
|
<!-- 默认单表展现 --> |
|
|
|
<Descriptions |
|
|
|
v-if="isBasic && !tabsExtend" |
|
|
|
:data="detailData" |
|
|
|
:schema="allSchemas.detailSchema" |
|
|
|
:columns="2" |
|
|
|
/> |
|
|
|
<!-- 单表切换tabs 展现table --> |
|
|
|
<Table |
|
|
|
v-if="isBasic && tabsExtend" |
|
|
|
:columns="teamSchemasRef.tableColumns" |
|
|
|
:data="teamObjectRef.tableList" |
|
|
|
:loading="teamObjectRef.loading" |
|
|
|
:pagination="{ total: teamObjectRef.total }" |
|
|
|
v-model:pageSize="teamObjectRef.pageSize" |
|
|
|
v-model:currentPage="teamObjectRef.currentPage" |
|
|
|
:columns="detailAllSchemasRef.tableColumns" |
|
|
|
:data="tableObjectRef.tableList" |
|
|
|
:loading="tableObjectRef.loading" |
|
|
|
:pagination="{ total: tableObjectRef.total }" |
|
|
|
v-model:pageSize="tableObjectRef.pageSize" |
|
|
|
v-model:currentPage="tableObjectRef.currentPage" |
|
|
|
> |
|
|
|
<template> |
|
|
|
<div>1</div> |
|
|
|
</template> |
|
|
|
<!-- <template #action="{ row }"> |
|
|
|
<ButtonBase |
|
|
|
:Butttondata="buttondata" |
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
/> |
|
|
|
</template> --> |
|
|
|
</Table> |
|
|
|
<Table |
|
|
|
v-if="!isBasic && fromeWhere != 'Equipment'" |
|
|
|
:columns="teamSchemasRef.tableColumns" |
|
|
|
:data="teamObjectRef.tableList" |
|
|
|
:loading="teamObjectRef.loading" |
|
|
|
:pagination="{ total: teamObjectRef.total }" |
|
|
|
v-model:pageSize="teamObjectRef.pageSize" |
|
|
|
v-model:currentPage="teamObjectRef.currentPage" |
|
|
|
v-if="!isBasic && fromeWhere != 'countPlan'" |
|
|
|
:columns="detailAllSchemasRef.tableColumns" |
|
|
|
:data="tableObjectRef.tableList" |
|
|
|
:loading="tableObjectRef.loading" |
|
|
|
:pagination="{ total: tableObjectRef.total }" |
|
|
|
v-model:pageSize="tableObjectRef.pageSize" |
|
|
|
v-model:currentPage="tableObjectRef.currentPage" |
|
|
|
> |
|
|
|
<template> |
|
|
|
<div>1</div> |
|
|
|
<template #photos="{ row }"> |
|
|
|
<div v-for="(item,index) in row.photos.split(',')" :key="index" style="color:#409eff ; cursor: pointer;" @click="openImage(item)">{{ item }}</div> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
<Table |
|
|
|
v-if="!isBasic && fromeWhere != 'Process'" |
|
|
|
:columns="teamSchemasRef.tableColumns" |
|
|
|
:data="teamObjectRef.tableList" |
|
|
|
:loading="teamObjectRef.loading" |
|
|
|
:pagination="{ total: teamObjectRef.total }" |
|
|
|
v-model:pageSize="teamObjectRef.pageSize" |
|
|
|
v-model:currentPage="teamObjectRef.currentPage" |
|
|
|
> |
|
|
|
<template> |
|
|
|
<div>1</div> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase |
|
|
|
:Butttondata="buttondata" |
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</Table> |
|
|
|
<DetailTable |
|
|
|
v-if="!isBasic && fromeWhere == 'Production' && isShowDrawer" |
|
|
|
:columns="teamSchemasRef.tableColumns" |
|
|
|
:data="teamObjectRef.tableList" |
|
|
|
v-if="!isBasic && fromeWhere == 'countPlan' && isShowDrawer" |
|
|
|
:columns="detailAllSchemasRef.tableColumns" |
|
|
|
:data="tableObjectRef.tableList" |
|
|
|
:allList="allList" |
|
|
|
:countScopeType="countScopeType" |
|
|
|
:key="updateKey" |
|
|
|
> |
|
|
|
<template> |
|
|
|
<div>1</div> |
|
|
|
<template #action="{ row }"> |
|
|
|
<ButtonBase |
|
|
|
:Butttondata="buttondata" |
|
|
|
@button-base-click="buttonTableClick($event, row)" |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</DetailTable> |
|
|
|
</ContentWrap> |
|
|
|
<ContentWrap class="w-[27%] ml-16px"> |
|
|
|
<!-- 附件组件 --> |
|
|
|
<Annex |
|
|
|
:annexData="annexData" |
|
|
|
@handleAnnexSuccess="handleAnnexSuccess" |
|
|
|
@deleteAnnexSuccess="deleteAnnexSuccess" |
|
|
|
:upData="remarksData.data" |
|
|
|
/> |
|
|
|
<!-- 备注组件 --> |
|
|
|
<Remarks |
|
|
|
:remarksData="remarksData" |
|
|
|
class="mt-20px" |
|
|
|
@remarksSubmitScuess="remarksSubmitScuess" |
|
|
|
/> |
|
|
|
<!-- 变更记录组件 --> |
|
|
|
<ChangeRecord :changeRecordData="changeRecordData" class="mt-20px" /> |
|
|
|
</ContentWrap> |
|
|
|
</div> |
|
|
|
</el-drawer> |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
@ -105,19 +142,16 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
import Annex from '@/components/Annex/src/Annex.vue' |
|
|
|
import Remarks from '@/components/Remarks/src/Remarks.vue' |
|
|
|
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue' |
|
|
|
import Tabs from '@/components/Tabs/src/Tabs.vue' |
|
|
|
import * as RemarkApi from '@/api/wms/remark' |
|
|
|
import * as FileApi from '@/api/wms/file' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import Detail from "@/components/workstationBind/src/Detail.vue"; |
|
|
|
import {TabsList} from "@/views/mes/workstation/workstation.data"; |
|
|
|
import DetailTable from "@/components/DetailTable/src/DetailTable.vue"; |
|
|
|
import Tabs from "@/components/Tabs/src/Tabs.vue"; |
|
|
|
import Annex from "@/components/Annex/src/Annex.vue"; |
|
|
|
import Remarks from "@/components/Remarks/src/Remarks.vue"; |
|
|
|
import BasicForm from "@/components/BasicForm/src/BasicForm.vue"; |
|
|
|
import TableHead from "@/components/TableHead/src/TableHead.vue"; |
|
|
|
import ChangeRecord from "@/components/ChangeRecord/src/ChangeRecord.vue"; |
|
|
|
import {Team} from "@/utils/disposition/formFields"; |
|
|
|
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' |
|
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' |
|
|
|
|
|
|
|
defineOptions({ name: 'Detail' }) |
|
|
|
|
|
|
@ -143,12 +177,6 @@ const props = defineProps({ |
|
|
|
required: false, |
|
|
|
default: false |
|
|
|
}, |
|
|
|
// 列表 相关信息 |
|
|
|
tableAllSchemas: { |
|
|
|
type: Array, |
|
|
|
required: true, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
// 表单,列表 相关信息 |
|
|
|
allSchemas: { |
|
|
|
type: Object, |
|
|
@ -270,11 +298,6 @@ const props = defineProps({ |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: true |
|
|
|
}, |
|
|
|
teamSchemas:{ |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: true |
|
|
|
} |
|
|
|
}) |
|
|
|
const isShowDrawer = ref(false) |
|
|
@ -374,7 +397,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
masterParmas.value.masterId = row.id |
|
|
|
masterParmas.value.number = row.number |
|
|
|
masterParmas.value.status = row.status |
|
|
|
teamObjectRef.value.params = { |
|
|
|
tableObjectRef.value.params = { |
|
|
|
masterId: row.id |
|
|
|
} |
|
|
|
await getList() |
|
|
@ -439,10 +462,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
} |
|
|
|
} |
|
|
|
defineExpose({ openDetail, formRef }) // 提供 open 方法,用于打开弹窗 |
|
|
|
// tabs 切换事件 |
|
|
|
const changeTabs = (item) => { |
|
|
|
alert(item.value) |
|
|
|
} |
|
|
|
|
|
|
|
// 获取备注列表 |
|
|
|
const getRemarkList = async () => { |
|
|
|
detailLoading.value = true |
|
|
@ -462,19 +482,18 @@ const remarksSubmitScuess = async (remark) => { |
|
|
|
const getChangeRecordList = async () => { |
|
|
|
changeRecordData.changeRecordList = await RemarkApi.getChangeRecordPage(remarksData.data) |
|
|
|
} |
|
|
|
|
|
|
|
const tableObjectRef = ref() |
|
|
|
const tableMethodsRef = ref() |
|
|
|
const detailAllSchemasRef = ref() |
|
|
|
detailAllSchemasRef.value = props.detailAllSchemas |
|
|
|
const teamObjectRef = ref() |
|
|
|
const teamMethodsRef = ref() |
|
|
|
const teamSchemasRef = ref() |
|
|
|
|
|
|
|
const { tableObject, tableMethods } = useTable({ |
|
|
|
getListApi: props.apiPage // 分页接口 |
|
|
|
}) |
|
|
|
|
|
|
|
teamObjectRef.value = tableObject |
|
|
|
teamMethodsRef.value = tableMethods |
|
|
|
teamSchemasRef.value = props.teamSchemas |
|
|
|
tableObjectRef.value = tableObject |
|
|
|
tableMethodsRef.value = tableMethods |
|
|
|
detailAllSchemasRef.value = props.detailAllSchemas |
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row, val) => { |
|
|
@ -486,8 +505,29 @@ const isShowMainButton = (row, val) => { |
|
|
|
} |
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
|
const { getList } = teamMethodsRef.value |
|
|
|
const { getList } = tableMethodsRef.value |
|
|
|
|
|
|
|
// 头部按钮事件 |
|
|
|
const buttonBaseClick = (val, item) => { |
|
|
|
if (val == 'add') { |
|
|
|
// 新增 |
|
|
|
openForm('create') |
|
|
|
} else if (val == 'import') { |
|
|
|
// 导入 |
|
|
|
handleImport() |
|
|
|
} else if (val == 'export') { |
|
|
|
// 导出 |
|
|
|
handleExport() |
|
|
|
} else if (val == 'refresh') { |
|
|
|
// 刷新 |
|
|
|
getList() |
|
|
|
} else if (val == 'filtrate') { |
|
|
|
// 筛选 |
|
|
|
} else { |
|
|
|
// 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
// const updataTableColumns = (val) => { |
|
|
@ -576,9 +616,9 @@ const searchFormClick = async (searchData) => { |
|
|
|
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] |
|
|
|
} |
|
|
|
detailAllSchemasRef.value = props.detailAllSchemas |
|
|
|
teamObjectRef.value = tableObject |
|
|
|
teamMethodsRef.value = tableMethods |
|
|
|
teamObjectRef.value.tableList = [] |
|
|
|
tableObjectRef.value = tableObject |
|
|
|
tableMethodsRef.value = tableMethods |
|
|
|
tableObjectRef.value.tableList = [] |
|
|
|
const { getList } = tableMethods |
|
|
|
await getList() |
|
|
|
updateKey.value += 1 |
|
|
@ -603,7 +643,7 @@ const openImage=(item)=>{ |
|
|
|
* @param field 当前操作字段 |
|
|
|
* @param cur 改变后值 |
|
|
|
*/ |
|
|
|
const detailBasicFormOnChange = (field, cur) => { |
|
|
|
const detailBasicFormOnChange = (field, cur) => { |
|
|
|
emit('detailBasicFormOnChange', field, cur) |
|
|
|
} |
|
|
|
|
|
|
@ -612,7 +652,7 @@ const detailBasicFormOnChange = (field, cur) => { |
|
|
|
* @param field 当前操作字段 |
|
|
|
* @param e |
|
|
|
*/ |
|
|
|
const onBlur = (field, e) => { |
|
|
|
const onBlur = (field, e) => { |
|
|
|
emit('onBlur', field, e) |
|
|
|
} |
|
|
|
|
|
|
@ -634,8 +674,8 @@ watch( |
|
|
|
tableObject.params[item.key] = item.value |
|
|
|
}) |
|
|
|
} |
|
|
|
teamObjectRef.value = tableObject |
|
|
|
teamMethodsRef.value = tableMethods |
|
|
|
tableObjectRef.value = tableObject |
|
|
|
tableMethodsRef.value = tableMethods |
|
|
|
const { getList } = tableMethods |
|
|
|
getList() |
|
|
|
} |
|
|
|