| | |
| | | |
| | | <template #menu="{ size, row, index }"> |
| | | <el-link class="link-btn" type="primary" v-if="row.status == 0 || row.status == 1" :underline="false" plain |
| | | :size="size" @click="handleSettle(row)" v-hasPermi="['cwgl:payableBillManagement:view']"> 结算 |
| | | :size="size" @click="handleSettle(row)" v-hasPermi="['cwgl:payableBillManagement:receivableBillSettlementDetail']"> 结算 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.status == 0 || row.status == 1" :underline="false" plain :size="size" @click="makeInvoice(row)" |
| | | v-hasPermi="['cwgl:payableBillManagement:invoice']"> 开票 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.status == 0 || row.status == 1" :underline="false" plain :size="size" @click="makeParticulars(row)" |
| | | v-hasPermi="['cwgl:payableBillManagement:amount']"> 开票明细 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" v-if="row.status == 0 || row.status == 1 || row.status == 3" |
| | | :underline="false" plain :size="size" @click="handleViewHistory(row)" |
| | | v-hasPermi="['cwgl:payableBillManagement:view']"> 结算明细 |
| | | v-hasPermi="['cwgl:payableBillManagement:list']"> 结算明细 |
| | | </el-link> |
| | | <el-link class="link-btn" type="primary" :underline="false" plain :size="size" @click="handleViewFeeDetail(row)" |
| | | v-hasPermi="['cwgl:payableBillManagement:view']"> 详情 |
| | |
| | | <BillSettlementHistory ref="historyRef" :type="activeType" /> |
| | | <NestedDetailDialog ref="feeDetailRef" :type="activeType" /> |
| | | <OperationLogModal ref="logModalRef" /> |
| | | <!-- 开票 --> |
| | | <makeOutInvoice ref="makeOutInvoiceRef" :type="makeType" :InvoiceDetails="InvoiceDetails" @success="makeOutInvoiceFresh" /> |
| | | |
| | | |
| | | </template> |
| | | |
| | | <script setup name="payableBillManagement" lang="ts"> |
| | | import { PayableBillManagementI,payableBillManagementVoid, addPayableBillManagement, delPayableBillManagement, exportPayableBillManagement, getPayableBillManagement, listPayableBillManagement, updatePayableBillManagement } from "@/api/cwgl/payableBillManagement"; |
| | | import { payableBillManagementInvoice,invoiceAmount,PayableBillManagementI,payableBillManagementVoid, addPayableBillManagement, delPayableBillManagement, exportPayableBillManagement, getPayableBillManagement, listPayableBillManagement, updatePayableBillManagement } from "@/api/cwgl/payableBillManagement"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import { listPayableInvoiceBusiness,} from "@/api/cwgl/payableInvoiceBusiness"; |
| | | |
| | | import { computed, reactive, ref, toRefs } from "vue"; |
| | | import { PagesInterface, PageQueryInterface } from "@/utils/globalInterface"; |
| | | import { usePagePlus } from "@/hooks/usePagePlus"; |
| | |
| | | import OperationLogModal from '@/components/OperationLogModal/index.vue'; |
| | | import BillSettlementHistory from '../../../components/BillSettlementHistory/index.vue'; |
| | | import NestedDetailDialog from '../../../components/NestedDetailDialog/index.vue'; |
| | | import makeOutInvoice from '@/components/makeOutInvoice/index.vue'; |
| | | |
| | | const { proxy } = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | |
| | | }) |
| | | |
| | | } |
| | | |
| | | /* 开票 */ |
| | | const makeOutInvoiceRef = ref() |
| | | const makeType = ref<'应付账单开票' | '应收账单开票'>('应付账单开票') |
| | | const InvoiceDetails = ref('') |
| | | |
| | | const makeInvoice =(row) =>{ |
| | | currentType.value = '应付账单开票' |
| | | InvoiceDetails.value = '本次开票信息' |
| | | ids.value = row.id |
| | | invoiceAmount(row.id).then((res)=>{ |
| | | if(res.code==200){ |
| | | row.invoicedAmount=res.data |
| | | makeOutInvoiceRef.value.open(row) |
| | | |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | const makeOutInvoiceFresh = (submitData: any) => { |
| | | payableBillManagementInvoice(submitData,submitData.id).then(res => { |
| | | if (res.code == 200) { |
| | | proxy.$modal.msgSuccess(res.msg); |
| | | makeOutInvoiceRef.value.openIshpw() |
| | | onLoad(page.value); // 刷新列表 |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | const makeParticulars =(row) =>{ |
| | | currentType.value = '应付账单开票记录' |
| | | InvoiceDetails.value = '开票明细' |
| | | ids.value = row.id |
| | | listPayableInvoiceBusiness({headId: row.id}).then((res) => { |
| | | if (res.code === 200) { |
| | | row.recordList=res.rows |
| | | makeOutInvoiceRef.value.open(row) |
| | | } |
| | | }) |
| | | } |
| | | </script> |