Commit 96eb6450 authored by linxin's avatar linxin

增加银行卡信息带出

parents 09d7b422 62c5a132
......@@ -21,8 +21,8 @@
<div class="clear" />
<div class="card-content">
<ul>
<li v-for="(item,index) in getBankList" :key="index">
<item-option class="slider">
<li v-for="(item,index) in getBankList" :key="index" >
<item-option class="slider" @click.native="sendList(item)">
<div
:style="'background-image: url('+ changeBgImg (item) +')'"
class="my-bank-card"
......@@ -65,6 +65,10 @@ export default {
this.showModalValue = true
this.$emit('getInfo', this.showModalValue)
},
sendList (a) {
this.$emit('getList', a)
this.sendFlag()
},
changeBgImg (item) {
if (item.bank_full_name === '中国农业银行') {
return backImg1
......
......@@ -198,19 +198,13 @@
<span>{{ list.description }}</span>
<div class="img-content">
<!--待上传图片列表-->
<div v-for="(item, index) in upload_list" v-if="item.check_id==list.check_id" :key="index" class="card-upload">
<img :src="item.picture" >
<div class="close" @click="delete_pic(item.attachment_id)">
<img src="@/assets/userBind/deleteIcon.png">
</div>
<div v-for="(list, index) in upload_list" :key="index">
<img :src="list.picture" >
</div>
<!--从服务器上下载的图片-->
<div v-for="item in dowload_list" >
<div v-for="(pic, index) in item" v-if="pic.check_id==list.check_id" :key="index" class="card-upload">
<img :src="pic.url" >
<div class="close" @click="delete_pic(pic.attachment_id)">
<img src="@/assets/userBind/deleteIcon.png">
</div>
<div v-for="item in dowload_list" class="card-upload">
<div v-for="(pic, index) in item" :key="index">
<img :src="item.url" >
</div>
</div>
<div class="card-upload" @click="imgUploadShow(list.check_id)">
......@@ -219,7 +213,7 @@
</div>
</div>
</div>
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" />
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" @getList="getList"/>
<InvoiceInfo
v-show="tabNum==2"
:baseInfo="baseInfo"
......@@ -439,20 +433,18 @@ export default {
}
})
},
load_picture (check_id, index) {
load_picture (check_id) {
let vm = this
let url = process.env.basePath + 'attachment_list_query' + '&index' + index // 附件查询
let url = process.env.basePath + 'attachment_list_query'
let param = {
check_id: check_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
console.log('%%%%%%%%%%%%' + res)
if (res.result === 'S') {
res.lists.forEach(item => {
item['url'] = process.env.filePath + 'attachment_id=' + item.attachment_id + '&access_token=' + window.localStorage.access_token
})
vm.dowload_list.push(res.lists)
console.log('**********' + res.lists)
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -471,7 +463,7 @@ export default {
let url = process.env.basePath + 'prj_cdd_check_list'
let param = {
master: {
'document_id': bpId,
'document_id': 7928,
'document_table': 'HLS_BP_MASTER',
'tab_group': 'HLS_NP',
},
......@@ -482,8 +474,8 @@ export default {
if (res.result === 'S') {
vm.cddItemList = [...res.lists]
// 查询图片
vm.cddItemList.forEach((item, index) => {
vm.load_picture(item.check_id, index)
vm.cddItemList.forEach(item => {
vm.load_picture(item.check_id)
})
}
})
......@@ -572,7 +564,6 @@ export default {
'pkvalue': check_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': check_id,
'filePath': '',
'attachment_id': '',
'user_id': 1,
......@@ -599,21 +590,21 @@ export default {
quality: 100,
}
let success = function (imgUrl) {
var list = []
for (let i = 0; i < imgUrl.length; i++) {
let obj = {
'pkvalue': check_id,
'source_type': 'PRJ_CDD_ITEM_CHECK',
'picture': '',
'check_id': check_id,
'filePath': '',
'attachment_id': '',
'user_id': 1,
}
obj.picture = imgUrl[i]
obj.filePath = imgUrl[i]
var list = []
list.push(obj)
}
// 拍完一张立马执行保存图片逻辑
vm.save_picture(list)
}
let error = function () {
......@@ -622,6 +613,7 @@ export default {
},
// 图片保存
save_picture (list) {
alert('图片待上传数组 ' + JSON.stringify(list))
let vm = this
if (list.length) {
// hlsPopup.showLoading('图片上传请稍候')
......@@ -637,6 +629,7 @@ export default {
for (var i = 0; i < list.length; i++) {
let uploadSuccess = function (res) {
if (res.result === 'S') {
alert('返回结果 ' + JSON.stringify(res.response))
alreadyUploadNum++
for (var j = 0; j < list.length; j++) {
if (list[j].filePath === res.response.filePath) {
......@@ -894,6 +887,9 @@ export default {
getInfo (i) {
this.showModalValue = i
},
getList (a) {
Object.assign(this.bank, a)
},
showModal () {
this.showModalValue = true
},
......@@ -1255,17 +1251,7 @@ export default {
align-items: center;
margin-top: 12px;
margin-left: 12px;
float: left;
.close {
position: relative;
color: #F96F68;
margin-top: -100%;
margin-left: -10%;
img{
width: 14px;
height: 14px;
}
}
// float: left;
img {
width: 88px;
height: 88px;
......@@ -1366,4 +1352,3 @@ export default {
line-height: 34px !important;
}
</style>
</h-view></textarea></item></list-item></div></h-content></template>
......@@ -29,7 +29,7 @@
<div class="card-content">
<ul>
<li v-for="(item,index) in getBankList" :key="index">
<item-option class="slider">
<item-option class="slider" @click.native="sendList(item)">
<div
:style="'background-image: url('+ changeBgImg (item) +')'"
class="my-bank-card"
......@@ -72,6 +72,10 @@ export default {
this.showModalValue = true
this.$emit('getInfo', this.showModalValue)
},
sendList (a) {
this.$emit('getList', a)
this.sendFlag()
},
changeBgImg (item) {
if (item.bank_full_name === '中国农业银行') {
return backImg1
......
......@@ -318,7 +318,7 @@
</div>
</div>
<!-- <BankInfo v-show="tabNum==1" :bp_id="bp_id" @getInfo="getInfo" /> -->
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" />
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" @getList="getList" />
<InvoiceInfo
v-show="tabNum==2"
:tabNum="tabNum"
......@@ -914,6 +914,9 @@ export default {
getInfo (i) {
this.showModalValue = i
},
getList (i) {
Object.assign(this.bank_lists, i)
},
getinvoiceList (val) {
console.log(val)
this.invoiceInfo = val
......
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