Commit 16d971dd2bb73fb98eeda2edc330f7243685d32a

Authored by 王富生
2 parents 2f924783 c482cd01

Merge remote-tracking branch 'origin/branch_dev' into branch_dev

# Conflicts:
#	src/views/payback/index.vue
.env.production
@@ -3,5 +3,5 @@ ENV = 'production' @@ -3,5 +3,5 @@ ENV = 'production'
3 3
4 # base api 4 # base api
5 #VUE_APP_BASE_API = '/prod-api' 5 #VUE_APP_BASE_API = '/prod-api'
6 -VUE_APP_BASE_API = '/prov-api' 6 +VUE_APP_BASE_API = 'http://test.renniting.cn/bcp/'
7 7
package.json
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
21 "normalize.css": "7.0.0", 21 "normalize.css": "7.0.0",
22 "nprogress": "^0.2.0", 22 "nprogress": "^0.2.0",
23 "path-to-regexp": "2.4.0", 23 "path-to-regexp": "2.4.0",
  24 + "qrcodejs2": "^0.0.2",
24 "vue": "2.6.10", 25 "vue": "2.6.10",
25 "vue-router": "3.0.6", 26 "vue-router": "3.0.6",
26 "vuex": "3.1.0" 27 "vuex": "3.1.0"
src/views/payback/index.vue
@@ -113,12 +113,15 @@ @@ -113,12 +113,15 @@
113 :visible.sync="dialogVisible" 113 :visible.sync="dialogVisible"
114 width="30%" 114 width="30%"
115 :close-on-click-modal="false"> 115 :close-on-click-modal="false">
  116 + <!--<div>-->
  117 + <!--<img style="display: block;width: 100%" :src="url" >-->
  118 +
  119 + <!--</div>-->
116 <div> 120 <div>
117 - <el-image style="display: block;width: 100%" :src="url" >  
118 - </el-image> 121 + <div id="qrcode"></div>
119 </div> 122 </div>
120 <span slot="footer" class="dialog-footer"> 123 <span slot="footer" class="dialog-footer">
121 - <el-button type="primary" @click="dialogVisible = false">确 定</el-button> 124 + <el-button type="primary" @click="onBack">确 定</el-button>
122 </span> 125 </span>
123 </el-dialog> 126 </el-dialog>
124 127
@@ -128,6 +131,7 @@ @@ -128,6 +131,7 @@
128 <script> 131 <script>
129 import {pageQueryArrearRecordByCondition,selectAllAppOrg,personOrderBackWxPay } from '@/api/index'; 132 import {pageQueryArrearRecordByCondition,selectAllAppOrg,personOrderBackWxPay } from '@/api/index';
130 import {fen2Yuan,string2Date,inOutStateFormatter,parkingDurationFormatter} from '@/filters/index'; 133 import {fen2Yuan,string2Date,inOutStateFormatter,parkingDurationFormatter} from '@/filters/index';
  134 + import QRCode from 'qrcodejs2' // 引入qrcode
