Browse Source

制品返修---主子表合并

master_hella_20240701
yufei0306 7 months ago
parent
commit
16d7c745e6
  1. 17
      src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue
  2. 33
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

17
src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductrepairRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductrepairRecordMain.allSchemas.searchSchema,...ProductrepairRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductrepairRecordMain.allSchemas"
:detailAllSchemas="ProductrepairRecordDetail.allSchemas"
/>
<!-- 列表 -->
@ -32,8 +33,8 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -104,7 +105,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductrepairRecordMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductrepairRecordMain.allSchemas.tableColumns,...ProductrepairRecordDetail.allSchemas.tableMainColumns])
// table
const buttondataTable = ref([{
@ -181,7 +182,7 @@ const tableFormButton = async (val , row) => {
bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.id
masterId: row.masterId
}
await getDetailListBom()
}
@ -234,7 +235,11 @@ const buttonBaseClick = (val, item) => {
}
// -
const butttondata = (row) => {
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
return []
}
return []
}

33
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductrepairRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductrepairRequestMain.allSchemas.searchSchema,...ProductrepairRequestDetaila.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductrepairRequestMain.allSchemas"
:detailAllSchemas="ProductrepairRequestDetaila.allSchemas"
/>
<!-- 列表 -->
@ -32,8 +33,8 @@
<span>{{ row.number }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
<template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -122,7 +123,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductrepairRequestMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductrepairRequestMain.allSchemas.tableColumns,...ProductrepairRequestDetaila.allSchemas.tableMainColumns])
// table
const buttondataTable = ref([{
@ -347,7 +348,11 @@ const isShowMainButton = (row,val) => {
}
// -
const butttondata = (row) => {
const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>0&&findIndex<$index){
return []
}
return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']), hasPermi:'wms:productrepair-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productrepair-request-main:reAdd'}), //
@ -364,26 +369,26 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭')
handleClose(row.id)
handleClose(row.masterId)
} else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id)
handleReAdd(row.masterId)
} else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id)
handleSubmit(row.masterId)
} else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回')
handleRefused(row.id)
handleRefused(row.masterId)
} else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id)
handleAgree(row.masterId)
} else if (val == 'mainHandle') { //
console.log('列表-操作按钮事件-处理')
handleHandle(row.id)
handleHandle(row.masterId)
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
handleDelete(row.masterId)
}
}
@ -669,10 +674,10 @@ const tableFormButton = async (val , row) => {
detatableDataBom.params = {
itemCode: row.itemCode,
bomVersion: row.bomVersion,
masterId: row.id
masterId: row.masterId
}
detailQty.value = row.qty
rowId.value = row.id
rowId.value = row.masterId
await getDetailListBom()
}
}

Loading…
Cancel
Save