Commit 8994ebeb authored by JingChao's avatar JingChao

Merge branch 'develop' of https://hel.hand-china.com/xugong/hls-xcmg-vue-app into develop

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