From 2d43a1df3f5ba42710e6d21c27d1e13bdb8dfd56 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期一, 24 三月 2025 09:23:08 +0800
Subject: [PATCH] -
---
src/pages/reimbursement/payment.vue | 257 +++++++++++++++++++++++++++++++++++++++------------
1 files changed, 196 insertions(+), 61 deletions(-)
diff --git a/src/pages/reimbursement/payment.vue b/src/pages/reimbursement/payment.vue
index 6371490..263b25c 100644
--- a/src/pages/reimbursement/payment.vue
+++ b/src/pages/reimbursement/payment.vue
@@ -2,67 +2,101 @@
<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
+ <view class="c-p-b-134">
+ <view class="content c-p-l-24 c-p-b-24">
+ <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" readonly placeholder="璇峰~鍐欓噾棰�"
+ type="digit"></up-input>
+ </up-form-item>
+ <up-form-item label="绉戠洰" prop="rewardContent" required :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" required :borderBottom='false' ref="item1">
+ <!-- <view class="c-p-b-20"> -->
+ <up-textarea v-model="state.publicJob.planContent" border="none" autoHeight
placeholder="璇峰~鍐欐憳瑕�"></up-textarea>
+ <!-- </view> -->
+ </up-form-item>
+ <up-form-item label="鍙戠エ" prop="idCardFace" v-if='state.publicJob.houbufapiaoStatus!=="Wu"'>
+ <view class="fui-upload__wrap" v-if="state.invoice&&state.invoice.length>0">
+ <view class="fui-upload__item" v-for="(item,index) in state.invoice" :key="item.keyid">
+ <u-tag :text="item.match(/\/([^\/]*)$/)[1]" size="mini"
+ @click="$util.previewWechat(item)"
+ v-if="$util.checkFileExtensions(item)"></u-tag>
+ <image class="fui-upload__img" :style="{width:200+'rpx',height:200+'rpx'}" v-else
+ :src="item" mode="aspectFill" @tap.stop="previewImage(index,'invoice')"></image>
+ </view>
+ </view>
+ <view class="" v-else>
+ {{state.publicJob.houbufapiaoStatus=="Wu"?'鏃犲彂绁�':null}}
+ </view>
+ </up-form-item>
+ <up-form-item label="闄勪欢" prop="idCardFace">
+ <view class="fui-upload__wrap" v-if="state.file&&state.file.length>0">
+ <view class="fui-upload__item" v-for="(item,index) in state.file" :key="item.keyid">
+ <u-tag :text="item.match(/\/([^\/]*)$/)[1]" size="mini"
+ @click="$util.previewWechat(item)"
+ v-if="$util.checkFileExtensions(item)"></u-tag>
+ <image class="fui-upload__img" v-else :style="{width:200+'rpx',height:200+'rpx'}"
+ :src="item" mode="aspectFill" @tap.stop="previewImage(index)"></image>
+ </view>
+ </view>
+ <view class="" v-else>
+ 鏈笂浼犻檮浠�
+ </view>
+ </up-form-item>
+ <template>
+ <view v-for="(item,index) in state.publicJob.oaWorkPlanShenpis" :key="item.index"
+ class="chuany-flex c-p-t-20">
+ <view class="chuany-flex chuany-width36">
+ <u-text :text='item.approvalStaff.name'></u-text>
+ <u-text type="success" text="宸叉壒鍑�"></u-text>
+ </view>
+ <view class="chuany-width64">
+ <u-text :text='item.approvalContent'></u-text>
+ </view>
+ </view>
+ </template>
+ <template v-if="state.publicJob.evaluationStatus=='NotReimbursed'">
+ <up-form-item label="璐︽埛绫诲瀷" prop="firmAccountId" required :borderBottom='false' ref="item1"
+ @click='openzhanghuPickerType'>
+ <up-input v-model="state.publicJob.accountType" border="none" placeholder="璇风偣鍑婚�夋嫨璐︽埛绫诲瀷"
+ readonly></up-input>
+ </up-form-item>
+ <up-form-item label="璐︽埛" prop="firmAccountId" required :borderBottom='false' ref="item1"
+ @click='openzhanghuPicker'>
+ <up-input v-model="state.publicJob.firmAccountName" border="none" placeholder="璇风偣鍑婚�夋嫨璐︽埛"
+ readonly></up-input>
+ </up-form-item>
+ </template>
+
+ <view v-else class="c-p-t-20">
+ <u--text type="success" text="宸蹭粯娆�"></u--text>
</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>
- <up-form-item label="璐︽埛" prop="firmAccountId" required :borderBottom='false' ref="item1"
- @click='openzhanghuPicker'>
- <up-input v-model="state.publicJob.firmAccountName" border="none" placeholder="璇风偣鍑婚�夋嫨璐︽埛"
- readonly></up-input>
- </up-form-item>
+
+ </view>
</view>
</up-form>
</view>
- <view class="tabbtns">
+ <view class="tabbtns" v-if="state.publicJob.evaluationStatus=='NotReimbursed'">
<view class="chuany-flex">
- <up-button type='success' class="text-69" :text="'浠樻'" :loading='isLoading' :loadingText="'浠樻涓�'"
+ <up-button type='success' :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> -->
@@ -70,7 +104,14 @@
</view>
<u-picker :show="zhanghuPicker" :columns="zhanghuList" keyName="accountName" @cancel='openzhanghuPicker'
- :defaultIndex='defaultIndex' @confirm='confirmzhanghuPicker'></u-picker>
+ :defaultIndex='defaultIndexAccount' @confirm='confirmzhanghuPicker'></u-picker>
+
+ <u-picker :show="zhanghuPickerType" :columns="state.zhanghuListType" @cancel='openzhanghuPickerType'
+ @confirm='confirmzhanghuPickerType'></u-picker>
+
+ <u-picker :show="kemuPicker" :columns="kemuList" keyName="subjectName" @cancel='openKemuPicker'
+ :defaultIndex='defaultIndex' @confirm='confirmKemuPicker'></u-picker>
+
</view>
</template>
@@ -103,6 +144,12 @@
let leibie = '璐圭敤鎶ラ攢'
let zhanghuPicker = ref(false)
let zhanghuList = ref()
+ let allZhanghuList = ref()
+ let zhanghuPickerType = ref(false)
+ let kemuList = ref()
+ let kemuPicker = ref(false)
+ let defaultIndex = ref([0])
+ let defaultIndexAccount = ref([0])
let state = reactive({
publicJob: {
departmentId: '', //閮ㄩ棬Id
@@ -115,17 +162,34 @@
planContent: '', //鎽樿
houbufapiaoStatus: 'You', //鏈夋棤鍙戠エ
workPlanAttachments: [], //闄勪欢&鍙戠エ
- firmAccountId: ''
+ firmAccountId: '',
+ accountType: ''
},
invoice: [],
- file: []
+ file: [],
+ zhanghuListType: []
})
let rules = {
+ accountType: {
+ required: true,
+ message: '璐︽埛绫诲瀷涓嶈兘涓虹┖',
+ trigger: ['blur', 'change']
+ },
firmAccountId: {
required: true,
message: '璐︽埛涓嶈兘涓虹┖',
trigger: ['blur', 'change']
},
+ planContent: {
+ required: true,
+ message: '鎽樿涓嶈兘涓虹┖',
+ trigger: ['blur', 'change']
+ },
+ rewardContent: {
+ required: true,
+ message: '绉戠洰涓嶈兘涓虹┖',
+ trigger: ['blur', 'change']
+ }
}
onLoad((options) => {
let data = $db.get('userInfo').userCompany
@@ -133,8 +197,18 @@
detailId.value = options.detailId
getRolePlaneList()
$api.GetFirmAccountList().then(res => {
- zhanghuList = [res.data]
+ res.data.forEach(item => {
+ state.zhanghuListType.push(item.accountType)
+ })
+ state.zhanghuListType = [Array.from(new Set(state.zhanghuListType))]
+ allZhanghuList = res.data
})
+
+ $api.getKeMuList().then(res => {
+ kemuList = [res.data]
+
+ })
+
})
const formRef = ref(null);
@@ -164,12 +238,31 @@
}
const confirmzhanghuPicker = (arr) => {
+ defaultIndexAccount = arr.indexs
state.publicJob.firmAccountId = String(arr.value[0].keyid)
state.publicJob.firmAccountName = arr.value[0].accountName
openzhanghuPicker()
}
+ const confirmzhanghuPickerType = (arr) => {
+ defaultIndexAccount = [0]
+ state.publicJob.accountType = arr.value[0]
+ openzhanghuPickerType()
+ }
const openzhanghuPicker = () => {
+ if (!state.publicJob.accountType) {
+ return $util.showToast({
+ title: '璇峰厛閫夋嫨璐︽埛绫诲瀷锛�'
+ })
+ }
+ zhanghuList = allZhanghuList.filter(item => {
+ return item.accountType == state.publicJob.accountType
+ })
+ zhanghuList = [zhanghuList]
+ console.log(zhanghuList);
zhanghuPicker.value = !zhanghuPicker.value
+ }
+ const openzhanghuPickerType = () => {
+ zhanghuPickerType.value = !zhanghuPickerType.value
}
const getRolePlaneList = () => {
let getList = null
@@ -181,6 +274,10 @@
$api.caiWuGetPlanInfo(detailId.value).then(res => {
state.publicJob = res.data
state.publicJob.planStartTime = $util.formatDate(state.publicJob.planStartTime)
+ let index = kemuList[0].findIndex(item => {
+ return item.keyid == state.publicJob.rewardResult
+ })
+ defaultIndex = [index]
state.publicJob.workPlanAttachments.forEach(item => {
if (item.attachmentType == 1) {
state.invoice.push(item.planAttachment)
@@ -189,6 +286,15 @@
}
})
})
+ }
+ const confirmKemuPicker = (arr) => {
+ console.log('----', arr);
+ state.publicJob.rewardResult = String(arr.value[0].keyid)
+ state.publicJob.rewardContent = arr.value[0].subjectName
+ openKemuPicker()
+ }
+ const openKemuPicker = () => {
+ kemuPicker.value = !kemuPicker.value
}
const saveOrder = (approvalStatus) => {
isLoading.value = true
@@ -199,8 +305,10 @@
// functionOrder = $api.BaoxiaoPlan
// }
let obj = {
- oA_WorkPlanId: state.publicJob.keyid,
- firmAccountId: state.publicJob.firmAccountId
+ keyid: state.publicJob.keyid,
+ firmAccountId: state.publicJob.firmAccountId,
+ planContent: state.publicJob.planContent,
+ accountType: state.publicJob.accountType
}
formRef.value.validate().then(res => {
$api.caiWuApprovalPlan(obj).then(res => {
@@ -243,4 +351,31 @@
.u-form-item__body {
padding: 5px 0 !important;
}
+
+ .fui-upload__wrap {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ flex-direction: row;
+ flex-wrap: wrap;
+ }
+
+ .fui-upload__item {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ align-items: center;
+ justify-content: center;
+ /* margin-right: 20rpx; */
+ margin: 10rpx 10rpx 10rpx 0;
+ /* margin-bottom: 20rpx; */
+ /* #ifdef H5 */
+ cursor: pointer;
+ /* #endif */
+ position: relative;
+
+ /* #ifndef APP-NVUE */
+ box-sizing: border-box;
+ /* #endif */
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1