Commit 0ad22639 authored by jiacheng.mao's avatar jiacheng.mao

业务办理省市不能为空

融租申请创建页面的调整
生成合同文本按钮调整
parent b6043d09
......@@ -198,6 +198,14 @@
<div slot="name" class="required">保证金</div>
<span slot="content">{{ saveInfo.deposit|currency }}</span>
</item>
<item v-if="!isReadOnly" :showArrow="true" @click.native="selectDepositDeductionLine">
<div slot="name" class="required">保证金抵扣方式</div>
<input slot="content" v-model="saveInfo.deposit_deduction_n" readonly placeholder="请选择">
</item>
<item v-if="isReadOnly">
<div slot="name" class="required">保证金抵扣方式</div>
<input slot="content" v-model="saveInfo.deposit_deduction_n" readonly>
</item>
<item>
<div slot="name" class="required">手续费比例</div>
<RateInput
......@@ -427,6 +435,7 @@ export default {
paywayLists: [], // 支付方式
divisionLists: [],
productLine: [], // 产品线
depositDeductionLine: [], //保证金抵扣方式
factory_ocr_type: '',
certificationType: '',
uploadList: [], // 附件上传
......@@ -469,6 +478,8 @@ export default {
down_payment: '',
deposit_ratio: '',
deposit_ratio_n: '',
deposit_deduction: '',
deposit_deduction_n: '',
deposit: '',
lease_charge_ratio: '',
lease_charge_ratio_n: '',
......@@ -515,6 +526,12 @@ export default {
keyWordProduct (newVal, oldVal) {
this.searchProduct()
},
showModalBusiness (newVal, oldVal){
if (!this.showModalBusiness){
this.businessLists = []
this.pagenumSearchPolicy = 1
}
},
'saveInfo.equip_price' () {
this.saveInfo.down_payment = (this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
this.saveInfo.deposit = (this.saveInfo.equip_price * this.saveInfo.deposit_ratio_n.replace('%', '') / 100).toFixed(2)
......@@ -595,6 +612,7 @@ export default {
vm.getProductLine() // 产品线查询
vm.repayPeriod()// 还款周期查询
vm.getPayWay()// 支付方式查询
vm.getDepositDeduction()// 保证金抵扣方式
}, 0)
console.log(vm.factory_ocr_type)
}
......@@ -1099,6 +1117,8 @@ export default {
hlsPopup.showLongCenter('保证金比例不能为空!')
} else if (!vm.saveInfo.deposit) {
hlsPopup.showLongCenter('保证金不能为空!')
} else if (!vm.saveInfo.deposit_deduction) {
hlsPopup.showLongCenter('保证金抵扣方式不能为空!')
} else if (!vm.saveInfo.lease_charge_ratio_n) {
hlsPopup.showLongCenter('手续费比例不能为空!')
} else if (!vm.saveInfo.lease_charge) {
......@@ -1387,8 +1407,8 @@ export default {
},
searchBusinessPolicy () {
let vm = this
vm.businessLists = []
vm.pagenumSearchPolicy = 1
// vm.businessLists = []
// vm.pagenumSearchPolicy = 1
let randomString = Math.floor(Math.random() * 21)
let url =
process.env.basePath +
......@@ -1400,6 +1420,7 @@ export default {
pagesize: 10,
pagenum: vm.pagenumSearchPolicy,
searchInput: vm.policyKeyWord,
division: vm.saveInfo.division,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -1411,7 +1432,10 @@ export default {
vm.businessLists = returnData
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vm.businessLists = returnData
// vm.businessLists = returnData
vum.forEach(returnData, function (data, index, array) {
vm.businessLists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
......@@ -1427,8 +1451,8 @@ export default {
},
getBusinessPolicy () {
let vm = this
vm.businessLists = []
vm.pagenumPolicy = 1
// vm.businessLists = []
// vm.pagenumPolicy = 1
let randomString = Math.floor(Math.random() * 21)
let url =
process.env.basePath +
......@@ -1440,6 +1464,7 @@ export default {
pagesize: 10,
pagenum: vm.pagenumPolicy,
searchInput: vm.policyKeyWord,
division: vm.saveInfo.division,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
......@@ -1453,7 +1478,7 @@ export default {
vum.forEach(returnData, function (data, index, array) {
vm.businessLists.push(array[index])
})
vm.pagenumPolicy++
// vm.pagenumPolicy++
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
......@@ -1589,6 +1614,35 @@ export default {
},
})
},
selectDepositDeductionLine (e) {
let vm = this
vm.hlsPopup.selectList({
list: vm.depositDeductionLine,
code: 'deposit_deduction',
object: {},
returnItem: function (index, obj) {
vm.saveInfo.deposit_deduction = obj.deposit_deduction
vm.saveInfo.deposit_deduction_n = obj.deposit_deduction_n
},
})
},
getDepositDeduction () {
let vm = this
let url = process.env.basePath + 'prj_deposit_deduction'
let param = {}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.depositDeductionLine = res.lists.map(item => {
return {
code: item.deposit_deduction,
code_name: item.deposit_deduction_n,
}
})
}
})
},
getProductLine () {
let vm = this
let url = process.env.basePath + 'prj_product_division'
......
......@@ -340,7 +340,7 @@
</div>
</h-content>
<bottom-tab v-if="!flag">
<tab-button class="save" @click.native="generateContract">生成合同文本</tab-button>
<tab-button class="save" @click.native="generateContract" :disable="generateContractFlag">生成合同文本</tab-button>
<tab-button
class="approve" @click.native="checkStatus"
>融租合同创建</tab-button
......@@ -461,6 +461,7 @@ export default {
equip: [],
vehicleImg: '',
vehicleImgUpload: '',
generateContractFlag: false,
}
},
computed: {
......@@ -842,6 +843,7 @@ export default {
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.generateContractFlag = false
if (res.result === 'S') {
// hlsPopup.showLongCenter('首次分期付款日期更新成功!')
vm.recalculate()
......@@ -863,6 +865,7 @@ export default {
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.generateContractFlag = false
if (res.result === 'S') {
hlsPopup.showLongCenter('签约日期更新成功!')
} else {
......@@ -888,6 +891,7 @@ export default {
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
vm.generateContractFlag = false
if (res.result === 'S') {
vm.hlsPopup.showSuccess('保存成功')
vm.getEquipment()
......@@ -944,6 +948,7 @@ export default {
generateContract () {
// 生成合同文本
let vm = this
vm.generateContractFlag = true
let url = process.env.basePath + 'car_create_all_content'
let param = {
project_id: vm.project_id,
......@@ -952,7 +957,7 @@ export default {
vm.hlsHttp.post(url, param).then(res => {
hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('生成成功')
hlsPopup.showLongCenter('生成成功')
vm.getAttachment()
} else {
vm.hlsPopup.showLongCenter(res.message)
......
......@@ -1016,6 +1016,10 @@ export default {
vm.hlsPopup.showLongCenter('联系地址不能为空!')
} else if (!vm.baseInfo.address_on_resident_booklit) {
vm.hlsPopup.showLongCenter('户籍地址不能为空!')
} else if (!vm.baseInfo.province_name) {
vm.hlsPopup.showLongCenter('业务办理省不能为空!')
} else if (!vm.baseInfo.city_name) {
vm.hlsPopup.showLongCenter('业务办理市不能为空!')
} else if (!vm.baseInfo.academic_background) {
vm.hlsPopup.showLongCenter('学历不能为空!')
} else if (!vm.baseInfo.marital_status && (((vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') && !vm.multipleRole) || vm.multipleRole === 'TENANT' || vm.multipleRole === 'GUTA')) {
......
......@@ -1075,6 +1075,14 @@ export default {
console.log(this.lastInfo)
delete this.lastInfo.business_license_num
delete this.lastInfo.id_card_name
if (!vm.baseInfo.province_name) {
vm.hlsPopup.showLongCenter('业务办理省不能为空!')
return
}
if (!vm.baseInfo.city_name) {
vm.hlsPopup.showLongCenter('业务办理市不能为空!')
return
}
for (var key in vm.lastInfo) {
if (!vm.lastInfo[key] && key !== 'phone') {
switch (key) {
......@@ -1169,6 +1177,14 @@ export default {
} else { // 非业务经办人
delete this.lastInfo.agent_username
delete this.lastInfo.id_card_name
if (!vm.baseInfo.province_name) {
vm.hlsPopup.showLongCenter('业务办理省不能为空!')
return
}
if (!vm.baseInfo.city_name) {
vm.hlsPopup.showLongCenter('业务办理市不能为空!')
return
}
for (var key1 in vm.lastInfo) {
if (!vm.lastInfo[key1] && key1 !== 'phone') {
console.log('key', key1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment