|
@@ -259,7 +259,8 @@ export default {
|
|
|
fileList: [],
|
|
|
dateStr: '',
|
|
|
username: '',
|
|
|
- paymentOptions: []
|
|
|
+ paymentOptions: [],
|
|
|
+ url: ''
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -274,11 +275,13 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
initData(data) {
|
|
|
+ this.url = 'add'
|
|
|
this.isView = data.isView
|
|
|
- this.contractId = data.contractId
|
|
|
+ // this.contractId = data.contractId
|
|
|
this.initDict(this.dc_key).then(res => {
|
|
|
this.getIdentityCardList()
|
|
|
if (data.id) {
|
|
|
+ this.url = 'edit'
|
|
|
this.getById(data)
|
|
|
}
|
|
|
})
|
|
@@ -324,6 +327,7 @@ export default {
|
|
|
const _this = this
|
|
|
_this.houseOption = []
|
|
|
_this.form.houseId = ''
|
|
|
+ _this.form.contractId = ''
|
|
|
_this.form.customerManagementId = ''
|
|
|
_this.form.buyerName = ''
|
|
|
_this.getHouseList()
|
|
@@ -339,7 +343,8 @@ export default {
|
|
|
const obj = {
|
|
|
label: item.groupName + '-' + item.discName + '-' + item.buildName + '-' + item.roomNo,
|
|
|
value: item.id,
|
|
|
- customerManagementId: item.customerManagementId
|
|
|
+ customerManagementId: item.customerManagementId,
|
|
|
+ contractId: item.contractId
|
|
|
}
|
|
|
_this.houseOption.push(obj)
|
|
|
})
|
|
@@ -352,8 +357,10 @@ export default {
|
|
|
const obj = this.houseOption.find(x => x.value === val)
|
|
|
if (obj) {
|
|
|
this.form.customerManagementId = obj.customerManagementId
|
|
|
+ this.form.contractId = obj.contractId
|
|
|
} else {
|
|
|
this.form.customerManagementId = ''
|
|
|
+ this.form.contractId = ''
|
|
|
}
|
|
|
this.getBuyerName()
|
|
|
this.getPaymentList()
|
|
@@ -402,6 +409,13 @@ export default {
|
|
|
const json = _this.getItemJson(item)
|
|
|
_this.AllData.push(json)
|
|
|
})
|
|
|
+ // 回显
|
|
|
+ _this.paymentOptions = res.data
|
|
|
+ _this.paymentOptions.forEach(element => {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.eltable.toggleRowSelection(element, true)
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
_this.loading = false
|
|
|
}).catch((e) => {
|
|
@@ -427,11 +441,10 @@ export default {
|
|
|
const extraData = {
|
|
|
// 退款详情
|
|
|
refundDetailInfoStr: JSON.stringify(_this.paymentOptions),
|
|
|
- fileList: JSON.stringify(_this.fileList),
|
|
|
- contractId: this.contractId
|
|
|
+ fileList: JSON.stringify(_this.fileList)
|
|
|
}
|
|
|
const postData = Object.assign({}, _this.form, extraData)
|
|
|
- this.baseRequest('add', postData).then(res => {
|
|
|
+ this.baseRequest(this.url, postData).then(res => {
|
|
|
const data = res.data
|
|
|
if (data.code == 200) {
|
|
|
this.$notify({
|
|
@@ -504,7 +517,6 @@ export default {
|
|
|
totalReceivedAmount += Number(item.receivedAmount)
|
|
|
}
|
|
|
})
|
|
|
- console.log('totalReceivedAmount', totalReceivedAmount)
|
|
|
_this.form.refundAmount = totalReceivedAmount
|
|
|
},
|
|
|
baseRequest(opUrl, postData) {
|