| | |
| | | //this.outParkId = cs.code; |
| | | this.code2 = cs.code; |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/outPark/findByBarrierCode', {code:cs.code}, res => { |
| | | this.statisticData = res.obj; |
| | | this.statisticData = res.data; |
| | | this.statisticData.enterTime = this.dateFormat('yyyy-MM-dd HH:mm:ss',this.statisticData.enterTime) |
| | | this.statisticData.createTime = this.dateFormat('yyyy-MM-dd HH:mm:ss',this.statisticData.createTime) |
| | | this.outParkId = this.statisticData.id; |
| | | this.status3 = this.statisticData.status3; |
| | | if(this.status3==1){ |
| | |
| | | type: 'success', |
| | | duration:10000, |
| | | }); |
| | | setTimeout(function(){window.location.href = res.obj;},10000); |
| | | setTimeout(function(){window.location.href = res.data.obj;},10000); |
| | | this.showFlag = false; |
| | | }) |
| | | }, |
| | |
| | | if(this.carNo){ |
| | | this.$byutil.postData(this, this.$systemconfig.basePath + '/outPark/outPark2', {code2:this.code2,carNo:this.carNo}, res => { |
| | | if(res.success){ |
| | | this.outParkId = res.obj.id; |
| | | this.outParkId = res.data.id; |
| | | this.pay(); |
| | | this.showFlag = false; |
| | | }else{ |
| | |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | dateFormat(fmt, date) { |
| | | let ret |
| | | const opt = { |
| | | 'y+': date.getFullYear().toString(), // 年 |
| | | 'M+': (date.getMonth() + 1).toString(), // 月 |
| | | 'd+': date.getDate().toString(), // 日 |
| | | 'H+': date.getHours().toString(), // 时 |
| | | 'm+': date.getMinutes().toString(), // 分 |
| | | 's+': date.getSeconds().toString(), // 秒 |
| | | // 有其他格式化字符需求可以继续添加,必须转化成字符串 |
| | | } |
| | | for (let k in opt) { |
| | | ret = new RegExp('(' + k + ')').exec(fmt) |
| | | if (ret) { |
| | | fmt = fmt.replace( |
| | | ret[1], |
| | | ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0') |
| | | ) |
| | | } |
| | | } |
| | | return fmt |
| | | }, |
| | | } |
| | | } |
| | | |