|
|
@@ -166,6 +166,7 @@
|
|
|
</template>
|
|
|
<template v-else-if="field.prop==='action'">
|
|
|
<el-button v-if="row.status===0" v-auth="'invoice.modify'" size="small" plain type="warning" @click="handleInvice(row)">开票</el-button>
|
|
|
+ <el-button v-if="row.status===0" v-auth="'invoice.modify'" size="small" plain type="danger" @click="handleCancelInvoice(row)">取消</el-button>
|
|
|
<el-button v-if="row.status===1" v-auth="'invoice.modify'" size="small" plain type="success" @click="previewInvoice(row)">查看</el-button>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
@@ -209,7 +210,9 @@ const pdfViewer = ref()
|
|
|
|
|
|
//定义变量
|
|
|
const state = reactive({
|
|
|
- formQuery: {},
|
|
|
+ formQuery: {
|
|
|
+ status:0
|
|
|
+ },
|
|
|
pageQuery: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -362,6 +365,18 @@ const handleTableSortChange = (column, prop, order) => {
|
|
|
// emit("on-sort-change", column)
|
|
|
}
|
|
|
|
|
|
+const handleCancelInvoice = (row:any) => {
|
|
|
+ Msg.confirm("请确认是否取消开票?").then(()=>{
|
|
|
+ $get(`/finance/cancelApplyInvoice/${row.id}`).then((res: any) => {
|
|
|
+ Msg.message("取消成功")
|
|
|
+ loadData(true)
|
|
|
+ }).catch(e => {
|
|
|
+ console.error(e)
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
//endregion
|
|
|
|