Commit 29fe67b2 authored by 14699's avatar 14699

fix:融资方案变更修改

parent b132108b
......@@ -66,7 +66,7 @@
</item>
</list-item>
</div>
<button @click="prjGuarantorSave">保存</button>
<button @click="prjBaseInfoSave(true,false, false)">保存</button>
</div>
</div>
</transition>
......@@ -80,7 +80,7 @@
<div :class="{ 'done': num === 0, 'undone': num !== 0 }" @click="num = 0;">
<img :src="num === 0 ? check1 : uncheck1">基本信息
</div>
<div :class="{ 'done': num === 1, 'undone': num !== 1 }" @click="num = 1;">
<div :class="{ 'done': num === 1, 'undone': num !== 1 }" @click="prjBaseInfoSave(false,true, false)">
<img :src="num === 1 ? check3 : uncheck3">方案信息
</div>
</div>
......@@ -110,6 +110,12 @@
slot="content" v-model="baseInfo.director"
readonly>
</item>
<item>
<div slot="name" class="font-color">金租审核进度</div>
<input
slot="content" v-model="approve_status_n"
readonly>
</item>
</list-item>
<div class="equipment-list">承租人信息</div>
<list-item :item-height="44" class="second-part">
......@@ -708,11 +714,11 @@
</h-content>
<bottom-tab class="add-box">
<tab-button class="next" @click.native="handleSave">
<img src="@/assets/intoApproval/approve.png" >保存
</tab-button>
<tab-button v-if="zm_project_status !== 'APPROVED' && director_flag === 'Y'" class="next" @click.native="handleSubmit">
提交复核
<img src="@/assets/intoApproval/approve.png" >提交
</tab-button>
<!-- <tab-button v-if="zm_project_status !== 'APPROVED' && director_flag === 'Y'" class="next" @click.native="handleSubmit">-->
<!-- 提交复核-->
<!-- </tab-button>-->
</bottom-tab>
</h-view>
</template>
......@@ -882,6 +888,7 @@ export default {
vm.confirm_id = vm.$route.params.item.confirm_id
vm.zm_project_status = vm.$route.params.item.zm_project_status // 复核状态
vm.director_flag = vm.$route.params.item.director_flag // 是否复核岗位
vm.approve_status_n = vm.$route.params.item.approve_status_n // 金租审核进度
vm.agentPic = vm.unRead
vm.leasePic = vm.unRead
if (vm.$route.params.item.bp_class === 'NP') {
......@@ -1756,44 +1763,7 @@ export default {
// handleSave
handleSave () {
if (this.num === 0) {
let vm = this
if (!vm.baseInfo.bp_name) {
hlsPopup.showLongCenter('公司名称不能为空!')
} else if (!vm.baseInfo.organization_code) {
hlsPopup.showLongCenter('统一社会信用代码不能为空!')
} else if (!vm.baseInfo.registered_capital) {
hlsPopup.showLongCenter('注册资本不能为空!')
} else if (!vm.baseInfo.registered_place) {
hlsPopup.showLongCenter('注册地址不能为空!')
} else if (!vm.baseInfo.business_address) {
hlsPopup.showLongCenter('经营地址不能为空!')
} else if (!vm.baseInfo.phone) {
hlsPopup.showLongCenter('承租人联系电话能为空!')
} else if (!vm.baseInfo.bp_other_asset) {
hlsPopup.showLongCenter('承租人其他资产说明项不能为空!')
} else if (!vm.baseInfo.other_info) {
hlsPopup.showLongCenter('其他补充信息栏不能为空!')
}
// else if (!vm.baseInfo.legal_person) {
// hlsPopup.showLongCenter('法人姓名不能为空!')
// } else if (!vm.baseInfo.id_card_no) {
// hlsPopup.showLongCenter('法人证件号不能为空!')
// } else if (!vm.baseInfo.cell_phone) {
// hlsPopup.showLongCenter('法人手机号码不能为空!')
// } else if (!vm.baseInfo.living_address) {
// hlsPopup.showLongCenter('法人联系地址不能为空!')
// } else if (!vm.baseInfo.control_person) {
// hlsPopup.showLongCenter('实控人姓名不能为空!')
// } else if (!vm.baseInfo.control_id_card_no) {
// hlsPopup.showLongCenter('实控人证件号不能为空!')
// } else if (!vm.baseInfo.control_cell_phone) {
// hlsPopup.showLongCenter('实控人手机号码不能为空!')
// } else if (!vm.baseInfo.control_living_address) {
// hlsPopup.showLongCenter('实控人联系地址不能为空!')
// }
else {
this.prjBaseInfoSave()
}
this.prjBaseInfoSave(false, false, true)
} else {
this.calculationSave()
}
......@@ -1813,9 +1783,14 @@ export default {
},
prjBaseInfoSubmit () {
let vm = this
let projectStatus = 'APPROVING'
if (vm.director_flag === 'Y') {
projectStatus = 'APPROVED'
}
let url = $config.basePath + 'zm_prj_status_update'
let param = {
project_id: vm.project_id,
zm_project_status: projectStatus,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
......@@ -1830,26 +1805,55 @@ export default {
}
})
},
// 保存融租方案接口
prjBaseInfoSave () {
// 保存基本信息接口
prjBaseInfoSave (isSaveGua = false, isClickTab = false, isSubmit = false) {
let vm = this
let url = $config.basePath + 'zm_prj_base_info_save'
let master = {
...vm.baseInfo, ...vm.invoiceInfo,
}
master.project_id = vm.project_id
let param = {
master,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('基本信息保存成功')
} else {
hlsPopup.showLongCenter(res.message)
if (!vm.baseInfo.bp_name) {
hlsPopup.showLongCenter('公司名称不能为空!')
} else if (!vm.baseInfo.organization_code) {
hlsPopup.showLongCenter('统一社会信用代码不能为空!')
} else if (!vm.baseInfo.registered_capital) {
hlsPopup.showLongCenter('注册资本不能为空!')
} else if (!vm.baseInfo.registered_place) {
hlsPopup.showLongCenter('注册地址不能为空!')
} else if (!vm.baseInfo.business_address) {
hlsPopup.showLongCenter('经营地址不能为空!')
} else if (!vm.baseInfo.phone) {
hlsPopup.showLongCenter('承租人联系电话能为空!')
} else if (!vm.baseInfo.bp_other_asset) {
hlsPopup.showLongCenter('承租人其他资产说明项不能为空!')
} else if (!vm.baseInfo.other_info) {
hlsPopup.showLongCenter('其他补充信息栏不能为空!')
} else {
let url = $config.basePath + 'zm_prj_base_info_save'
let master = {
...vm.baseInfo, ...vm.invoiceInfo,
}
})
master.project_id = vm.project_id
let param = {
master,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('基本信息保存成功')
if (isSaveGua) {
vm.prjGuarantorSave()
}
if (isClickTab) {
vm.num = 1
}
if (isSubmit) {
if (vm.zm_project_status !== 'APPROVED') {
vm.prjBaseInfoSubmit()
}
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
}
},
// 保存担保人
prjGuarantorSave () {
......@@ -1938,6 +1942,9 @@ export default {
if (res.result === 'S') {
vm.quotationInfo.quotation_id = res.quotation_id
hlsPopup.showLongCenter('方案信息保存成功')
if (vm.zm_project_status !== 'APPROVED') {
vm.prjBaseInfoSubmit()
}
} else {
hlsPopup.showLongCenter(res.message)
}
......
......@@ -82,7 +82,7 @@
</item> -->
</list-item>
</div>
<button @click="prjGuarantorSave">保存</button>
<button @click="prjBaseInfoSave(true,false, false)">保存</button>
</div>
</div>
</transition>
......@@ -96,7 +96,7 @@
<div :class="{ 'done': num === 0, 'undone': num !== 0 }" @click="num = 0;">
<img :src="num === 0 ? check1 : uncheck1">基本信息
</div>
<div :class="{ 'done': num === 1, 'undone': num !== 1 }" @click="num = 1;">
<div :class="{ 'done': num === 1, 'undone': num !== 1 }" @click="prjBaseInfoSave(false,true, false)">
<img :src="num === 1 ? check3 : uncheck3">方案信息
</div>
</div>
......@@ -126,6 +126,12 @@
slot="content" v-model="baseInfo.director"
readonly>
</item>
<item>
<div slot="name" class="font-color">金租审核进度</div>
<input
slot="content" v-model="approve_status_n"
readonly>
</item>
</list-item>
<div class="equipment-list">承租人信息</div>
<list-item :item-height="44" class="second-part">
......@@ -680,7 +686,7 @@
</h-content>
<bottom-tab class="add-box">
<tab-button class="next" @click.native="handleSave()">
<img src="@/assets/intoApproval/approve.png">保存
<img src="@/assets/intoApproval/approve.png">提交
</tab-button>
</bottom-tab>
</h-view>
......@@ -751,6 +757,7 @@ export default {
dowload_list_suggest: [],
upload_list_credit: [],
dowload_list_credit: [],
approve_status_n: '待审核',
}
},
computed: {},
......@@ -1499,46 +1506,8 @@ export default {
// handleSave
handleSave () {
// debugger
if (this.num === 0) {
let vm = this
if (!vm.baseInfo.bp_name) {
hlsPopup.showLongCenter('公司名称不能为空!')
} else if (!vm.baseInfo.organization_code) {
hlsPopup.showLongCenter('统一社会信用代码不能为空!')
} else if (!vm.baseInfo.registered_capital) {
hlsPopup.showLongCenter('注册资本不能为空!')
} else if (!vm.baseInfo.registered_place) {
hlsPopup.showLongCenter('注册地址不能为空!')
} else if (!vm.baseInfo.business_address) {
hlsPopup.showLongCenter('经营地址不能为空!')
} else if (!vm.baseInfo.phone) {
hlsPopup.showLongCenter('承租人联系电话不能为空!')
} else if (!vm.baseInfo.bp_other_asset) {
hlsPopup.showLongCenter('承租人其他资产说明项不能为空!')
} else if (!vm.baseInfo.other_info) {
hlsPopup.showLongCenter('其他补充信息栏不能为空!')
}
// else if (!vm.baseInfo.legal_person) {
// hlsPopup.showLongCenter('法人姓名不能为空!')
// } else if (!vm.baseInfo.id_card_no) {
// hlsPopup.showLongCenter('法人证件号不能为空!')
// } else if (!vm.baseInfo.cell_phone) {
// hlsPopup.showLongCenter('法人手机号码不能为空!')
// } else if (!vm.baseInfo.living_address) {
// hlsPopup.showLongCenter('法人联系地址不能为空!')
// } else if (!vm.baseInfo.control_person) {
// hlsPopup.showLongCenter('实控人姓名不能为空!')
// } else if (!vm.baseInfo.control_id_card_no) {
// hlsPopup.showLongCenter('实控人证件号不能为空!')
// } else if (!vm.baseInfo.control_cell_phone) {
// hlsPopup.showLongCenter('实控人手机号码不能为空!')
// } else if (!vm.baseInfo.control_living_address) {
// hlsPopup.showLongCenter('实控人联系地址不能为空!')
// }
else {
this.prjBaseInfoSave()
}
this.prjBaseInfoSave(false, false, true)
} else {
this.calculationSave()
}
......@@ -1559,7 +1528,6 @@ export default {
}
})
},
// 保存担保人
prjGuarantorSave () {
let vm = this
......@@ -1593,36 +1561,65 @@ export default {
}
},
// 保存融租方案接口
prjBaseInfoSave () {
// 保存基本信息接口
prjBaseInfoSave (isSaveGua = false, isClickTab = false, isSubmit = false) {
let vm = this
let url = $config.basePath + 'zm_prj_base_info_save'
let master = {
...vm.baseInfo, ...vm.invoiceInfo,
}
master.user_phone = window.localStorage.user_phone
// master.phone= window.localStorage.user_phone
master.project_id = vm.project_id
let param = {
master,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
hlsPopup.showLongCenter('基本信息保存成功')
vm.project_id = res.project_id
vm.getMiningLicenseList()
vm.getFinancialStatementsList()
vm.getSuggerLicenseList()
vm.getContractLicenseList()
vm.getLicenseList()
vm.getProductLicenseList()
vm.getCreditLicenseList()
} else {
hlsPopup.showLongCenter(res.message)
if (!vm.baseInfo.bp_name) {
hlsPopup.showLongCenter('公司名称不能为空!')
} else if (!vm.baseInfo.organization_code) {
hlsPopup.showLongCenter('统一社会信用代码不能为空!')
} else if (!vm.baseInfo.registered_capital) {
hlsPopup.showLongCenter('注册资本不能为空!')
} else if (!vm.baseInfo.registered_place) {
hlsPopup.showLongCenter('注册地址不能为空!')
} else if (!vm.baseInfo.business_address) {
hlsPopup.showLongCenter('经营地址不能为空!')
} else if (!vm.baseInfo.phone) {
hlsPopup.showLongCenter('承租人联系电话不能为空!')
} else if (!vm.baseInfo.bp_other_asset) {
hlsPopup.showLongCenter('承租人其他资产说明项不能为空!')
} else if (!vm.baseInfo.other_info) {
hlsPopup.showLongCenter('其他补充信息栏不能为空!')
} else {
let url = $config.basePath + 'zm_prj_base_info_save'
let master = {
...vm.baseInfo, ...vm.invoiceInfo,
}
})
master.user_phone = window.localStorage.user_phone
// master.phone= window.localStorage.user_phone
master.project_id = vm.project_id
let param = {
master,
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
if (!isSaveGua && !isSaveGua) {
hlsPopup.showLongCenter('基本信息保存成功')
}
vm.project_id = res.project_id
vm.getMiningLicenseList()
vm.getFinancialStatementsList()
vm.getSuggerLicenseList()
vm.getContractLicenseList()
vm.getLicenseList()
vm.getProductLicenseList()
vm.getCreditLicenseList()
if (isSaveGua) {
vm.prjGuarantorSave()
}
if (isClickTab) {
vm.num = 1
}
if (isSubmit) {
vm.prjBaseInfoSubmit()
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
}
},
// 设备信息
getLease () {
......@@ -1673,6 +1670,10 @@ export default {
hlsPopup.showLongCenter('请先保存基本信息')
return
}
if (!vm.quotationInfo.equip_price) {
hlsPopup.showLongCenter('请输入设备总价')
return
}
let url = $config.basePath + 'zm_prj_quotation_save'
let master = {
'project_id': vm.project_id,
......@@ -1701,6 +1702,7 @@ export default {
if (res.result === 'S') {
hlsPopup.showLongCenter('方案信息保存成功')
vm.quotationInfo.quotation_id = res.quotation_id
vm.prjBaseInfoSubmit()
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -1711,6 +1713,26 @@ export default {
vm.guarantorInfo = {}
vm.guarantorFlag = true
},
prjBaseInfoSubmit () {
let vm = this
let url = $config.basePath + 'zm_prj_status_update'
let param = {
project_id: vm.project_id,
zm_project_status: 'APPROVING',
}
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.hlsPopup.showSuccess('提交成功')
// setTimeout(() => {
// vm.$router.go(-1)
// }, 1000)
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
},
}
</script>
......
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