({
queryForm: {},
@@ -152,6 +190,7 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, do
const resetQuery = () => {
// 清空搜索条件
queryRef.value?.resetFields()
+ state.queryForm.processStatus = ""
// 清空多选
selectObjs.value = []
getDataList()
@@ -168,6 +207,19 @@ const selectionChangHandle = (objs: { id: string }[]) => {
multiple.value = !objs.length
}
+onMounted(async () => {
+ const { data } = await getDicts("check_status")
+ data.unshift({ label: "全部", value: null })
+ data.push({ label: "未提交", value: 99 })
+ tabItems.value = data
+})
+
+// tab点击切换
+const handleClickTabItem = (e: any) => {
+ state.queryForm.processStatus = tabItems.value[e.index].value
+ getDataList()
+}
+
// 删除操作
const handleDelete = async (ids: string[]) => {
try {
@@ -199,4 +251,15 @@ const previewInvoice = async (row: any) => {
loading.value = false
}
}
+
+// 执行审批
+const deal = (row: any) => {
+ if (!row.processId) return useMessage().info("流程id不存在")
+ processDrawerRef.value.openProcessDrawer(row)
+}
+
+// 审批提交
+const taskSubmitEvent = () => {
+ getDataList()
+}
diff --git a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue
index c6e955c..b89846b 100644
--- a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue
+++ b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue
@@ -64,7 +64,6 @@
|
申请审批
- 盖章审批
保存
- 打印
+ 打印
-
-
-
@@ -138,7 +133,6 @@ import { formatDate } from "/@/utils/formatTime"
import { displayPrice } from "/@/utils/formatMoney"
import printJS from "print-js"
import { bindInvoice, invoiceBack, getObj, apply } from "/@/api/wallet/wallet-recharge-invoice"
-import ProcessDrawer from "/@/components/processDrawer/index.vue"
import { useDict } from "/@/hooks/dict"
interface ReceiptData {
@@ -153,8 +147,8 @@ interface ReceiptData {
remark: string
totalPriceCnStr: string
picUrl: string
+ stampPicUrl: string
processStatus: string | null
- processId: string | null
}
const emit = defineEmits(["refresh"])
@@ -164,7 +158,6 @@ let timer
const visible = ref(false)
const loading = ref(false)
const receiptRef = ref(null)
-const processDrawerRef = ref()
const deptOrUserInput = ref(null)
const isStamping = ref(false) // 盖章动画开关
const receiptData = ref({
@@ -179,8 +172,8 @@ const receiptData = ref({
payeeUser: "", // 开票人
remark: "", // 备注
picUrl: "", // 发票图片地址
+ stampPicUrl: "", // 盖过章的发票图片地址
processStatus: "", // 审批状态
- processId: "", // 流程实例id
})
const receiptDataItems = computed(() => {
try {
@@ -212,10 +205,6 @@ const handleClose = () => {
// 发票作废
const backInvoice = async () => {
- if (!receiptData.value.picUrl) {
- useMessage().error("请先盖章")
- return
- }
loading.value = true
try {
await invoiceBack({ id: receiptData.value.id })
@@ -317,7 +306,11 @@ const applyStamp = async () => {
if (!picUrl) return useMessage().success("图片上传失败")
const { code, msg } = await apply({ id: receiptData.value.id, picUrl })
- if (code == 0) return useMessage().success("申请成功")
+ if (code == 0) {
+ useMessage().success("申请成功")
+ emit("refresh")
+ return
+ }
useMessage().error(msg || "申请失败")
} catch (error) {
useMessage().error(error as string)
@@ -326,17 +319,6 @@ const applyStamp = async () => {
}
}
-// 执行审批
-const stampApproval = () => {
- if (!receiptData.value.processId) return useMessage().info("流程id不存在")
- processDrawerRef.value.openProcessDrawer(receiptData.value)
-}
-
-// 审批提交
-const taskSubmitEvent = () => {
- emit("refresh")
-}
-
// 打印
const handlePrint = async () => {
if (receiptRef.value) {
|