diff --git a/src/components/BottomBtn/index.vue b/src/components/BottomBtn/index.vue
index 8d140f5..8782b37 100644
--- a/src/components/BottomBtn/index.vue
+++ b/src/components/BottomBtn/index.vue
@@ -106,50 +106,33 @@ 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()
- this.$EventBus.$emit('handleResetLive', 'company-myTrips')
- this.$EventBus.$emit('handleResetLive', 'company-myClaim')
- history.back()
- this.$loading(false, 'loadingSb')
- })
- .catch(() => {
- this.$forceCloseLoading()
- this.$loading(false, 'loadingSb')
- })
- } else {
+ approveTask(obj)
+ .then(() => {
+ this.$forceCloseLoading()
+ this.$EventBus.$emit('handleResetLive', 'company-myTrips')
+ this.$EventBus.$emit('handleResetLive', 'company-myClaim')
+ history.back()
+ this.$loading(false, 'loadingSb')
+ })
+ .catch(() => {
+ this.$forceCloseLoading()
+ 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 = '驳回'
diff --git a/src/store/modules/common/user.js b/src/store/modules/common/user.js
index ac01caa..77535bb 100644
--- a/src/store/modules/common/user.js
+++ b/src/store/modules/common/user.js
@@ -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)
diff --git a/src/store/modules/getters.js b/src/store/modules/getters.js
index b8e3873..36a60bd 100644
--- a/src/store/modules/getters.js
+++ b/src/store/modules/getters.js
@@ -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
\ No newline at end of file
diff --git a/src/views/company/claim/index.vue b/src/views/company/claim/index.vue
index a3f19e2..b5ee04c 100644
--- a/src/views/company/claim/index.vue
+++ b/src/views/company/claim/index.vue
@@ -86,6 +86,16 @@
placeholder="请输入"
@click="showPicker = true"
/>
+
+
+
+
+
+
+
+
@@ -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