Browse Source

盘点模块--主子表合并--拆分

master_hella_20240701
wangyufei 5 months ago
parent
commit
6172933d83
  1. 9
      README.md
  2. 18
      src/views/wms/countManage/count/countJobMain/index.vue
  3. 34
      src/views/wms/countManage/count/countPlanMain/index.vue
  4. 11
      src/views/wms/countManage/count/countRecordMain/index.vue
  5. 34
      src/views/wms/countManage/count/countRequestMain/index.vue
  6. 12
      src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue
  7. 26
      src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

9
README.md

@ -110,7 +110,14 @@ const { tableObject, tableMethods } = useTable({
getListApi: “PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage”// 分页接口 getListApi: “PurchasereceiptRequestDetailApi.getPurchasereceiptRequestDetailPage”// 分页接口
}) })
5、ts文件配置: 5、搜索工作栏
<Search
:schema="[...CountPlanMain.allSchemas.searchSchema,...CountPlanDetail.allSchemas.searchSchema]"
@search="setSearchParams"
@reset="setSearchParams"
/>
6、ts文件配置:
hiddenInMain:true, //子表中数据不展示在主表 hiddenInMain:true, //子表中数据不展示在主表
sortTableDefault:1000, // 主页面中Table表中展示的排序位置:默认值999 ,最小值1,值越大越靠后,值越小越靠前 sortTableDefault:1000, // 主页面中Table表中展示的排序位置:默认值999 ,最小值1,值越大越靠后,值越小越靠前
sortSearchDefault:1000,// 搜素框中展示的排序位置,用法同sortTableDefault sortSearchDefault:1000,// 搜素框中展示的排序位置,用法同sortTableDefault

18
src/views/wms/countManage/count/countJobMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountJobMain.allSchemas.searchSchema,...CountJobDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountJobMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountJobMain.allSchemas" :allSchemas="CountJobMain.allSchemas"
:detailAllSchemas="CountJobDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -95,7 +94,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([...CountJobMain.allSchemas.tableColumns,...CountJobDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountJobMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -142,7 +141,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountJobDetailApi.getCountJobDetailPage // getListApi: CountJobMainApi.getCountJobMainPage //
}) })
// //
@ -193,10 +192,7 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // // defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), //
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), // defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1','2']),hasPermi:'wms:count-job-main:close'}), //
@ -230,13 +226,13 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainJobAba') { // } else if (val == 'mainJobAba') { //
console.log('列表-操作按钮事件-放弃') console.log('列表-操作按钮事件-放弃')
} else if (val == 'mainJobClo') { // } else if (val == 'mainJobClo') { //
handleClose(row.masterId) handleClose(row.id)
} else if (val == 'mainJobAcc') { // } else if (val == 'mainJobAcc') { //
console.log('列表-操作按钮事件-承接') console.log('列表-操作按钮事件-承接')
} else if (val == 'exportCountJob'){// } else if (val == 'exportCountJob'){//
handleExportCountJob(row.masterId,row.number) handleExportCountJob(row.id,row.number)
} else if( val == 'importCountJob'){ // } else if( val == 'importCountJob'){ //
handleImport(row.masterId) handleImport(row.id)
} }
} }

34
src/views/wms/countManage/count/countPlanMain/index.vue

