Commit 4c3cc414 authored by linxin's avatar linxin

add

parent fd4fc329
Pipeline #4538 canceled with stages
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
v-for="(item,index) in equip" v-for="(item,index) in equip"
:key="index" :key="index"
class="equipment" class="equipment"
@click="downNum = true;getRent(item.contract_id)" @click="downNum = true;getRent(item.contract_id,item.contract_lease_item_id)"
> >
<div class="left"> <div class="left">
<span> <span>
...@@ -245,6 +245,7 @@ export default { ...@@ -245,6 +245,7 @@ export default {
showDate: '', showDate: '',
flag: false, flag: false,
isUpload: false, // 是否上传 isUpload: false, // 是否上传
contract_lease_item_id: '',
upload_list: [], // 上传列表 upload_list: [], // 上传列表
productLine: [ productLine: [
{ {
...@@ -376,6 +377,30 @@ export default { ...@@ -376,6 +377,30 @@ export default {
}) })
}, },
methods: { methods: {
getImg (id) { // 获取合格证
let vm = this
let randomString = Math.floor(Math.random() * 21)
let url =
process.env.basePath +
'app_attment_query' +
'&index' +
`'${randomString}'`
let param = {
'master': {
'source_type': 'CON_CONTRACT_LEASE_ITEM',
'pkvalue': id,
},
}
vm.$post(url, param).then(function (res) {
if (res.result === 'S') {
if (res.info) {
vm.vehicleImg = process.env.filePath + 'attachment_id=' + res.info.attachment_id + '&access_token=' + window.localStorage.access_token
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
// ocr识别入口 // ocr识别入口
ocrShow () { ocrShow () {
let vm = this let vm = this
...@@ -530,10 +555,10 @@ export default { ...@@ -530,10 +555,10 @@ export default {
let vm = this let vm = this
let list = [] let list = []
let obj = { let obj = {
pkvalue: 'contract_lease_item_id', pkvalue: vm.contract_lease_item_id,
source_type: 'CON_CONTRACT_LEASE_ITEM', source_type: 'CON_CONTRACT_LEASE_ITEM',
picture: '', picture: '',
check_id: '', check_id: vm.contract_lease_item_id,
filePath: vm.vehicleImg, filePath: vm.vehicleImg,
attachment_id: '', attachment_id: '',
user_id: 1, user_id: 1,
...@@ -574,7 +599,7 @@ export default { ...@@ -574,7 +599,7 @@ export default {
}, },
}) })
}, },
getRent (e) { getRent (e, id) {
let vm = this let vm = this
for (let i in vm.info) { for (let i in vm.info) {
vm.info[i] = '' vm.info[i] = ''
...@@ -589,6 +614,8 @@ export default { ...@@ -589,6 +614,8 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
Object.assign(vm.info, res.info) Object.assign(vm.info, res.info)
vm.getImg(id)
vm.contract_lease_item_id = id
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
......
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