|
@@ -46,20 +46,21 @@
|
|
|
<el-col :span="9" class="col-input">
|
|
|
<el-form-item>
|
|
|
<el-select
|
|
|
- v-model="form.bankNumber"
|
|
|
+ v-model="bankObject"
|
|
|
:popper-append-to-body="false"
|
|
|
popper-class="statistic_base"
|
|
|
placeholder=""
|
|
|
filterable
|
|
|
clearable
|
|
|
+ @change="bankChange"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in dc_data.bankOption"
|
|
|
+ v-for="item in bankOptions"
|
|
|
:key="item.value"
|
|
|
popper-class="statistic_base"
|
|
|
:popper-append-to-body="false"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ :label="item.bankName + (item.bankBranchName?item.bankBranchName:'') + item.bankNumber"
|
|
|
+ :value="item"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -67,7 +68,7 @@
|
|
|
<el-col :span="3" class="col-txt"><span>应收金额</span></el-col>
|
|
|
<el-col :span="9" class="col-input">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="form.maintenanceTotalPrice" readonly />
|
|
|
+ <el-input v-model="form.receivableMoney" readonly />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -154,7 +155,9 @@ export default {
|
|
|
dateStr: '',
|
|
|
username: '',
|
|
|
isView: false,
|
|
|
- bankOption: []
|
|
|
+ bankOptions: [],
|
|
|
+ bankObject: '',
|
|
|
+ contractId: ''
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -167,24 +170,33 @@ export default {
|
|
|
methods: {
|
|
|
initData(data) {
|
|
|
this.isView = data.isView
|
|
|
+ this.contractId = data.id
|
|
|
+ this.form.receivableMoney = data.maintenanceTotalPrice
|
|
|
+ this.getBankOptions()
|
|
|
this.initDict(this.dc_key).then(res => {
|
|
|
this.getById(data)
|
|
|
})
|
|
|
},
|
|
|
getById(data) {
|
|
|
- this.baseRequest('getById', data).then(res => {
|
|
|
- this.form = res.data
|
|
|
- this.form.buyerName = data.buyerName
|
|
|
- if (this.form.paymentVoucher) {
|
|
|
- this.fileList = JSON.parse(this.form.paymentVoucher)
|
|
|
- }
|
|
|
- if (res.data.handleName) {
|
|
|
- this.username = res.data.handleName
|
|
|
- }
|
|
|
- if (res.data.handleDate) {
|
|
|
- this.dateStr = res.data.handleDate
|
|
|
+ this.getBankTaxRateByFloor()
|
|
|
+ if (data.maintenanceFundsId) {
|
|
|
+ const postData = {
|
|
|
+ id: data.maintenanceFundsId
|
|
|
}
|
|
|
- })
|
|
|
+ this.baseRequest('getById', postData).then(res => {
|
|
|
+ this.form = res.data
|
|
|
+ if (this.form.paymentVoucher) {
|
|
|
+ this.fileList = JSON.parse(this.form.paymentVoucher)
|
|
|
+ }
|
|
|
+ if (res.data.handleName) {
|
|
|
+ this.username = res.data.handleName
|
|
|
+ }
|
|
|
+ if (res.data.handleDate) {
|
|
|
+ this.dateStr = res.data.handleDate
|
|
|
+ }
|
|
|
+ this.bankObject = res.data.bankName + res.data.bankBranchName + res.data.bankNumber
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
confirmSubmit: function() {
|
|
|
const _this = this
|
|
@@ -192,7 +204,8 @@ export default {
|
|
|
if (valid) {
|
|
|
const soaUrl = 'add'
|
|
|
const extraData = {
|
|
|
- paymentVoucher: JSON.stringify(_this.fileList)
|
|
|
+ paymentVoucher: JSON.stringify(_this.fileList),
|
|
|
+ contractId: this.contractId
|
|
|
}
|
|
|
const postData = Object.assign({}, _this.form, extraData)
|
|
|
this.baseRequest(soaUrl, postData).then(res => {
|
|
@@ -229,8 +242,32 @@ export default {
|
|
|
this.fileList.push(res)
|
|
|
})
|
|
|
},
|
|
|
+ getBankOptions() {
|
|
|
+ this.bankRequest('listAll', {}).then(res => {
|
|
|
+ this.bankOptions = res.data || []
|
|
|
+ })
|
|
|
+ },
|
|
|
+ bankChange(val) {
|
|
|
+ console.log(val)
|
|
|
+ this.form.bankName = val.bankName
|
|
|
+ this.form.bankBranchName = val.bankBranchName
|
|
|
+ this.form.bankNumber = val.bankNumber
|
|
|
+ },
|
|
|
+ getBankTaxRateByFloor() {
|
|
|
+ this.baseRequest('getBankTaxRateByFloor', { contractId: this.contractId }).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.bankObject = res.data.bankFullName
|
|
|
+ this.form.bankName = res.data.bankName
|
|
|
+ this.form.bankBranchName = res.data.bankBranchName
|
|
|
+ this.form.bankNumber = res.data.bankNumber
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
baseRequest(opUrl, postData) {
|
|
|
return this.$channel.globeRequest('MaintenanceFundsManagementController', opUrl, postData, 'project')
|
|
|
+ },
|
|
|
+ bankRequest(opUrl, postData) {
|
|
|
+ return this.$channel.globeRequest('InvoiceBankController', opUrl, postData, 'project')
|
|
|
}
|
|
|
|
|
|
}
|