haicang
jwg 3 months ago
parent 29ef38f7e3
commit 9e00f318fb

@ -106,37 +106,14 @@ export default {
hanleCancel() {
this.isShow = false
},
handleConfirm() {
handleConfirm(key) {
this.$nextTick(() => {
this.$refs.form.validate().then(() => {
if (key == 2) {
let obj = {
id: this.accessId,
reason: this.form.reason
reason: ''
}
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)
.then(() => {
this.$forceCloseLoading()
@ -150,6 +127,12 @@ export default {
this.$loading(false, 'loadingSb')
})
} else {
this.$refs.form.validate().then(() => {
let obj = {
id: this.accessId,
reason: this.form.reason
}
this.$loading(true, 'loadingSb')
rejectTask(obj)
.then(() => {
this.$forceCloseLoading()
@ -162,8 +145,8 @@ export default {
this.$forceCloseLoading()
this.$loading(false, 'loadingSb')
})
}
})
}
})
},
handleSubmit(key) {
@ -172,7 +155,7 @@ export default {
this.title = '同意'
this.form.reason = '已同意'
//
this.handleConfirm()
this.handleConfirm(2)
} else if (key == 3) {
this.key = key
this.title = '驳回'

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

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

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

Loading…
Cancel
Save