Commit 2819dc68 authored by linxin's avatar linxin

解决bug

parent 82894824
......@@ -8,9 +8,9 @@ module.exports = merge(prodEnv, {
debug: true,
isMobilePlatform: false,
loginPath: '"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=admin&password=" ',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_UAT&apiName="',
basePath: '"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_DEV&apiName="',
rootPath: '"http://180.104.121.66:8088/r/api"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_UAT&apiName=file_view&"',
filePath: '"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_DEV&apiName=file_view&"',
ocrPath: '"http://180.104.121.66:8088/r/api"',
appId: '"com.xcmg.app"',
currentVersion: '"1.0.2"',
......
......@@ -296,7 +296,7 @@ export default {
if (res.result === 'S') {
return true
} else {
// vm.hlsPopup.showLongCenter(res.message)
vm.hlsPopup.showLongCenter(res.message)
}
},
getTabNum (i) {
......
......@@ -2,7 +2,7 @@
<h-view id="create-rent-info">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="routeGoCustom()">
<img src="@/assets/userBind/arrow.png" @click="routeGoCustomClick()">
<span>租赁信息</span>
</div>
</h-header>
......@@ -281,6 +281,7 @@ export default {
policyKeyWord: '',
isReadOnly: false, // 是否只读
fromPutted: false,
isClick: false, // false:右滑返回;true:点击按钮返回
fromList: false, // 判断是否从列表过来
pagenum: 1, // 产品型号页码
pagenumSearch: 1, // 产品型号查询时的页码
......@@ -348,6 +349,13 @@ export default {
// },
},
watch: {
$route (to, from) {
if (to.name === 'CreateBaseInfo' && from.name === 'CreateRentInfo') {
if (!this.isClick && this.fromPage === 'sale') {
this.routeGoCustom()
}
}
},
policyKeyWord (newVal, oldVal) {
this.searchBusinessPolicy()
},
......@@ -394,6 +402,7 @@ export default {
vm.bp_agent_id = vm.$route.params.bp_agent_id
vm.saveInfo.bp_name = window.localStorage.bp_name_tenant
vm.saveTed = false
vm.isClick = false
if (vm.fromPage === 'sale') {
vm.fromList = false
vm.isReadOnly = false
......@@ -427,10 +436,18 @@ export default {
})
},
methods: {
routeGoCustomClick () {
if (this.fromPage === 'sale') {
this.isClick = true
this.routeGoCustom()
} else {
this.$routeGo()
}
},
// 自定义返回逻辑:第一次新建时返回判断是否保存数据,未保存提示保存
routeGoCustom () {
let vm = this
if (vm.salesEnter === 'SalesInfo' && !vm.saveTed) {
if (vm.fromPage === 'sale' && !vm.saveTed) {
hlsPopup.showConfirm({
title: '提示',
content: '当前页面数据未保存,返回会导致数据丢失,是否保存?',
......@@ -576,6 +593,43 @@ export default {
},
saveBack () {
let vm = this
if (!vm.saveInfo.division_n) {
hlsPopup.showLongCenter('产品线不能为空!')
} else if (!vm.saveInfo.product_id_n) {
hlsPopup.showLongCenter('产品型号不能为空!')
} else if (!vm.saveInfo.product_num) {
hlsPopup.showLongCenter('产品数量不能为空!')
} else if (!vm.saveInfo.product_plan_name) {
hlsPopup.showLongCenter('商务政策不能为空!')
} else if (!vm.saveInfo.equip_price) {
hlsPopup.showLongCenter('设备单价不能为空!')
} else if (!vm.saveInfo.down_payment_ratio_n) {
hlsPopup.showLongCenter('首付比例不能为空!')
} else if (!vm.saveInfo.down_payment) {
hlsPopup.showLongCenter('首付款不能为空!')
} else if (!vm.saveInfo.deposit_ratio_n) {
hlsPopup.showLongCenter('保证金比例不能为空!')
} else if (!vm.saveInfo.deposit) {
hlsPopup.showLongCenter('保证金不能为空!')
} else if (!vm.saveInfo.lease_charge_ratio_n) {
hlsPopup.showLongCenter('手续费比例不能为空!')
} else if (!vm.saveInfo.lease_charge) {
hlsPopup.showLongCenter('手续费不能为空!')
} else if (!vm.saveInfo.gps_fee) {
hlsPopup.showLongCenter('GPS费用不能为空!')
} else if (!vm.saveInfo.insurance_fee) {
hlsPopup.showLongCenter('保险押金不能为空!')
} else if (!vm.saveInfo.lease_start_date) {
hlsPopup.showLongCenter('预计付款日不能为空!')
} else if (!vm.saveInfo.annual_pay_times_n) {
hlsPopup.showLongCenter('还款周期不能为空!')
} else if (!vm.saveInfo.lease_times) {
hlsPopup.showLongCenter('租赁期数不能为空!')
} else if (!vm.saveInfo.pay_type_n) {
hlsPopup.showLongCenter('支付方式不能为空!')
} else if (!vm.saveInfo.residual_value) {
hlsPopup.showLongCenter('留购价不能为空!')
} else {
let url = process.env.basePath + 'prj_lease_info_save'
vm.saveInfo.down_payment_ratio = (vm.saveInfo.down_payment_ratio_n.replace('%', '') / 100).toFixed(2)
vm.saveInfo.lease_charge_ratio = (vm.saveInfo.lease_charge_ratio_n.replace('%', '') / 100).toFixed(2)
......@@ -594,6 +648,7 @@ export default {
hlsPopup.showLongCenter(res.message)
}
})
}
},
async isComputedCheck () {
let vm = this
......
......@@ -2,7 +2,7 @@
<h-view id="create-base-info">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="routeGoCustom()" >
<img src="@/assets/userBind/arrow.png" @click="routeGoCustomClick()" >
<span>基本信息</span>
</div>
</h-header>
......@@ -390,6 +390,7 @@ export default {
bp_class: '',
showModalValue: false,
fromPutted: false, // 为true为从已提交进来
isClick: false,
keyWord: '',
bp_agent_id: '',
pageNum: 1,
......@@ -431,8 +432,10 @@ export default {
watch: {
$route (to, from) {
if (to.name === 'SalesInfo' && from.name === 'CreateBaseInfo') {
if (!this.isClick) {
this.routeGoCustom()
}
}
},
checked: {
handler (newVal, oldVal) {
......@@ -494,6 +497,7 @@ export default {
vm.fromPutted = false
vm.checked = false // 农行代扣
vm.checkedApproved = false // 是否特批
vm.isClick = false
Object.keys(vm.saveInfo).forEach(i => {
if (
i !== 'project_id' &&
......@@ -538,6 +542,10 @@ export default {
},
methods: {
routeGoCustomClick () {
this.isClick = true
this.routeGoCustom()
},
// 自定义返回逻辑:第一次新建时返回判断是否保存数据,未保存提示保存
routeGoCustom () {
let vm = this
......
......@@ -26,7 +26,7 @@
<item>
<div slot="name" class="font-color">融资金额</div>
<span v-if="!equip_price" slot="content" class="autoColor">融资金额自动填充</span>
<span v-if="equip_price" slot="content">{{ parseFloat(equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100).toFixed(2) | currency }}</span>
<span v-if="equip_price" slot="content">{{ parseFloat(equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100).toFixed(2) | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">首付款比例</div>
......@@ -35,7 +35,7 @@
<item>
<div slot="name" class="font-color">首付款</div>
<span v-if="!equip_price" slot="content" class="autoColor">首付款金额自动填充</span>
<span v-if="equip_price" slot="content">{{ equip_price*info.down_payment_ratio_n.replace("%","")/100 | currency }}</span>
<span v-if="equip_price" slot="content">{{ equip_price*info.down_payment_ratio_n.replace("%","")/100 | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">保证金比例</div>
......@@ -46,7 +46,7 @@
<span v-if="!equip_price" slot="content" class="autoColor">保证金额自动填充</span>
<span
v-if="equip_price"
slot="content">{{ equip_price*info.deposit_ratio_n.replace("%","")/100 | currency }}</span>
slot="content">{{ equip_price*info.deposit_ratio_n.replace("%","")/100 | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">手续费比例</div>
......@@ -55,21 +55,19 @@
<item>
<div slot="name" class="font-color">手续费</div>
<span v-if="!equip_price" slot="content" class="autoColor">手续费金额自动填充</span>
<span v-if="equip_price" slot="content">{{ parseFloat((equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100)).toFixed(2) | currency }}</span>
<span v-if="equip_price" slot="content">{{ parseFloat((equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100)).toFixed(2) | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">保险押金</div>
<input slot="content" v-model="insurance_fee" placeholder="请输入保险押金">
</item>
<CurrencyInput slot="content" v-model="insurance_fee" placeholder="请输入保险押金"/></currencyinput></item>
<item>
<div slot="name" class="font-color">GPS费用</div>
<input slot="content" v-model="gps_fee" placeholder="请输入GPS费用">
</item>
<CurrencyInput slot="content" v-model="gps_fee" placeholder="请输入GPS费用"/></currencyinput></item>
<item>
<div slot="name" class="font-color">首次付款合计</div>
<span v-if="!equip_price" slot="content" class="autoColor">首次付款合计金额自动填充</span>
<!-- 合计 = 首付款+保证金+手续费+GPS费用+保险押金 -->
<span v-if="equip_price" slot="content">{{ parseFloat(equip_price*info.down_payment_ratio_n.replace("%","")/100 + equip_price*info.deposit_ratio_n.replace("%","")/100 + (equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100) + Number(gps_fee) + Number(insurance_fee)).toFixed(2) | currency }}</span>
<span v-if="equip_price" slot="content">{{ parseFloat(equip_price*info.down_payment_ratio_n.replace("%","")/100 + equip_price*info.deposit_ratio_n.replace("%","")/100 + (equip_price - equip_price*info.down_payment_ratio_n.replace("%","")/100)*(info.lease_charge_ratio_n.replace("%","")/100) + Number(gps_fee) + Number(insurance_fee)).toFixed(2) | currency }}</span>
</item>
<item @click.native="showTime('YYYY-MM-DD')">
<div slot="name" class="fo nt-color">预计付款日</div>
......
......@@ -54,7 +54,7 @@
>
<!-- <input v-if="!bpClass_flag" slot="content" :placeholder="type" v-model="baseInfo.business_license_num" > -->
</item>
<button v-if="isAddNewType" class="type-save">新增角色</button>
<button v-if="isAddNewType" class="type-save" @click="addNewRole">新增角色</button>
</list-item>
<div class="userInfo martop">企业信息</div>
<div class="upload-id-card">
......@@ -930,9 +930,6 @@ export default {
case 'business_address':
vm.hlsPopup.showLongCenter('经营地址未填写')
break
case 'phone':
vm.hlsPopup.showLongCenter('固定电话未填写')
break
case 'id_card_no':
vm.hlsPopup.showLongCenter('身份证未填写')
break
......@@ -1026,9 +1023,6 @@ export default {
case 'business_address':
vm.hlsPopup.showLongCenter('经营地址未填写')
break
case 'phone':
vm.hlsPopup.showLongCenter('固定电话未填写')
break
case 'id_card_no':
vm.hlsPopup.showLongCenter('身份证未填写')
break
......@@ -1339,7 +1333,26 @@ export default {
}
})
},
addNewRole () { // 增加角色
let vm = this
let url = process.env.basePath + 'bp_type_save'
let param = {
master: {
bp_id: window.localStorage.getItem('bp_id'),
bp_type: vm.multiBpType.bp_type,
},
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('新增成功')
vm.isAddNewType = false
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// ocr识别入口
ocrShow (ocrType, type) {
let vm = this
......
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