Commit 00bd6bf7 authored by 786817560's avatar 786817560

Merge branch 'ren' into develop

parents e18af40d dd073a93
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<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="$routeGo()" > <img src="@/assets/userBind/arrow.png" @click="$routeGo()" >
<span>基本信息</span> <span>附件信息</span>
</div> </div>
</h-header> </h-header>
<h-content> <h-content>
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
<div class="userInfo">补充资料</div> <div class="userInfo">补充资料</div>
<div class="house"> <div class="house">
<p class="titles">特批申请书</p> <p class="titles">特批申请书</p>
<div v-if="!applicationImg" class="card-upload" @click="ocrShow('CAR_CARD', '')"> <div v-if="!applicationImg" class="card-upload" @click="ocrShow('特批申请书', checkId)">
<img src="@/assets/userBind/camera.png" class="upload-btn" > <img src="@/assets/userBind/camera.png" class="upload-btn" >
</div> </div>
<div v-if="applicationImg && status !== 'APPROVED'" class="card-upload"> <div v-if="applicationImg && status !== 'APPROVED'" class="card-upload">
<img :src="applicationImg" @click="ocrShow('', '')"> <img :src="applicationImg" @click="ocrShow('特批申请书', checkId)">
</div> </div>
<div v-if="applicationImg && status === 'APPROVED'" class="card-upload"> <div v-if="applicationImg && status === 'APPROVED'" class="card-upload">
<img :src="applicationImg" @click="showBigPicture(applicationImg)"> <img :src="applicationImg" @click="showBigPicture(applicationImg)">
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</div> </div>
</h-content> </h-content>
<bottom-tab class="add-box"> <bottom-tab class="add-box">
<tab-button class="before" @click.native="$routeGo()">保存</tab-button> <tab-button class="before" @click.native="handSave">保存</tab-button>
<tab-button class="next" @click.native="handleSubmit">提交</tab-button> <tab-button class="next" @click.native="handleSubmit">提交</tab-button>
</bottom-tab> </bottom-tab>
</h-view> </h-view>
...@@ -139,20 +139,114 @@ export default { ...@@ -139,20 +139,114 @@ export default {
}) })
}, },
// ocr识别入口 // ocr识别入口
ocrShow (ocrType, type) { ocrShow (desc, checkId) {
let vm = this let vm = this
hlsPopup.showActionSheet({ hlsPopup.showActionSheet({
titleText: '请选择照片', titleText: '请选择照片',
buttonArray: ['拍照', '从相册取'], buttonArray: ['拍照', '从相册取'],
callback: index => { callback: index => {
if (index === 0) { if (index === 0) {
vm.openCamera(ocrType, type) vm.openCamera(desc, checkId)
} else { } else {
vm.takePicture(ocrType, type) vm.takePicture(desc, checkId)
} }
}, },
}) })
}, },
openCamera (desc, checkId) {
let vm = this
let obj = {
'pkvalue': checkId,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': checkId,
'filePath': '',
'attachment_id': '',
'user_id': 1,
'fileName': desc + '_' + new Date().getTime(),
}
let cameraoptions = {
quality: 100,
}
let success = function (imgdata) {
obj.picture = imgdata
obj.filePath = imgdata
let list = []
list.push(obj)
// 拍完一张立马执行保存图片逻辑
vm.save_picture(list)
}
let error = function () {
hlsPopup.showLongCenter('请拍照')
}
hlsUtil.openCamera(cameraoptions, success, error)
},
takePicture (desc, checkId) {
let vm = this
let cameraoptions = {
quality: 100,
}
let success = function (imgUrl) {
var list = []
for (let i = 0; i < imgUrl.length; i++) {
let obj = {
'pkvalue': checkId,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': checkId,
'filePath': '',
'attachment_id': '',
'user_id': 1,
'fileName': desc + '_' + new Date().getTime(),
}
obj.picture = imgUrl[i]
obj.filePath = imgUrl[i]
list.push(obj)
}
vm.save_picture(list)
}
let error = function () {
}
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
// 图片保存
save_picture (list) {
let vm = this
if (list.length) {
// hlsPopup.showLoading('图片上传请稍候')
var alreadyUploadNum = 0
var attLength = 0
var recordUploadInterval = setInterval(function () {
if (alreadyUploadNum === attLength) {
clearInterval(recordUploadInterval)
/* hlsPopup.hideLoading()
hlsPopup.showLongCenter('图片上传成功') */
}
}, 500)
for (var i = 0; i < list.length; i++) {
let uploadSuccess = function (res) {
if (res.result === 'S') {
alreadyUploadNum++
for (var j = 0; j < list.length; j++) {
if (list[j].filePath === res.response.filePath) {
list[j].attachment_id = res.response.attachment_id
vm.upload_list.push(list[j])
break
}
}
} else {
hlsPopup.hideLoading()
}
}
if (!list[i].attachment_id) {
attLength++
hlsUtil.fileUploadSvc(list[i], uploadSuccess)
}
}
} else {
hlsPopup.hideLoading()
}
},
loadItemList () { loadItemList () {
let vm = this let vm = this
vm.dowload_list = [] vm.dowload_list = []
...@@ -180,24 +274,24 @@ export default { ...@@ -180,24 +274,24 @@ export default {
let listTemp = [...res.lists] let listTemp = [...res.lists]
listTemp.forEach(item => { listTemp.forEach(item => {
switch (item.cdd_item) { switch (item.cdd_item) {
case 'NP_ID_CARD_F': // 自然人身份证正面 // case 'NP_ID_CARD_F': // 自然人身份证正面
vm.idCardFrontCheck_id = item.check_id // vm.idCardFrontCheck_id = item.check_id
break // break
case 'LEGAL_ID_CARD_F': // 法人代表身份证正面 // case 'LEGAL_ID_CARD_F': // 法人代表身份证正面
vm.idCardFrontCheck_id = item.check_id // vm.idCardFrontCheck_id = item.check_id
break // break
case 'NP_ID_CARD_B': // 身份证背面 // case 'NP_ID_CARD_B': // 身份证背面
vm.idCardBackCheck_id = item.check_id // vm.idCardBackCheck_id = item.check_id
break // break
case 'LEGAL_ID_CARD_B': // 身份证背面 // case 'LEGAL_ID_CARD_B': // 身份证背面
vm.idCardBackCheck_id = item.check_id // vm.idCardBackCheck_id = item.check_id
break // break
case 'HOUSE_CARD': // 房产证 // case 'HOUSE_CARD': // 房产证
vm.house_id = item.check_id // vm.house_id = item.check_id
break // break
case 'CAR_CARD': // 行驶证 // case 'CAR_CARD': // 行驶证
vm.car_id = item.check_id // vm.car_id = item.check_id
break // break
case 'ORG_CODE': // 营业执照 case 'ORG_CODE': // 营业执照
vm.license_id = item.check_id vm.license_id = item.check_id
break break
...@@ -282,26 +376,16 @@ export default { ...@@ -282,26 +376,16 @@ export default {
} }
}) })
}, },
// 获取项目id // 保存
getPrjId () { handSave () {
let vm = this hlsPopup.showLongCenter('保存成功!')
let url = process.env.basePath + 'get_project_id'
let param = { }
vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
console.log('获取项目id', res)
if (res.result === 'S') {
// vm.showLists = res.lists
}
})
}, },
// 项目提交审批 // 项目提交审批
handleSubmit () { handleSubmit () {
let vm = this let vm = this
let url = process.env.basePath + 'prj_project_submit' let url = process.env.basePath + 'prj_project_submit'
let param = { let param = {
project_id: vm.project_id, project_id: window.localStorage.project_id,
} }
vm.hlsPopup.showLoading('请稍候') vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-09-29 10:02:11 * @Date: 2019-09-29 10:02:11
* @LastEditTime : 2019-12-23 16:14:57 * @LastEditTime : 2019-12-26 12:05:03
* @LastEditors : Please set LastEditors * @LastEditors : Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
--> -->
...@@ -74,15 +74,15 @@ ...@@ -74,15 +74,15 @@
</item> </item>
<item v-if="user_bp_type === 'AGENT'"> <item v-if="user_bp_type === 'AGENT'">
<div slot="name" class="font-color">授信额度</div> <div slot="name" class="font-color">授信额度</div>
<input slot="content" placeholder="授信额度"> <input slot="content" v-model="inflow_line" readonly placeholder="授信额度">
</item> </item>
<item v-if="user_bp_type === 'AGENT'"> <item v-if="user_bp_type === 'AGENT'">
<div slot="name" class="font-color">已使用授信额度</div> <div slot="name" class="font-color">已使用授信额度</div>
<input slot="content" placeholder="已使用授信额度"> <input slot="content" v-model="inflow_used" readonly placeholder="已使用授信额度">
</item> </item>
<item v-if="user_bp_type === 'AGENT'"> <item v-if="user_bp_type === 'AGENT'">
<div slot="name" class="font-color">剩余授信额度</div> <div slot="name" class="font-color">剩余授信额度</div>
<input slot="content" placeholder="剩余授信额度"> <input slot="content" v-model="inflow_reset" readonly placeholder="剩余授信额度">
</item> </item>
<item @click.native="showTime('YYYY-MM-DD')"> <item @click.native="showTime('YYYY-MM-DD')">
<div slot="name" class="font-color">签约日期</div> <div slot="name" class="font-color">签约日期</div>
...@@ -280,7 +280,13 @@ export default { ...@@ -280,7 +280,13 @@ export default {
if (res.result === 'S') { if (res.result === 'S') {
vm.bp_agent_name = res.info.bp_agent_name vm.bp_agent_name = res.info.bp_agent_name
vm.bp_agent_id = res.info.bp_agent_id vm.bp_agent_id = res.info.bp_agent_id
vm.salesInfo.bp_id_agent = res.info.bp_agent_id if (window.localStorage.bp_type === 'OFFICE') {
vm.office_name = res.info.bp_agent_name
vm.salesInfo.office_id = res.info.bp_agent_id
vm.salesInfo.bp_id_agent = ''
} else {
vm.salesInfo.bp_id_agent = res.info.bp_agent_id
}
vm.salesInfo.bp_user_id = res.info.bp_user_id vm.salesInfo.bp_user_id = res.info.bp_user_id
vm.lesseeQuery() vm.lesseeQuery()
vm.salesQuery() vm.salesQuery()
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-09-29 10:02:11 * @Date: 2019-09-29 10:02:11
* @LastEditTime: 2019-12-19 10:38:35 * @LastEditTime : 2019-12-26 12:08:25
* @LastEditors: Please set LastEditors * @LastEditors : Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
--> -->
<template> <template>
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
</div> </div>
<list-item :item-height="44" class="second-part"> <list-item :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="font-color">参数项</div> <div slot="name" class="font-color">设备识别号</div>
<input slot="content" v-model="info.product_code" readonly > <input slot="content" v-model="info.product_code" readonly >
</item> </item>
<item> <item>
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-09-29 10:02:11 * @Date: 2019-09-29 10:02:11
* @LastEditTime: 2019-12-19 11:11:37 * @LastEditTime : 2019-12-26 13:39:32
* @LastEditors: Please set LastEditors * @LastEditors : Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
--> -->
<template> <template>
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
watch: { watch: {
'num': { 'num': {
handler (newVal, oldVal) { handler (newVal, oldVal) {
this.$refs.scroll.update(false) // this.$refs.scroll.update(false)
if (newVal === 2) { if (newVal === 2) {
if (!this.approvedFlag) { if (!this.approvedFlag) {
this.contractList() this.contractList()
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* @Description: 合同详情 * @Description: 合同详情
* @Author: your name * @Author: your name
* @Date: 2019-09-25 15:38:21 * @Date: 2019-09-25 15:38:21
* @LastEditTime: 2019-12-20 15:36:19 * @LastEditTime : 2019-12-26 12:08:42
* @LastEditors: Please set LastEditors * @LastEditors : Please set LastEditors
--> -->
<template> <template>
<h-view id="details" class="public-style" title="经销商签约"> <h-view id="details" class="public-style" title="经销商签约">
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
<p>设备清单</p></div> <p>设备清单</p></div>
<list-item :item-height="44" class="second-part"> <list-item :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="font-color">参数项</div> <div slot="name" class="font-color">设备识别号</div>
<input slot="content" v-model="info.product_code" readonly> <input slot="content" v-model="info.product_code" readonly>
</item> </item>
<item> <item>
......
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