Commit dcf54a326a52f543b372a39abc307533beae59c1

Authored by 刘淇
1 parent 1cb9b8c4

扬名微信公众号

build/webpack.base.conf.js
@@ -8,9 +8,10 @@ function resolve (dir) { @@ -8,9 +8,10 @@ function resolve (dir) {
8 return path.join(__dirname, '..', dir) 8 return path.join(__dirname, '..', dir)
9 } 9 }
10 10
  11 +const vuxLoader = require('vux-loader')
  12 +// const webpackConfig = originalConfig // 原来的 module.exports 代码赋值给变量 webpackConfig
11 13
12 -  
13 -module.exports = { 14 +let webpackConfig = {
14 context: path.resolve(__dirname, '../'), 15 context: path.resolve(__dirname, '../'),
15 entry: { 16 entry: {
16 app: './src/main.js' 17 app: './src/main.js'
@@ -80,3 +81,6 @@ module.exports = { @@ -80,3 +81,6 @@ module.exports = {
80 child_process: 'empty' 81 child_process: 'empty'
81 } 82 }
82 } 83 }
  84 +module.exports = vuxLoader.merge(webpackConfig, {
  85 + plugins: ['vux-ui']
  86 +})
package.json
@@ -16,12 +16,12 @@ @@ -16,12 +16,12 @@
16 "less-loader": "^4.1.0", 16 "less-loader": "^4.1.0",
17 "mint-ui": "^2.2.13", 17 "mint-ui": "^2.2.13",
18 "moment": "^2.29.1", 18 "moment": "^2.29.1",
19 - "node-sass": "^5.0.0", 19 + "node-sass": "^4.14.1",
20 "sass-loader": "^7.3.1", 20 "sass-loader": "^7.3.1",
21 "vue": "^2.5.2", 21 "vue": "^2.5.2",
22 - "mint-ui": "^2.2.13",  
23 "vue-h5-popup": "^1.0.2", 22 "vue-h5-popup": "^1.0.2",
24 - "vue-router": "^3.0.1" 23 + "vue-router": "^3.0.1",
  24 + "vux": "^2.11.1"
25 }, 25 },
26 "devDependencies": { 26 "devDependencies": {
27 "autoprefixer": "^7.1.2", 27 "autoprefixer": "^7.1.2",
@@ -42,7 +42,6 @@ @@ -42,7 +42,6 @@
42 "friendly-errors-webpack-plugin": "^1.6.1", 42 "friendly-errors-webpack-plugin": "^1.6.1",
43 "html-webpack-plugin": "^2.30.1", 43 "html-webpack-plugin": "^2.30.1",
44 "node-notifier": "^5.1.2", 44 "node-notifier": "^5.1.2",
45 - "node-sass": "^5.0.0",  
46 "optimize-css-assets-webpack-plugin": "^3.2.0", 45 "optimize-css-assets-webpack-plugin": "^3.2.0",
47 "ora": "^1.2.0", 46 "ora": "^1.2.0",
48 "portfinder": "^1.0.13", 47 "portfinder": "^1.0.13",
@@ -64,6 +63,7 @@ @@ -64,6 +63,7 @@
64 "vue-loader": "^13.3.0", 63 "vue-loader": "^13.3.0",
65 "vue-style-loader": "^3.0.1", 64 "vue-style-loader": "^3.0.1",
66 "vue-template-compiler": "^2.5.2", 65 "vue-template-compiler": "^2.5.2",
  66 + "vux-loader": "^1.2.9",
67 "webpack": "^3.4.1", 67 "webpack": "^3.4.1",
68 "webpack-bundle-analyzer": "^2.9.0", 68 "webpack-bundle-analyzer": "^2.9.0",
69 "webpack-dev-server": "^2.9.7", 69 "webpack-dev-server": "^2.9.7",
src/api/invoice/invoice.js 0 → 100644
  1 +import request from '@/utils/request'
  2 +
  3 +
  4 +// 获取发票抬头
  5 +export function queryCustInvoiceInfoList(params) {
  6 + return request({
  7 + url: 'invoice/queryCustInvoiceInfoList',
  8 + method: 'post',
  9 + data: params
  10 + })
  11 +}
  12 +
  13 +// 天下发票抬头
  14 +export function insertCustInvoiceInfo(params) {
  15 + return request({
  16 + url: 'invoice/insertCustInvoiceInfo',
  17 + method: 'post',
  18 + data: params
  19 + })
  20 +}
  21 +
  22 +
  23 +// 编辑发票抬头
  24 +export function updateCustInvoiceInfo(params) {
  25 + return request({
  26 + url: 'invoice/updateCustInvoiceInfo',
  27 + method: 'post',
  28 + data: params
  29 + })
  30 +}
  31 +
  32 +// 删除发票抬头
  33 +export function deleteCustInvoiceInfoByID(params) {
  34 + return request({
  35 + url: 'invoice/deleteCustInvoiceInfoByID',
  36 + method: 'post',
  37 + data: params
  38 + })
  39 +}
  40 +
  41 +// 可发票记录
  42 +export function queryRntPayOrderForInvoice(params) {
  43 + return request({
  44 + url: 'invoice/queryRntPayOrderForInvoice',
  45 + method: 'post',
  46 + data: params
  47 + })
  48 +}
  49 +
  50 +// 提交开票
  51 +export function openTicketForCustInvoiceHisInfo(params) {
  52 + return request({
  53 + url: 'invoice/openTicketForCustInvoiceHisInfo',
  54 + method: 'post',
  55 + data: params
  56 + })
  57 +}
  58 +
  59 +// 开票历史
  60 +export function queryCustInvoiceHistoryList(params) {
  61 + return request({
  62 + url: 'invoice/queryCustInvoiceHistoryList',
  63 + method: 'post',
  64 + data: params
  65 + })
  66 +}
  67 +
  68 +
  69 +
  70 +
  71 +
  72 +
  73 +
  74 +
  75 +
  76 +
  77 +
src/assets/images/parkInvoice/parkInvoiceNo.png 0 → 100644

2.28 KB

src/main.js
@@ -39,11 +39,61 @@ Vue.prototype.$moment = moment @@ -39,11 +39,61 @@ Vue.prototype.$moment = moment
39 import utils from './utils/utils' // 工具类 39 import utils from './utils/utils' // 工具类
40 Vue.prototype.$utils = utils 40 Vue.prototype.$utils = utils
41 41
  42 +import common from './utils/common' // 公共
  43 +Vue.prototype.$common = common
  44 +
42 import Mint from 'mint-ui'; 45 import Mint from 'mint-ui';
43 import 'mint-ui/lib/style.css' 46 import 'mint-ui/lib/style.css'
44 Vue.use(Mint); 47 Vue.use(Mint);
45 48
46 49
  50 +
  51 +import {
  52 + XHeader,
  53 + XInput,
  54 + Group,
  55 + XButton,
  56 + Tabbar,
  57 + TabbarItem,
  58 + Tab,
  59 + TabItem,
  60 + Cell,
  61 + CellBox,
  62 + Checklist,
  63 + CheckIcon,
  64 + Swiper,
  65 + SwiperItem,
  66 + Divider,
  67 + TransferDom,
  68 + Confirm,
  69 + Toast
  70 +}from 'vux'
  71 +
  72 +
  73 +Vue.component('Toast', Toast)
  74 +Vue.component('Confirm', Confirm)
  75 +Vue.component('TransferDom', TransferDom)
  76 +Vue.component('Divider', Divider)
  77 +Vue.component('SwiperItem', SwiperItem)
  78 +Vue.component('Swiper', Swiper)
  79 +Vue.component('CheckIcon', CheckIcon)
  80 +Vue.component('Checklist', Checklist)
  81 +Vue.component('Group', Group)
  82 +Vue.component('Cell', Cell)
  83 +Vue.component('cell-box', CellBox)
  84 +Vue.component('x-header', XHeader);
  85 +Vue.component('x-input', XInput);
  86 +Vue.component('group', Group);
  87 +Vue.component('x-button', XButton);
  88 +Vue.component('tabbar', Tabbar);
  89 +Vue.component('tabbar-item', TabbarItem);
  90 +Vue.component('tab', Tab);
  91 +Vue.component('tab-item', TabItem);
  92 +
  93 +
  94 +import { ToastPlugin } from 'vux'
  95 +Vue.use(ToastPlugin)
  96 +
47 import 'swiper/dist/css/swiper.min.css' // 轮播 97 import 'swiper/dist/css/swiper.min.css' // 轮播
48 import 'swiper/dist/js/swiper.min' 98 import 'swiper/dist/js/swiper.min'
49 99
src/router/index.js
@@ -37,6 +37,72 @@ export default new Router({ @@ -37,6 +37,72 @@ export default new Router({
37 component: () => import("@/views/parkPay/orderPay.vue") 37 component: () => import("@/views/parkPay/orderPay.vue")
38 }, 38 },
39 39
  40 + // ---------------- 电子发票导航
  41 + {
  42 + path: '/eInvoiceWrap',
  43 + name: 'eInvoiceWrap',
  44 + component: () => import("@/views/eInvoice/eInvoiceWrap.vue")
  45 + },
  46 +
  47 + // ---------------- 停车发票
  48 + {
  49 + path: '/parkInvoice',
  50 + name: 'parkInvoice',
  51 + component: () => import("@/views/eInvoice/parkInvoice/parkInvoice.vue")
  52 + },
  53 +
  54 + // ---------------- 填写发票
  55 + {
  56 + path: '/fill',
  57 + name: 'fill',
  58 + component: () => import("@/views/eInvoice/common/fill.vue")
  59 + },
  60 +
  61 + // ---------------- 发票操作
  62 + {
  63 + path: '/invoiceOpt',
  64 + name: 'invoiceOpt',
  65 + component: () => import("@/views/eInvoice/invoiceOpt/invoiceOpt.vue")
  66 + },
  67 +
  68 +
  69 + // ---------------- 个人发票操作查看
  70 + {
  71 + path: '/checkEdit',
  72 + name: 'checkEdit',
  73 + component: () => import("@/views/eInvoice/invoiceOpt/checkEdit.vue")
  74 + },
  75 +
  76 + // ---------------- 个人发票历史记录
  77 + {
  78 + path: '/invoiceRecord',
  79 + name: 'invoiceRecord',
  80 + component: () => import("@/views/eInvoice/invoiceRecord/invoiceRecord.vue")
  81 + },
  82 +
  83 + // ---------------- 个人发票历史查看
  84 + {
  85 + path: '/invoiceDetail',
  86 + name: 'invoiceDetail',
  87 + component: () => import("@/views/eInvoice/invoiceRecord/invoiceDetail.vue")
  88 + },
  89 +
  90 + // ---------------- 电子包含交易
  91 + {
  92 + path: '/exchange',
  93 + name: 'exchange',
  94 + component: () => import("@/views/eInvoice/invoiceRecord/exchange.vue")
  95 + },
  96 +
  97 +
  98 +
  99 +
  100 +
  101 +
  102 +
  103 +
  104 +
  105 +
40 // //---------------- 个人页面导航 106 // //---------------- 个人页面导航
41 // { 107 // {
42 // path: '/selfNav', 108 // path: '/selfNav',
src/utils/common.js
  1 +export default {
  2 +
  3 +}
src/utils/request.js
@@ -3,9 +3,9 @@ import axios from 'axios' @@ -3,9 +3,9 @@ import axios from 'axios'
3 // let _url = process.env.API_ROOT 3 // let _url = process.env.API_ROOT
4 // axios.defaults.baseURL = process.env.API_ROOT 4 // axios.defaults.baseURL = process.env.API_ROOT
5 const service = axios.create({ 5 const service = axios.create({
6 - // https://dev.renniting.cn/pay/ 赤峰测试 6 + // http://dev.renniting.cn/pay/ 赤峰测试
7 // http://pay.service.renniting.cn/ 赤峰 7 // http://pay.service.renniting.cn/ 赤峰
8 - baseURL: 'http://pay.service.renniting.cn/', // url = base url + request url 8 + baseURL: 'http://dev.renniting.cn/pay/', // url = base url + request url
9 // withCredentials: true, // send cookies when cross-domain requests 9 // withCredentials: true, // send cookies when cross-domain requests
10 timeout: 6000 // request timeout 10 timeout: 6000 // request timeout
11 }) 11 })
src/utils/utils.js
@@ -36,6 +36,11 @@ export default { @@ -36,6 +36,11 @@ export default {
36 var youWant=d.getFullYear() + '-' + this.completedString(d.getMonth() + 1) + '-' + this.completedString(d.getDate()) ; 36 var youWant=d.getFullYear() + '-' + this.completedString(d.getMonth() + 1) + '-' + this.completedString(d.getDate()) ;
37 return youWant 37 return youWant
38 }, 38 },
  39 + timestampTransformTime: function (timestamp) {
  40 + var d = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  41 + var youWant=d.getFullYear() + '/' + this.completedString(d.getMonth() + 1) + '/' + this.completedString(d.getDate()) ;
  42 + return youWant
  43 + },
39 completedString:function(s) { 44 completedString:function(s) {
40 return s < 10 ? '0' + s : s 45 return s < 10 ? '0' + s : s
41 }, 46 },
@@ -182,5 +187,32 @@ export default { @@ -182,5 +187,32 @@ export default {
182 strmd5=strmd5.toUpperCase(); 187 strmd5=strmd5.toUpperCase();
183 return strmd5; 188 return strmd5;
184 }, 189 },
  190 + parseParams: function (data) {
  191 + try {
  192 + var tempArr = [];
  193 + for (var i in data) {
  194 + var key = (i);
  195 + var value = encodeURIComponent(data[i]);//decodeURIComponent
  196 + tempArr.push(key + '=' + value);
  197 + }
  198 + var urlParamsStr = tempArr.join('&');
  199 + return urlParamsStr;
  200 + } catch (err) {
  201 + return '';
  202 + }
  203 + },
  204 +
  205 + commonParams: function() {
  206 + let salt = this.myCommonSalt(32);
  207 + let reqData = {
  208 + app_id: this.myVarAppid,
  209 + deviceInfo: this.myDeviceInfo,
  210 + salt: salt,
  211 + sign_type: "md5",
  212 + token:'b4bbab7dd63140b5b66cc962496b34f7',
  213 + orgId: this.myOrgId
  214 + };
  215 + return reqData
  216 + }
185 217
186 } 218 }
src/views/eInvoice/common/fill.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 +
  4 + <div>
  5 + <divider>抬头类型</divider>
  6 + <tab :line-width=2 active-color='#fc378c' v-model="index">
  7 + <tab-item class="vux-center" :selected="active === item" v-for="(item, index) in list2" @click="active = item"
  8 + :key="index">{{item}}
  9 + </tab-item>
  10 + </tab>
  11 + <swiper v-model="index" :show-dots="false" height="400px">
  12 + <swiper-item :key="0">
  13 + <div class="tab-swiper vux-center">
  14 + <group title="发票详情">
  15 + <x-input title="发票抬头" v-model="personname" type="text" placeholder="请填写抬头名称" required></x-input>
  16 + <x-input title="电子邮箱" v-model="personemail" type="email" placeholder="用于向您发送电子邮箱" required
  17 + is-type="email"></x-input>
  18 + <x-input title="备注信息" v-model="personremark" type="text" placeholder="请填写备注信息"></x-input>
  19 + </group>
  20 + </div>
  21 + </swiper-item>
  22 + <swiper-item :key="1">
  23 + <div class="tab-swiper vux-center">
  24 + <group title="发票详情" label-width="120px">
  25 + <x-input title="发票抬头" v-model="name" type="text" placeholder="请填写抬头名称" required></x-input>
  26 + <x-input title="纳税人识别号" v-model="num" type="text" placeholder="请填写纳税人识别号" required></x-input>
  27 + <x-input title="注册地址" v-model="address" type="text" placeholder="请填写公司注册地址"></x-input>
  28 + <x-input title="注册电话" v-model="iphone" type="text" placeholder="请填写公司注册电话"></x-input>
  29 + <x-input title="开户行" v-model="bankName" type="text" placeholder="请填写公司开户账户"></x-input>
  30 + <x-input title="开户账号" v-model="bankNum" type="text" placeholder="请填写公司开户账号"></x-input>
  31 + <x-input title="电子邮箱" v-model="email" type="email" placeholder="用于向您发送电子邮箱" required
  32 + is-type="email"></x-input>
  33 + <x-input title="备注信息" v-model="remark" type="text" placeholder="请填写备注信息"></x-input>
  34 + </group>
  35 + </div>
  36 + </swiper-item>
  37 + </swiper>
  38 +
  39 + <div style="padding: 15px">
  40 + <x-button type="warn" @click.native="fillBtn">确定</x-button>
  41 + </div>
  42 +
  43 + </div>
  44 +
  45 + <toast v-model="showToast" type="text" :time="800" is-show-mask :text="showVal" position="top" width="15em"></toast>
  46 + </div>
  47 +</template>
  48 +
  49 +<script>
  50 +
  51 +import { insertCustInvoiceInfo } from "@/api/invoice/invoice.js";
  52 +export default {
  53 + name: "fill",
  54 + data() {
  55 + return {
  56 + list2: ["个人", "企业"],
  57 + active: "个人",
  58 + index: 0,
  59 + personname: "",
  60 + personemail: "",
  61 + personremark: "",
  62 + name: "",//企业发票抬头
  63 + email: "",//企业邮箱
  64 + remark: "",//企业备注信息
  65 + num: "",//企业纳税人识别号
  66 + address: "",//企业注册地址
  67 + iphone: "",//企业注册电话
  68 + bankName: "",
  69 + bankNum: "",
  70 + showToast: false,
  71 + showVal: "" // 提示内容
  72 + };
  73 + },
  74 + mounted() {
  75 + },
  76 + methods: {
  77 + fillBtn: function() {
  78 + let jsondata = {}
  79 + if (this.index == 0) {
  80 + if (!this.personname) {
  81 + this.showToast = true;
  82 + this.showVal = "请填写个人发票抬头名称";
  83 + return false;
  84 + }
  85 + if (!this.personemail) {
  86 + this.showToast = true;
  87 + this.showVal = "请填写个人发票邮箱";
  88 + return false;
  89 + }
  90 + let obj = {
  91 + invoiceType: "0",// 0 :个人 , 1:企业 ,3:非营业单位
  92 + name: this.personname,
  93 + email: this.personemail,
  94 + remark: this.personremark,
  95 + isDefault: "1"
  96 + };
  97 + jsondata = Object.assign(obj,this.$utils.commonParams())
  98 + }
  99 + if (this.index == 1) {
  100 + if (!this.name) {
  101 + this.showToast = true;
  102 + this.showVal = "请填写企业发票抬头名称";
  103 + return false;
  104 + }
  105 + if (!this.email) {
  106 + this.showToast = true;
  107 + this.showVal = "请填写个人发票邮箱";
  108 + return false;
  109 + }
  110 + if (!this.num) {
  111 + this.showToast = true;
  112 + this.showVal = "请填写企业纳税人识别号";
  113 + return false;
  114 + }
  115 + let obj = {
  116 + invoiceType: "1",// 0 :个人 , 1:企业 ,3:非营业单位
  117 + name: this.name,
  118 + email: this.email,
  119 + remark: this.remark,
  120 + isDefault: "1",
  121 + phone: this.iphone,//企业注册电话
  122 + address: this.address,//企业注册地址
  123 + phone: this.iphone,//企业注册电话
  124 + taxid: this.num,//企业纳税人识别号
  125 + bankName: this.bankName,
  126 + cardNo: this.bankNum
  127 + };
  128 + jsondata = Object.assign(obj,this.$utils.commonParams())
  129 + }
  130 + jsondata.sign = this.$utils.signObject(jsondata);
  131 + insertCustInvoiceInfo(jsondata).then(response => {
  132 + console.log(jsondata);
  133 + console.log(response);
  134 + if(response.code == 0){
  135 + this.$router.push({
  136 + path: "invoiceOpt"
  137 + });
  138 + }else{
  139 + alert(response.message)
  140 + }
  141 +
  142 + });
  143 + }
  144 + }
  145 +};
  146 +</script>
  147 +
  148 +<style scoped>
  149 +
  150 +</style>
src/views/eInvoice/eInvoiceWrap.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <group>
  4 + <cell
  5 + title="停车发票"
  6 + inline-desc='仅支持微信支付订单,按照实际消费金额开票'
  7 + is-link
  8 + :link="{path:'./parkInvoice'}" >
  9 + <!-- anything -->
  10 + </cell>
  11 +
  12 + <cell
  13 + title="购买会员卡发票"
  14 + inline-desc='支持购买月卡、季卡、年卡产生的费用,开具发票'
  15 + is-link
  16 + >
  17 + <!-- anything -->
  18 + </cell>
  19 +
  20 + <cell
  21 + title="开票历史" is-link
  22 + :link="{path:'./invoiceRecord'}"
  23 + >
  24 + <!-- anything -->
  25 + </cell>
  26 +
  27 + <cell-box>
  28 + 注: 开具电子发票之前请绑定车牌并提交行驶证审核通过。
  29 + </cell-box>
  30 + </group>
  31 + </div>
  32 +</template>
  33 +
  34 +<script>
  35 +export default {
  36 + name: "eInvoiceWrap"
  37 +};
  38 +</script>
  39 +
  40 +<style scoped>
  41 + >>> .vux-label {
  42 + padding-right: 20px;
  43 + }
  44 +</style>
src/views/eInvoice/invoiceOpt/checkEdit.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 +
  4 + <div>
  5 + <divider>抬头类型({{ active }})</divider>
  6 +
  7 + <swiper v-model="index" :show-dots="false" height="400px">
  8 + <swiper-item :key="0">
  9 + <div class="tab-swiper vux-center">
  10 + <group title="发票详情">
  11 + <x-input title="发票抬头" v-model="personname" type="text" placeholder="请填写抬头名称" required
  12 + :disabled="disabledStatus"></x-input>
  13 + <x-input title="电子邮箱" v-model="personemail" type="email" placeholder="用于向您发送电子邮箱" required
  14 + is-type="email" :disabled="disabledStatus"></x-input>
  15 + <x-input title="备注信息" v-model="personremark" type="text" placeholder="请填写备注信息"
  16 + :disabled="disabledStatus"></x-input>
  17 + </group>
  18 + </div>
  19 + </swiper-item>
  20 + <swiper-item :key="1">
  21 + <div class="tab-swiper vux-center">
  22 + <group title="发票详情" label-width="120px">
  23 + <x-input title="发票抬头" v-model="name" type="text" placeholder="请填写抬头名称" required
  24 + :disabled="disabledStatus"></x-input>
  25 + <x-input title="纳税人识别号" v-model="num" type="text" placeholder="请填写纳税人识别号" required
  26 + :disabled="disabledStatus"></x-input>
  27 + <x-input title="注册地址" v-model="address" type="text" placeholder="请填写公司注册地址"
  28 + :disabled="disabledStatus"></x-input>
  29 + <x-input title="注册电话" v-model="iphone" type="text" placeholder="请填写公司注册电话"
  30 + :disabled="disabledStatus"></x-input>
  31 + <x-input title="开户行" v-model="bankName" type="text" placeholder="请填写公司开户账户"
  32 + :disabled="disabledStatus"></x-input>
  33 + <x-input title="开户账号" v-model="bankNum" type="text" placeholder="请填写公司开户账号"
  34 + :disabled="disabledStatus"></x-input>
  35 + <x-input title="电子邮箱" v-model="email" type="email" placeholder="用于向您发送电子邮箱" required
  36 + :disabled="disabledStatus"
  37 + is-type="email"></x-input>
  38 + <x-input title="备注信息" v-model="remark" type="text" placeholder="请填写备注信息"
  39 + :disabled="disabledStatus"></x-input>
  40 + </group>
  41 + </div>
  42 + </swiper-item>
  43 + </swiper>
  44 +
  45 + <div style="padding: 15px" v-show="btnShow">
  46 + <x-button type="warn" @click.native="updateHandle">确定</x-button>
  47 + </div>
  48 +
  49 + </div>
  50 +
  51 +
  52 + </div>
  53 +</template>
  54 +
  55 +<script>
  56 +
  57 +
  58 +import { updateCustInvoiceInfo } from "@/api/invoice/invoice.js";
  59 +export default {
  60 + name: "checkEdit",
  61 + data() {
  62 + return {
  63 + active: "个人",
  64 + index: 1, // 个人是0 企业是1
  65 + disabledStatus: false, // 是编辑还是查看状态
  66 + btnShow: true, // 是编辑还是查看状态
  67 + personname: "",
  68 + personemail: "",
  69 + personremark: "",
  70 + name: "",//企业发票抬头
  71 + email: "",//企业邮箱
  72 + remark: "",//企业备注信息
  73 + num: "",//企业纳税人识别号
  74 + address: "",//企业注册地址
  75 + iphone: "",//企业注册电话
  76 + bankName: "",
  77 + bankNum: "",
  78 + id: "",
  79 + isDefault: ""
  80 + };
  81 + },
  82 + mounted() {
  83 + let status = this.$route.query.status;
  84 + console.log(status); // 0 查看 1编辑
  85 + let type = this.$route.query.type;
  86 + console.log(type); // 0 是个人 1是企业
  87 + let data = JSON.parse(sessionStorage.getItem("invoiceData"));
  88 + console.log(data);
  89 + this.isDefault = data.isDefault;
  90 + this.id = data.id;
  91 + if (status == 0) {
  92 + this.disabledStatus = true;
  93 + this.btnShow = false;
  94 + }
  95 + if (status == 1) {
  96 + this.disabledStatus = false;
  97 + this.btnShow = true;
  98 + }
  99 + if (type == 0) {
  100 + this.index = 0;
  101 + this.active = "个人";
  102 + this.personname = data.name;
  103 + this.personemail = data.email;
  104 + this.personremark = data.remark;
  105 + }
  106 + if (type == 1) {
  107 + this.index = 1;
  108 + this.active = "企业";
  109 + this.name = data.name;
  110 + this.email = data.email;
  111 + this.remark = data.remark;
  112 + this.num = data.taxid;
  113 + this.address = data.address;
  114 + this.iphone = data.phone;
  115 + this.bankName = data.bankName;
  116 + this.bankNum = data.cardNo;
  117 + }
  118 + },
  119 + methods: {
  120 + // 编辑更新发票信息
  121 + updateHandle: function() {
  122 + let jsondata = {};
  123 + if (this.index == 0) {
  124 + if (!this.personname) {
  125 + this.showToast = true;
  126 + this.showVal = "请填写个人发票抬头名称";
  127 + return false;
  128 + }
  129 + if (!this.personemail) {
  130 + this.showToast = true;
  131 + this.showVal = "请填写个人发票邮箱";
  132 + return false;
  133 + }
  134 + let obj = {
  135 + invoiceType: "0",// 0 :个人 , 1:企业 ,3:非营业单位
  136 + name: this.personname,
  137 + email: this.personemail,
  138 + remark: this.personremark,
  139 + isDefault: this.isDefault,
  140 + id: this.id
  141 + };
  142 + jsondata = Object.assign(obj,this.$utils.commonParams())
  143 + }
  144 + if (this.index == 1) {
  145 + if (!this.name) {
  146 + this.showToast = true;
  147 + this.showVal = "请填写企业发票抬头名称";
  148 + return false;
  149 + }
  150 + if (!this.email) {
  151 + this.showToast = true;
  152 + this.showVal = "请填写个人发票邮箱";
  153 + return false;
  154 + }
  155 + if (!this.num) {
  156 + this.showToast = true;
  157 + this.showVal = "请填写企业纳税人识别号";
  158 + return false;
  159 + }
  160 + let obj = {
  161 + invoiceType: "1",// 0 :个人 , 1:企业 ,3:非营业单位
  162 + name: this.name,
  163 + email: this.email,
  164 + remark: this.remark,
  165 + phone: this.iphone,//企业注册电话
  166 + address: this.address,//企业注册地址
  167 + phone: this.iphone,//企业注册电话
  168 + taxid: this.num,//企业纳税人识别号
  169 + bankName: this.bankName,
  170 + cardNo: this.bankNum,
  171 + isDefault: this.isDefault,
  172 + id: this.id
  173 + };
  174 + jsondata = Object.assign(obj,this.$utils.commonParams())
  175 + }
  176 + jsondata.sign = this.$utils.signObject(jsondata);
  177 + updateCustInvoiceInfo(jsondata).then(response => {
  178 + console.log(jsondata);
  179 + console.log(response);
  180 + if (response.code == 0) {
  181 + this.$router.push({
  182 + path: "invoiceOpt"
  183 + });
  184 + } else {
  185 + alert(response.message);
  186 + }
  187 + });
  188 + }
  189 + }
  190 +};
  191 +</script>
  192 +
  193 +<style scoped>
  194 +
  195 +</style>
src/views/eInvoice/invoiceOpt/invoiceOpt.vue 0 → 100644
  1 +<template>
  2 + <div style="height: 100%;display: flex;flex-direction: column;">
  3 + <div class="list-wrap">
  4 + <div class="noDada" v-if="list.length == 0">
  5 + <img src="../../../assets/images/parkInvoice/parkInvoiceNo.png" width="180px" height="140px">
  6 + <p>暂无发票抬头,请添加发票抬头才可以发票哦</p>
  7 +
  8 + <!--<div style="padding: 10px;">-->
  9 + <!--<x-button type="warn">添加发票抬头</x-button>-->
  10 + <!--</div>-->
  11 + </div>
  12 +
  13 + <group v-else>
  14 + <div v-for="(i, index) in list" style="border-bottom: 1px solid #D9D9D9 ">
  15 + <cell :title="i.name" :inline-desc="`发票类型: ${i.invoiceType==0?'个人':'企业'}`">
  16 + <div>
  17 + <span @click="toUse(i)"
  18 + style="color: #FFF;padding: 2px 12px;background:red;border-radius: 15px;font-size: 14px;">去使用</span>
  19 + </div>
  20 + </cell>
  21 +
  22 + <cell>
  23 + <div slot="title">
  24 + <input type="radio" name="radioInvoice" :checked="i.isDefault == 1" @change="changDefault(i)">
  25 + <span class="colorBlue">默认抬头</span>
  26 + </div>
  27 + <div>
  28 + <x-button mini @click.native="checkOrEdit(i,0)">查看</x-button>
  29 + <x-button mini type="primary" style="margin-top: 0" @click.native="checkOrEdit(i,1)">编辑</x-button>
  30 + <x-button mini type="warn" style="margin-top: 0" @click.native="deleteHandle(i)">删除</x-button>
  31 + </div>
  32 + </cell>
  33 + </div>
  34 + </group>
  35 + </div>
  36 + <x-button type="warn" style="border-radius: 0" @click.native="toFill">新增抬头</x-button>
  37 +
  38 + <div transfer-dom>
  39 + <confirm v-model="deleShow"
  40 + title="删除"
  41 + @on-cancel=""
  42 + @on-confirm="onConfirm"
  43 + @on-show=""
  44 + @on-hide="">
  45 + <p style="text-align:center;">您是否确定删除发票抬头?</p>
  46 + </confirm>
  47 + </div>
  48 + </div>
  49 +</template>
  50 +
  51 +<script>
  52 +
  53 +import { queryCustInvoiceInfoList, deleteCustInvoiceInfoByID, updateCustInvoiceInfo } from "@/api/invoice/invoice.js";
  54 +export default {
  55 + name: "invoiceOpt",
  56 + data() {
  57 + return {
  58 + deleShow: false,
  59 + list: [],// 抬头列表
  60 + deleteID: ""
  61 + };
  62 + },
  63 + mounted() {
  64 + this.queryCustInvoiceInfoList(); // 获取抬头
  65 + },
  66 + methods: {
  67 + // 前往使用
  68 + toUse: function(i) {
  69 + this.$router.push({
  70 + path: "parkInvoice",
  71 + query: {
  72 + name: i.name,
  73 + email: i.email,
  74 + remark: i.remark,
  75 + type: i.invoiceType == 0 ? "个人" : "企业"
  76 + }
  77 + });
  78 + },
  79 + // 设置默认
  80 + changDefault: function(i) {
  81 + console.log(i);
  82 + let jsondata = {};
  83 + if (i.invoiceType == 0) {
  84 + let obj = {
  85 + invoiceType: "0",// 0 :个人 , 1:企业 ,3:非营业单位
  86 + name: i.name,
  87 + email: i.email,
  88 + remark: i.remark,
  89 + isDefault: "1",
  90 + id: i.id
  91 + };
  92 + jsondata = Object.assign(obj, this.$utils.commonParams());
  93 + }
  94 + if (i.invoiceType == 1) {
  95 + let obj = {
  96 + invoiceType: "1",// 0 :个人 , 1:企业 ,3:非营业单位
  97 + name: i.name,
  98 + email: i.email,
  99 + remark: i.remark,
  100 + phone: i.iphone,//企业注册电话
  101 + address: i.address,//企业注册地址
  102 + phone: i.phone,//企业注册电话
  103 + taxid: i.taxid,//企业纳税人识别号
  104 + bankName: i.bankName,
  105 + cardNo: i.bankNum,
  106 + isDefault: "1",
  107 + id: i.id
  108 + };
  109 + jsondata = Object.assign(obj, this.$utils.commonParams());
  110 + }
  111 + jsondata.sign = this.$utils.signObject(jsondata);
  112 + updateCustInvoiceInfo(jsondata).then(response => {
  113 + console.log(jsondata);
  114 + console.log(response);
  115 + if (response.code == 0) {
  116 + this.queryCustInvoiceInfoList();
  117 + } else {
  118 + alert(response.message);
  119 + }
  120 + });
  121 + },
  122 + // 删除
  123 + deleteHandle: function(i) {
  124 + this.deleteID = i.id;
  125 + this.deleShow = true;
  126 + },
  127 + onConfirm() {
  128 + console.log("on confirm");
  129 + let obj = {
  130 + id: this.deleteID
  131 + };
  132 + let jsondata = Object.assign(obj, this.$utils.commonParams());
  133 + jsondata.sign = this.$utils.signObject(jsondata);
  134 + console.log("传参 " + JSON.stringify(jsondata));
  135 + deleteCustInvoiceInfoByID(jsondata).then(response => {
  136 + this.queryCustInvoiceInfoList();
  137 + });
  138 + },
  139 + // 获取抬头列表
  140 + queryCustInvoiceInfoList: function() {
  141 + let jsondata = this.$utils.commonParams();
  142 + jsondata.sign = this.$utils.signObject(jsondata);
  143 + console.log("传参 " + JSON.stringify(jsondata));
  144 + queryCustInvoiceInfoList(jsondata).then(response => {
  145 + console.log(response);
  146 + this.list = response.data;
  147 + });
  148 + },
  149 + // 前往开发票
  150 + toFill: function() {
  151 + this.$router.push({
  152 + path: "fill"
  153 + });
  154 + },
  155 + // 前往查看或者编辑发票
  156 + checkOrEdit: function(i, status) {
  157 + sessionStorage.setItem("invoiceData", JSON.stringify(i));
  158 + this.$router.push({
  159 + path: "checkEdit",
  160 + query: {
  161 + status: status, // 0 是查看 1是编辑
  162 + type: i.invoiceType // 0 是个人 1是企业
  163 + }
  164 + });
  165 + }
  166 + }
  167 +};
  168 +
  169 +</script>
  170 +
  171 +<style scoped lang="scss">
  172 + .list-wrap {
  173 + flex: 1;
  174 + overflow-y: auto;
  175 + > > > .weui-cells {
  176 + margin-top: 0;
  177 + }
  178 + }
  179 +
  180 + .colorBlue {
  181 + color: #0d72e2;
  182 + }
  183 +
  184 + .noDada {
  185 + text-align: center;
  186 +
  187 + img {
  188 + margin: 20px auto;
  189 + }
  190 +
  191 + }
  192 +</style>
src/views/eInvoice/invoiceRecord/exchange.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <group>
  4 + <cell align-items="left" class="inovice-list" value="¥0.10">
  5 + <div slot="title">
  6 + <span>苏A1231</span>
  7 + </div>
  8 + <div slot="title">
  9 + <span>杭州路段</span>
  10 + </div>
  11 + <div slot="title">
  12 + <span>2021/06/01 13:13:13</span>
  13 + </div>
  14 + </cell>
  15 + <cell align-items="left" class="inovice-list" value="¥0.10">
  16 + <div slot="title">
  17 + <span>苏A1231</span>
  18 + </div>
  19 + <div slot="title">
  20 + <span>杭州路段</span>
  21 + </div>
  22 + <div slot="title">
  23 + <span>2021/06/01 13:13:13</span>
  24 + </div>
  25 + </cell>
  26 + </group>
  27 + </div>
  28 +</template>
  29 +
  30 +<script>
  31 +export default {
  32 + name: "exchange"
  33 +};
  34 +</script>
  35 +
  36 +<style scoped>
  37 +
  38 +</style>
src/views/eInvoice/invoiceRecord/invoiceDetail.vue 0 → 100644
  1 +<template>
  2 + <div>
  3 + <group title="开票历史">
  4 + <cell title="发票预览" link="https://vux.li"></cell>
  5 + <cell title="收件信息" inline-desc='电子邮箱: 34124@163.com'></cell>
  6 + <cell title="发票包含内容" inline-desc='该发票包含2笔交易' link="https://vux.li"></cell>
  7 + </group>
  8 +
  9 + <group title="">
  10 + <div style="padding: 40px 20px;">
  11 + <box gap="10px 10px">
  12 + <x-button :gradients="['#1D62F0', '#19D5FD']">重发电子邮箱</x-button>
  13 + </box>
  14 + <div style="text-align: center;padding-top: 20px;">客服电话: 0714-6212345</div>
  15 + </div>
  16 + </group>
  17 + </div>
  18 +</template>
  19 +
  20 +
  21 +<script>
  22 +import {
  23 + queryCustInvoiceHistoryList
  24 +} from "@/api/invoice/invoice.js";
  25 +export default {
  26 + name: "invoiceDetail",
  27 + data() {
  28 + return {
  29 + list: []
  30 + };
  31 + },
  32 + mounted() {
  33 + },
  34 + methods: {}
  35 +};
  36 +</script>
  37 +
  38 +<style scoped lang="scss">
  39 + .noDada {
  40 + text-align: center;
  41 + img {
  42 + margin: 20px auto;
  43 + }
  44 + }
  45 +
  46 +</style>
src/views/eInvoice/invoiceRecord/invoiceRecord.vue 0 → 100644
  1 +<template>
  2 + <div v-if="list.length>0">
  3 + <group title="开票历史">
  4 + <cell title="停车" link="https://vux.li" inline-desc='2020/05/29 22:22:22'>
  5 + <div>
  6 + <p>已发送电子邮箱</p>
  7 + <p>¥ 0.20</p>
  8 + </div>
  9 + </cell>
  10 +
  11 + <cell title="停车" link="https://vux.li" inline-desc='2020/05/29 22:22:22'>
  12 + <div>
  13 + <p>已开票</p>
  14 + <p>¥ 0.20</p>
  15 + </div>
  16 + </cell>
  17 + </group>
  18 + </div>
  19 +
  20 + <div class="noDada" v-else>
  21 + <img src="../../../assets/images/parkInvoice/parkInvoiceNo.png" width="180px" height="140px">
  22 + <p>暂无开票历史记录</p>
  23 + </div>
  24 +</template>
  25 +
  26 +
  27 +<script>
  28 +import {
  29 + queryCustInvoiceHistoryList
  30 +} from "@/api/invoice/invoice.js";
  31 +export default {
  32 + name: "invoiceRecord",
  33 + data() {
  34 + return {
  35 + list: []
  36 + };
  37 + },
  38 + mounted() {
  39 + this.queryCustInvoiceHistoryList();
  40 + },
  41 + methods: {
  42 + queryCustInvoiceHistoryList: function() {
  43 + let jsondata = this.$utils.commonParams();
  44 + jsondata.sign = this.$utils.signObject(jsondata);
  45 + console.log("传参 " + JSON.stringify(jsondata));
  46 + queryCustInvoiceHistoryList(jsondata).then(response => {
  47 + console.log(response);
  48 + this.list = response.data;
  49 + });
  50 + }
  51 + }
  52 +};
  53 +</script>
  54 +
  55 +<style scoped lang="scss">
  56 + .noDada {
  57 + text-align: center;
  58 + img {
  59 + margin: 20px auto;
  60 + }
  61 + }
  62 +
  63 +</style>
src/views/eInvoice/parkInvoice/parkInvoice.vue 0 → 100644
  1 +<template>
  2 + <div style="height: 100%">
  3 + <div class="noDada" v-if="list.length == 0">
  4 + <img src="../../../assets/images/parkInvoice/parkInvoiceNo.png" width="180px" height="140px">
  5 + <p>暂无发票抬头,请添加发票抬头才可以发票哦</p>
  6 +
  7 + <div style="padding: 10px;">
  8 + <x-button type="warn">添加发票抬头</x-button>
  9 + </div>
  10 + </div>
  11 + <div class="inovice-main" v-else>
  12 + <div class="inovice-top">
  13 + <group>
  14 + <cell is-link link="invoiceOpt" align-items="left" class="inovice-list">
  15 + <div slot="title">
  16 + <span>发票类型:</span>
  17 + <span>{{type}}</span>
  18 + </div>
  19 +
  20 + <div slot="title">
  21 + <span>发票抬头:</span>
  22 + <span>{{name}}</span>
  23 + </div>
  24 +
  25 + <div slot="title">
  26 + <span>电子邮箱:</span>
  27 + <span>{{email}}</span>
  28 + </div>
  29 +
  30 + <div slot="title">
  31 + <span>备注信息:</span>
  32 + <span>{{remark}}</span>
  33 + </div>
  34 + </cell>
  35 + </group>
  36 +
  37 + <div class="weui-cells weui-cells_checkbox" v-if="checkboxData.length>0">
  38 + <label v-for='(item, index) in checkboxData' :key="item.id" class="weui-cell weui-check_label">
  39 + <div class="weui-cell__hd">
  40 + <input :value="item.id" v-model="item.state" @click="handleInputChange" type="checkbox"
  41 + name="vux-checkbox" class="weui-check">
  42 + <i class="weui-icon-checked vux-checklist-icon-checked"></i>
  43 + </div>
  44 + <div class="weui-cell__bd">
  45 + <p>{{item.carNumber}}</p>
  46 + <p>停车发票</p>
  47 + <p>{{item.plName}}</p>
  48 + <p>
  49 + 有效期:{{$utils.timestampTransformTime(item.createDate)}}--{{$utils.timestampTransformTime(item.payFinishTime)}}</p>
  50 + </div>
  51 + <p>¥{{((item.orderActFee)/100).toFixed(2)}}元</p>
  52 + </label>
  53 + </div>
  54 +
  55 +
  56 + <div class="noDada" v-else>
  57 + <img src="../../../assets/images/parkInvoice/parkInvoiceNo.png" width="90px" height="70px">
  58 + <p>您还没有可开发票的记录</p>
  59 + </div>
  60 + </div>
  61 +
  62 + <div class="inovice-bottom">
  63 + <p class="calculate-wrap">
  64 + 您已选中 <span style="color: #f00">{{ checkedLen}}</span>笔交易
  65 + <span style="padding-left: 20px">合计 <span style="color: #f00">{{(totalPrice/100).toFixed(2)}}</span></span>
  66 + </p>
  67 +
  68 + <div class="opration-area">
  69 + <!--<input v-model="isAllChecked" @click="allHandle" type="checkbox"-->
  70 + <!--name="vux-checkbox" class="weui-check">-->
  71 +
  72 + <!--<checklist :options="commonList" v-model="isAllChecked" @on-change="allHandle"></checklist>-->
  73 + <div @click="allHandle" style="float: left">
  74 + <check-icon :value.sync="isAllChecked"> 全选</check-icon>
  75 + </div>
  76 +
  77 + <x-button type="warn" style="width: 160px;float: right;height: 60px;border-radius: 0"
  78 + @click.native="openTicket">提交开票
  79 + </x-button>
  80 + </div>
  81 + </div>
  82 +
  83 + </div>
  84 +
  85 +
  86 + </div>
  87 +</template>
  88 +
  89 +<script>
  90 +import {
  91 + queryCustInvoiceInfoList,
  92 + queryRntPayOrderForInvoice,
  93 + openTicketForCustInvoiceHisInfo
  94 +} from "@/api/invoice/invoice.js"
  95 +export default {
  96 + name: "parkInvoice",
  97 + data() {
  98 + return {
  99 + name: "",
  100 + email: "",
  101 + type: "",
  102 + remark: "",
  103 + list: [],
  104 + invoiceList:[],
  105 + commonList: ["全选"],
  106 + fullValues: [],
  107 + checkboxData: [],
  108 + selectedData: [], // 全选存储数据
  109 + totalPrice: 0, // 总价
  110 + isAllChecked: false,// 是否全选
  111 + checkedLen: 0,// 选中了几个
  112 + checkBox: {
  113 + checked: false,
  114 + items: {}
  115 + }
  116 + };
  117 + },
  118 + computed: {
  119 + totalPurchasers() {
  120 + return this.selectedData.length;
  121 + },
  122 +
  123 + },
  124 + mounted() {
  125 + this.name = this.$route.query.name;
  126 + this.email = this.$route.query.email;
  127 + this.type = this.$route.query.type;
  128 + this.remark = this.$route.query.remark;
  129 + this.queryCustInvoiceInfoList(); // 获取抬头
  130 + this.queryRntPayOrderForInvoice(); // 获取可开票列表
  131 + },
  132 + methods: {
  133 + // 提交开票
  134 + openTicket: function() {
  135 + let that = this;
  136 + if (this.checkedLen == 0) {
  137 + this.$vux.toast.text("请先选择可发票记录", "top");
  138 + return false;
  139 + }
  140 +
  141 + let finalArr = this.checkboxData.filter(item => this.selectedData.indexOf(item.id) > -1);
  142 + finalArr.forEach(item=>{
  143 + this.$delete(item,'id')
  144 + this.$delete(item,'state')
  145 + })
  146 +
  147 + let data = this.list[0]
  148 + let obj = {}
  149 + let jsondata = {};
  150 + if (data.invoiceType == 0){ // 0个人 1企业
  151 + obj = {
  152 + invoiceType: "1", // 1 停车订单,2 会员卡列表,3 充值列表
  153 + remark: data.remark, //备注谢谢
  154 + custName: data.name, // 发票抬头
  155 + custEmail:data.email, // 邮箱
  156 + invoiceTotalFee: this.totalPrice, // 总金额
  157 + invoiceKind: "0",
  158 + orderList: finalArr
  159 + };
  160 + }else{
  161 + obj = {
  162 + invoiceType: "1", // 1 停车订单,2 会员卡列表,3 充值列表
  163 + remark: data.remark, //备注谢谢
  164 + custName: data.name, // 发票抬头
  165 + custCardNo: data.cardNo, // 开户账户
  166 + custPhone: data.phone, // 电话
  167 + invoiceTotalFee: this.totalPrice, // 总金额
  168 + custEmail: data.email, // 邮箱
  169 + custAddress: data.address, // 地址
  170 + custBankName: data.bankName, // 开户银行
  171 + invoiceKind: "0",
  172 + orderList: JSON.stringify(finalArr)
  173 + };
  174 + }
  175 +
  176 + jsondata = Object.assign(obj, this.$utils.commonParams());
  177 + jsondata.sign = this.$utils.signObject(jsondata);
  178 + console.log(JSON.stringify(jsondata));
  179 + openTicketForCustInvoiceHisInfo(jsondata).then(response => {
  180 + console.log(response);
  181 + this.queryCustInvoiceInfoList()
  182 + });
  183 + },
  184 + // 获取可开票列表
  185 + queryRntPayOrderForInvoice: function() {
  186 + let that = this;
  187 + let jsondata = {};
  188 + let obj = {
  189 + invoiceType: "1" // 1 停车订单,2 会员卡列表,3 充值列表
  190 + };
  191 + jsondata = Object.assign(obj, this.$utils.commonParams());
  192 + jsondata.sign = this.$utils.signObject(jsondata);
  193 + queryRntPayOrderForInvoice(jsondata).then(response => {
  194 + const res = response.data
  195 +
  196 + that.checkboxData = res;
  197 + for (var i = 0; i < that.checkboxData.length; i++) { // 添加state属性并设置为false
  198 + that.$set(that.checkboxData[i], "state", false);
  199 + that.$set(that.checkboxData[i], "id", i);
  200 + }
  201 + console.log('-----')
  202 + console.log(that.checkboxData);
  203 + });
  204 + },
  205 + // 获取抬头
  206 + queryCustInvoiceInfoList: function() {
  207 + let that = this;
  208 + let jsondata = this.$utils.commonParams();
  209 + jsondata.sign = this.$utils.signObject(jsondata);
  210 + console.log("传参 " + JSON.stringify(jsondata));
  211 + queryCustInvoiceInfoList(jsondata).then(response => {
  212 + // console.log(response);
  213 + this.list = response.data.filter(item => {
  214 + return item.isDefault == 1
  215 + })
  216 + response.data.map(item => {
  217 + if (item.isDefault == 1) {
  218 + that.name = item.name;
  219 + that.email = item.email;
  220 + that.type = item.invoiceType == "0" ? "个人" : "企业";
  221 + that.remark = item.remark;
  222 + }
  223 + });
  224 + });
  225 + },
  226 + change: function() {
  227 + },
  228 + // 全选
  229 + allHandle: function(value) {
  230 + console.log(this.isAllChecked);
  231 + if (this.isAllChecked) {
  232 + console.log("1");
  233 + this.totalPrice = 0;
  234 + this.checkedLen = this.checkboxData.length;
  235 + this.selectedData = [];
  236 + for (let i = 0; i < this.checkboxData.length; i++) {
  237 + this.$set(this.checkboxData[i], "state", true);
  238 + console.log(this.checkboxData[i].orderActFee);
  239 + this.totalPrice += this.checkboxData[i].orderActFee;
  240 + this.selectedData.push(this.checkboxData[i].id);
  241 + }
  242 + // this.totalPrice = (this.totalPrice/100).toFixed(2)
  243 + this.checkedLen = this.checkboxData.length;
  244 + console.log(this.checkboxData);
  245 + } else {
  246 + console.log("2");
  247 + this.totalPrice = 0;
  248 + this.checkedLen = 0;
  249 + this.selectedData = [];
  250 + for (let i = 0; i < this.checkboxData.length; i++) {
  251 + this.$set(this.checkboxData[i], "state", false);
  252 + }
  253 + console.log(this.checkboxData);
  254 + }
  255 + // this.isAllChecked = !this.isAllChecked
  256 + },
  257 + // 单选
  258 + handleInputChange: function(e) {
  259 + console.log(e.target._value);
  260 + console.log("------------");
  261 + console.log(this.selectedData);
  262 + setTimeout(() => {
  263 + if (this.selectedData.indexOf(e.target._value) > -1) {
  264 + this.remove(this.selectedData, e.target._value);
  265 + } else {
  266 + this.selectedData.push(e.target._value);
  267 + }
  268 + if (this.selectedData.length < this.checkboxData.length) {
  269 + this.isAllChecked = false;
  270 + } else {
  271 + this.isAllChecked = true;
  272 + }
  273 + this.calculatedTotal();
  274 + this.checkedLen = this.selectedData.length;
  275 + }, 0);
  276 + console.log(this.selectedData);
  277 + },
  278 + //数组删除
  279 + remove(arr, val) {
  280 + var index = arr.indexOf(val);
  281 + if (index > -1) {
  282 + arr.splice(index, 1);
  283 + }
  284 + },
  285 + //数组合并去重
  286 + arrayMerging(arr1, arr2) {
  287 + var arr = arr1.concat();
  288 + for (var i = 0; i < arr2.length; i++) {
  289 + if (arr.indexOf(arr2[i]) === -1) {
  290 + arr.push(arr2[i]);
  291 + }
  292 + }
  293 + return arr;
  294 + },
  295 + calculatedTotal() {
  296 + this.totalPrice = 0;
  297 + this.selectedData.map((item1, index) => {
  298 + let curItem1 = item1;
  299 + this.checkboxData.map((item2, index) => {
  300 + if (this.checkboxData[index].id == curItem1) {
  301 + this.totalPrice += this.checkboxData[index].orderActFee;
  302 + }
  303 + });
  304 + });
  305 + return this.totalPrice;
  306 + }
  307 + }
  308 +};
  309 +</script>
  310 +
  311 +<style scoped lang="scss">
  312 + .noDada {
  313 + text-align: center;
  314 + img {
  315 + margin: 20px auto;
  316 + }
  317 + }
  318 +
  319 + .inovice-top {
  320 + flex: 1;
  321 + overflow-y: auto;
  322 + }
  323 +
  324 + .inovice-top > > > .weui-cells {
  325 + margin-top: 0;
  326 + }
  327 +
  328 + .inovice-top > > > .weui-cells_checkbox {
  329 + font-size: 14px;
  330 + }
  331 +
  332 + .inovice-list {
  333 + span:nth-of-type(2) {
  334 + padding-left: 30px;
  335 + color: #999;
  336 + }
  337 + }
  338 +
  339 + .inovice-main {
  340 + height: 100%;
  341 + display: flex;
  342 + flex-direction: column;
  343 + }
  344 +
  345 + .inovice-bottom {
  346 + height: 100px;
  347 + }
  348 +
  349 + .calculate-wrap {
  350 + background: #e6fafa;
  351 + padding: 0 0 0 15px;
  352 + height: 40px;
  353 + line-height: 40px;
  354 + }
  355 +
  356 + .opration-area {
  357 + padding-left: 15px;
  358 + height: 60px;
  359 + line-height: 60px;
  360 + }
  361 +
  362 +</style>
src/views/parkPay/parkRecord.vue
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <div v-show="currentTabActive==0"> 14 <div v-show="currentTabActive==0">
15 15
16 <div v-if="parkingData.length>0"> 16 <div v-if="parkingData.length>0">
17 - <p class="free-tip" v-if="parkingData[0].parkDuration<=3600">停车1小时内无需缴费,请申请离场。</p> 17 + <!--<p class="free-tip" v-if="parkingData[0].parkDuration<=1800">停车1小时内无需缴费,请申请离场。</p>-->
18 18
19 <div class="cost-main" v-for="i in parkingData"> 19 <div class="cost-main" v-for="i in parkingData">
20 <ul class="cost-header"> 20 <ul class="cost-header">
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p> 33 <p>停车时长:{{ $utils.dateFormat(i.parkDuration)}}</p>
34 <div class="out-wrap"> 34 <div class="out-wrap">
35 <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p> 35 <p class="mon-wrap">¥{{(i.unPayFee/100).toFixed(2)}}</p>
36 - <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-if="parkingData[0].parkDuration<=3600">申请离场</p> 36 + <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-if="parkingData[0].parkDuration<=1800">申请离场</p>
37 <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else>出场缴费</p> 37 <p class="out-btn" @click="toPayCurrent(i,parkingData[0].parkDuration)" v-else>出场缴费</p>
38 </div> 38 </div>
39 </div> 39 </div>
@@ -315,7 +315,7 @@ export default { @@ -315,7 +315,7 @@ export default {
315 315
316 } else { 316 } else {
317 //$('.dialog-out').show() 317 //$('.dialog-out').show()
318 - this.$msgbox('提示', '停车15分钟内无需缴费,申请成功。') 318 + this.$msgbox('提示', response.message)
319 } 319 }
320 320
321 }) 321 })