From ea44321752674bc97efb7bfa987c19121c3d6881 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期四, 16 一月 2025 17:16:50 +0800
Subject: [PATCH] 财务报销(未完成)
---
src/pages/reimbursement/approve.vue | 212 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 212 insertions(+), 0 deletions(-)
diff --git a/src/pages/reimbursement/approve.vue b/src/pages/reimbursement/approve.vue
new file mode 100644
index 0000000..b877350
--- /dev/null
+++ b/src/pages/reimbursement/approve.vue
@@ -0,0 +1,212 @@
+<template>
+ <view class="full-page ">
+ <view class="list">
+ <up-form labelPosition="left" :model="state.publicJob" ref="formRef" labelWidth='140rpx'>
+ <view class="content c-p-l-24 c-p-b-120">
+ <up-form-item label="鐢宠鏃ユ湡" prop="planStartTime" :borderBottom='false' ref="item1">
+ <up-input v-model="state.publicJob.planStartTime" border="none" placeholder="璇风偣鍑婚�夋嫨閮ㄩ棬"
+ readonly></up-input>
+ </up-form-item>
+ <up-form-item label="閮ㄩ棬" prop="departmentId" :borderBottom='false' ref="item1">
+ <up-input v-model="state.publicJob.depart.name" border="none" placeholder="璇风偣鍑婚�夋嫨閮ㄩ棬"
+ readonly></up-input>
+ </up-form-item>
+ <up-form-item label="濮撳悕" prop="name" :borderBottom='false' ref="item1">
+ <up-input v-model="state.publicJob.planPeople" border="none" placeholder="璇峰~鍐欏鍚�"
+ readonly></up-input>
+ </up-form-item>
+ <up-form-item label="璇风ず绫诲埆" prop="name" :borderBottom='false' ref="item1">
+ <up-input v-model="leibie" border="none" placeholder="璇峰~鍐欏鍚�" readonly></up-input>
+ </up-form-item>
+ <up-form-item label="閲戦" prop="planMoney" :borderBottom='false' ref="item1">
+ <up-input v-model="state.publicJob.planMoney" border="none" placeholder="璇峰~鍐欓噾棰�"
+ type="digit"></up-input>
+ </up-form-item>
+ <up-form-item label="绉戠洰" prop="rewardContent" :borderBottom='false' ref="item1">
+ <up-input v-model="state.publicJob.rewardContent" border="none" placeholder="璇风偣鍑婚�夋嫨绉戠洰"
+ readonly></up-input>
+ </up-form-item>
+ <up-form-item label="鎽樿" prop="planContent" :borderBottom='false' ref="item1">
+ <view class="c-p-b-20">
+ <up-textarea v-model="state.publicJob.planContent" border="none" readonly
+ placeholder="璇峰~鍐欐憳瑕�"></up-textarea>
+ </view>
+ </up-form-item>
+ <up-form-item label="鍙戠エ" prop="idCardFace" v-if='state.publicJob.houbufapiaoStatus!=="Wu"'>
+ <view class="" v-if="state.invoice&&state.invoice.length>0">
+ <image class="fui-upload__img" v-for="(item,index) in state.invoice"
+ :style="{width:200+'rpx',height:200+'rpx'}" :key="item.keyid" :src="item"
+ mode="aspectFill" @tap.stop="previewImage(index,'invoice')"></image>
+ </view>
+ <view class="" v-else>
+ 鏈笂浼犲彂绁�
+ </view>
+ </up-form-item>
+ <up-form-item label="闄勪欢" prop="idCardFace">
+ <view class="" v-if="state.file&&state.file.length>0">
+ <image class="fui-upload__img" v-for="(item,index) in state.file"
+ :style="{width:200+'rpx',height:200+'rpx'}" :key="item.keyid" :src="item"
+ mode="aspectFill" @tap.stop="previewImage(index)"></image>
+ </view>
+ <view class="" v-else>
+ 鏈笂浼犻檮浠�
+ </view>
+ </up-form-item>
+ </view>
+ </up-form>
+ </view>
+ <view class="tabbtns">
+ <view class="chuany-flex">
+ <up-button type='success' class="text-69" :text="'鎵瑰噯'" :loading='isLoading' :loadingText="'鎵瑰噯涓�'"
+ @click="saveOrder('Yes')"></up-button>
+ <up-button color='#fece01' class="text-69" :text="'涓嶆壒鍑�'" :loading='isLoading' :loadingText="'鎻愪氦涓�'"
+ @click="saveOrder('No')"></up-button>
+ </view>
+
+ </view>
+
+ </view>
+</template>
+
+<script setup>
+ import {
+ apiBaseUrl
+ } from '@/common/setting/constVarsHelper.js';
+ import {
+ ref,
+ reactive,
+ getCurrentInstance,
+ onMounted,
+ computed
+ } from 'vue';
+ import {
+ onLoad,
+ onShow,
+ onReady,
+ onHide
+ } from "@dcloudio/uni-app";
+ const {
+ $upload,
+ $api,
+ $util,
+ $db
+ } = getCurrentInstance().appContext.config.globalProperties
+ let role = ref()
+ let detailId = ref()
+ let leibie = '璐圭敤鎶ラ攢'
+ let state = reactive({
+ publicJob: {
+ departmentId: '', //閮ㄩ棬Id
+ departmentName: '',
+ depart: {},
+ name: '', //濮撳悕
+ rewardResult: '', //绉戠洰id
+ rewardContent: '', //绉戠洰鍚嶇О
+ planMoney: '', //閲戦
+ planContent: '', //鎽樿
+ houbufapiaoStatus: 'You', //鏈夋棤鍙戠エ
+ workPlanAttachments: [] //闄勪欢&鍙戠エ
+ },
+ invoice: [],
+ file: []
+ })
+ onLoad((options) => {
+ let data = $db.get('userInfo').userCompany
+ role.value = options.role
+ detailId.value = options.detailId
+ getRolePlaneList()
+ })
+
+ const formRef = ref(null);
+ onReady(() => {})
+ onShow(() => {})
+ onMounted(() => {
+
+
+ });
+ let isLoading = ref(false)
+ const previewImage = (index, val) => {
+ if (val === 'invoice') {
+ uni.previewImage({
+ current: state.invoice[index],
+ loop: true,
+ urls: state.invoice
+ })
+ } else {
+ uni.previewImage({
+ current: state.file[index],
+ loop: true,
+ urls: state.file
+ })
+ }
+
+ }
+ const getRolePlaneList = () => {
+ let getList = null
+ if (role.value == 'zhuGuan') {
+ getList = $api.zhuGuanGetPlanInfo
+ } else {
+ getList = $api.jingLiGetPlanInfo
+ }
+ getList(detailId.value).then(res => {
+ state.publicJob = res.data
+ state.publicJob.planStartTime = $util.formatDate(state.publicJob.planStartTime)
+ state.publicJob.workPlanAttachments.forEach(item => {
+ if (item.attachmentType == 1) {
+ state.invoice.push(item.planAttachment)
+ } else {
+ state.file.push(item.planAttachment)
+ }
+ })
+ })
+ }
+ const saveOrder = (approvalStatus) => {
+ isLoading.value = true
+ let functionOrder = null
+ if (role.value == 'zhuGuan') {
+ functionOrder = $api.ApprovalPlan
+ } else {
+ functionOrder = $api.BaoxiaoPlan
+ }
+ let obj = {
+ oA_WorkPlanId: state.publicJob.keyid,
+ approvalStatus
+ }
+ functionOrder(obj).then(res => {
+ if (res.code == 1) {
+ uni.navigateBack()
+ $util.showToast({
+ title: approvalStatus == 'Yes' ? '鎵瑰噯鎴愬姛锛�' : "涓嶆壒鍑嗘垚鍔燂紒",
+ icon: "success"
+ })
+ } else {
+ $util.showToast({
+ title: res.error
+ })
+ }
+ isLoading.value = false
+ })
+ }
+</script>
+
+<style>
+ .list {}
+
+ .u-button {
+ width: 280rpx !important;
+ margin: 0;
+ }
+
+ .content {
+ width: 100%;
+ box-sizing: border-box;
+ background-color: #fff;
+ }
+
+ .u-textarea {
+ padding: 0 !important;
+ }
+ .u-form-item__body {
+ padding: 5px 0 !important;
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.1