Browse Source

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

master_hella_20240701
bjang03 8 months ago
parent
commit
74b032a34e
  1. 18
      src/views/mes/workstation/components/Detail.vue
  2. 44
      src/views/mes/workstation/index.vue
  3. 17
      src/views/mes/workstation/workstation.data.ts

18
src/views/mes/workstation/components/Detail.vue

@ -33,7 +33,7 @@
<TableHead <TableHead
v-if="!isBasic" v-if="!isBasic"
:HeadButttondata="HeadButttondata" :HeadButttondata="HeadButttondata"
:masterId="masterParmas.masterId" :code="masterParmas.code"
@button-base-click="buttonBaseClick" @button-base-click="buttonBaseClick"
:routeName="routeName" :routeName="routeName"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
@ -371,9 +371,9 @@ const change = (item, index) => {
// //
const masterParmas = ref({ const masterParmas = ref({
masterId: '', //id code: '', //id
number: '', // number: '', //
status: '' // status: '', //
}) })
// //
@ -395,11 +395,11 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
// //
if (!props.isBasic) { if (!props.isBasic) {
// id // id
masterParmas.value.masterId = row.id masterParmas.value.code = row.id
masterParmas.value.number = row.number masterParmas.value.number = row.number
masterParmas.value.status = row.status masterParmas.value.status = row.status
tableObjectRef.value.params = { tableObjectRef.value.params = {
masterId: row.id code: row.code
} }
await getList() await getList()
} }
@ -549,8 +549,8 @@ const buttonTableClick = async (val, row) => {
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
const openForm = async (type: string, row?: number) => { const openForm = async (type: string, row?: number) => {
formRef.value.open(type, row, masterParmas.value) // formRef.value.open(type, row, masterParmas.value)
emit('detailOpenForm', type, row) emit('detailOpenForm', type, masterParmas.value)
} }
// form // form
const submitForm = async (formType, data) => { const submitForm = async (formType, data) => {
@ -614,7 +614,7 @@ const searchFormClick = async (searchData) => {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
? searchData.filters ? searchData.filters
: [{ column: 'masterId', action: '==', value: masterParmas.value.masterId }] : [{ column: 'code', action: '==', value: masterParmas.value.code }]
} }
detailAllSchemasRef.value = props.detailAllSchemas detailAllSchemasRef.value = props.detailAllSchemas
tableObjectRef.value = tableObject tableObjectRef.value = tableObject
@ -668,7 +668,7 @@ watch(
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage // getListApi: props.apiPage //
}) })
tableObject.params.masterId = masterParmas.value.masterId tableObject.params.code = masterParmas.value.code
detailAllSchemasRef.value = props.detailAllSchemas detailAllSchemasRef.value = props.detailAllSchemas
if (props.tableObjectExtend) { if (props.tableObjectExtend) {
props.tableObjectExtend.forEach(item => { props.tableObjectExtend.forEach(item => {

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

@ -60,18 +60,19 @@
:tabs="TabsList" :tabs="TabsList"
:apiDelete=tabsDeleteApi :apiDelete=tabsDeleteApi
@changeTabs="changeTabs" @changeTabs="changeTabs"
@tableFormButton="tableFormButton"
:detailButtonIsShowAdd="true" :detailButtonIsShowAdd="true"
:detailButtonIsShowDelete="true" :detailButtonIsShowDelete="true"
:detailButtonIsShowEdit="false" :detailButtonIsShowEdit="false"
@detailOpenForm="detailOpenForm"
/> />
<!-- 记录子包装弹窗 --> <!-- 记录子包装弹窗 -->
<BasicForm <BasicForm
ref="teamListRef" ref="teamListRef"
@success="getList" @success="getList"
:tableAllSchemas="Team.allSchemas" :tableAllSchemas="Team.allSchemas"
:tableData="selectTeamListTableData.tableList" :tableData="WorkstationApi.checkTeamPageList"
:isBusiness="true" :isBusiness="true"
:isOpenSearchTable="true"
:isShowButton="false" :isShowButton="false"
:isShowReduceButton="false" :isShowReduceButton="false"
:isShowFooterButtton="false" :isShowFooterButtton="false"
@ -305,7 +306,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
// //
const detailAllSchemas = ref(Team.allSchemas) const detailAllSchemas = ref(Team.allSchemas)
const apiPage = ref(WorkstationApi.getTeamPage) const apiPage = ref(WorkstationApi.getTeamPage)
const tableKey = ref("workstationDetail"); const tableKey = ref("Team");
// tabs // tabs
const changeTabs = (data) =>{ const changeTabs = (data) =>{
tableKey.value = data.prop tableKey.value = data.prop
@ -327,16 +328,6 @@ const changeTabs = (data) =>{
tabsDeleteApi = WorkstationApi.deleteOperstepsRelation tabsDeleteApi = WorkstationApi.deleteOperstepsRelation
} }
} }
// const buttondataTable = ref([{
// label: '',
// name: 'viewParentPickingNumber',
// hide: false,
// type: 'primary',
// icon: '',
// color: '',
// hasPermi: '',
// link: true, //
// }])
const teamListRef = ref() const teamListRef = ref()
const { tableObject: selectTeamListTableData, tableMethods: selectTeamListTableMethods } = useTable({ const { tableObject: selectTeamListTableData, tableMethods: selectTeamListTableMethods } = useTable({
getListApi: WorkstationApi.checkTeamPageList getListApi: WorkstationApi.checkTeamPageList
@ -360,32 +351,31 @@ const { tableObject: selectOperstepsListTableData, tableMethods: OperstepsListTa
getListApi: WorkstationApi.checkOperstepsPageList getListApi: WorkstationApi.checkOperstepsPageList
}) })
const { getList:selectOperstepsList } = OperstepsListTableMethods const { getList:selectOperstepsList } = OperstepsListTableMethods
const detailOpenForm = async (type, params) => {
const tableFormButton = async (val , row) => { if (tableKey.value == 'Team') {
if(val == 'Team'){
selectTeamListTableData.params = { selectTeamListTableData.params = {
workstationCode:row.workstationCode workstationCode: params.code
} }
await selectTeamList() await selectTeamList()
teamListRef.value.open('create', row, null,'viewDetail')// teamListRef.value.open('viewDetail', params, null, 'viewDetail')//
}else if(val == 'Equipment'){ } else if (tableKey.value == 'Equipment') {
selectEquipmentListTableData.params = { selectEquipmentListTableData.params = {
workstationCode:row.workstationCode workstationCode: params.code
} }
await selectEquipmentList() await selectEquipmentList()
equipmentListRef.value.open('create', row, null,'viewDetail')// equipmentListRef.value.open('viewDetail', params.code, null, 'viewDetail')//
}else if(val == 'Process'){ } else if (tableKey.value == 'Process') {
selectProcessListTableData.params = { selectProcessListTableData.params = {
workstationCode:row.workstationCode workstationCode: params.code
} }
await selectProcessListList() await selectProcessListList()
processListRef.value.open('create', row, null,'viewDetail')// processListRef.value.open('viewDetail', params.code, null, 'viewDetail')//
}else if(val == 'Production'){ } else if (tableKey.value == 'Production') {
selectOperstepsListTableData.params = { selectOperstepsListTableData.params = {
workstationCode:row.workstationCode workstationCode: params.code
} }
await selectOperstepsList() await selectOperstepsList()
operstepsListRef.value.open('create', row, null,'viewDetail')// operstepsListRef.value.open('viewDetail', params.code, null, 'viewDetail')//
} }
} }
</script> </script>

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

@ -131,22 +131,7 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
isTableForm:true, isTableForm:true,
} }
])) ]))
export const TeamSelect = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '代码',
field: 'code',
sort: 'custom',
isSearch: true,
isForm: false
},
{
label: '名称',
field: 'name',
sort: 'custom',
isSearch: true,
isForm: false
}
]))
export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([ export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '代码', label: '代码',

Loading…
Cancel
Save