@ -2,7 +2,7 @@
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="[...CountPlanMain.allSchemas.searchSchema,...CountPlanDetail.allSchemas.searchSchema]" :schema="CountPlanMain.allSchemas.searchSchema"
@search="setSearchParams" @search="setSearchParams"
@reset="setSearchParams" @reset="setSearchParams"
/> />
@ -16,7 +16,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountPlanMain.allSchemas" :allSchemas="CountPlanMain.allSchemas"
:detailAllSchemas="CountPlanDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -134,7 +133,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([...CountPlanMain.allSchemas.tableColumns,...CountPlanDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountPlanMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -180,7 +179,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountPlanDetailApi.getCountPlanDetailPage // getListApi: CountPlanMainApi.getCountPlanMainPage //
}) })
// //
@ -243,10 +242,7 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainListPlanOpeBtn({ defaultButtons.mainListPlanOpeBtn({
hide: isShowMainButton(row, ['5']), hide: isShowMainButton(row, ['5']),
@ -287,7 +283,7 @@ const butttondata = (row,$index) => {
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainPlanOpe') { // if (val == 'mainPlanOpe') { //
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.open(row.masterId).then(() => { CountPlanMainApi.open(row.id).then(() => {
message.success(t('打开成功')) message.success(t('打开成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -298,7 +294,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanClo') { // } else if (val == 'mainPlanClo') { //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.close(row.masterId).then(() => { CountPlanMainApi.close(row.id).then(() => {
message.success(t('关闭成功')) message.success(t('关闭成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -309,14 +305,14 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanSub') { // } else if (val == 'mainPlanSub') { //
await message.confirm(t('common.confirmSubmit')) await message.confirm(t('common.confirmSubmit'))
tableObject.loading = true tableObject.loading = true
await CountPlanMainApi.submit(row.masterId) await CountPlanMainApi.submit(row.id)
message.success(t('提交审批成功')) message.success(t('提交审批成功'))
tableObject.loading = false tableObject.loading = false
await getList() await getList()
} else if (val == 'mainPlanTur') { // } else if (val == 'mainPlanTur') { //
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.reject(row.masterId).then(() => { CountPlanMainApi.reject(row.id).then(() => {
message.success(t('驳回成功')) message.success(t('驳回成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -327,7 +323,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanApp') { // } else if (val == 'mainPlanApp') { //
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.agree(row.masterId).then(() => { CountPlanMainApi.agree(row.id).then(() => {
message.success(t('审批已通过')) message.success(t('审批已通过'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -338,7 +334,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanPub') { // } else if (val == 'mainPlanPub') { //
await message.confirm('确认要发布吗?') await message.confirm('确认要发布吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.publish(row.masterId).then(() => { CountPlanMainApi.publish(row.id).then(() => {
message.success(t('发布成功')) message.success(t('发布成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -349,7 +345,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanRes') { // } else if (val == 'mainPlanRes') { //
await message.confirm('确认要重置吗?') await message.confirm('确认要重置吗?')
tableObject.loading = true tableObject.loading = true
CountPlanMainApi.resetting(row.masterId).then(() => { CountPlanMainApi.resetting(row.id).then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -360,7 +356,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.masterId) handleDelete(row.id)
} }
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
@ -369,7 +365,7 @@ const openForm = async (type: string, row?: number) => {
tableData.value = [ tableData.value = [
{ {
type: '', type: '',
value: '' value: []
} }
] // ] //
formRef.value.open(type, row) formRef.value.open(type, row)
@ -497,7 +493,7 @@ CountPlanDetail.allSchemas.tableFormColumns.forEach((item) => {
const tableData = ref([ const tableData = ref([
{ {
type: '', type: '',
value: '' value: []
} }
]) ])
@ -506,7 +502,7 @@ const handleAddTable = () => {
// tableFormKeys.formType='' // tableFormKeys.formType=''
tableFormKeys = { tableFormKeys = {
type: '', type: '',
value: '' value: []
} }
tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys)))
} }

11
src/views/wms/countManage/count/countRecordMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountRecordMain.allSchemas.searchSchema,...CountRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountRecordMain.allSchemas" :allSchemas="CountRecordMain.allSchemas"
:detailAllSchemas="CountRecordDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -77,7 +76,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([...CountRecordMain.allSchemas.tableColumns,...CountRecordDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountRecordMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -85,7 +84,7 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountRecordDetailApi.getCountRecordDetailPage // getListApi: CountRecordMainApi.getCountRecordMainPage //
}) })
// //
@ -127,10 +126,6 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainCountAdjustRequesttBtn({ defaultButtons.mainCountAdjustRequesttBtn({
hasPermi: 'wms:count-record-main:generate' hasPermi: 'wms:count-record-main:generate'

34
src/views/wms/countManage/count/countRequestMain/index.vue

@ -2,7 +2,7 @@
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search <Search
:schema="[...CountRequestMain.allSchemas.searchSchema,...CountRequestDetail.allSchemas.searchSchema]" :schema="CountRequestMain.allSchemas.searchSchema"
@search="setSearchParams" @search="setSearchParams"
@reset="setSearchParams" @reset="setSearchParams"
/> />
@ -16,7 +16,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountRequestMain.allSchemas" :allSchemas="CountRequestMain.allSchemas"
:detailAllSchemas="CountRequestDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -125,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([...CountRequestMain.allSchemas.tableColumns,...CountRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -200,7 +199,7 @@ const searchTableSuccessCount = (formField, searchField, val, type,row,count) =>
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountRequestDetailApi.getCountRequestDetailPage // getListApi: CountRequestMainApi.getCountRequestMainPage //
}) })
// //
@ -285,10 +284,7 @@ const isShowGenerateMainButton = (row, val) => {
const searchTableRef = ref() const searchTableRef = ref()
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainListCloseBtn({hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),hasPermi: 'wms:count-request-main:close'}), // defaultButtons.mainListCloseBtn({hide: isShowMainButton(row, ['1', '2', '3', '4', '6']),hasPermi: 'wms:count-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide: isShowMainButton(row, ['5']),hasPermi: 'wms:count-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide: isShowMainButton(row, ['5']),hasPermi: 'wms:count-request-main:reAdd'}), //
@ -311,7 +307,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.close(row.masterId) CountRequestMainApi.close(row.id)
.then(() => { .then(() => {
message.success(t('关闭成功')) message.success(t('关闭成功'))
tableObject.loading = false tableObject.loading = false
@ -325,7 +321,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.reAdd(row.masterId) CountRequestMainApi.reAdd(row.id)
.then(() => { .then(() => {
message.success(t('添加成功')) message.success(t('添加成功'))
tableObject.loading = false tableObject.loading = false
@ -339,7 +335,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.submit(row.masterId) CountRequestMainApi.submit(row.id)
.then(() => { .then(() => {
message.success(t('提交审批成功')) message.success(t('提交审批成功'))
tableObject.loading = false tableObject.loading = false
@ -353,7 +349,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.refused(row.masterId) CountRequestMainApi.refused(row.id)
.then(() => { .then(() => {
message.success(t('驳回成功')) message.success(t('驳回成功'))
tableObject.loading = false tableObject.loading = false
@ -367,7 +363,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.agree(row.masterId) CountRequestMainApi.agree(row.id)
.then(() => { .then(() => {
message.success(t('审批已通过')) message.success(t('审批已通过'))
tableObject.loading = false tableObject.loading = false
@ -381,7 +377,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要处理吗?') await message.confirm('确认要处理吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.handle(row.masterId) CountRequestMainApi.handle(row.id)
.then(() => { .then(() => {
message.success(t('处理成功')) message.success(t('处理成功'))
tableObject.loading = false tableObject.loading = false
@ -403,7 +399,7 @@ const buttonTableClick = async (val, row) => {
label:3, label:3,
title:'选择' title:'选择'
}]) }])
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'reCount','',true,'',row,{masterId:row.masterId},'',radioList.value) searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'reCount','',true,'',row,{masterId:row.id},'',radioList.value)
} else if (val == 'mainSuperviseCount') { } else if (val == 'mainSuperviseCount') {
// //
const radioList = ref([{ const radioList = ref([{
@ -413,11 +409,11 @@ const buttonTableClick = async (val, row) => {
label:2, label:2,
title:'选择' title:'选择'
}]) }])
searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'superviseCount','',true,'',row,{masterId:row.masterId},'',radioList.value) searchTableRef.value.open('盘点申请明细',CountRequestDetail.allSchemas,CountRequestDetailApi.getCountRequestDetailPage,'superviseCount','',true,'',row,{masterId:row.id},'',radioList.value)
} else if (val == 'countAdjustRequest') { } else if (val == 'countAdjustRequest') {
// //
await message.confirm('确认要生成盘点调整申请吗?') await message.confirm('确认要生成盘点调整申请吗?')
CountRequestMainApi.generateCountadjustRequest(row.masterId) CountRequestMainApi.generateCountadjustRequest(row.id)
.then(() => { .then(() => {
message.success(t('已生成盘点调整申请')) message.success(t('已生成盘点调整申请'))
getList() getList()
@ -429,7 +425,7 @@ const buttonTableClick = async (val, row) => {
// //
await message.confirm('确认要解冻吗?') await message.confirm('确认要解冻吗?')
tableObject.loading = true tableObject.loading = true
CountRequestMainApi.thaw(row.masterId) CountRequestMainApi.thaw(row.id)
.then(() => { .then(() => {
message.success(t('解冻成功')) message.success(t('解冻成功'))
tableObject.loading = false tableObject.loading = false
@ -444,7 +440,7 @@ const buttonTableClick = async (val, row) => {
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { } else if (val == 'delete') {
// //
handleDelete(row.masterId) handleDelete(row.id)
} }
} }

12
src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountadjustRecordMain.allSchemas.searchSchema,...CountadjustRecordDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountadjustRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountadjustRecordMain.allSchemas" :allSchemas="CountadjustRecordMain.allSchemas"
:detailAllSchemas="CountadjustRecordDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -77,7 +76,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([...CountadjustRecordMain.allSchemas.tableColumns,...CountadjustRecordDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountadjustRecordMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -85,7 +84,7 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountadjustRecordDetailApi.getCountadjustRecordDetailPage // getListApi: CountadjustRecordMainApi.getCountadjustRecordMainPage //
}) })
// //
@ -127,10 +126,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [] return []
} }

26
src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...CountadjustRequestMain.allSchemas.searchSchema,...CountadjustRequestDetail.allSchemas.searchSchema]" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="CountadjustRequestMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="CountadjustRequestMain.allSchemas" :allSchemas="CountadjustRequestMain.allSchemas"
:detailAllSchemas="CountadjustRequestDetail.allSchemas"
/> />
<!-- 列表 --> <!-- 列表 -->
@ -97,7 +96,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([...CountadjustRequestMain.allSchemas.tableColumns,...CountadjustRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref(CountadjustRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -131,7 +130,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CountadjustRequestDetailApi.getCountadjustRequestDetailPage // getListApi: CountadjustRequestMainApi.getCountadjustRequestMainPage //
}) })
// //
@ -188,10 +187,7 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row,$index) => { const butttondata = (row,$index) => {
const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
if(findIndex>-1&&findIndex<$index){
return []
}
return [ return [
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), // defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:countadjust-request-main:close'}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), // defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:countadjust-request-main:reAdd'}), //
@ -206,7 +202,7 @@ const buttonTableClick = async (val, row) => {
if (val == 'mainClose') { // if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?') await message.confirm('确认要关闭吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.close(row.masterId).then(() => { CountadjustRequestMainApi.close(row.id).then(() => {
message.success(t('关闭成功')) message.success(t('关闭成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -217,7 +213,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainReAdd') { // } else if (val == 'mainReAdd') { //
await message.confirm('确认要重新添加吗?') await message.confirm('确认要重新添加吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.reAdd(row.masterId).then(() => { CountadjustRequestMainApi.reAdd(row.id).then(() => {
message.success(t('添加成功')) message.success(t('添加成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -228,7 +224,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainSubmit') { // } else if (val == 'mainSubmit') { //
await message.confirm('确认要提交审批吗?') await message.confirm('确认要提交审批吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.submit(row.masterId).then(() => { CountadjustRequestMainApi.submit(row.id).then(() => {
message.success(t('提交审批成功')) message.success(t('提交审批成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -239,7 +235,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainTurnDown') { // } else if (val == 'mainTurnDown') { //
await message.confirm('确认要驳回吗?') await message.confirm('确认要驳回吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.refused(row.masterId).then(() => { CountadjustRequestMainApi.refused(row.id).then(() => {
message.success(t('驳回成功')) message.success(t('驳回成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -250,7 +246,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainApprove') { // } else if (val == 'mainApprove') { //
await message.confirm('确认要审批通过吗?') await message.confirm('确认要审批通过吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.agree(row.masterId).then(() => { CountadjustRequestMainApi.agree(row.id).then(() => {
message.success(t('审批已通过')) message.success(t('审批已通过'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -261,7 +257,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainHandle') { // } else if (val == 'mainHandle') { //
await message.confirm('确认要处理吗?') await message.confirm('确认要处理吗?')
tableObject.loading = true tableObject.loading = true
CountadjustRequestMainApi.handle(row.masterId).then(() => { CountadjustRequestMainApi.handle(row.id).then(() => {
message.success(t('处理成功')) message.success(t('处理成功'))
tableObject.loading = false tableObject.loading = false
getList() getList()
@ -272,7 +268,7 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'edit') { // } else if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.masterId) handleDelete(row.id)
} }
} }

Loading…
Cancel
Save