|
@ -155,16 +155,23 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="厂家回款通路" align="center" width="200"> |
|
|
<el-table-column v-if="formobj.costTypeKey == '001'" label="厂家回款通路" align="center" width="200"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-select v-model="scope.row.actualPay" placeholder="请选择" filterable @change="changeActualPay($event, scope.row)"> |
|
|
<el-select v-model="scope.row.actualPay" placeholder="请选择" filterable @change="changeActualPay($event, scope.row)"> |
|
|
<el-option v-for="item in actualPay_list" :key="item.actualPaySid" :label="item.actualPay" :value="item.actualPay"/> |
|
|
<el-option v-for="item in actualPay_list" :key="item.actualPaySid" :label="item.actualPay" :value="item.actualPay"/> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column v-if="formobj.costTypeKey == '002' || formobj.costTypeKey == '003'" label="收款账号" align="center" width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-select v-model="scope.row.receivingAccount" placeholder="请选择" filterable @change="changeReceivingAccount($event, scope.row)"> |
|
|
|
|
|
<el-option v-for="item in receivingAccount_list" :key="item.bankAccount" :label="item.bankAccount" :value="item.bankAccount"/> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column v-if="formobj.costTypeKey == '001'" prop="receivingAccount" label="收款银行账号" align="center" width="160" /> |
|
|
<el-table-column prop="receiveCompany" label="收款单位" align="center" width="150" /> |
|
|
<el-table-column prop="receiveCompany" label="收款单位" align="center" width="150" /> |
|
|
<el-table-column prop="bank" label="开户行" align="center" width="140" /> |
|
|
<el-table-column prop="bank" label="开户行" align="center" width="140" /> |
|
|
<el-table-column prop="receivingAccount" label="收款银行账号" align="center" width="160" /> |
|
|
|
|
|
<el-table-column prop="payAccount" label="付款金额(元)" align="center" width="150"> |
|
|
<el-table-column prop="payAccount" label="付款金额(元)" align="center" width="150"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-input v-model="scope.row.payAccount" placeholder="" clearable @keyup.native="scope.row.payAccount = getNumber(scope.row.payAccount, 2)" @keydown.native="scope.row.payAccount = getNumber(scope.row.payAccount, 2)"></el-input> |
|
|
<el-input v-model="scope.row.payAccount" placeholder="" clearable @keyup.native="scope.row.payAccount = getNumber(scope.row.payAccount, 2)" @keydown.native="scope.row.payAccount = getNumber(scope.row.payAccount, 2)"></el-input> |
|
@ -361,7 +368,7 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import req from '@/api/anruifinmanagement/payment' |
|
|
import req from '@/api/anruifinmanagement/payment' |
|
|
import { typeValues, getOrgSidByPath, getInvoicingList, brandDown, selectNameByOrg, getTypeValueList } from '@/api/jichuxinxi/dictcommons' |
|
|
import { typeValues, getOrgSidByPath, getInvoicingList, brandDown, selectNameByOrg, getTypeValueList, getKhhByOrgSid } from '@/api/jichuxinxi/dictcommons' |
|
|
import vehcile from './relation/vehcile' |
|
|
import vehcile from './relation/vehcile' |
|
|
import trailerCar from './relation/trailerCar' |
|
|
import trailerCar from './relation/trailerCar' |
|
|
import top from './relation/top' |
|
|
import top from './relation/top' |
|
@ -400,6 +407,7 @@ export default { |
|
|
payCompany_list: [], |
|
|
payCompany_list: [], |
|
|
payment_list: [], |
|
|
payment_list: [], |
|
|
actualPay_list: [], |
|
|
actualPay_list: [], |
|
|
|
|
|
receivingAccount_list: [], |
|
|
formobj: { |
|
|
formobj: { |
|
|
billNo: '', // 申请编号 |
|
|
billNo: '', // 申请编号 |
|
|
name: '', // 申请人姓名 |
|
|
name: '', // 申请人姓名 |
|
@ -481,11 +489,6 @@ export default { |
|
|
this.costType_list = res.data |
|
|
this.costType_list = res.data |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
getTypeValueList({ type: 'payCostType', groupNum: '001' }).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.costTitle_list = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
getInvoicingList({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
getInvoicingList({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
this.payCompany_list = res.data |
|
|
this.payCompany_list = res.data |
|
@ -542,6 +545,30 @@ export default { |
|
|
this.actualPay_list = res.data |
|
|
this.actualPay_list = res.data |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (this.formobj.costTypeKey !== '' && this.formobj.costTypeKey !== '004') { |
|
|
|
|
|
getTypeValueList({ type: 'payCostType', groupNum: this.formobj.costTypeKey }).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.costTitle_list = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.costTitle_list = [] |
|
|
|
|
|
} |
|
|
|
|
|
if (this.formobj.costTypeKey === '002' || this.formobj.costTypeKey === '003') { |
|
|
|
|
|
let type = '' |
|
|
|
|
|
if (this.formobj.costTypeKey === '002') { |
|
|
|
|
|
type = '0002' |
|
|
|
|
|
} else if (this.formobj.costTypeKey === '003') { |
|
|
|
|
|
type = '0003' |
|
|
|
|
|
} |
|
|
|
|
|
getKhhByOrgSid({ orgSid: this.formobj.useOrgSid, supplierType: type }).then((resp) => { |
|
|
|
|
|
if (resp.success) { |
|
|
|
|
|
this.receivingAccount_list = resp.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.receivingAccount_list = [] |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}).catch((e) => { |
|
|
}).catch((e) => { |
|
|
this.formobj = row |
|
|
this.formobj = row |
|
@ -576,9 +603,35 @@ export default { |
|
|
if (this.formobj.costTypeKey !== '001') { |
|
|
if (this.formobj.costTypeKey !== '001') { |
|
|
this.formobj.isVeh = '0' |
|
|
this.formobj.isVeh = '0' |
|
|
} |
|
|
} |
|
|
|
|
|
this.formobj.detailsList = [] |
|
|
} else { |
|
|
} else { |
|
|
this.formobj.costTypeKey = '' |
|
|
this.formobj.costTypeKey = '' |
|
|
this.formobj.isVeh = '' |
|
|
this.formobj.isVeh = '' |
|
|
|
|
|
this.formobj.detailsList = [] |
|
|
|
|
|
} |
|
|
|
|
|
if (this.formobj.costTypeKey !== '' && this.formobj.costTypeKey !== '004') { |
|
|
|
|
|
getTypeValueList({ type: 'payCostType', groupNum: this.formobj.costTypeKey }).then((res) => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.costTitle_list = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.costTitle_list = [] |
|
|
|
|
|
} |
|
|
|
|
|
if (this.formobj.costTypeKey === '002' || this.formobj.costTypeKey === '003') { |
|
|
|
|
|
let type = '' |
|
|
|
|
|
if (this.formobj.costTypeKey === '002') { |
|
|
|
|
|
type = '0002' |
|
|
|
|
|
} else if (this.formobj.costTypeKey === '003') { |
|
|
|
|
|
type = '0003' |
|
|
|
|
|
} |
|
|
|
|
|
getKhhByOrgSid({ orgSid: this.formobj.useOrgSid, supplierType: type }).then((resp) => { |
|
|
|
|
|
if (resp.success) { |
|
|
|
|
|
this.receivingAccount_list = resp.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.receivingAccount_list = [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
isVehChange(val) { |
|
|
isVehChange(val) { |
|
@ -615,7 +668,6 @@ export default { |
|
|
backClosingPayment(value) { |
|
|
backClosingPayment(value) { |
|
|
this.viewState = 1 |
|
|
this.viewState = 1 |
|
|
value = JSON.parse(JSON.stringify(value)) |
|
|
value = JSON.parse(JSON.stringify(value)) |
|
|
console.log(value, 77) |
|
|
|
|
|
value.forEach((e) => { |
|
|
value.forEach((e) => { |
|
|
this.formobj.eveList.push({ |
|
|
this.formobj.eveList.push({ |
|
|
sid: '', // sid |
|
|
sid: '', // sid |
|
@ -696,6 +748,17 @@ export default { |
|
|
row.receivingAccount = '' |
|
|
row.receivingAccount = '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
changeReceivingAccount(value, row) { |
|
|
|
|
|
const choose = this.receivingAccount_list.filter((item) => item.bankAccount === value) |
|
|
|
|
|
if (choose.length > 0 && choose !== null) { |
|
|
|
|
|
row.receiveCompany = choose[0].manufacturerName |
|
|
|
|
|
row.bank = choose[0].depositBank |
|
|
|
|
|
row.receivingAccount = choose[0].bankAccount |
|
|
|
|
|
} else { |
|
|
|
|
|
row.bank = '' |
|
|
|
|
|
row.receivingAccount = '' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
handleAddPayment(row, index) { |
|
|
handleAddPayment(row, index) { |
|
|
if (row.paymentType === '') { |
|
|
if (row.paymentType === '') { |
|
|
this.$message({ showClose: true, type: 'error', message: '付款方式不能为空' }) |
|
|
this.$message({ showClose: true, type: 'error', message: '付款方式不能为空' }) |
|
@ -893,6 +956,19 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
saveOrUpdate() { |
|
|
saveOrUpdate() { |
|
|
|
|
|
if (this.formobj.costTypeKey !== '004' && this.formobj.costTypeKey !== '') { |
|
|
|
|
|
if (this.formobj.detailsList.length === 0) { |
|
|
|
|
|
this.$message({ showClose: true, type: 'error', message: '付款明细列表不能为空' }) |
|
|
|
|
|
return |
|
|
|
|
|
} else { |
|
|
|
|
|
for (var i = 0; i < this.formobj.detailsList.length; i++) { |
|
|
|
|
|
if (this.formobj.detailsList[i].payAccount === '') { |
|
|
|
|
|
this.$message({ showClose: true, type: 'error', message: '付款明细列表中付款金额不能为空' }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
@ -925,6 +1001,19 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
submitVehicleApply() { |
|
|
submitVehicleApply() { |
|
|
|
|
|
if (this.formobj.costTypeKey !== '004' && this.formobj.costTypeKey !== '') { |
|
|
|
|
|
if (this.formobj.detailsList.length === 0) { |
|
|
|
|
|
this.$message({ showClose: true, type: 'error', message: '付款明细列表不能为空' }) |
|
|
|
|
|
return |
|
|
|
|
|
} else { |
|
|
|
|
|
for (var i = 0; i < this.formobj.detailsList.length; i++) { |
|
|
|
|
|
if (this.formobj.detailsList[i].payAccount === '') { |
|
|
|
|
|
this.$message({ showClose: true, type: 'error', message: '付款明细列表中付款金额不能为空' }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|