163 lines
3.5 KiB
Vue
163 lines
3.5 KiB
Vue
<template>
|
|
<div class="page-cont">
|
|
<p class="page-title">请选择移交人员</p>
|
|
<div class="page-select">
|
|
<div class="select-item">
|
|
<span>指定经办人</span>
|
|
<view class="select-unit">
|
|
<picker mode="selector" @change="pickerChange" range-key="USER_NAME" :range="TransferUserList">
|
|
<view>{{TransferUserList[pickerIndex].USER_NAME}}</view>
|
|
</picker>
|
|
<i class="uni-icon uni-icon-arrowright"></i>
|
|
|
|
</view>
|
|
|
|
</div>
|
|
</div>
|
|
<button class="mt80" @click="postFn" :loading="isSubmit">移交</button>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {mapGetters,mapMutations} from 'vuex'
|
|
export default {
|
|
data() {
|
|
|
|
return {
|
|
postData: {
|
|
PROINST_ID:'',
|
|
FINANCEPROINST_ID:'',
|
|
NOWACTINST_ID:'',
|
|
PROINST_NEXTID: 4000
|
|
},
|
|
|
|
TransferUserList: [] ,// 待移交人员列表
|
|
|
|
isExpense: false, // 是否是财务审批
|
|
isSubmit:false, // 是否在提交
|
|
|
|
pickerIndex: 0
|
|
};
|
|
},
|
|
computed:{
|
|
...mapGetters({'users':'getUser'})
|
|
},
|
|
methods: {
|
|
...mapMutations(['isGetTodoList']),
|
|
pickerChange(e){
|
|
this.pickerIndex = e.mp.detail.value
|
|
},
|
|
getTransferUser() { // 是否是请求移交人员
|
|
let _this = this
|
|
let _data = {}
|
|
if(this.isExpense) {
|
|
|
|
_data = {
|
|
action_type: 'GetFlowTransferUser',
|
|
action_data: _this.users.uid,
|
|
PROINST_ID: _this.postData.FINANCEPROINST_ID,
|
|
NextACTDEF_IDS: _this.postData.NOWACTINST_ID,
|
|
TransferType: 1,
|
|
UserId : _this.users.sid
|
|
}
|
|
}else{
|
|
|
|
_data = {
|
|
action_type: 'GetNextStepUser',
|
|
businessType: _this.postData.businessType,
|
|
PROINST_ID: _this.postData.PROINST_ID,
|
|
NextStepId: _this.postData.NOWACTINST_ID,
|
|
IsTransfer: 1,
|
|
USER_ID : _this.users.UserId
|
|
}
|
|
}
|
|
|
|
this.$request.get(_data).then((res)=> {
|
|
uni.hideLoading()
|
|
_this.TransferUserList= res.Data.List
|
|
|
|
})
|
|
},
|
|
|
|
postFn () {
|
|
let _this = this
|
|
if(_this.isSubmit) {
|
|
return
|
|
}
|
|
if(!_this.TransferUserList[_this.pickerIndex]) {
|
|
uni.showToast({
|
|
title: '请选择移交人员后提交。',
|
|
icon: 'none'
|
|
})
|
|
return false
|
|
}
|
|
|
|
let arr = {
|
|
action_type: 'ProcessApproval',
|
|
businessType: _this.postData.businessType,
|
|
PROINST_ID: _this.postData.PROINST_ID,
|
|
PROINST_NEXTID: _this.postData.PROINST_NEXTID,
|
|
NOWACTINST_IDS: _this.postData.NOWACTINST_ID,
|
|
|
|
NextSTAFF_ID: _this.TransferUserList[_this.pickerIndex].USER_ID,
|
|
|
|
}
|
|
|
|
|
|
this.isSubmit = true
|
|
|
|
this.$request.post(arr).then( (_data)=> {
|
|
_this.isSubmit = false
|
|
if (_data.ResultCode==='100') {
|
|
_this.$eventHub.$emit(_this.postData.businessType,true);
|
|
_this.isGetTodoList(true);
|
|
uni.showToast({
|
|
title: _data.ResultDesc,
|
|
success () {
|
|
setTimeout(()=> {
|
|
uni.navigateBack({ delta: 2})
|
|
},200)
|
|
|
|
}
|
|
})
|
|
}else {
|
|
uni.showToast({
|
|
title: _data.ResultDesc || '操作错误',
|
|
icon: 'none'
|
|
})
|
|
|
|
}
|
|
})
|
|
},
|
|
},
|
|
onUnload() {
|
|
this.$util.addUserBehavior()
|
|
},
|
|
onLoad(option) {
|
|
|
|
uni.showLoading({
|
|
title:'正在加载'
|
|
})
|
|
this.postData = option
|
|
this.postData.PROINST_NEXTID = 4000
|
|
this.getTransferUser()
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
@import url("../../common/css/auditingPop.css");
|
|
@import url("../../common/css/picker.css");
|
|
.page-select {
|
|
padding: 8upx 30upx;
|
|
}
|
|
.select-item {
|
|
border-bottom: none;
|
|
}
|
|
.mt80 {
|
|
margin-top: 200upx;
|
|
}
|
|
|
|
</style>
|