Compare commits

..

2 Commits

@ -106,37 +106,14 @@ export default {
hanleCancel() { hanleCancel() {
this.isShow = false this.isShow = false
}, },
handleConfirm() { handleConfirm(key) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.form.validate().then(() => { if (key == 2) {
let obj = { let obj = {
id: this.accessId, id: this.accessId,
reason: this.form.reason reason: ''
} }
this.$loading(true, 'loadingSb') this.$loading(true, 'loadingSb')
if (this.key == 2) {
/* approveTask(obj)
.then(() => {
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back()
this.$loading(false, 'loadingSb')
})
.catch(() => {
this.$loading(false, 'loadingSb')
})
} else {
rejectTask(obj)
.then(() => {
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back()
this.$loading(false, 'loadingSb')
})
.catch(() => {
this.$loading(false, 'loadingSb')
}) */
approveTask(obj) approveTask(obj)
.then(() => { .then(() => {
this.$forceCloseLoading() this.$forceCloseLoading()
@ -150,6 +127,12 @@ export default {
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
}) })
} else { } else {
this.$refs.form.validate().then(() => {
let obj = {
id: this.accessId,
reason: this.form.reason
}
this.$loading(true, 'loadingSb')
rejectTask(obj) rejectTask(obj)
.then(() => { .then(() => {
this.$forceCloseLoading() this.$forceCloseLoading()
@ -162,8 +145,8 @@ export default {
this.$forceCloseLoading() this.$forceCloseLoading()
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
}) })
}
}) })
}
}) })
}, },
handleSubmit(key) { handleSubmit(key) {
@ -172,7 +155,7 @@ export default {
this.title = '同意' this.title = '同意'
this.form.reason = '已同意' this.form.reason = '已同意'
// //
this.handleConfirm() this.handleConfirm(2)
} else if (key == 3) { } else if (key == 3) {
this.key = key this.key = key
this.title = '驳回' this.title = '驳回'

@ -22,8 +22,12 @@ export default {
areaTree: [], areaTree: [],
userDeptTree: [], userDeptTree: [],
userList: [], userList: [],
bankInfo: [], // 账户信息
}, },
mutations: { mutations: {
SET_BANKINFO: (state, bankInfo) => {
state.bankInfo = bankInfo.length > 0 ? bankInfo : []
},
SET_AUTHORIZATION(state, authorization) { SET_AUTHORIZATION(state, authorization) {
state.authorization = authorization state.authorization = authorization
}, },
@ -207,6 +211,7 @@ export default {
setLocalStorage('userInfo', JSON.stringify(res.data)) setLocalStorage('userInfo', JSON.stringify(res.data))
let res1 = res.data let res1 = res.data
commit('SET_USERINFO', res.data) commit('SET_USERINFO', res.data)
commit('SET_BANKINFO', res.data.bankInfoList || [])
getAreaTree().then(res => { getAreaTree().then(res => {
let tree = res.data || [] let tree = res.data || []
handleAreaLoop(tree) handleAreaLoop(tree)
@ -237,7 +242,6 @@ export default {
reject(res.response.code) reject(res.response.code)
}) })
// //
// huoqu // huoqu
}).catch(e => { }).catch(e => {
console.log(e) console.log(e)

@ -9,6 +9,8 @@ const getters = {
userList: state => state.common.user.userList, userList: state => state.common.user.userList,
dict_datas: state => state.dict.dictDatas, dict_datas: state => state.dict.dictDatas,
requestPageSize: state => state.common.global.requestPageSize, requestPageSize: state => state.common.global.requestPageSize,
// 银行信息
bankInfo: state => state.common.user.bankInfo,
} }
export default getters export default getters

@ -86,6 +86,16 @@
placeholder="请输入" placeholder="请输入"
@click="showPicker = true" @click="showPicker = true"
/> />
<van-field
v-model="form.bankAccount"
:disabled="disabled"
required
label="收款账号"
clear-trigger="always"
input-align="right"
placeholder="请输入"
@click="showPicker2 = true"
/>
<van-field <van-field
v-model="form.reason" v-model="form.reason"
:disabled="disabled" :disabled="disabled"
@ -817,6 +827,8 @@
} }
" "
/> />
<!-- 资金来源底部框 -->
<van-popup v-model="showPicker" position="bottom"> <van-popup v-model="showPicker" position="bottom">
<van-picker <van-picker
show-toolbar show-toolbar
@ -826,6 +838,17 @@
@cancel="showPicker = false" @cancel="showPicker = false"
/> />
</van-popup> </van-popup>
<!-- 银行账号底部框 -->
<van-popup v-model="showPicker2" position="bottom">
<van-picker
show-toolbar
title="选择银行账号"
:columns="bankAccountList1"
@confirm="selectBankAccount"
@cancel="showPicker2 = false"
/>
</van-popup>
</div> </div>
</template> </template>
@ -866,10 +889,15 @@ export default {
this.getTree() this.getTree()
}, },
// 访DOM // 访DOM
mounted() {}, mounted() {
console.log(this.$store.getters.bankInfo, 'this.$store.getters.bankInfo')
},
data() { data() {
return { return {
showPicker2: false,
showPicker: false, showPicker: false,
//
bankAccountList: this.$store.getters.bankInfo,
areaTree: [], areaTree: [],
indexOne: 1, indexOne: 1,
indexTwo: 1, indexTwo: 1,
@ -966,6 +994,9 @@ export default {
// //
// bs_fee_type // bs_fee_type
computed: { computed: {
bankAccountList1() {
return this.bankAccountList.map((e) => e.bankNumber)
},
fundingSourceList() { fundingSourceList() {
const list = this.getDictDatas('funding_source')?.map((e) => { const list = this.getDictDatas('funding_source')?.map((e) => {
return { return {
@ -1013,6 +1044,11 @@ export default {
watch: {}, watch: {},
// //
methods: { methods: {
selectBankAccount(val) {
console.log(val, 'valvalval')
this.form.bankAccount = val
this.showPicker2 = false
},
selectFundingSource(val) { selectFundingSource(val) {
this.form.fundingSource = val.value this.form.fundingSource = val.value
this.fundingSourceLabel = val.text this.fundingSourceLabel = val.text

Loading…
Cancel
Save