doctor-admin-components 1.0.13-beta.56 → 1.0.13-beta.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
v-for="(bankData, i) in bankList"
|
|
13
13
|
:key="i"
|
|
14
14
|
class="bank-container"
|
|
15
|
-
:class="{ 'bank-container-select': sellectIndex == i, 'bank-container-unselect': sellectIndex != i }"
|
|
15
|
+
:class="{ 'bank-container-select': !disableSelect && sellectIndex == i, 'bank-container-unselect': disableSelect || sellectIndex != i }"
|
|
16
16
|
@click="clickSelct(i)"
|
|
17
17
|
>
|
|
18
18
|
<el-row style="padding-bottom: 20px">
|
|
@@ -37,10 +37,14 @@
|
|
|
37
37
|
</el-row>
|
|
38
38
|
</div>
|
|
39
39
|
<!-- 添加入口 -->
|
|
40
|
-
<div v-if="!bankList || bankList.length
|
|
40
|
+
<div v-if="!bankList || bankList.length == 0" style="padding-left: 30px; padding-top: 10px">
|
|
41
41
|
<span>未添加收款账户信息,</span>
|
|
42
42
|
<el-button type="text" size="mini" @click="clickAdd">去添加</el-button>
|
|
43
43
|
</div>
|
|
44
|
+
<div v-else-if="bankList && bankList.length < 3" style="padding-left: 30px; padding-top: 10px">
|
|
45
|
+
<el-button type="text" size="mini" @click="clickAdd">去添加</el-button>
|
|
46
|
+
<span>收款账户信息</span>
|
|
47
|
+
</div>
|
|
44
48
|
<!-- 添加收款账户弹框 -->
|
|
45
49
|
<el-dialog title="添加收款账户" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false">
|
|
46
50
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
@@ -95,14 +99,31 @@ export default {
|
|
|
95
99
|
companyId: {
|
|
96
100
|
type: String | Number,
|
|
97
101
|
default: null
|
|
102
|
+
},
|
|
103
|
+
// 是否禁止选择功能
|
|
104
|
+
disableSelect: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false
|
|
107
|
+
},
|
|
108
|
+
// 之前选择的id
|
|
109
|
+
accountId: {
|
|
110
|
+
type: String | Number,
|
|
111
|
+
default: null
|
|
98
112
|
}
|
|
99
113
|
},
|
|
100
114
|
watch: {
|
|
101
115
|
companyId: {
|
|
102
116
|
handler(newVal, oldVal) {
|
|
103
117
|
console.log('companyId changed:', newVal)
|
|
118
|
+
this.sellectIndex = -1
|
|
104
119
|
this.getBankList()
|
|
105
120
|
}
|
|
121
|
+
},
|
|
122
|
+
accountId: {
|
|
123
|
+
handler(newVal, oldVal) {
|
|
124
|
+
console.log('accountId changed:', newVal)
|
|
125
|
+
this.handleCaclSelectIndex()
|
|
126
|
+
}
|
|
106
127
|
}
|
|
107
128
|
},
|
|
108
129
|
data() {
|
|
@@ -136,9 +157,18 @@ export default {
|
|
|
136
157
|
beneficiaryAddress: null
|
|
137
158
|
}
|
|
138
159
|
},
|
|
160
|
+
handleCaclSelectIndex() {
|
|
161
|
+
if (!this.disableSelect && this.accountId) {
|
|
162
|
+
this.sellectIndex = this.bankList.findIndex((item) => item.accountId == this.accountId)
|
|
163
|
+
}
|
|
164
|
+
},
|
|
139
165
|
getBankList() {
|
|
166
|
+
if (!this.companyId) {
|
|
167
|
+
return
|
|
168
|
+
}
|
|
140
169
|
getCompanyBanks(this.companyId).then((res) => {
|
|
141
170
|
this.bankList = res.data?.paymentAccountList
|
|
171
|
+
this.handleCaclSelectIndex()
|
|
142
172
|
})
|
|
143
173
|
},
|
|
144
174
|
clickAdd() {
|
|
@@ -146,6 +176,10 @@ export default {
|
|
|
146
176
|
this.open = true
|
|
147
177
|
},
|
|
148
178
|
clickSelct(index) {
|
|
179
|
+
if (this.disableSelect) {
|
|
180
|
+
console.log('disableSelect')
|
|
181
|
+
return
|
|
182
|
+
}
|
|
149
183
|
this.sellectIndex = index
|
|
150
184
|
let data = this.bankList[index]
|
|
151
185
|
console.log('select data', data)
|
|
@@ -157,7 +191,7 @@ export default {
|
|
|
157
191
|
clickConfirm() {
|
|
158
192
|
let e = this.form
|
|
159
193
|
if (!(e.swiftCode || e.bankName || e.bankAddress || e.beneficiaryAccount || e.beneficiary || e.beneficiaryAddress)) {
|
|
160
|
-
this.$modal.msgError('请输入内容')
|
|
194
|
+
this.$modal.msgError('请输入内容')
|
|
161
195
|
return
|
|
162
196
|
}
|
|
163
197
|
insertCompanyBank({
|