Commit 33ecdb87 by 宋毅

tj

parent 327fe49d
{ {
template: '${tmpl}', template: '${tmpl}',
data: function() { data: function() {
...@@ -50,12 +51,15 @@ ...@@ -50,12 +51,15 @@
payWay: "", payWay: "",
payAccount: "", payAccount: "",
}; };
this.$root.postReq("/web/auth/userCtl/invoice",obj).then(res => { this.$root.postReq("/web/auth/userCtl/invoice", obj).then(res => {
if(res.status == 0){ var result = JSON.parse(rtn.stdout);
if (result.status == 0) {
this.$root.pushx({ this.$root.pushx({
title:'', title: '',
name:'/fapiao' name: '/fapiao'
}) })
} else {
this.$message.warning("操作异常,请刷新页面");
} }
}) })
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</div> </div>
<div class="fapiao-main"> <div class="fapiao-main">
<div class="fapiao-items"> <div class="fapiao-items">
<div class="fapiao-item" v-for="(item,index) in orderList"> <div class="fapiao-item" v-for="(item,index) in orderList" @click="openUrl(item.invoiceImg)">
<div class="top"> <div class="top">
<h3>{{item.merchantName}}</h3> <h3>{{item.merchantName}}</h3>
<h4>{{item.statusName}}</h4> <h4>{{item.statusName}}</h4>
......
...@@ -6,16 +6,22 @@ ...@@ -6,16 +6,22 @@
} }
}, },
mounted: function() { mounted: function() {
this.$root.postReq("/web/auth/userCtl/invoicelist",{}).then(res => { this.$root.postReq("/web/auth/userCtl/invoicelist", {}).then(res => {
console.log(JSON.parse(res.stdout)); console.log(JSON.parse(res.stdout));
this.orderList =JSON.parse(res.stdout).data.rows; this.orderList = JSON.parse(res.stdout).data.rows;
}) })
}, },
created: function() { created: function() {
}, },
methods: { methods: {
openUrl(invoiceImg){
if (invoiceImg) {
window.open(invoiceImg);
} else {
this.$message.warning("暂未开票,敬请期待");
}
}
}, },
vname: "gsb-fapiao" vname: "gsb-fapiao"
} }
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