Browse Source

制品报废--主子表合并

master_hella_20240701
yufei0306 7 months ago
parent
commit
d235352254
  1. 15
      src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue
  2. 17
      src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue
  3. 33
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

15
src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="ProductscrapJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...ProductscrapJobMain.allSchemas.searchSchema,...ProductscrapJobDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="ProductscrapJobMain.allSchemas" :allSchemas="ProductscrapJobMain.allSchemas"
:detailAllSchemas="ProductscrapJobDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -32,8 +33,8 @@
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -81,7 +82,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(ProductscrapJobMain.allSchemas.tableColumns) const tableColumns = ref([...ProductscrapJobMain.allSchemas.tableColumns,...ProductscrapJobDetail.allSchemas.tableMainColumns])
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -178,7 +179,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 [ return [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //

17
src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue

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

33
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="ProductscrapRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="[...ProductscrapRequestMain.allSchemas.searchSchema,...ProductscrapRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="ProductscrapRequestMain.allSchemas" :allSchemas="ProductscrapRequestMain.allSchemas"
:detailAllSchemas="ProductscrapRequestDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -32,8 +33,8 @@
<span>{{ row.number }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row,$index }">
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row,$index)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -123,7 +124,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(ProductscrapRequestMain.allSchemas.tableColumns) const tableColumns = ref([...ProductscrapRequestMain.allSchemas.tableColumns,...ProductscrapRequestDetail.allSchemas.tableMainColumns])
// table // table
const buttondataTable = ref([{ const buttondataTable = ref([{
@ -274,9 +275,9 @@ const tableFormButton = async (val , row) => {
detatableDataBom.params = { detatableDataBom.params = {
itemCode: row.itemCode, itemCode: row.itemCode,
bomVersion: row.bomVersion, bomVersion: row.bomVersion,
masterId: row.id masterId: row.masterId
} }
rowId.value = row.id rowId.value = row.masterId
detailQty.value = row.qty detailQty.value = row.qty
await getDetailListBom() await getDetailListBom()
detailBomRef.value.open('create', row, null,'viewDetail')// detailBomRef.value.open('create', row, null,'viewDetail')//
@ -411,7 +412,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 [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:productscrap-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:productscrap-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:productscrap-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:productscrap-request-main:reAdd'}), //
@ -428,26 +433,26 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
console.log('列表-操作按钮事件-关闭') console.log('列表-操作按钮事件-关闭')
handleClose(row.id) handleClose(row.masterId)
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
console.log('列表-操作按钮事件-重新添加') console.log('列表-操作按钮事件-重新添加')
handleReAdd(row.id) handleReAdd(row.masterId)
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
console.log('列表-操作按钮事件-提交审批') console.log('列表-操作按钮事件-提交审批')
handleSubmit(row.id) handleSubmit(row.masterId)
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
console.log('列表-操作按钮事件-驳回') console.log('列表-操作按钮事件-驳回')
handleRefused(row.id) handleRefused(row.masterId)
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
console.log('列表-操作按钮事件-审批通过') console.log('列表-操作按钮事件-审批通过')
handleAgree(row.id) handleAgree(row.masterId)
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
console.log('列表-操作按钮事件-处理') console.log('列表-操作按钮事件-处理')
handleHandle(row.id) handleHandle(row.masterId)
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.masterId)
} }
} }

Loading…
Cancel
Save