131 export default { 135 export default {
132 data() { 136 data() {
133 return { 137 return {
@@ -145,7 +149,7 @@ @@ -145,7 +149,7 @@
145 ], 149 ],
146 multipleSelection:[], 150 multipleSelection:[],
147 dialogVisible:false, 151 dialogVisible:false,
148 - url:'http://106.15.186.134:9090/group1/M00/20/F3/rBMAsV0exOmAH91dAAZpQUTBbps512.jpg', 152 + url:'http://img.renniting.cn/group1/M00/35/07/rBABHF0fHpOAGw2BAAF_F0CXpIA340.png',
149 } 153 }
150 }, 154 },
151 mounted: function() { 155 mounted: function() {
@@ -153,6 +157,25 @@ @@ -153,6 +157,25 @@
153 157
154 }, 158 },
155 methods: { 159 methods: {
  160 + qrcode :function(url) {
  161 + let qrcode = new QRCode('qrcode', {
  162 + width: 100,
  163 + height: 100, // 高度
  164 + text: url,// 二维码内容
  165 + // render: 'canvas' // 设置渲染方式(有两种方式 table和canvas,默认是canvas)
  166 + // background: '#f0f'
  167 + // foreground: '#ff0'
  168 + })
  169 + console.log(qrcode)
  170 + },
  171 + clearCode:function(){
  172 +
  173 + var qrcodes=document.getElementById('qrcode');
  174 + if(qrcodes != null && qrcodes.innerHTML != '' && qrcodes.innerHTML!= null){
  175 + qrcodes.innerHTML = '';
  176 + }
  177 +
  178 + },
156 /** 179 /**
157 *获取所有组织下拉框 180 *获取所有组织下拉框
158 */ 181 */
@@ -226,22 +249,21 @@ @@ -226,22 +249,21 @@
226 249
227 }, 250 },
228 toBackSubmit:function(){ 251 toBackSubmit:function(){
  252 + this.clearCode();
229 let selects = this.multipleSelection; 253 let selects = this.multipleSelection;
230 - /*if(selects == null || selects.length < 1){ 254 + if(selects == null || selects.length < 1){
231 this.$message({ 255 this.$message({
232 message: '请至少选择一行数据!', 256 message: '请至少选择一行数据!',
233 type: 'warning' 257 type: 'warning'
234 }); 258 });
235 return; 259 return;
236 - }*/ 260 + }
237 let orders = []; 261 let orders = [];
238 let orgIds = []; 262 let orgIds = [];
239 - /*selects.forEach(item=>{  
240 - orders.push({orderId:item.orderId,parkId:item.plNo,orderNotPayFee:item.arrearageFee}); 263 + selects.forEach(item=>{
  264 + orders.push({orderId:item.orderId,parkId:item.plNo,orderNotPayFee:item.arrearageFee,sourceType:1});
241 orgIds.push(item.orgId); 265 orgIds.push(item.orgId);
242 - });*/  
243 - orders.push({orderId:'101519114989403303936',parkId:'P320211005',orderNotPayFee:'72275'});  
244 - orgIds.push('10005'); 266 + });
245 if(orders == null || orders.length < 1){ 267 if(orders == null || orders.length < 1){
246 this.$message({ 268 this.$message({
247 message: '请至少选择一行数据!', 269 message: '请至少选择一行数据!',
@@ -254,20 +276,23 @@ @@ -254,20 +276,23 @@
254 sysCode:'10003', 276 sysCode:'10003',
255 payType:2, 277 payType:2,
256 paySrcType:103, 278 paySrcType:103,
257 - carNumber:'京A12333',  
258 terminalSource:9, 279 terminalSource:9,
  280 + carNumber:'京A11111',
259 recordArreaInfos:JSON.stringify(orders) 281 recordArreaInfos:JSON.stringify(orders)
260 }; 282 };
261 // req = JSON.stringify(req); 283 // req = JSON.stringify(req);
262 //调用后台接口获取二维码信息 284 //调用后台接口获取二维码信息
263 personOrderBackWxPay(req).then(response =>{ 285 personOrderBackWxPay(req).then(response =>{
264 if(response.code=='8888'){ 286 if(response.code=='8888'){
265 - console.log(response.data);  
266 - this.url = response.data;  
267 - 287 + let data = response.data;
  288 + data = JSON.parse(data);
  289 + let url = data.data.code_url;
  290 + console.log(url);
  291 + //this.url = url;
  292 + this.qrcode(url);
268 }else{ 293 }else{
269 console.log(response); 294 console.log(response);
270 - this.url = "http://106.15.186.134:9090/group1/M00/20/F3/rBMAsV0exOmAH91dAAZpQUTBbps512.jpg"; 295 +
271 } 296 }
272 297
273 }); 298 });
@@ -277,6 +302,11 @@ @@ -277,6 +302,11 @@
277 onSubmit:function() { 302 onSubmit:function() {
278 this.pageQueryArrearRecordByCondition(); 303 this.pageQueryArrearRecordByCondition();
279 }, 304 },
  305 + onBack:function() {
  306 + this.dialogVisible = false;
  307 + this.pageQueryArrearRecordByCondition();
  308 + this.clearCode();
  309 + },
280 onCancel:function() { 310 onCancel:function() {
281 this.$message({ 311 this.$message({
282 message: 'cancel!', 312 message: 'cancel!',
vue.config.js
@@ -21,7 +21,7 @@ module.exports = { @@ -21,7 +21,7 @@ module.exports = {
21 * In most cases please use '/' !!! 21 * In most cases please use '/' !!!
22 * Detail: https://cli.vuejs.org/config/#publicpath 22 * Detail: https://cli.vuejs.org/config/#publicpath
23 */ 23 */
24 - publicPath: '/', 24 + publicPath: './',
25 outputDir: 'dist', 25 outputDir: 'dist',
26 assetsDir: 'static', 26 assetsDir: 'static',
27 lintOnSave: process.env.NODE_ENV === 'development', 27 lintOnSave: process.env.NODE_ENV === 'development',