Browse Source

制品拆解---主子表合并

master_hella_20240701
yufei0306 7 months ago
parent
commit
66f73b3b60
  1. 15
      src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue
  2. 19
      src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue
  3. 33
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

15
src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductdismantleJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductdismantleJobMain.allSchemas.searchSchema,...ProductdismantleJobDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductdismantleJobMain.allSchemas"
:detailAllSchemas="ProductdismantleJobDetail.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>
@ -81,7 +82,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductdismantleJobMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductdismantleJobMain.allSchemas.tableColumns,...ProductdismantleJobDetail.allSchemas.tableMainColumns])
//
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 [
defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), //

19
src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductdismantleRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductdismantleRecordMain.allSchemas.searchSchema,...ProductdismantleRecordDetaila.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductdismantleRecordMain.allSchemas"
:detailAllSchemas="ProductdismantleRecordDetaila.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>
@ -101,7 +102,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductdismantleRecordMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductdismantleRecordMain.allSchemas.tableColumns,...ProductdismantleRecordDetaila.allSchemas.tableMainColumns])
// table
const buttondataTable = ref([{
@ -140,9 +141,9 @@ const tableFormButton = async (val , row) => {
bomModelVisible.value = true
DialogTitle.value = '物料代码【' + row.itemCode + '】——Bom信息'
detatableDataBom.params = {
masterId: row.id
masterId: row.masterId
}
rowId.value = row.id
rowId.value = row.masterId
await getDetailListBom()
}
}
@ -195,7 +196,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/productdismantle/productdismantleRequestMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductdismantleRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductdismantleRequestMain.allSchemas.searchSchema,...ProductdismantleRequestDetaila.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductdismantleRequestMain.allSchemas"
:detailAllSchemas="ProductdismantleRequestDetaila.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>
@ -117,7 +118,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductdismantleRequestMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductdismantleRequestMain.allSchemas.tableColumns,...ProductdismantleRequestDetaila.allSchemas.tableMainColumns])
// table
const buttondataTable = ref([{
@ -234,9 +235,9 @@ const tableFormButton = async (val , row) => {
detatableDataBom.params = {
itemCode: row.itemCode,
bomVersion: row.bomVersion,
masterId: row.id
masterId: row.masterId
}
rowId.value = row.id
rowId.value = row.masterId
detailQty.value = row.qty
await getDetailListBom()
}
@ -346,7 +347,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:productdismantle-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productdismantle-request-main:reAdd'}), //
@ -364,7 +369,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
tableObject.loading = true
ProductdismantleRequestMainApi.close(row.id).then(() => {
ProductdismantleRequestMainApi.close(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -375,7 +380,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
ProductdismantleRequestMainApi.reAdd(row.id).then(() => {
ProductdismantleRequestMainApi.reAdd(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -386,7 +391,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
ProductdismantleRequestMainApi.submit(row.id).then(() => {
ProductdismantleRequestMainApi.submit(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -397,7 +402,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?')
tableObject.loading = true
ProductdismantleRequestMainApi.refused(row.id).then(() => {
ProductdismantleRequestMainApi.refused(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -408,7 +413,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?')
tableObject.loading = true
ProductdismantleRequestMainApi.agree(row.id).then(() => {
ProductdismantleRequestMainApi.agree(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -419,7 +424,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
tableObject.loading = true
ProductdismantleRequestMainApi.handle(row.id).then(() => {
ProductdismantleRequestMainApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -430,7 +435,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
handleDelete(row.masterId)
}
}

Loading…
Cancel
Save