|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="[...SupplierinvoiceRequestMain.allSchemas.searchSchema,...SupplierinvoiceRequestDetail.allSchemas.searchSchema]" @search="searchList" @reset="searchList" /> |
|
|
|
<Search :schema="SupplierinvoiceRequestMain.allSchemas.searchSchema" @search="searchList" @reset="searchList" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
@ -12,7 +12,6 @@ |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="SupplierinvoiceRequestMain.allSchemas" |
|
|
|
:detailAllSchemas="SupplierinvoiceRequestDetail.allSchemas" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
@ -189,7 +188,7 @@ |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref([...SupplierinvoiceRequestMain.allSchemas.tableColumns,...SupplierinvoiceRequestDetail.allSchemas.tableMainColumns]) |
|
|
|
const tableColumns = ref(SupplierinvoiceRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
@ -228,7 +227,7 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => { |
|
|
|
const searchTableSuccessDetail = async (formField, searchField, val, formRef,searchTableFormModel)=>{ |
|
|
|
console.log('详情',formField, searchField, val, formRef,searchTableFormModel) |
|
|
|
let res = await SupplierinvoiceRequestDetailApi.createSupplierinvoiceRequestDetail({ |
|
|
|
masterId:searchTableFormModel.masterId, |
|
|
|
masterId:searchTableFormModel.id, |
|
|
|
subList:val |
|
|
|
}) |
|
|
|
detailRef.value.updateList() |
|
|
@ -272,7 +271,7 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea |
|
|
|
const Echo = [] |
|
|
|
|
|
|
|
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 findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1 |
|
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
|
return [] |
|
|
|
} |
|
|
|
return [ |
|
|
|
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' }), // 提交审批 |
|
|
@ -414,33 +409,33 @@ const handleImport = () => { |
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'mainPurPlanOpe') { // 打开 |
|
|
|
handleOpe(row.masterId) |
|
|
|
handleOpe(row.id) |
|
|
|
} else if (val == 'mainPurPlanClo') {// 关闭 |
|
|
|
handleClo(row.masterId) |
|
|
|
handleClo(row.id) |
|
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
|
handleSub(row.masterId) |
|
|
|
handleSub(row.id) |
|
|
|
} else if (val == 'purchase_mainPlanSub') { // 采购审批通过 |
|
|
|
handleApp(row.masterId) |
|
|
|
handleApp(row.id) |
|
|
|
} else if (val == 'purchase_mainPlanTur') { // 采购驳回按钮 |
|
|
|
resonSubmit(val, row) |
|
|
|
// handleTur(row.masterId) |
|
|
|
// handleTur(row.id) |
|
|
|
} else if (val == 'invoice_sent_out') { // 发票寄出确认 |
|
|
|
handleInvoiceSentOut(row.masterId) |
|
|
|
handleInvoiceSentOut(row.id) |
|
|
|
} else if(val == 'finance_mainPlanSub'){ // 财务审批通过 |
|
|
|
handleFinanceApp(row.masterId) |
|
|
|
handleFinanceApp(row.id) |
|
|
|
} else if(val == 'finance_mainPlanTur'){ //财务审批拒绝 |
|
|
|
resonSubmit(val, row) |
|
|
|
// handleFinaceTur(row.masterId) |
|
|
|
} else if (val == 'genRecords') { // 处理 |
|
|
|
genRecords(row.masterId) |
|
|
|
genRecords(row.id) |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.masterId) |
|
|
|
handleDelete(row.id) |
|
|
|
} else if( val == 'mian_print'){ // 打印 |
|
|
|
handleDocumentPrint(row.masterId) |
|
|
|
handleDocumentPrint(row.id) |
|
|
|
} 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 departmentCode = wsCache.get(CACHE_KEY.DEPT).find((account) => account.id == row.departmentCode)?.name |
|
|
|
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].hiddenUpload = Number(row.status)>=3 |
|
|
|
detailRef.value.openDetail(row, titleName, titleValue) |
|
|
@ -700,9 +695,9 @@ const handleImport = () => { |
|
|
|
}).then(({ value }) => { |
|
|
|
// 驳回原因 |
|
|
|
if (val == 'purchase_mainPlanTur') { // 采购驳回按钮 |
|
|
|
handleTur(row.masterId,value) |
|
|
|
handleTur(row.id,value) |
|
|
|
}else if(val == 'finance_mainPlanTur'){ //财务审批拒绝 |
|
|
|
handleFinaceTur(row.masterId,value) |
|
|
|
handleFinaceTur(row.id,value) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|