Browse Source

主子表拆分

master_hella_20240701
wangyufei 5 months ago
parent
commit
c4843eeb18
  1. 41
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

41
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -1,7 +1,7 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="[...SupplierinvoiceRequestMain.allSchemas.searchSchema,...SupplierinvoiceRequestDetail.allSchemas.searchSchema]" @search="searchList" @reset="searchList" /> <Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="searchList" @reset="searchList" />
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -12,7 +12,6 @@
@updataTableColumns="updataTableColumns" @updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="SupplierinvoiceRequestMain.allSchemas" :allSchemas="SupplierinvoiceRequestMain.allSchemas"
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas"
/> />
@ -189,7 +188,7 @@
const route = useRoute() // const route = useRoute() //
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref([...SupplierinvoiceRequestMain.allSchemas.tableColumns,...SupplierinvoiceRequestDetail.allSchemas.tableMainColumns]) const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns)
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
@ -228,7 +227,7 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => {
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{ const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{
console.log('详情',formField, searchField, val, formRef,searchTableFormModel) console.log('详情',formField, searchField, val, formRef,searchTableFormModel)
let res = await SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail({ let res = await SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail({
masterId:searchTableFormModel.masterId, masterId:searchTableFormModel.id,
subList:val subList:val
}) })
detailRef.value.updateList() detailRef.value.updateList()
@ -272,7 +271,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
const Echo = [] const Echo = []
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: SupplierinvoiceRequestDetailApi.getSupplierinvoiceRequestDetailPage // getListApi: SupplierinvoiceRequestMainApi.getSupplierinvoiceRequestMainPage //
}) })
// //
@ -329,10 +328,6 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea
// - // -
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.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['9']) ,hasPermi: 'wms:supplierinvoice-request-main:open'}), // defaultButtons.mainListPurchasePlanOpeBtn({ hide: isShowMainButton(row, ['9']) ,hasPermi: 'wms:supplierinvoice-request-main:open'}), //
defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1','6']),hasPermi: 'wms:supplierinvoice-request-main:sub' }), // defaultButtons.mainListPlanSubBtn({ hide: isShowMainButton(row, ['1','6']),hasPermi: 'wms:supplierinvoice-request-main:sub' }), //
@ -414,33 +409,33 @@ const handleImport = () => {
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'mainPurPlanOpe') { // if (val == 'mainPurPlanOpe') { //
handleOpe(row.masterId) handleOpe(row.id)
} else if (val == 'mainPurPlanClo') {// } else if (val == 'mainPurPlanClo') {//
handleClo(row.masterId) handleClo(row.id)
} else if (val == 'mainPlanSub') { // } else if (val == 'mainPlanSub') { //
handleSub(row.masterId) handleSub(row.id)
} else if (val == 'purchase_mainPlanSub') { // } else if (val == 'purchase_mainPlanSub') { //
handleApp(row.masterId) handleApp(row.id)
} else if (val == 'purchase_mainPlanTur') { // } else if (val == 'purchase_mainPlanTur') { //
resonSubmit(val, row) resonSubmit(val, row)
// handleTur(row.masterId) // handleTur(row.id)
} else if (val == 'invoice_sent_out') { // } else if (val == 'invoice_sent_out') { //
handleInvoiceSentOut(row.masterId) handleInvoiceSentOut(row.id)
} else if(val == 'finance_mainPlanSub'){ // } else if(val == 'finance_mainPlanSub'){ //
handleFinanceApp(row.masterId) handleFinanceApp(row.id)
} else if(val == 'finance_mainPlanTur'){ // } else if(val == 'finance_mainPlanTur'){ //
resonSubmit(val, row) resonSubmit(val, row)
// handleFinaceTur(row.masterId) // handleFinaceTur(row.masterId)
} else if (val == 'genRecords') { // } else if (val == 'genRecords') { //
genRecords(row.masterId) genRecords(row.id)
} 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)
} else if( val == 'mian_print'){ // } else if( val == 'mian_print'){ //
handleDocumentPrint(row.masterId) handleDocumentPrint(row.id)
} else if( val == 'repeal'){ // } else if( val == 'repeal'){ //
handleRepeal(row.masterId) handleRepeal(row.id)
} }
} }
@ -519,7 +514,7 @@ const handleImport = () => {
const openDetail = (row : any, titleName : any, titleValue : any) => { const openDetail = (row : any, titleName : any, titleValue : any) => {
const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name const departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name
if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode)) if (departmentCode) row.departmentCode = JSON.parse(JSON.stringify(departmentCode))
clicKRowId.value = row.masterId clicKRowId.value = row.id
detailAnnexTable.value[0].hiddenDelete = Number(row.status)>=3 detailAnnexTable.value[0].hiddenDelete = Number(row.status)>=3
detailAnnexTable.value[0].hiddenUpload = Number(row.status)>=3 detailAnnexTable.value[0].hiddenUpload = Number(row.status)>=3
detailRef.value.openDetail(row, titleName, titleValue) detailRef.value.openDetail(row, titleName, titleValue)
@ -700,9 +695,9 @@ const handleImport = () => {
}).then(({ value }) => { }).then(({ value }) => {
//  // 
if (val == 'purchase_mainPlanTur') { // if (val == 'purchase_mainPlanTur') { //
handleTur(row.masterId,value) handleTur(row.id,value)
}else if(val == 'finance_mainPlanTur'){ // }else if(val == 'finance_mainPlanTur'){ //
handleFinaceTur(row.masterId,value) handleFinaceTur(row.id,value)
} }
}) })
.catch(() => { .catch(() => {

Loading…
Cancel
Save