浦江县行政事业单位食堂统一收款收据
@@ -117,9 +119,13 @@
作废
申请审批
+
盖章审批
保存
-
打印
+
打印
+
+
+
@@ -132,8 +138,8 @@ 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"
-
-const emit = defineEmits(["refresh"])
+import ProcessDrawer from "/@/components/processDrawer/index.vue"
+import { useDict } from "/@/hooks/dict"
interface ReceiptData {
id: string
@@ -148,13 +154,18 @@ interface ReceiptData {
totalPriceCnStr: string
picUrl: string
processStatus: string | null
+ processId: string | null
}
+const emit = defineEmits(["refresh"])
+
+const { check_status } = useDict("check_status")
const visible = ref(false)
const loading = ref(false)
-const receiptRef = ref
(null)
-const deptOrUserInput = ref(null)
let timer
+const receiptRef = ref(null)
+const processDrawerRef = ref()
+const deptOrUserInput = ref(null)
const isStamping = ref(false) // 盖章动画开关
const receiptData = ref({
id: "",
@@ -168,7 +179,8 @@ const receiptData = ref({
payeeUser: "", // 开票人
remark: "", // 备注
picUrl: "", // 发票图片地址
- processStatus: "",
+ processStatus: "", // 审批状态
+ processId: "", // 流程实例id
})
const applyId = ref()
const receiptDataItems = computed(() => {
@@ -311,9 +323,9 @@ const applyStamp = async () => {
const picUrl = await uploadImage(blob)
if (!picUrl) return useMessage().success("图片上传失败")
- const { code } = await apply({ id: receiptData.value.id, picUrl })
+ const { code, msg } = await apply({ id: receiptData.value.id, picUrl })
if (code == 0) return useMessage().success("申请成功")
- useMessage().error("申请失败")
+ useMessage().error(msg || "申请失败")
} catch (error) {
useMessage().error(error as string)
} finally {
@@ -321,6 +333,17 @@ const applyStamp = async () => {
}
}
+// 盖章执行审批
+const stampApproval = () => {
+ if (!receiptData.value.processId) return useMessage().info("流程id不存在")
+ processDrawerRef.value.openProcessDrawer(receiptData.value.processId)
+}
+
+// 审批提交
+const taskSubmitEvent = () => {
+ emit("refresh")
+}
+
// 打印
const handlePrint = async () => {
if (receiptRef.value) {