Browse Source

制品上架---主子表合并

master_hella_20240701
yufei0306 7 months ago
parent
commit
428a5cf537
  1. 21
      src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue
  2. 15
      src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue
  3. 29
      src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue

21
src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductputawayJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductputawayJobMain.allSchemas.searchSchema,...ProductputawayJobDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductputawayJobMain.allSchemas"
:detailAllSchemas="ProductputawayJobDetail.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(ProductputawayJobMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductputawayJobMain.allSchemas.tableColumns,...ProductputawayJobDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
@ -149,7 +150,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'])}), //
@ -231,11 +236,11 @@ const buttonTableClick = async (val, row) => {
}
ProductputawayJobMainApi.executeProductputawayMain(aaa)
} else if (val == 'mainJobAba') { //
ProductputawayJobMainApi.abandonProductputawayMain(row.id)
ProductputawayJobMainApi.abandonProductputawayMain(row.masterId)
} else if (val == 'mainJobClo') { //
ProductputawayJobMainApi.closeProductputawayMain(row.id)
ProductputawayJobMainApi.closeProductputawayMain(row.masterId)
} else if (val == 'mainJobAcc') { //
ProductputawayJobMainApi.acceptProductputawayMain(row.id)
ProductputawayJobMainApi.acceptProductputawayMain(row.masterId)
}
}
//

15
src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductputawayRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductputawayRecordMain.allSchemas.searchSchema,...ProductputawayRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductputawayRecordMain.allSchemas"
:detailAllSchemas="ProductputawayRecordDetail.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>
@ -76,7 +77,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductputawayRecordMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductputawayRecordMain.allSchemas.tableColumns,...ProductputawayRecordDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
@ -125,7 +126,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 []
}

29
src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue

@ -1,7 +1,7 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="ProductputawayRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
<Search :schema="[...ProductputawayRequestMain.allSchemas.searchSchema,...ProductputawayRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
@ -12,6 +12,7 @@
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="ProductputawayRequestMain.allSchemas"
:detailAllSchemas="ProductputawayRequestDetail.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>
@ -93,7 +94,7 @@ const { t } = useI18n() // 国际化
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(ProductputawayRequestMain.allSchemas.tableColumns)
const tableColumns = ref([...ProductputawayRequestMain.allSchemas.tableColumns,...ProductputawayRequestDetail.allSchemas.tableMainColumns])
//
const updataTableColumns = (val) => {
@ -196,7 +197,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:productputaway-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']), hasPermi:'wms:productputaway-request-main:reAdd'}), //
@ -213,7 +218,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
tableObject.loading = true
ProductputawayRequestMainApi.close(row.id).then(() => {
ProductputawayRequestMainApi.close(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -224,7 +229,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?')
tableObject.loading = true
ProductputawayRequestMainApi.reAdd(row.id).then(() => {
ProductputawayRequestMainApi.reAdd(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -235,7 +240,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
ProductputawayRequestMainApi.submit(row.id).then(() => {
ProductputawayRequestMainApi.submit(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -246,7 +251,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?')
tableObject.loading = true
ProductputawayRequestMainApi.refused(row.id).then(() => {
ProductputawayRequestMainApi.refused(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -257,7 +262,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?')
tableObject.loading = true
ProductputawayRequestMainApi.agree(row.id).then(() => {
ProductputawayRequestMainApi.agree(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -268,7 +273,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?')
tableObject.loading = true
ProductputawayRequestMainApi.handle(row.id).then(() => {
ProductputawayRequestMainApi.handle(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -279,7 +284,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