|
@@ -216,18 +216,40 @@ export default {
|
|
|
this.username = username
|
|
|
},
|
|
|
methods: {
|
|
|
- initData(data) {
|
|
|
+ initData(data, fromAddress) {
|
|
|
this.getBankOptions()
|
|
|
this.customerManagementId = data.id
|
|
|
this.intentionalDepositId = data.intentionalDepositId
|
|
|
this.initDict(this.dc_key).then(res => {
|
|
|
- this.getByCustomerManagementId(data)
|
|
|
- this.getCustomerById(this.customerManagementId)
|
|
|
+ // this.getByCustomerManagementId(data)
|
|
|
+ this.getCustomerById(this.customerManagementId, fromAddress)
|
|
|
})
|
|
|
},
|
|
|
handleChange(value) {
|
|
|
|
|
|
},
|
|
|
+ getById(val) {
|
|
|
+ const data = {
|
|
|
+ id: val
|
|
|
+ }
|
|
|
+ this.baseRequest('getById', data).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.form = res.data
|
|
|
+ this.serialNumber = this.form.serialNumber
|
|
|
+ this.form.paymentMethod = this.form.paymentMethod + ''
|
|
|
+ if (this.form.fileList) {
|
|
|
+ this.fileList = JSON.parse(this.form.fileList)
|
|
|
+ }
|
|
|
+ this.dateStr = this.form.createdAt
|
|
|
+ this.username = this.form.createdName
|
|
|
+ this.form.bankName = res.data.bankName == null ? '' : res.data.bankName
|
|
|
+ this.form.bankBranchName = res.data.bankBranchName == null ? '' : res.data.bankBranchName
|
|
|
+ this.form.bankNumber = res.data.bankNumber == null ? '' : res.data.bankNumber
|
|
|
+ this.bankObject = this.form.bankName + this.form.bankBranchName + this.form.bankNumber
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
getByCustomerManagementId(val) {
|
|
|
const data = {
|
|
|
customerManagementId: val.id
|
|
@@ -270,7 +292,7 @@ export default {
|
|
|
if (valid) {
|
|
|
let soaUrl = 'add'
|
|
|
// 已收取状态
|
|
|
- if (_this.intentionalDepositId) {
|
|
|
+ if (_this.intentionalDepositId || _this.customerForm.intentionalDepositId) {
|
|
|
soaUrl = 'edit'
|
|
|
_this.form.id = _this.intentionalDepositId
|
|
|
}
|
|
@@ -363,10 +385,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getCustomerById(val) {
|
|
|
+ getCustomerById(val, fromAddress) {
|
|
|
this.customerForm = {}
|
|
|
this.baseCustomerRequest('getById', { id: val }).then(res => {
|
|
|
this.customerForm = res.data
|
|
|
+ if (fromAddress === 'customer') {
|
|
|
+ this.intentionalDepositId = res.data.intentionalDepositId
|
|
|
+ }
|
|
|
+ this.getById(this.intentionalDepositId)
|
|
|
}).catch((err) => {
|
|
|
})
|
|
|
},
|