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

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

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

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

@ -131,22 +131,7 @@ export const Team = useCrudSchemas(reactive<CrudSchema[]>([
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[]>([
{
label: '代码',

Loading…
Cancel
Save