Commit 810282754545ae25e0251a8c4c3dcc4950377e23

Authored by 刘淇
1 parent 83c49479

发票

common/common.js
1 import md5 from './md5.min.js'; 1 import md5 from './md5.min.js';
2 // 江阴正式环境 2 // 江阴正式环境
3 -var serverUrl = "https://bus.jycrtc.com"; 3 +var serverUrl = "http://test.jycrtc.com:8096";
  4 +// 测试 http://test.jycrtc.com:8096 正式 https://bus.jycrtc.com
  5 +var serverPayUrl = ''
4 // 测试环境 6 // 测试环境
5 // var serverUrl = "http://test.jycrtc.com:8096"; 7 // var serverUrl = "http://test.jycrtc.com:8096";
6 //江阴微信小程序appid 8 //江阴微信小程序appid
@@ -51,7 +53,26 @@ const createCouponOrder = serverUrl + "/business/h5/coupon/createCouponOrder"; @@ -51,7 +53,26 @@ const createCouponOrder = serverUrl + "/business/h5/coupon/createCouponOrder";
51 // 商户卡券-使用余额购买 53 // 商户卡券-使用余额购买
52 const accountPay = serverUrl + "/business/h5/pay/busAccount/accountPay"; 54 const accountPay = serverUrl + "/business/h5/pay/busAccount/accountPay";
53 55
  56 +// 获取发票抬头列表
  57 +const queryCustInvoiceInfoList = serverUrl + "/business/h5/pay/invoice/queryCustInvoiceInfoList";
  58 +// 新增一条客户发票抬头信息
  59 +const insertCustInvoiceInfo = serverUrl + "/business/h5/pay/invoice/insertCustInvoiceInfo";
  60 +// 通过主键更新一条客户发票抬头信息
  61 +const updateCustInvoiceInfo = serverUrl + "/business/h5/pay/invoice/updateCustInvoiceInfo";
  62 +// 删除一条客户发票抬头信息
  63 +const deleteCustInvoiceInfoByID = serverUrl + "/business/h5/pay/invoice/deleteCustInvoiceInfoByID";
54 64
  65 +// 获取开票订单列表
  66 +const queryRntPayOrderForInvoice = serverUrl + "/business/h5/pay/invoice/queryRntPayOrderForInvoice";
  67 +
  68 +// 记录客户开发票历史信息及开票历史详情信息
  69 +const openTicketForCustInvoiceHisInfo = serverUrl + "/business/h5/pay/invoice/openTicketForCustInvoiceHisInfo";
  70 +
  71 +// 查询客户所有发票历史
  72 +const queryCustInvoiceHistoryList = serverUrl + "/business/h5/pay/invoice/queryCustInvoiceHistoryList";
  73 +
  74 +// 重发邮件
  75 +const resendInvoiceMail = serverUrl + "/business/h5/pay/invoice/resendInvoiceMail";
55 76
56 77
57 78
@@ -223,8 +244,43 @@ var cardTypeFormat = function(num){ @@ -223,8 +244,43 @@ var cardTypeFormat = function(num){
223 return '折扣券' 244 return '折扣券'
224 } 245 }
225 } 246 }
  247 +
  248 +var formatDate = function(dataStr) {
  249 + var time = new Date(dataStr);
  250 +
  251 + function timeAdd0(str) {
  252 +
  253 + if (str < 10) {
  254 +
  255 + str = '0' + str;
  256 +
  257 + }
  258 +
  259 + return str
  260 +
  261 + }
  262 +
  263 + var y = time.getFullYear();
  264 +
  265 + var m = time.getMonth() + 1;
  266 +
  267 + var d = time.getDate();
  268 +
  269 + var h = time.getHours();
  270 +
  271 + var mm = time.getMinutes();
  272 +
  273 + var s = time.getSeconds();
  274 +
  275 + return y + '-' + timeAdd0(m) + '-' + timeAdd0(d) + ' '
  276 +
  277 + + timeAdd0(h) + ':' + timeAdd0(mm) + ':' + timeAdd0(s);
  278 +
  279 +
  280 +};
226 export default { 281 export default {
227 // deviceInfo, 282 // deviceInfo,
  283 + formatDate,
228 hs_wxPay_appId, 284 hs_wxPay_appId,
229 public_orgId, 285 public_orgId,
230 appName, 286 appName,
@@ -254,6 +310,23 @@ export default { @@ -254,6 +310,23 @@ export default {
254 accountPay, 310 accountPay,
255 311
256 312
  313 + // 获取发票抬头列表
  314 + queryCustInvoiceInfoList,
  315 + // 新增一条客户发票抬头信息
  316 + insertCustInvoiceInfo,
  317 + // 通过主键更新一条客户发票抬头信息
  318 + updateCustInvoiceInfo,
  319 + // 删除一条客户发票抬头信息
  320 + deleteCustInvoiceInfoByID,
  321 + // 获取开票订单列表
  322 + queryRntPayOrderForInvoice,
  323 + // 记录客户开发票历史信息及开票历史详情信息
  324 + openTicketForCustInvoiceHisInfo,
  325 + // 查询客户所有发票历史
  326 + queryCustInvoiceHistoryList,
  327 + // 重发邮件
  328 + resendInvoiceMail,
  329 +
257 //陈彪接口 330 //陈彪接口
258 rechargeList, 331 rechargeList,
259 walletKindType, 332 walletKindType,
common/uni.css
@@ -1857,4 +1857,11 @@ checkbox-group label { @@ -1857,4 +1857,11 @@ checkbox-group label {
1857 1857
1858 .marginRightArrow{ 1858 .marginRightArrow{
1859 margin-right: 10px; 1859 margin-right: 10px;
1860 -}  
1861 \ No newline at end of file 1860 \ No newline at end of file
  1861 +}
  1862 +
  1863 +.novipcard_Mid{
  1864 + text-align: center;
  1865 +}
  1866 +
  1867 +
  1868 +
pages/addTitle/addTitle.vue
1 <template> 1 <template>
2 - <view>  
3 - <uni-section title="抬头类型" type="line">  
4 - <view class="uni-list">  
5 - <radio-group @change="radioChange">  
6 - <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">  
7 - <view>  
8 - <radio :value="item.value" :checked="index === current" />  
9 - </view>  
10 - <view style="flex: 1;">{{item.name}}</view>  
11 - </label>  
12 - </radio-group>  
13 - </view>  
14 - </uni-section>  
15 - <uni-section title="发票详情" type="line">  
16 - <view class="paddinglr30">  
17 - <!-- 基础用法,不包含校验规则 -->  
18 - <uni-forms ref="baseForm" :rules="rules" :modelValue="baseFormData">  
19 - <uni-forms-item label="发票抬头" name="invoicetitle" required>  
20 - <uni-easyinput v-model="baseFormData.invoicetitle" placeholder="请输入发票抬头" />  
21 - </uni-forms-item>  
22 - <uni-forms-item label="纳税人识别号" name="userId" required>  
23 - <uni-easyinput v-model="baseFormData.userId" placeholder="请输入纳税人识别号" />  
24 - </uni-forms-item>  
25 - <uni-forms-item label="注册地址">  
26 - <uni-easyinput v-model="baseFormData.address" placeholder="请输入注册地址" />  
27 - </uni-forms-item>  
28 - <uni-forms-item label="注册电话">  
29 - <uni-easyinput v-model="baseFormData.telphone" placeholder="请输入注册电话" />  
30 - </uni-forms-item>  
31 - <uni-forms-item label="开户行">  
32 - <uni-easyinput v-model="baseFormData.bank" placeholder="请输入开户行" />  
33 - </uni-forms-item>  
34 - <uni-forms-item label="开户账号">  
35 - <uni-easyinput v-model="baseFormData.bankAccount" placeholder="请输入开户账号" />  
36 - </uni-forms-item>  
37 - <uni-forms-item label="电子邮箱" name="email" required>  
38 - <uni-easyinput v-model="baseFormData.email" placeholder="请输入电子邮箱" />  
39 - </uni-forms-item>  
40 - <uni-forms-item label="备注">  
41 - <uni-easyinput type="textarea" v-model="baseFormData.remark" placeholder="备注" />  
42 - </uni-forms-item>  
43 - <uni-section title="纸质票邮寄方式" type="line">  
44 - <uni-forms-item label="邮寄地址" name="emsAdress" required="">  
45 - <uni-easyinput v-model="baseFormData.emsAdress" placeholder="请输入邮寄地址" />  
46 - </uni-forms-item>  
47 - <uni-forms-item label="联系人">  
48 - <uni-easyinput v-model="baseFormData.emsUsername" placeholder="请输入联系人" />  
49 - </uni-forms-item>  
50 - <uni-forms-item label="联系方式">  
51 - <uni-easyinput v-model="baseFormData.emsTel" placeholder="请输入联系方式" />  
52 - </uni-forms-item>  
53 - </uni-section>  
54 - </uni-forms> 2 + <view>
  3 + <uni-section title="抬头类型" type="line">
  4 + <view class="uni-list">
  5 + <radio-group @change="radioChange">
  6 + <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
  7 + <view>
  8 + <radio :value="item.value" :checked="index === current"/>
  9 + </view>
  10 + <view style="flex: 1;">{{item.name}}</view>
  11 + </label>
  12 + </radio-group>
  13 + </view>
  14 + </uni-section>
55 15
56 - </view>  
57 - </uni-section>  
58 - <view class="paddinglr30 margin-top-30 uni-common-mb">  
59 - <button type="primary" @click="submit('baseForm')">确认</button>  
60 - </view>  
61 - </view> 16 +
  17 + <!--个人-->
  18 + <uni-section title="个人发票详情" type="line" v-if="current==0">
  19 + <view class="paddinglr30 margin-top-30">
  20 + <!-- 基础用法,不包含校验规则 -->
  21 + <uni-forms ref="baseFormPerson" :rules="rulesPerson" :modelValue="baseFormDataPerson">
  22 + <uni-forms-item label="发票抬头" name="invoicetitle" required>
  23 + <uni-easyinput v-model="baseFormDataPerson.invoicetitle" placeholder="请输入发票抬头"/>
  24 + </uni-forms-item>
  25 +
  26 + <uni-forms-item label="电子邮箱" name="email" required>
  27 + <uni-easyinput v-model="baseFormDataPerson.email" placeholder="请输入电子邮箱"/>
  28 + </uni-forms-item>
  29 +
  30 + <uni-forms-item label="备注信息">
  31 + <uni-easyinput type="textarea" v-model="baseFormDataPerson.remark" placeholder="备注"/>
  32 + </uni-forms-item>
  33 + </uni-forms>
  34 +
  35 + </view>
  36 + </uni-section>
  37 +
  38 + <!--企业-->
  39 + <uni-section title="发票详情" type="line" v-if="current==1">
  40 + <view class="paddinglr30 margin-top-30">
  41 + <!-- 基础用法,不包含校验规则 -->
  42 + <uni-forms ref="baseForm" :rules="rules" :modelValue="baseFormData">
  43 + <uni-forms-item label="发票抬头" name="invoicetitle" required>
  44 + <uni-easyinput v-model="baseFormData.invoicetitle" placeholder="请输入发票抬头"/>
  45 + </uni-forms-item>
  46 + <uni-forms-item label="纳税人识别号" name="userId" required>
  47 + <uni-easyinput v-model="baseFormData.userId" placeholder="请输入纳税人识别号"/>
  48 + </uni-forms-item>
  49 + <uni-forms-item label="注册地址">
  50 + <uni-easyinput v-model="baseFormData.address" placeholder="请输入注册地址"/>
  51 + </uni-forms-item>
  52 + <uni-forms-item label="注册电话">
  53 + <uni-easyinput v-model="baseFormData.telphone" placeholder="请输入注册电话"/>
  54 + </uni-forms-item>
  55 + <uni-forms-item label="开户行">
  56 + <uni-easyinput v-model="baseFormData.bank" placeholder="请输入开户行"/>
  57 + </uni-forms-item>
  58 + <uni-forms-item label="开户账号">
  59 + <uni-easyinput v-model="baseFormData.bankAccount" placeholder="请输入开户账号"/>
  60 + </uni-forms-item>
  61 + <uni-forms-item label="电子邮箱" name="email" required>
  62 + <uni-easyinput v-model="baseFormData.email" placeholder="请输入电子邮箱"/>
  63 + </uni-forms-item>
  64 + <uni-forms-item label="备注">
  65 + <uni-easyinput type="textarea" v-model="baseFormData.remark" placeholder="备注"/>
  66 + </uni-forms-item>
  67 + <!--<uni-section title="纸质票邮寄方式" type="line">-->
  68 + <!--<uni-forms-item label="邮寄地址" name="emsAdress" required="">-->
  69 + <!--<uni-easyinput v-model="baseFormData.emsAdress" placeholder="请输入邮寄地址"/>-->
  70 + <!--</uni-forms-item>-->
  71 + <!--<uni-forms-item label="联系人">-->
  72 + <!--<uni-easyinput v-model="baseFormData.emsUsername" placeholder="请输入联系人"/>-->
  73 + <!--</uni-forms-item>-->
  74 + <!--<uni-forms-item label="联系方式">-->
  75 + <!--<uni-easyinput v-model="baseFormData.emsTel" placeholder="请输入联系方式"/>-->
  76 + <!--</uni-forms-item>-->
  77 + <!--</uni-section>-->
  78 + </uni-forms>
  79 +
  80 + </view>
  81 + </uni-section>
  82 + <view class="paddinglr30 margin-top-30 uni-common-mb">
  83 + <button type="primary" @click="submit()">确认</button>
  84 + </view>
  85 + </view>
62 </template> 86 </template>
63 87
64 <script> 88 <script>
65 - export default {  
66 - data() {  
67 - return {  
68 - items: [{  
69 - value: '1',  
70 - name: '个人'  
71 - },  
72 - {  
73 - value: '2',  
74 - name: '企业'  
75 - },  
76 - {  
77 - value: '3',  
78 - name: '非企业性单位'  
79 - },  
80 - ],  
81 - current: 0,  
82 - baseFormData: {  
83 - invoicetitle: '',  
84 - userId: '',  
85 - address: '',  
86 - telphone: '',  
87 - bank: '',  
88 - bankAccount: '',  
89 - email: '',  
90 - remark: '',  
91 - emsAdress: '',  
92 - emsUsername: '',  
93 - emsTel: '',  
94 - },  
95 - // 校验规则  
96 - rules: {  
97 - invoicetitle: {  
98 - rules: [{  
99 - required: true,  
100 - errorMessage: '发票抬头不能为空'  
101 - }]  
102 - },  
103 - userId: {  
104 - rules: [{  
105 - required: true,  
106 - errorMessage: '纳税人识别号不能为空'  
107 - }, {  
108 - format: 'number',  
109 - errorMessage: '纳税人识别号只能输入数字'  
110 - }]  
111 - },  
112 - email: {  
113 - rules: [{  
114 - required: true,  
115 - errorMessage: '电子邮箱不能为空'  
116 - }, ]  
117 - },  
118 - emsAdress: {  
119 - rules: [{  
120 - required: true,  
121 - errorMessage: '邮寄地址不能为空'  
122 - }, ]  
123 - },  
124 - },  
125 - };  
126 - },  
127 - onLoad() {}, 89 +export default {
  90 + data() {
  91 + return {
  92 + items: [{
  93 + value: '1',
  94 + name: '个人'
  95 + },
  96 + {
  97 + value: '2',
  98 + name: '企业'
  99 + },
  100 + // {
  101 + // value: '3',
  102 + // name: '非企业性单位'
  103 + // },
  104 + ],
  105 + current: 0,
  106 + baseFormDataPerson: {
  107 + invoicetitle: '',
  108 + email: '',
  109 + remark: '',
  110 + },
  111 + baseFormData: {
  112 + invoicetitle: '',
  113 + userId: '',
  114 + address: '',
  115 + telphone: '',
  116 + bank: '',
  117 + bankAccount: '',
  118 + email: '',
  119 + remark: '',
  120 + // emsAdress: '',
  121 + // emsUsername: '',
  122 + // emsTel: '',
  123 + },
  124 + // 校验规则
  125 + rulesPerson: {
  126 + invoicetitle: {
  127 + rules: [{
  128 + required: true,
  129 + errorMessage: '发票抬头不能为空'
  130 + }]
  131 + },
  132 +
  133 + email: {
  134 + rules: [{
  135 + required: true,
  136 + errorMessage: '电子邮箱不能为空'
  137 + },]
  138 + },
  139 +
  140 + },
  141 + // 校验规则
  142 + rules: {
  143 + invoicetitle: {
  144 + rules: [{
  145 + required: true,
  146 + errorMessage: '发票抬头不能为空'
  147 + }]
  148 + },
  149 + userId: {
  150 + rules: [{
  151 + required: true,
  152 + errorMessage: '纳税人识别号不能为空'
  153 + }, {
  154 + format: 'number',
  155 + errorMessage: '纳税人识别号只能输入数字'
  156 + }]
  157 + },
  158 + email: {
  159 + rules: [{
  160 + required: true,
  161 + errorMessage: '电子邮箱不能为空'
  162 + },]
  163 + },
  164 + emsAdress: {
  165 + rules: [{
  166 + required: true,
  167 + errorMessage: '邮寄地址不能为空'
  168 + },]
  169 + },
  170 + },
  171 + };
  172 + },
  173 + onLoad() {
  174 + },
  175 + onReady() {
  176 + // 设置自定义表单校验规则,必须在节点渲染完毕后执行
  177 + // this.$refs.baseForm.setRules(this.rules)
  178 + // this.$refs.baseFormPerson.setRules(this.rulesPerson)
  179 + },
  180 + methods: {
  181 + radioChange: function (evt) {
  182 + for (let i = 0; i < this.items.length; i++) {
  183 + if (this.items[i].value === evt.detail.value) {
  184 + this.current = i;
  185 + break;
  186 + }
  187 + }
  188 + console.log(this.current)
  189 + },
  190 + submit() {
  191 + console.log()
  192 + if(this.current==0){
  193 + this.$refs['baseFormPerson'].validate().then(res => {
  194 + console.log('success', res);
128 195
129 - onReady() {  
130 - // 设置自定义表单校验规则,必须在节点渲染完毕后执行  
131 - this.$refs.baseForm.setRules(this.rules)  
132 - }, 196 + let insertCustInvoiceInfo = this.$common.insertCustInvoiceInfo;
  197 + let jsondata = {
  198 + name: this.baseFormDataPerson.invoicetitle,
  199 + email: this.baseFormDataPerson.email,
  200 + remark: this.baseFormDataPerson.remark,
  201 + isDefault: '1',// 是否默认客户抬头信息,1表示是默认抬头信息,0不是默认抬头信息(默认0)
  202 + invoiceType: '0', // 发票类型(个人、公司),0 表示个人,1表示公司
  203 + };
  204 + uni.request({
  205 + url: insertCustInvoiceInfo,
  206 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  207 + dataType: "json",
  208 + method: "POST",
  209 + success: (res) => {
  210 + console.log(res)
  211 + if (res.data.code == 0) {
  212 + uni.showToast({
  213 + icon:'none',
  214 + title: `新增个人发票抬头成功`
  215 + })
  216 + uni.navigateBack({
  217 + delta:1,//返回层数,2则上上页
  218 + })
  219 + }else{
  220 + uni.showToast({
  221 + icon:'none',
  222 + title: res.data.message
  223 + })
  224 + }
  225 + if(res.code=='1001'){
  226 + uni.showToast({
  227 + icon:'none',
  228 + title: res.message
  229 + })
  230 + }
  231 + }
  232 + })
  233 + }).catch(err => {
  234 + console.log('err', err);
  235 + })
  236 + }
  237 + if(this.current==1){
  238 + this.$refs['baseForm'].validate().then(res => {
  239 + console.log('success', res);
  240 + let insertCustInvoiceInfo = this.$common.insertCustInvoiceInfo;
  241 + let jsondata = {
  242 + name: this.baseFormData.invoicetitle,
  243 + email: this.baseFormData.email,
  244 + remark: this.baseFormData.remark,
  245 + isDefault: '1',// 是否默认客户抬头信息,1表示是默认抬头信息,0不是默认抬头信息(默认0)
  246 + invoiceType: '1', // 发票类型(个人、公司),0 表示个人,1表示公司
  247 + bankName: this.baseFormData.bank,
  248 + taxid: this.baseFormData.userId,
  249 + cardNo: this.baseFormData.bankAccount,
  250 + address: this.baseFormData.address,
  251 + phone: this.baseFormData.telphone,
  252 + };
  253 + uni.request({
  254 + url: insertCustInvoiceInfo,
  255 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  256 + dataType: "json",
  257 + method: "POST",
  258 + success: (res) => {
  259 + console.log(res)
  260 + if (res.data.code == 0) {
  261 + uni.showToast({
  262 + icon:'none',
  263 + title: `新增企业发票抬头成功`
  264 + })
  265 + uni.navigateBack({
  266 + delta:1,//返回层数,2则上上页
  267 + })
  268 + }else{
  269 + uni.showToast({
  270 + icon:'none',
  271 + title: res.data.message
  272 + })
  273 + }
  274 + if(res.code=='1001'){
  275 + uni.showToast({
  276 + icon:'none',
  277 + title: res.message
  278 + })
  279 + }
  280 + }
  281 + })
  282 + }).catch(err => {
  283 + console.log('err', err);
  284 + })
  285 + }
133 286
134 - methods: {  
135 - radioChange: function(evt) {  
136 - for (let i = 0; i < this.items.length; i++) {  
137 - if (this.items[i].value === evt.detail.value) {  
138 - this.current = i;  
139 - break;  
140 - }  
141 - }  
142 - },  
143 - submit(ref) {  
144 - this.$refs[ref].validate().then(res => {  
145 - console.log('success', res);  
146 - uni.showToast({  
147 - title: `校验通过`  
148 - })  
149 - }).catch(err => {  
150 - console.log('err', err);  
151 - })  
152 - }  
153 - },  
154 - } 287 + }
  288 + },
  289 +}
155 </script> 290 </script>
156 291
157 <style lang="scss"> 292 <style lang="scss">
pages/billing/billing.vue
1 <template> 1 <template>
2 - <view>  
3 - <view class="billing-content">  
4 - <view class="uni-title uni-common-mt uni-common-pl">开票类型</view>  
5 - <view class="uni-list">  
6 - <radio-group @change="typeChange">  
7 - <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">  
8 - <view>  
9 - <radio :value="item.value" :checked="index === current" />  
10 - </view>  
11 - <view>{{item.name}}</view>  
12 - </label>  
13 - </radio-group>  
14 - </view>  
15 -  
16 - <view class="paddinglr30 bg-white uni-text border-bottom-1 pos-rel" @click="detailClick">  
17 - <view class="jy-fix-height34">  
18 - <text class="color-black">抬头类型:</text>  
19 - <text class="color-black">公司</text>  
20 - </view>  
21 - <view class="jy-fix-height34">  
22 - <text class="color-black">发票抬头:</text>  
23 - <text class="color-black">111</text>  
24 - </view>  
25 - <view class="jy-fix-height34">  
26 - <text class="color-black">纳税人识别号:</text>  
27 - <text class="color-black">1111</text>  
28 - </view>  
29 - <view class="jy-fix-height34" v-if="current === 0">  
30 - <text class="color-black">电子邮箱:</text>  
31 - <text class="color-black">111</text>  
32 - </view>  
33 - <view class="jy-fix-height34" v-if="current === 1">  
34 - <text class="color-black">邮寄地址:</text>  
35 - <text class="color-black">北京市海淀区玲珑路中关村产业园15A三层</text>  
36 - </view>  
37 - <view class="jy-fix-height34" v-if="current === 1">  
38 - <text class="color-black">联系方式:</text>  
39 - <text class="color-black">王旭 13810587647</text>  
40 - </view>  
41 - <view class="jy-fix-height34">  
42 - <text class="color-black">备注:</text>  
43 - <text class="color-black">111</text>  
44 - </view>  
45 -  
46 - <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">  
47 - </view>  
48 - </view>  
49 -  
50 - <!-- 每项选择 -->  
51 - <view class="billing-list">  
52 - <checkbox-group name="check" @change="changeCheck" class="check">  
53 - <!-- 注意v-for不要设在checkbox-group上 -->  
54 - <label class="uni-list paddingl10 pos-rel" v-for="(item, index) in content" :key="item.id">  
55 - <view class="jy-fix-height34">  
56 - <checkbox :value="item.value" :checked="item.checked" /><text  
57 - class="margin-left-5">余额充值</text>  
58 - </view>  
59 - <view class="jy-fix-height34 paddinglr30 margin-left-5">{{item.name}}</view>  
60 - <view class="jy-fix-height34 paddinglr30 margin-left-5">{{item.time}}</view>  
61 - <view class="pos-abs billing-money">  
62 - {{item.money}}  
63 - </view>  
64 - </label>  
65 - </checkbox-group>  
66 - </view>  
67 - <view class="billing-total">  
68 - 您已选中0笔交易,共0元  
69 - </view>  
70 - <!-- 全选 -->  
71 - <checkbox-group name="allCheck" @change="changeAll">  
72 - <label class="billing-all paddinglr30">  
73 - <checkbox :value="allCheck.value" :checked="allCheck.checked" /><text>{{allCheck.name}}</text>  
74 - <button type="primary" class="billing-submit" @click="billingSubmit">提交发票</button>  
75 - </label>  
76 - </checkbox-group>  
77 -  
78 - </view>  
79 - </view> 2 + <view>
  3 + <view class="billing-content">
  4 + <!--<view class="uni-title uni-common-mt uni-common-pl">开票类型</view>-->
  5 + <!--<view class="uni-list">-->
  6 + <!--<radio-group @change="typeChange">-->
  7 + <!--<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">-->
  8 + <!--<view>-->
  9 + <!--<radio :value="item.value" :checked="index === current" />-->
  10 + <!--</view>-->
  11 + <!--<view>{{item.name}}</view>-->
  12 + <!--</label>-->
  13 + <!--</radio-group>-->
  14 + <!--</view>-->
  15 +
  16 + <view class="paddinglr30 bg-white uni-text border-bottom-1 pos-rel" @click="detailClick">
  17 + <view class="jy-fix-height34 commonText">
  18 + <text class="color-black">抬头类型:</text>
  19 + <text class="color-black">{{invoiceType==0?'个人':'企业'}}</text>
  20 + </view>
  21 + <view class="jy-fix-height34 commonText">
  22 + <text class="color-black">发票抬头:</text>
  23 + <text class="color-black">{{name}}</text>
  24 + </view>
  25 + <!--<view class="jy-fix-height34 commonText">-->
  26 + <!--<text class="color-black">纳税人识别号:</text>-->
  27 + <!--<text class="color-black">1111</text>-->
  28 + <!--</view>-->
  29 + <view class="jy-fix-height34 commonText" v-if="current === 1">
  30 + <text class="color-black">电子邮箱:</text>
  31 + <text class="color-black">{{email}}</text>
  32 + </view>
  33 + <!--<view class="jy-fix-height34 commonText" v-if="current === 1">-->
  34 + <!--<text class="color-black">邮寄地址:</text>-->
  35 + <!--<text class="color-black ">北京市海淀区玲珑路中关村产业园15A三层北京市海淀区玲珑路中关村产业园15A三层</text>-->
  36 + <!--</view>-->
  37 + <!--<view class="jy-fix-height34 commonText" v-if="current === 1">-->
  38 + <!--<text class="color-black">联系方式:</text>-->
  39 + <!--<text class="color-black">王旭 13810587647</text>-->
  40 + <!--</view>-->
  41 + <view class="jy-fix-height34 commonText">
  42 + <text class="color-black">备注:</text>
  43 + <text class="color-black">{{remark}}</text>
  44 + </view>
  45 +
  46 + <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">
  47 + </view>
  48 + </view>
  49 +
  50 + <!-- 每项选择 -->
  51 + <view class="billing-list" v-if="content.length>0">
  52 + <checkbox-group name="check" @change="changeCheck" class="check">
  53 + <!-- 注意v-for不要设在checkbox-group上 -->
  54 + <label class="uni-list paddingl10 pos-rel " v-for="(item, index) in content" :key="item.id">
  55 + <view class="pos-abs billing-check">
  56 + <checkbox :value="item.rltOrderId" :checked="item.checked"/>
  57 + </view>
  58 + <view class="">
  59 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-if="type=='1'">停车缴费</view>
  60 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-else-if="type=='2'">会员卡缴费</view>
  61 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-else>账户充值</view>
  62 +
  63 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-if="type=='1'">{{item.carNumber}}</view>
  64 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-else-if="type=='2'">{{item.carNumber}}</view>
  65 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-else>充值金额</view>
  66 +
  67 +
  68 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-if="item.terminalSource=='4'">充值渠道:云平台</view>
  69 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-else-if="item.terminalSource=='11'">充值渠道:微信小程序</view>
  70 + <view class="jy-fix-height34 paddinglr30 margin-left-5" v-else>充值渠道:商户端微信小程序</view>
  71 +
  72 +
  73 + <view class="pos-abs billing-money">
  74 + {{(item.orderActFee/100).toFixed(2)}} 元
  75 + </view>
  76 + </view>
  77 +
  78 + </label>
  79 + </checkbox-group>
  80 + </view>
  81 +
  82 + <view v-else class="novipcard_Mid" style="padding-top: 20px;">
  83 + <image class="novipcard" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image>
  84 + <view class="novipcard_txt">
  85 + 暂无记录
  86 + </view>
  87 +
  88 + </view>
  89 +
  90 + <view class="billing-total">
  91 + 您已选中{{payNum}}笔交易,共{{(moneyTotal/100).toFixed(2)}}元
  92 + </view>
  93 + <!-- 全选 -->
  94 + <checkbox-group name="allCheck" @change="changeAll">
  95 + <label class="billing-all paddinglr30">
  96 + <checkbox :value="allCheck.value" :checked="allCheck.checked"/>
  97 + <text>{{allCheck.name}}</text>
  98 + <button type="primary" class="billing-submit" @click="billingSubmit">提交发票</button>
  99 + </label>
  100 + </checkbox-group>
  101 +
  102 + </view>
  103 + </view>
80 </template> 104 </template>
81 105
82 <script> 106 <script>
83 - export default {  
84 - data() {  
85 - return {  
86 - items: [{  
87 - value: '1',  
88 - name: '增值税电子普通发票',  
89 - checked: 'true'  
90 - },  
91 - {  
92 - value: '2',  
93 - name: '增值税纸质专用发票',  
94 -  
95 - }  
96 - ],  
97 - current: 0,  
98 - allCheck: {  
99 - name: '全选',  
100 - value: 'all',  
101 - checked: false  
102 - },  
103 - content: [{  
104 - name: '微信支付',  
105 - value: '1',  
106 - id: 1,  
107 - money: '5000',  
108 - time: '2022-01-12',  
109 - whether: true  
110 - },  
111 - {  
112 - name: '微信支付',  
113 - value: '2',  
114 - money: '5000',  
115 - time: '2022-01-12',  
116 - id: 2,  
117 - whether: true  
118 - },  
119 - {  
120 - name: '微信支付',  
121 - value: '2',  
122 - money: '5000',  
123 - time: '2022-01-12',  
124 - id: 2,  
125 - whether: true  
126 - },  
127 - {  
128 - name: '微信支付',  
129 - value: '2',  
130 - money: '5000',  
131 - time: '2022-01-12',  
132 - id: 2,  
133 - whether: true  
134 - },  
135 - {  
136 - name: '线下公对公',  
137 - value: '3',  
138 - money: '5000',  
139 - time: '2022-01-12',  
140 - id: 3,  
141 - whether: true  
142 - }  
143 - ]  
144 -  
145 - }  
146 - },  
147 - methods: {  
148 - typeChange: function(evt) {  
149 - for (let i = 0; i < this.items.length; i++) {  
150 - if (this.items[i].value === evt.detail.value) {  
151 - this.current = i;  
152 - break;  
153 - }  
154 - }  
155 - },  
156 - detailClick() {  
157 - uni.navigateTo({  
158 - url: '../invoiceTitle/invoiceTitle'  
159 -  
160 - });  
161 - },  
162 - // 全选  
163 - changeAll: function(e) {  
164 - if (e.detail.value.length == 0) {  
165 - this.content.map(item => this.$set(item, 'checked', false));  
166 - this.$set(this.allCheck, 'checked', false);  
167 - } else {  
168 - this.content.map(item => this.$set(item, 'checked', true));  
169 - this.$set(this.allCheck, 'checked', true);  
170 - }  
171 - },  
172 - // 多选  
173 - changeCheck: function(e) {  
174 - var items = this.content;  
175 - var len = this.content.length;  
176 - var values = e.detail.value;  
177 - // console.log(values)  
178 - for (var i = 0; i < len; i++) {  
179 - var item = items[i];  
180 - if (values.includes(item.value)) {  
181 - this.$set(item, 'checked', true);  
182 - } else {  
183 - this.$set(item, 'checked', false);  
184 - }  
185 - }  
186 - // 判断选中状态  
187 - var arr = [];  
188 - this.content.forEach(item => item.whether == true ? arr.push(item) : '');  
189 - var isAll = arr.every(item => item.checked == true);  
190 - isAll ? this.$set(this.allCheck, 'checked', true) : this.$set(this.allCheck, 'checked', false)  
191 - },  
192 - billingSubmit() {  
193 -  
194 - },  
195 -  
196 - }  
197 - } 107 +export default {
  108 + data() {
  109 + return {
  110 +
  111 +
  112 + custName: '', // 购买方填写名称(开发票个人或公司名称)公司必填
  113 + invoiceType: '', // 发票类型(个人、公司),0 表示个人,1表示公司,2表示非企业性质单位
  114 + custTaxid: '', // 纳税人识别号(税号) 公司必填
  115 + custEmail: '', // 客户电子邮箱
  116 +
  117 + payNum: 0,
  118 + moneyTotal: 0,
  119 + items: [{
  120 + value: '1',
  121 + name: '增值税电子普通发票',
  122 + checked: 'true'
  123 + },
  124 + {
  125 + value: '2',
  126 + name: '增值税纸质专用发票',
  127 + }
  128 + ],
  129 + current: 0,
  130 + allCheck: {
  131 + name: '全选',
  132 + value: 'all',
  133 + checked: false
  134 + },
  135 + content: [
  136 + // {
  137 + // name: '微信支付',
  138 + // value: '1',
  139 + // id: 1,
  140 + // money: '5000',
  141 + // time: '2022-01-12',
  142 + // whether: true
  143 + // },
  144 + // {
  145 + // name: '微信支付',
  146 + // value: '2',
  147 + // money: '5000',
  148 + // time: '2022-01-12',
  149 + // id: 2,
  150 + // whether: true
  151 + // },
  152 + // {
  153 + // name: '微信支付',
  154 + // value: '3',
  155 + // money: '5000',
  156 + // time: '2022-01-12',
  157 + // id: 3,
  158 + // whether: true
  159 + // },
  160 + // {
  161 + // name: '微信支付',
  162 + // value: '4',
  163 + // money: '5000',
  164 + // time: '2022-01-12',
  165 + // id: 4,
  166 + // whether: true
  167 + // },
  168 + // {
  169 + // name: '线下公对公',
  170 + // value: '5',
  171 + // money: '5000',
  172 + // time: '2022-01-12',
  173 + // id: 5,
  174 + // whether: true
  175 + // }
  176 + ],
  177 + invoiceType:0, // 发票类型
  178 + email:'', // 发票邮箱
  179 + name:'', // 发票抬头
  180 + remark:'', // 备注
  181 + type:'1', //
  182 + useTitleIfo:{}
  183 + }
  184 + },
  185 + onLoad(params){
  186 + console.log(params)
  187 + // invoiceType='+i.invoiceType+'&email='+i.email+'&name'+i.name+'&remark'+i.remark
  188 + this.invoiceType = params.invoiceType
  189 + this.custEmail = params.email
  190 + this.custName = params.name
  191 + this.remark = params.remark
  192 + this.useTitleIfo = JSON.parse(uni.getStorageSync('useTitleIfo'))
  193 + this.custTaxid = this.useTitleIfo.taxid
  194 + this.name = params.name
  195 +
  196 + this.type = uni.getStorageSync('type') // 发票类型。1-停车记录,2-会员卡,3-余额充值
  197 + console.log(this.type)
  198 + console.log(this.custTaxid)
  199 + console.log(this.useTitleIfo)
  200 +
  201 + },
  202 + onShow() {
  203 + this.queryRntPayOrderForInvoice()
  204 + },
  205 + methods: {
  206 + queryRntPayOrderForInvoice() {
  207 + var queryRntPayOrderForInvoice = this.$common.queryRntPayOrderForInvoice;
  208 + var jsondata = {
  209 + invoiceType: this.type,
  210 + };
  211 + uni.request({
  212 + url: queryRntPayOrderForInvoice,
  213 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  214 + dataType: "json",
  215 + method: "POST",
  216 + success: (res) => {
  217 + console.log(res)
  218 + if (res.data.code == 0) {
  219 + this.content = res.data.data
  220 + console.log(this.content)
  221 + }
  222 + }
  223 + })
  224 + },
  225 + typeChange: function (evt) {
  226 + for (let i = 0; i < this.items.length; i++) {
  227 + if (this.items[i].value === evt.detail.value) {
  228 + this.current = i;
  229 + break;
  230 + }
  231 + }
  232 + },
  233 + detailClick() {
  234 + uni.navigateTo({
  235 + url: '../invoiceTitle/invoiceTitle'
  236 + });
  237 + },
  238 + // 全选
  239 + changeAll: function (e) {
  240 + console.log(e.detail.value)
  241 + let me = this
  242 + if (e.detail.value.length == 0) {
  243 + this.content.map(item => this.$set(item, 'checked', false));
  244 + this.$set(this.allCheck, 'checked', false);
  245 + this.payNum = 0
  246 + this.moneyTotal = 0
  247 + } else {
  248 + this.content.forEach(function (item, index) {
  249 + console.log(item);
  250 + me.$set(item, 'checked', true)
  251 + me.payNum++
  252 + me.moneyTotal += item.orderActFee
  253 + });
  254 + this.$set(this.allCheck, 'checked', true);
  255 + }
  256 + },
  257 + // 多选
  258 + changeCheck: function (e) {
  259 + let me = this
  260 + var items = this.content;
  261 + var len = this.content.length;
  262 + var values = e.detail.value;
  263 + console.log(values)
  264 + for (var i = 0; i < len; i++) {
  265 + var item = items[i];
  266 + if (values.includes(item.rltOrderId)) {
  267 + this.$set(item, 'checked', true);
  268 + } else {
  269 + this.$set(item, 'checked', false);
  270 + }
  271 + }
  272 + console.log(items)
  273 + // 判断选中状态
  274 + var arr = [];
  275 + this.payNum = 0
  276 + this.moneyTotal = 0
  277 + // this.content.forEach(item => item.checked == true ? arr.push(item) : '');
  278 + this.content.forEach(function (item, index) {
  279 + console.log(item);
  280 + if (item.checked == true) {
  281 + me.payNum++
  282 + me.moneyTotal += item.orderActFee
  283 + }
  284 + });
  285 + var isAll = this.content.every(item => item.checked == true);
  286 + isAll ? this.$set(this.allCheck, 'checked', true) : this.$set(this.allCheck, 'checked', false)
  287 + },
  288 + billingSubmit() {
  289 + let orderList = []
  290 + this.content.forEach(function (item, index) {
  291 + if (item.checked == true) {
  292 + orderList.push(item)
  293 + }
  294 + });
  295 + if(orderList.length==0){
  296 + uni.showToast({
  297 + icon:'none',
  298 + title: `请至少选择一条再提交`
  299 + })
  300 + return
  301 + }
  302 +
  303 + var openTicketForCustInvoiceHisInfo = this.$common.openTicketForCustInvoiceHisInfo;
  304 + var jsondata = {
  305 + orderList: JSON.stringify(orderList),
  306 + invoiceTotalFee: this.moneyTotal,
  307 + custName: this.useTitleIfo.name, // 购买方填写名称(开发票个人或公司名称)公司必填
  308 + invoiceType: this.invoiceType, // 发票类型(个人、公司),0 表示个人,1表示公司,2表示非企业性质单位
  309 + custTaxid: this.custTaxid, // 纳税人识别号(税号) 公司必填
  310 + custEmail: this.custEmail, // 客户电子邮箱
  311 + invoiceKind: '0', // 发票种类:0 普通发票,1增值发票
  312 + orgId: this.$common.public_orgId,
  313 + saleTaxid:'91320281MA1X8C486Y',
  314 + address:this.useTitleIfo.address,
  315 +
  316 + invoiceState:this.useTitleIfo.dataState,
  317 + custBankName:this.useTitleIfo.bankName,
  318 + custCardNo:this.useTitleIfo.cardNo,
  319 + custAddress:this.useTitleIfo.address,
  320 + custPhone:this.useTitleIfo.phone,
  321 + remark:this.useTitleIfo.remark
  322 + // this.useTitleIfo
  323 +
  324 + };
  325 + uni.request({
  326 + url: openTicketForCustInvoiceHisInfo,
  327 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  328 + dataType: "json",
  329 + method: "POST",
  330 + success: (res) => {
  331 + console.log(res)
  332 + if (res.data.code == 0) {
  333 + this.queryRntPayOrderForInvoice()
  334 + uni.showToast({
  335 + icon:'none',
  336 + title: `提交成功`
  337 + })
  338 + }
  339 + }
  340 + })
  341 +
  342 + },
  343 + moneyCount() {
  344 + },
  345 + }
  346 +}
198 </script> 347 </script>
199 348
200 -<style lang="scss">  
201 - .icon-arrowright {  
202 - color: #bbb;  
203 - // font-size: 20px;  
204 - right: 2upx;  
205 - top: 73px;  
206 - }  
207 -  
208 - .billing-list {  
209 - width: 100%;  
210 - margin-bottom: 82px;  
211 - }  
212 -  
213 - .billing-money {  
214 - top: 34px;  
215 - right: 20px;  
216 - height: 34px;  
217 - list-height: 34px;  
218 - // z-index: 1;  
219 - }  
220 -  
221 - .billing-total {  
222 - position: fixed;  
223 - bottom: 46px;  
224 - left: 0;  
225 - width: 100%;  
226 - height: 34px;  
227 - line-height: 34px;  
228 - // color: #51c24e;  
229 - background-color: #f2fded;  
230 - }  
231 -  
232 - .billing-all {  
233 - position: fixed;  
234 - bottom: 0;  
235 - left: 0;  
236 - width: 100%;  
237 - height: 46px;  
238 - line-height: 46px;  
239 - // font-size: 24px;  
240 - background-color: #f6f6f6;  
241 - }  
242 -  
243 - .billing-submit {  
244 - position: fixed;  
245 - bottom: 0;  
246 - right: 0;  
247 - width: 100px;  
248 - height: 46px;  
249 - line-height: 46px;  
250 - } 349 +<style lang="scss" scoped>
  350 + .icon-arrowright {
  351 + color: #bbb;
  352 + // font-size: 20px;
  353 + right: 2px;
  354 + top: 33px;
  355 + }
  356 +
  357 + .billing-list {
  358 + width: 100%;
  359 + margin-bottom: 82px;
  360 + }
  361 +
  362 + .billing-check {
  363 + top: 38px;
  364 + left: 4px;
  365 + height: 34px;
  366 + list-height: 34px;
  367 + // z-index: 1;
  368 + }
  369 +
  370 + .billing-money {
  371 + top: 38px;
  372 + right: 20px;
  373 + height: 34px;
  374 + list-height: 34px;
  375 + // z-index: 1;
  376 + }
  377 +
  378 + .billing-total {
  379 + padding-left: 30px;
  380 + position: fixed;
  381 + bottom: 46px;
  382 + left: 0;
  383 + width: 100%;
  384 + height: 34px;
  385 + line-height: 34px;
  386 + // color: #51c24e;
  387 + background-color: #f2fded;
  388 + z-index: 11;
  389 + }
  390 +
  391 + .billing-all {
  392 + position: fixed;
  393 + bottom: 0;
  394 + left: 0;
  395 + width: 100%;
  396 + height: 46px;
  397 + line-height: 46px;
  398 + // font-size: 24px;
  399 + background-color: #f6f6f6;
  400 + z-index: 11;
  401 + }
  402 +
  403 + .billing-submit {
  404 + position: fixed;
  405 + bottom: 0;
  406 + right: 0;
  407 + width: 100px;
  408 + height: 46px;
  409 + line-height: 46px;
  410 + }
  411 +
  412 + .commonText {
  413 + overflow: hidden;
  414 + white-space: nowrap;
  415 + text-overflow: ellipsis;
  416 + width: 100%;
  417 + }
  418 +
251 </style> 419 </style>
pages/companyMsg/companyMsg.vue
1 <template> 1 <template>
2 - <view>  
3 - <view class="paddinglr30 bg-white uni-text margin-bottom-5">  
4 - <view class="jy-fix-height34">  
5 - <text class="color-black">抬头类型:</text>  
6 - <text class="color-black">公司</text>  
7 - </view>  
8 - </view>  
9 - <uni-section title="发票详情" type="line">  
10 - <view class="uni-list">  
11 - <view class="uni-list-cell jy-fix-height34">  
12 - <view class="uni-list-cell-left">  
13 - <text class="is-required">*</text>发票抬头:  
14 - </view>  
15 - <view class="uni-list-cell-db">  
16 - 中兴智能交通股份有限公司  
17 - </view>  
18 - </view>  
19 - <view class="uni-list-cell jy-fix-height34">  
20 - <view class="uni-list-cell-left">  
21 - <text class="is-required">*</text>纳税人识别号:  
22 - </view>  
23 - <view class="uni-list-cell-db">  
24 - 123333  
25 - </view>  
26 - </view>  
27 - <view class="uni-list-cell">  
28 - <view class="uni-list-cell-left jy-fix-height34">  
29 - 注册地址:  
30 - </view>  
31 - <view class="uni-list-cell-db uni-ellipsis-2">  
32 - 北京市海淀区玲珑路中关村产业园北京市海淀区玲珑路中关村产业园  
33 - </view>  
34 - </view>  
35 - <view class="uni-list-cell jy-fix-height34">  
36 - <view class="uni-list-cell-left">  
37 - 注册电话:  
38 - </view>  
39 - <view class="uni-list-cell-db">  
40 - 123  
41 - </view>  
42 - </view>  
43 - <view class="uni-list-cell">  
44 - <view class="uni-list-cell-left jy-fix-height34">  
45 - 开户行:  
46 - </view>  
47 - <view class="uni-list-cell-db uni-ellipsis-2">  
48 - 北京市海淀区玲珑路中关村产业园北京市海淀区玲珑路中关村产业园  
49 - </view>  
50 - </view>  
51 - <view class="uni-list-cell jy-fix-height34">  
52 - <view class="uni-list-cell-left">  
53 - 开户账号:  
54 - </view>  
55 - <view class="uni-list-cell-db">  
56 - 1123村产业园  
57 - </view>  
58 - </view>  
59 - <view class="uni-list-cell jy-fix-height34">  
60 - <view class="uni-list-cell-left">  
61 - <text class="is-required">*</text>电子邮箱:  
62 - </view>  
63 - <view class="uni-list-cell-db">  
64 - 1123@qq.com  
65 - </view>  
66 - </view>  
67 - <view class="uni-list-cell jy-fix-height34">  
68 - <view class="uni-list-cell-left">  
69 - 备注:  
70 - </view>  
71 - <view class="uni-list-cell-db">  
72 - 备注  
73 - </view>  
74 - </view>  
75 - </view>  
76 - </uni-section> 2 + <view>
  3 + <view class=" bg-white uni-text margin-bottom-5" style="padding-left: 15px">
  4 + <view class="jy-fix-height34">
  5 + <text class="color-black">抬头类型:</text>
  6 + <text class="color-black">{{titleIfo.invoiceType==0?'个人':'企业'}}</text>
  7 + </view>
  8 + </view>
  9 + <uni-section title="发票详情" type="line">
  10 + <view class="uni-list">
  11 + <view class="uni-list-cell jy-fix-height34">
  12 + <view class="uni-list-cell-left">
  13 + <text class="is-required">*</text>
  14 + 发票抬头:
  15 + </view>
  16 + <view class="uni-list-cell-db">
  17 + {{titleIfo.name}}
  18 + </view>
  19 + </view>
  20 + <view class="uni-list-cell jy-fix-height34" v-if="titleIfo.invoiceType==1">
  21 + <view class="uni-list-cell-left">
  22 + <text class="is-required">*</text>
  23 + 纳税人识别号:
  24 + </view>
  25 + <view class="uni-list-cell-db">
  26 + {{titleIfo.taxid}}
  27 + </view>
  28 + </view>
  29 + <view class="uni-list-cell" v-if="titleIfo.invoiceType==1">
  30 + <view class="uni-list-cell-left jy-fix-height34" >
  31 + 注册地址:
  32 + </view>
  33 + <view class="uni-list-cell-db uni-ellipsis-2">
  34 + {{titleIfo.address}}
  35 + </view>
  36 + </view>
  37 + <view class="uni-list-cell jy-fix-height34" v-if="titleIfo.invoiceType==1">
  38 + <view class="uni-list-cell-left">
  39 + 注册电话:
  40 + </view>
  41 + <view class="uni-list-cell-db">
  42 + {{titleIfo.phone}}
  43 + </view>
  44 + </view>
  45 + <view class="uni-list-cell" v-if="titleIfo.invoiceType==1">
  46 + <view class="uni-list-cell-left jy-fix-height34">
  47 + 开户行:
  48 + </view>
  49 + <view class="uni-list-cell-db uni-ellipsis-2">
  50 + {{titleIfo.bankName}}
  51 + </view>
  52 + </view>
  53 + <view class="uni-list-cell jy-fix-height34" v-if="titleIfo.invoiceType==1">
  54 + <view class="uni-list-cell-left">
  55 + 开户账号:
  56 + </view>
  57 + <view class="uni-list-cell-db">
  58 + {{titleIfo.taxid}}
  59 + </view>
  60 + </view>
  61 + <view class="uni-list-cell jy-fix-height34" >
  62 + <view class="uni-list-cell-left">
  63 + <text class="is-required">*</text>
  64 + 电子邮箱:
  65 + </view>
  66 + <view class="uni-list-cell-db">
  67 + {{titleIfo.email}}
  68 + </view>
  69 + </view>
  70 + <view class="uni-list-cell jy-fix-height34" >
  71 + <view class="uni-list-cell-left">
  72 + 备注:
  73 + </view>
  74 + <view class="uni-list-cell-db">
  75 + {{titleIfo.remark}}
  76 + </view>
  77 + </view>
  78 + </view>
  79 + </uni-section>
77 80
78 - <uni-section title="纸质票邮寄方式" type="line">  
79 - <view class="uni-list">  
80 - <view class="uni-list-cell">  
81 - <view class="uni-list-cell-left jy-fix-height34">  
82 - 邮寄地址:  
83 - </view>  
84 - <view class="uni-list-cell-db uni-ellipsis-2">  
85 - 北京市海淀区玲珑路中关村产业园北京市海淀区玲珑路中关村产业园  
86 - </view>  
87 - </view>  
88 - <view class="uni-list-cell jy-fix-height34">  
89 - <view class="uni-list-cell-left">  
90 - 联系人:  
91 - </view>  
92 - <view class="uni-list-cell-db">  
93 - 中兴智能交通股份有限公司  
94 - </view>  
95 - </view>  
96 - <view class="uni-list-cell jy-fix-height34">  
97 - <view class="uni-list-cell-left">  
98 - 联系方式:  
99 - </view>  
100 - <view class="uni-list-cell-db">  
101 - 13113131212  
102 - </view>  
103 - </view>  
104 - </view>  
105 - </uni-section>  
106 - </view> 81 +
  82 + </view>
107 </template> 83 </template>
108 84
109 <script> 85 <script>
110 - export default {  
111 - data() {  
112 - return {  
113 -  
114 - };  
115 - }  
116 - } 86 +export default {
  87 + data() {
  88 + return {
  89 + titleIfo:{}
  90 + };
  91 + },
  92 + onLoad(){
  93 + this.titleIfo = JSON.parse(uni.getStorageSync('companyMsg'))
  94 + console.log(this.titleIfo)
  95 + }
  96 +}
117 </script> 97 </script>
118 98
119 <style lang="scss"> 99 <style lang="scss">
pages/editTitle/editTitle.vue
1 <template> 1 <template>
2 - <view>  
3 - <uni-section title="抬头类型" type="line">  
4 - <view class="uni-list">  
5 - <radio-group @change="radioChange">  
6 - <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">  
7 - <view>  
8 - <radio :value="item.value" :checked="index === current" />  
9 - </view>  
10 - <view style="flex: 1;">{{item.name}}</view>  
11 - </label>  
12 - </radio-group>  
13 - </view>  
14 - </uni-section>  
15 - <uni-section title="发票详情" type="line">  
16 - <view class="paddinglr30">  
17 - <!-- 包含校验规则 -->  
18 - <uni-forms ref="baseForm" :rules="rules" :modelValue="baseFormData">  
19 - <uni-forms-item label="发票抬头" name="invoicetitle" required>  
20 - <uni-easyinput v-model="baseFormData.invoicetitle" placeholder="请输入发票抬头" />  
21 - </uni-forms-item>  
22 - <uni-forms-item label="电子邮箱" name="email" required>  
23 - <uni-easyinput v-model="baseFormData.email" placeholder="请输入电子邮箱" />  
24 - </uni-forms-item>  
25 - <uni-forms-item label="备注">  
26 - <uni-easyinput type="textarea" v-model="baseFormData.remark" placeholder="备注" />  
27 - </uni-forms-item>  
28 - <uni-section title="纸质票邮寄方式" type="line">  
29 - <uni-forms-item label="邮寄地址" name="emsAdress" required="">  
30 - <uni-easyinput v-model="baseFormData.emsAdress" placeholder="请输入邮寄地址" />  
31 - </uni-forms-item>  
32 - <uni-forms-item label="联系人">  
33 - <uni-easyinput v-model="baseFormData.emsUsername" placeholder="请输入联系人" />  
34 - </uni-forms-item>  
35 - <uni-forms-item label="联系方式">  
36 - <uni-easyinput v-model="baseFormData.emsTel" placeholder="请输入联系方式" />  
37 - </uni-forms-item>  
38 - </uni-section>  
39 - </uni-forms>  
40 -  
41 - </view>  
42 - </uni-section>  
43 - <view class="paddinglr30 margin-top-30 uni-common-mb">  
44 - <button type="primary" @click="submit('baseForm')">确认</button>  
45 - </view>  
46 - </view> 2 + <view>
  3 + <uni-section title="抬头类型" type="line">
  4 + <view class="uni-list">
  5 + <radio-group @change="radioChange">
  6 + <label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
  7 + <view>
  8 + <radio :value="item.value" :checked="index === current"/>
  9 + </view>
  10 + <view style="flex: 1;">{{item.name}}</view>
  11 + </label>
  12 + </radio-group>
  13 + </view>
  14 + </uni-section>
  15 +
  16 + <!--个人-->
  17 + <uni-section title="发票详情" type="line" v-if="current==0">
  18 + <view class="paddinglr30 margin-top-30">
  19 + <!-- 包含校验规则 -->
  20 + <uni-forms ref="baseFormPerson" :rules="rulesPerson" :modelValue="baseFormDataPerson">
  21 + <uni-forms-item label="发票抬头" name="invoicetitle" required>
  22 + <uni-easyinput v-model="baseFormDataPerson.invoicetitle" placeholder="请输入发票抬头"/>
  23 + </uni-forms-item>
  24 +
  25 + <uni-forms-item label="电子邮箱" name="email" required>
  26 + <uni-easyinput v-model="baseFormDataPerson.email" placeholder="请输入电子邮箱"/>
  27 + </uni-forms-item>
  28 +
  29 + <uni-forms-item label="备注信息">
  30 + <uni-easyinput type="textarea" v-model="baseFormDataPerson.remark" placeholder="备注"/>
  31 + </uni-forms-item>
  32 + </uni-forms>
  33 + </view>
  34 + </uni-section>
  35 +
  36 +
  37 + <!--企业-->
  38 + <uni-section title="发票详情" type="line" v-if="current==1">
  39 + <view class="paddinglr30 margin-top-30">
  40 + <!-- 基础用法,不包含校验规则 -->
  41 + <uni-forms ref="baseForm" :rules="rules" :modelValue="baseFormData">
  42 + <uni-forms-item label="发票抬头" name="invoicetitle" required>
  43 + <uni-easyinput v-model="baseFormData.invoicetitle" placeholder="请输入发票抬头"/>
  44 + </uni-forms-item>
  45 + <uni-forms-item label="纳税人识别号" name="userId" required>
  46 + <uni-easyinput v-model="baseFormData.userId" placeholder="请输入纳税人识别号"/>
  47 + </uni-forms-item>
  48 + <uni-forms-item label="注册地址">
  49 + <uni-easyinput v-model="baseFormData.address" placeholder="请输入注册地址"/>
  50 + </uni-forms-item>
  51 + <uni-forms-item label="注册电话">
  52 + <uni-easyinput v-model="baseFormData.phone" placeholder="请输入注册电话"/>
  53 + </uni-forms-item>
  54 + <uni-forms-item label="开户行">
  55 + <uni-easyinput v-model="baseFormData.bank" placeholder="请输入开户行"/>
  56 + </uni-forms-item>
  57 + <uni-forms-item label="开户账号">
  58 + <uni-easyinput v-model="baseFormData.bankAccount" placeholder="请输入开户账号"/>
  59 + </uni-forms-item>
  60 + <uni-forms-item label="电子邮箱" name="email" required>
  61 + <uni-easyinput v-model="baseFormData.email" placeholder="请输入电子邮箱"/>
  62 + </uni-forms-item>
  63 + <uni-forms-item label="备注">
  64 + <uni-easyinput type="textarea" v-model="baseFormData.remark" placeholder="备注"/>
  65 + </uni-forms-item>
  66 + <!--<uni-section title="纸质票邮寄方式" type="line">-->
  67 + <!--<uni-forms-item label="邮寄地址" name="emsAdress" required="">-->
  68 + <!--<uni-easyinput v-model="baseFormData.emsAdress" placeholder="请输入邮寄地址"/>-->
  69 + <!--</uni-forms-item>-->
  70 + <!--<uni-forms-item label="联系人">-->
  71 + <!--<uni-easyinput v-model="baseFormData.emsUsername" placeholder="请输入联系人"/>-->
  72 + <!--</uni-forms-item>-->
  73 + <!--<uni-forms-item label="联系方式">-->
  74 + <!--<uni-easyinput v-model="baseFormData.emsTel" placeholder="请输入联系方式"/>-->
  75 + <!--</uni-forms-item>-->
  76 + <!--</uni-section>-->
  77 + </uni-forms>
  78 +
  79 + </view>
  80 + </uni-section>
  81 +
  82 + <view class="paddinglr30 margin-top-30 uni-common-mb">
  83 + <button type="primary" @click="submit">确认</button>
  84 + </view>
  85 + </view>
47 </template> 86 </template>
48 87
49 <script> 88 <script>
50 - export default {  
51 - data() {  
52 - return {  
53 - items: [{  
54 - value: '1',  
55 - name: '个人'  
56 - },  
57 - {  
58 - value: '2',  
59 - name: '企业'  
60 - },  
61 - {  
62 - value: '3',  
63 - name: '非企业性单位'  
64 - },  
65 - ],  
66 - current: 0,  
67 - baseFormData: {  
68 - invoicetitle: '',  
69 - email: '',  
70 - remark: '',  
71 - emsAdress: '',  
72 - emsUsername: '',  
73 - emsTel: '',  
74 - },  
75 - // 校验规则  
76 - rules: {  
77 - invoicetitle: {  
78 - rules: [{  
79 - required: true,  
80 - errorMessage: '发票抬头不能为空'  
81 - }]  
82 - },  
83 - email: {  
84 - rules: [{  
85 - required: true,  
86 - errorMessage: '电子邮箱不能为空'  
87 - }, ]  
88 - },  
89 - emsAdress: {  
90 - rules: [{  
91 - required: true,  
92 - errorMessage: '邮寄地址不能为空'  
93 - }, ]  
94 - },  
95 - },  
96 - };  
97 - },  
98 - onLoad() {},  
99 -  
100 - onReady() {  
101 - // 设置自定义表单校验规则,必须在节点渲染完毕后执行  
102 - this.$refs.baseForm.setRules(this.rules)  
103 - },  
104 -  
105 - methods: {  
106 - radioChange: function(evt) {  
107 - for (let i = 0; i < this.items.length; i++) {  
108 - if (this.items[i].value === evt.detail.value) {  
109 - this.current = i;  
110 - break;  
111 - }  
112 - }  
113 - },  
114 - submit(ref) {  
115 - this.$refs[ref].validate().then(res => {  
116 - console.log('success', res);  
117 - uni.showToast({  
118 - title: `校验通过`  
119 - })  
120 - }).catch(err => {  
121 - console.log('err', err);  
122 - })  
123 - }  
124 - },  
125 - } 89 +export default {
  90 + data() {
  91 + return {
  92 + titleIfo:'',
  93 + items: [{
  94 + value: '1',
  95 + name: '个人'
  96 + },
  97 + {
  98 + value: '2',
  99 + name: '企业'
  100 + },
  101 + // {
  102 + // value: '3',
  103 + // name: '非企业性单位'
  104 + // },
  105 + ],
  106 + current: 0,
  107 + baseFormDataPerson: {
  108 + invoicetitle: '',
  109 + email: '',
  110 + remark: '',
  111 + },
  112 + baseFormData: {
  113 + invoicetitle: '',
  114 + userId: '',
  115 + address: '',
  116 + phone: '',
  117 + bank: '',
  118 + bankAccount: '',
  119 + email: '',
  120 + remark: '',
  121 + // emsAdress: '',
  122 + // emsUsername: '',
  123 + // emsTel: '',
  124 + },
  125 + // 校验规则
  126 + rulesPerson: {
  127 + invoicetitle: {
  128 + rules: [{
  129 + required: true,
  130 + errorMessage: '发票抬头不能为空'
  131 + }]
  132 + },
  133 +
  134 + email: {
  135 + rules: [{
  136 + required: true,
  137 + errorMessage: '电子邮箱不能为空'
  138 + },]
  139 + },
  140 +
  141 + },
  142 + // 校验规则
  143 + rules: {
  144 + invoicetitle: {
  145 + rules: [{
  146 + required: true,
  147 + errorMessage: '发票抬头不能为空'
  148 + }]
  149 + },
  150 + userId: {
  151 + rules: [{
  152 + required: true,
  153 + errorMessage: '纳税人识别号不能为空'
  154 + }, {
  155 + format: 'number',
  156 + errorMessage: '纳税人识别号只能输入数字'
  157 + }]
  158 + },
  159 + email: {
  160 + rules: [{
  161 + required: true,
  162 + errorMessage: '电子邮箱不能为空'
  163 + },]
  164 + },
  165 + emsAdress: {
  166 + rules: [{
  167 + required: true,
  168 + errorMessage: '邮寄地址不能为空'
  169 + },]
  170 + },
  171 + },
  172 + };
  173 + },
  174 + onLoad() {
  175 + this.titleIfo = JSON.parse(uni.getStorageSync('titleIfo'))
  176 + console.log(this.titleIfo)
  177 + if(this.titleIfo.invoiceType == '0'){
  178 + this.current = 0
  179 +
  180 + this.baseFormDataPerson.invoicetitle = this.titleIfo.name
  181 + this.baseFormDataPerson.email = this.titleIfo.email
  182 + this.baseFormDataPerson.remark = this.titleIfo.remark
  183 +
  184 + }else{
  185 + this.current = 1
  186 +
  187 + this.baseFormData.invoicetitle = this.titleIfo.name
  188 + this.baseFormData.email = this.titleIfo.email
  189 + this.baseFormData.remark = this.titleIfo.remark
  190 + this.baseFormData.bank = this.titleIfo.bankName
  191 + this.baseFormData.bankAccount = this.titleIfo.cardNo
  192 + this.baseFormData.address = this.titleIfo.address
  193 + this.baseFormData.userId = this.titleIfo.taxid
  194 + this.baseFormData.phone = this.titleIfo.phone
  195 +
  196 + }
  197 + },
  198 + onReady() {
  199 + // 设置自定义表单校验规则,必须在节点渲染完毕后执行
  200 + // this.$refs.baseForm.setRules(this.rules)
  201 + },
  202 + methods: {
  203 + radioChange: function (evt) {
  204 + for (let i = 0; i < this.items.length; i++) {
  205 + if (this.items[i].value === evt.detail.value) {
  206 + this.current = i;
  207 + break;
  208 + }
  209 + }
  210 + },
  211 + submit(ref) {
  212 + console.log()
  213 + if(this.current==0){
  214 + this.$refs['baseFormPerson'].validate().then(res => {
  215 + console.log('success', res);
  216 +
  217 +
  218 + let updateCustInvoiceInfo = this.$common.updateCustInvoiceInfo;
  219 + let jsondata = {
  220 + id: this.titleIfo.id,
  221 + name: this.baseFormDataPerson.invoicetitle,
  222 + email: this.baseFormDataPerson.email,
  223 + remark: this.baseFormDataPerson.remark,
  224 + invoiceType:'0',
  225 + isDefault:this.titleIfo.isDefault
  226 +
  227 + };
  228 + uni.request({
  229 + url: updateCustInvoiceInfo,
  230 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  231 + dataType: "json",
  232 + method: "POST",
  233 + success: (res) => {
  234 + console.log(res)
  235 + if (res.data.code == 0) {
  236 + uni.showToast({
  237 + icon:'none',
  238 + title: `编辑成功`
  239 + })
  240 + uni.navigateBack({
  241 + delta: 1
  242 + })
  243 + }else{
  244 + uni.showToast({
  245 + icon:'none',
  246 + title: res.data.message
  247 + })
  248 +
  249 + }
  250 + }
  251 + })
  252 +
  253 + }).catch(err => {
  254 + console.log('err', err);
  255 + })
  256 + }
  257 + if(this.current==1){
  258 + this.$refs['baseForm'].validate().then(res => {
  259 +
  260 + let updateCustInvoiceInfo = this.$common.updateCustInvoiceInfo;
  261 + let jsondata = {
  262 +
  263 + id: this.titleIfo.id,
  264 + name: this.baseFormData.invoicetitle,
  265 + email: this.baseFormData.email,
  266 + remark: this.baseFormData.remark,
  267 + invoiceType:'1',
  268 + isDefault:this.titleIfo.isDefault,
  269 + taxid:this.baseFormData.userId,
  270 + bankName:this.baseFormData.bank,
  271 + cardNo:this.baseFormData.bankAccount,
  272 + address:this.baseFormData.address,
  273 + phone:this.baseFormData.phone,
  274 + };
  275 + uni.request({
  276 + url: updateCustInvoiceInfo,
  277 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  278 + dataType: "json",
  279 + method: "POST",
  280 + success: (res) => {
  281 + console.log(res)
  282 + if (res.data.code == 0) {
  283 + uni.showToast({
  284 + icon:'none',
  285 + title: `编辑成功`
  286 + })
  287 + uni.navigateBack({
  288 + delta: 1
  289 + })
  290 + }else{
  291 + uni.showToast({
  292 + icon:'none',
  293 + title: res.data.message
  294 + })
  295 +
  296 + }
  297 + }
  298 + })
  299 +
  300 + }).catch(err => {
  301 + console.log('err', err);
  302 + })
  303 + }
  304 + }
  305 + },
  306 +}
126 </script> 307 </script>
127 308
128 <style lang="scss"> 309 <style lang="scss">
pages/elecRecord/elecRecord.vue
1 <template> 1 <template>
2 <view> 2 <view>
3 <view class="elec-content"> 3 <view class="elec-content">
4 - <view class="elec-card bg-white"> 4 + <view class="elec-card bg-white" v-for="(i, index) in custInvoiceHisDetailDTOList">
5 <view class="elec-card-left float-left"> 5 <view class="elec-card-left float-left">
6 - <view class="elec-card-msg">黄石肯特科技发展有限公司</view>  
7 - <view class="elec-card-msg">折扣券</view>  
8 - <view class="elec-card-msg">万达车场8折折扣券</view>  
9 - <view class="elec-card-msg">¥5元/张 X 15张</view> 6 + <view class="elec-card-msg">{{i.plName}}</view>
  7 + <view class="elec-card-msg">{{i.carNumber}}</view>
  8 + <view class="elec-card-msg">{{$common.formatDate(i.orderDate)}}</view>
  9 + <!--<view class="elec-card-msg">应收¥{{(i.orderTotalFee/100).toFixed(2)}}</view>-->
10 </view> 10 </view>
11 <view class="elec-card-right float-right"> 11 <view class="elec-card-right float-right">
12 <view class="elec-card-text"> 12 <view class="elec-card-text">
13 - 75.00元  
14 - </view>  
15 - </view>  
16 - </view>  
17 - <view class="elec-card bg-white">  
18 - <view class="elec-card-left float-left">  
19 - <view class="elec-card-msg">黄石肯特科技发展有限公司</view>  
20 - <view class="elec-card-msg">折扣券</view>  
21 - <view class="elec-card-msg">万达车场8折折扣券</view>  
22 - <view class="elec-card-msg">¥5元/张 X 15张</view>  
23 - </view>  
24 - <view class="elec-card-right float-right">  
25 - <view class="elec-card-text">  
26 - 75.00元 13 + 实收 ¥{{(i.orderActFee/100).toFixed(2)}}元
27 </view> 14 </view>
28 </view> 15 </view>
29 </view> 16 </view>
  17 + <!--<view class="elec-card bg-white">-->
  18 + <!--<view class="elec-card-left float-left">-->
  19 + <!--<view class="elec-card-msg">黄石肯特科技发展有限公司</view>-->
  20 + <!--<view class="elec-card-msg">折扣券</view>-->
  21 + <!--<view class="elec-card-msg">万达车场8折折扣券</view>-->
  22 + <!--<view class="elec-card-msg">¥5元/张 X 15张</view>-->
  23 + <!--</view>-->
  24 + <!--<view class="elec-card-right float-right">-->
  25 + <!--<view class="elec-card-text">-->
  26 + <!--75.00元-->
  27 + <!--</view>-->
  28 + <!--</view>-->
  29 + <!--</view>-->
  30 +
  31 + <!--<view class="novipcard_Mid">-->
  32 + <!--<image class="novipcard" src="../../static/vipcard/novipcard.png" mode="aspectFit"></image>-->
  33 + <!--<view class="novipcard_txt">-->
  34 + <!--暂无记录-->
  35 + <!--</view>-->
  36 +
  37 + <!--</view>-->
  38 +
30 </view> 39 </view>
31 </view> 40 </view>
32 </template> 41 </template>
33 42
34 <script> 43 <script>
35 - export default {  
36 - data() {  
37 - return {  
38 -  
39 - }  
40 - },  
41 - methods: {  
42 -  
43 - }  
44 - } 44 +export default {
  45 + data() {
  46 + return {
  47 + custInvoiceHisDetailDTOList:'',
  48 + index:0,
  49 + }
  50 + },
  51 + onLoad(params) {
  52 + var pages = getCurrentPages();//当前页
  53 + var beforePage = pages[pages.length - 3];//上二个页面
  54 + console.log(beforePage.$vm.list)
  55 + console.log(params)
  56 + this.index = params.index
  57 + this.custInvoiceHisDetailDTOList = beforePage.$vm.list[this.index].custInvoiceHisDetailDTOList
  58 + console.log(this.custInvoiceHisDetailDTOList)
  59 + },
  60 + methods: {}
  61 +}
45 </script> 62 </script>
46 63
47 <style lang="scss"> 64 <style lang="scss">
@@ -52,22 +69,23 @@ @@ -52,22 +69,23 @@
52 69
53 .elec-card { 70 .elec-card {
54 width: 100%; 71 width: 100%;
55 - height: 200upx; 72 + /*height: 200upx;*/
56 padding: 22upx 30upx; 73 padding: 22upx 30upx;
57 line-height: 32upx; 74 line-height: 32upx;
58 border-bottom: 1px solid #e5e5e5; 75 border-bottom: 1px solid #e5e5e5;
  76 + overflow: hidden;
59 } 77 }
60 78
61 .elec-card-left { 79 .elec-card-left {
62 width: 70%; 80 width: 70%;
63 - height: 200upx; 81 + /*height: 200upx;*/
64 82
65 } 83 }
66 84
67 .elec-card-right { 85 .elec-card-right {
68 width: 30%; 86 width: 30%;
69 - height: 200upx;  
70 - line-height: 200upx; 87 + /*height: 200upx;*/
  88 + /*line-height: 200upx;*/
71 } 89 }
72 90
73 .elec-card-msg { 91 .elec-card-msg {
pages/index/index.vue
@@ -182,16 +182,16 @@ @@ -182,16 +182,16 @@
182 }); 182 });
183 }, 183 },
184 toInvoicePage() { 184 toInvoicePage() {
185 - uni.showToast({  
186 - title: '正在开发中...',  
187 - icon: 'none',  
188 - duration: 2000  
189 - }) 185 + // uni.showToast({
  186 + // title: '正在开发中...',
  187 + // icon: 'none',
  188 + // duration: 2000
  189 + // })
190 190
191 - // uni.navigateTo({  
192 - // url: '../invoiceClaim/invoiceClaim' 191 + uni.navigateTo({
  192 + url: '../invoiceClaim/invoiceClaim'
193 193
194 - // }); 194 + });
195 }, 195 },
196 toBusinessCardPage() { 196 toBusinessCardPage() {
197 uni.navigateTo({ 197 uni.navigateTo({
pages/invoiceClaim/invoiceClaim.vue
1 <template> 1 <template>
2 - <view>  
3 - <view class="claim-content">  
4 - <uni-list>  
5 - <uni-list-item title="充值发票" note="支持账户余额充值金额开具发票" clickable showArrow @click="payCell()" />  
6 - <uni-list-item title="开票历史" clickable showArrow @click="recordCell()" />  
7 - </uni-list>  
8 - </view>  
9 - </view> 2 + <view>
  3 + <view class="claim-content">
  4 + <uni-list>
  5 + <uni-list-item title="充值发票" note="支持账户余额充值金额开具发票" clickable showArrow @click="payCell('3')"/>
  6 + <uni-list-item title="开票历史" clickable showArrow @click="recordCell"/>
  7 + </uni-list>
  8 + </view>
  9 + </view>
10 </template> 10 </template>
11 11
12 <script> 12 <script>
13 - export default {  
14 - data() {  
15 - return { 13 +export default {
  14 + data() {
  15 + return {}
  16 + },
  17 + methods: {
  18 + payCell(i) {
  19 + // invoiceType 是 Integer 发票类型。1-停车记录,2-会员卡,3-余额充值
  20 + uni.setStorageSync('type',i) // 存储点击的是 什么类型。 1-停车记录,2-会员卡,3-余额充值
  21 + uni.navigateTo({
  22 + url: '../invoiceTitle/invoiceTitle'
16 23
17 - }  
18 - },  
19 - methods: {  
20 - payCell(){  
21 - uni.navigateTo({  
22 - url: '../billing/billing'  
23 -  
24 - });  
25 - },  
26 - recordCell() {  
27 - uni.navigateTo({  
28 - url: '../invoiceRecord/invoiceRecord'  
29 -  
30 - });  
31 - }  
32 - }  
33 - } 24 + });
  25 + },
  26 + recordCell() {
  27 + uni.navigateTo({
  28 + url: '../invoiceRecord/invoiceRecord'
  29 + });
  30 + }
  31 + }
  32 +}
34 </script> 33 </script>
35 34
36 <style> 35 <style>
pages/invoiceForm/invoiceForm.vue
1 <template> 1 <template>
2 - <view>  
3 - <uni-notice-bar backgroundColor="#f2fded" color="#51c24e" single showIcon text="已发送电子邮箱"></uni-notice-bar>  
4 - <uni-list>  
5 - <uni-list-item title="发票预览" clickable showArrow @click="previewCell" />  
6 - </uni-list> 2 + <view>
  3 + <!--<uni-notice-bar backgroundColor="#f2fded" color="#51c24e" single showIcon text="已发送电子邮箱"></uni-notice-bar>-->
  4 + <uni-list>
  5 + <uni-list-item title="发票预览" clickable showArrow @click="previewCell"/>
7 6
8 - <uni-list>  
9 - <view class="recordCon uni-list-cell-pd">  
10 - <text class="color-black">发票信息</text>  
11 - </view>  
12 - <view class="recordCon uni-list-cell-pd">  
13 - <text>电子邮箱:{{invoiceInfo.email}}</text>  
14 - </view>  
15 - </uni-list> 7 + </uni-list>
16 8
17 - <view class="bg-white border-bottom-1 pos-rel" @click="recordClick">  
18 - <view class="recordCon uni-list-cell-pd">  
19 - <text class="color-black">发票包含内容</text>  
20 - </view>  
21 - <view class="recordCon uni-list-cell-pd">  
22 - <text>该发票包含{{invoiceInfo.number}}笔交易</text>  
23 - </view>  
24 - <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">  
25 - </view>  
26 - </view> 9 + <uni-list>
  10 + <view class="recordCon uni-list-cell-pd">
  11 + <text class="color-black">发票信息</text>
  12 + </view>
  13 + <view class="recordCon uni-list-cell-pd">
  14 + <text>电子邮箱:{{invoiceInfo.email}}</text>
  15 + </view>
  16 + </uni-list>
27 17
28 - <view class="margin-top-30">  
29 - <button type="primary" class="tel-btn">重发邮件</button>  
30 - <button class="tel-btn" v-if="tel.length>0" type="primary" plain="true" @click="call">客服电话:{{tel}}</button>  
31 - </view> 18 + <view class="bg-white border-bottom-1 pos-rel" @click="recordClick">
  19 + <view class="recordCon uni-list-cell-pd">
  20 + <text class="color-black">发票包含内容</text>
  21 + </view>
  22 + <view class="recordCon uni-list-cell-pd">
  23 + <text>该发票包含{{len}}笔交易</text>
  24 + </view>
  25 + <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">
  26 + </view>
  27 + </view>
32 28
33 - </view> 29 + <view class="margin-top-30">
  30 + <button type="primary" class="tel-btn" @click="sentEmail">重发邮件</button>
  31 + </view>
  32 +
  33 + <view class="margin-top-30">
  34 + <button class="tel-btn" v-if="tel.length>0" type="primary" plain="true" @click="call">客服电话:{{tel}}</button>
  35 + </view>
  36 +
  37 + </view>
34 </template> 38 </template>
35 39
36 <script> 40 <script>
37 - export default {  
38 - data() {  
39 - return {  
40 - invoiceInfo: {  
41 - email: '123456@qq.com',  
42 - number: 0  
43 - },  
44 - tel: '400-6345688'  
45 - }  
46 - },  
47 - methods: {  
48 - previewCell() {  
49 - uni.navigateTo({  
50 - url: '../invoicePreview/invoicePreview'  
51 -  
52 - });  
53 - },  
54 - recordClick() {  
55 - uni.navigateTo({  
56 - url: '../elecRecord/elecRecord' 41 +export default {
  42 + data() {
  43 + return {
  44 + invoiceInfo: {
  45 + email: '123456@qq.com',
  46 + number: 0
  47 + },
  48 + tel: '400-6345688',
  49 + invoiceId:'',
  50 + invoiceUrl:'',
  51 + index:0,
  52 + len:0
  53 + }
  54 + },
  55 + onLoad(params){
  56 + var pages = getCurrentPages();//当前页
  57 + var beforePage = pages[pages.length - 2];//上个页面
  58 + console.log(beforePage.$vm.list)
  59 + console.log(params)
57 60
58 - });  
59 - },  
60 - }  
61 - } 61 + this.invoiceInfo.email = params.custEmail
  62 + this.invoiceId = params.invoiceId
  63 + this.index = params.index
  64 + this.invoiceUrl =beforePage.$vm.list[this.index].invoiceUrl
  65 + this.len = params.len
  66 + },
  67 + methods: {
  68 + call(){
  69 + var me = this;
  70 + uni.makePhoneCall({
  71 + phoneNumber: me.tel //仅为示例
  72 + });
  73 + },
  74 + previewCell() {
  75 + uni.navigateTo({
  76 + url: '../invoicePreview/invoicePreview?index='+this.index
  77 + });
  78 + // window.open(this.invoiceUrl)
  79 + },
  80 + recordClick() {
  81 + uni.navigateTo({
  82 + url: '../elecRecord/elecRecord?index='+this.index
  83 + });
  84 + },
  85 + sentEmail(){
  86 + var resendInvoiceMail = this.$common.resendInvoiceMail;
  87 + var jsondata = {
  88 + invoiceId:this.invoiceId,
  89 + orgId:this.$common.public_orgId
  90 + };
  91 + uni.request({
  92 + url: resendInvoiceMail,
  93 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  94 + dataType: "json",
  95 + method: "POST",
  96 + success: (res) => {
  97 + console.log(res)
  98 + console.log(res.data)
  99 + console.log(res.code)
  100 + if (res.data.code == 0) {
  101 + uni.showToast({
  102 + icon:'none',
  103 + title: `邮件发送成功`
  104 + })
  105 + }
  106 + }
  107 + })
  108 + }
  109 + }
  110 +}
62 </script> 111 </script>
63 112
64 -<style lang="scss">  
65 - .icon-arrowright {  
66 - color: #bbb;  
67 - font-size: 20px;  
68 - right: 2upx;  
69 - top: 60upx;  
70 - } 113 +<style scoped>
  114 + .icon-arrowright {
  115 + color: #bbb;
  116 + font-size: 20px;
  117 + right: 15upx;
  118 + top: 60upx;
  119 + }
  120 +
  121 + .tel-btn {
  122 + width: 90%;
  123 + margin: 30upx auto;
  124 + }
  125 +
  126 + >>> .uni-list-cell__content-title {
  127 + margin-left: 0 !important;
  128 + }
71 129
72 - .tel-btn {  
73 - width: 90%;  
74 - margin: 30upx auto;  
75 - }  
76 </style> 130 </style>
pages/invoicePreview/invoicePreview.vue
1 <template> 1 <template>
2 <view> 2 <view>
3 - 3 + <!--<image style="width: 100%" mode="scaleToFill" :src="src"-->
  4 + <!--@error="imageError"></image>-->
  5 + <web-view :src="invoiceUrl"></web-view>
4 </view> 6 </view>
5 </template> 7 </template>
6 8
7 <script> 9 <script>
8 - export default {  
9 - data() {  
10 - return {  
11 -  
12 - };  
13 - }  
14 - } 10 +export default {
  11 + data() {
  12 + return {
  13 + src: '',
  14 + invoiceUrl:'',
  15 + index:0,
  16 + };
  17 + },
  18 + onLoad(params) {
  19 + var pages = getCurrentPages();//当前页
  20 + var beforePage = pages[pages.length - 3];//上二个页面
  21 + console.log(beforePage.$vm.list)
  22 + console.log(params)
  23 + this.index = params.index
  24 + this.invoiceUrl = beforePage.$vm.list[this.index].invoiceUrl
  25 + console.log(this.invoiceUrl)
  26 + },
  27 +}
15 </script> 28 </script>
16 29
17 <style lang="scss"> 30 <style lang="scss">
pages/invoiceRecord/invoiceRecord.vue
1 <template> 1 <template>
2 - <view>  
3 - <view class="record-content">  
4 - <view class="bg-white border-bottom-1 pos-rel" @click="payClick">  
5 - <view class="recordCon uni-list-cell-pd">  
6 - <text class="color-black">余额充值</text>  
7 - <text>已发送电子邮箱</text>  
8 - </view>  
9 - <view class="recordCon uni-list-cell-pd">  
10 - <text>2020-10-01 01:01:01</text>  
11 - <text>¥3.00</text>  
12 - </view>  
13 - <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">  
14 - </view>  
15 - </view>  
16 - <view class="bg-white pos-rel" @click="payClick">  
17 - <view class="recordCon uni-list-cell-pd">  
18 - <text class="color-black">余额充值</text>  
19 - <text>已发送电子邮箱</text>  
20 - </view>  
21 - <view class="recordCon uni-list-cell-pd">  
22 - <text>2020-10-01 01:01:01</text>  
23 - <text>¥3.00</text>  
24 - </view>  
25 - <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">  
26 - </view>  
27 - </view>  
28 -  
29 - </view>  
30 - </view> 2 + <view>
  3 + <view class="record-content">
  4 + <view v-if="list.length>0">
  5 + <view class="bg-white border-bottom-1 pos-rel" v-for="(i, index) in list" @click="payClick(i,index)">
  6 +
  7 + <view class="recordCon uni-list-cell-pd">
  8 + <text class="color-black">{{i.invoiceBigType=='100'?'停车':i.invoiceBigType=='200'?'充值':'会员卡'}}</text>
  9 + <!--发票状态,1 待开票,3已开票 2 已邮寄 4已下载(这是开票接口的过渡状态,给用户展示已开票)-->
  10 + <text v-if="i.invoiceState==1">待开票</text>
  11 + <text v-else-if="i.invoiceState==2">已邮寄 </text>
  12 + <text v-else-if="i.invoiceState==3">已开票</text>
  13 + <text v-else>已下载</text>
  14 + </view>
  15 + <view class="recordCon uni-list-cell-pd">
  16 + <!--<text>{{$common.formatDate(new Date(i.custInvoiceHisDetailDTOList[0].orderDate * 1000),'yyyy-MM-dd hh:mm')}}</text>-->
  17 + <text>{{$common.formatDate(i.custInvoiceHisDetailDTOList[0].orderDate)}}</text>
  18 + <text>¥{{(i.invoiceTotalFee/100).toFixed(2)}}</text>
  19 +
  20 + </view>
  21 + <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">
  22 + </view>
  23 + </view>
  24 + </view>
  25 +
  26 + <!--<view style="padding: 30px;text-align: center" v-else>暂无记录!</view>-->
  27 +
  28 + <view class="novipcard_Mid" style="padding-top: 20px;" v-else>
  29 + <image class="novipcard" :src="noIcon" mode="aspectFit"></image>
  30 + <view class="novipcard_txt">
  31 + 暂无记录
  32 + </view>
  33 +
  34 + </view>
  35 +
  36 +
  37 + </view>
  38 + </view>
31 </template> 39 </template>
32 40
33 <script> 41 <script>
34 - export default {  
35 - data() {  
36 - return {  
37 -  
38 - }  
39 - },  
40 - methods: {  
41 - payClick() {  
42 - uni.navigateTo({  
43 - url: '../invoiceForm/invoiceForm'  
44 -  
45 - });  
46 - },  
47 - }  
48 - } 42 +export default {
  43 + data() {
  44 + return {
  45 + list:[],
  46 + noIcon:require('static/vipcard/novipcard.png'),
  47 + }
  48 + },
  49 + onShow(){
  50 + this.queryCustInvoiceHistoryList()
  51 + },
  52 + methods: {
  53 + queryCustInvoiceHistoryList() {
  54 +
  55 + var queryCustInvoiceHistoryList = this.$common.queryCustInvoiceHistoryList;
  56 + var jsondata = {};
  57 + uni.request({
  58 + url: queryCustInvoiceHistoryList,
  59 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  60 + dataType: "json",
  61 + method: "POST",
  62 + success: (res) => {
  63 + if (res.data.code == 0) {
  64 + this.list = res.data.data
  65 + console.log(this.list)
  66 + }
  67 + }
  68 + })
  69 + },
  70 + payClick(i,index) {
  71 + console.log(index)
  72 + uni.navigateTo({
  73 + url: '../invoiceForm/invoiceForm?custEmail='+i.custEmail+'&invoiceId='+i.invoiceId+'&index='+index+'&len='+i.custInvoiceHisDetailDTOList.length
  74 + });
  75 + },
  76 + }
  77 +}
49 </script> 78 </script>
50 79
51 <style lang="scss"> 80 <style lang="scss">
52 - .icon-arrowright {  
53 - color: #bbb;  
54 - font-size: 20px;  
55 - right: 2upx;  
56 - top: 60upx;  
57 - } 81 + .icon-arrowright {
  82 + color: #bbb;
  83 + font-size: 20px;
  84 + right: 2upx;
  85 + top: 60upx;
  86 + }
58 </style> 87 </style>
pages/invoiceTitle/invoiceTitle.vue
1 <template> 1 <template>
2 - <view>  
3 - <view>  
4 -  
5 - <view class="uni-list">  
6 - <radio-group @change="titleChange">  
7 - <label class="display-block border-bottom-5" v-for="(item, index) in items" :key="item.value">  
8 - <view class="elec-card bg-white">  
9 - <view class="elec-card-left float-left">  
10 - <view class="elec-card-msg">黄石肯特科技发展有限公司</view>  
11 - <view class="elec-card-msg">发票类型:公司</view>  
12 - </view>  
13 - <view class="elec-card-right float-right">  
14 - <button class="mini-btn color-62c7ee" type="primary" size="mini">去使用</button>  
15 - </view>  
16 - </view>  
17 - <view class="uni-list-cell uni-list-cell-pd">  
18 - <view>  
19 - <radio :value="item.value" :checked="index === current" />  
20 - </view>  
21 - <view style="flex:1;">默认抬头</view>  
22 - <view>  
23 - <button class="mini-btn margin-left-5" type="primary" size="mini"  
24 - @click="detailLookBtn">查看</button>  
25 - <button class="mini-btn margin-left-5" type="default" size="mini"  
26 - @click="detailEditBtn">编辑</button>  
27 - <button class="mini-btn margin-left-5" type="warn" size="mini"  
28 - @click="detailDelBtn">删除</button>  
29 - </view>  
30 - </view>  
31 - </label>  
32 - </radio-group>  
33 - </view>  
34 - <view class="billing-all">  
35 - <button type="primary" class="title-submit" @click="addInvoiceTitle">添加发票抬头</button>  
36 - </view>  
37 - </view>  
38 - </view> 2 + <view>
  3 + <view>
  4 +
  5 + <view class="uni-list" v-if="items.length>0">
  6 + <radio-group @change="titleChange">
  7 + <label class="display-block border-bottom-5" v-for="(item, index) in items" :key="item.value">
  8 + <view class="elec-card bg-white">
  9 + <view class="elec-card-left float-left" >
  10 + <view class="elec-card-msg">{{item.name}}</view>
  11 + <view class="elec-card-msg">发票类型:{{item.invoiceType | invoiceTypeFilter}}</view>
  12 + </view>
  13 + <view class="elec-card-right float-right" @click="toUse(JSON.stringify(item))">
  14 + <button class="mini-btn color-62c7ee" type="primary" size="mini" >
  15 + 去使用
  16 + </button>
  17 + </view>
  18 + </view>
  19 + <view class="uni-list-cell uni-list-cell-pd">
  20 + <view>
  21 + <radio :value="JSON.stringify(item)" :checked="item.isDefault == 1"/>
  22 + </view>
  23 + <view style="flex:1;">默认抬头</view>
  24 + <view>
  25 + <button class="mini-btn margin-left-5" type="primary" size="mini"
  26 + @click="detailLookBtn(JSON.stringify(item), index)">查看
  27 + </button>
  28 + <button class="mini-btn margin-left-5" type="default" size="mini"
  29 + @click="detailEditBtn(JSON.stringify(item), index)">编辑
  30 + </button>
  31 + <button class="mini-btn margin-left-5" type="warn" size="mini"
  32 + @click="detailDelBtn(JSON.stringify(item), index)">删除
  33 + </button>
  34 + </view>
  35 + </view>
  36 + </label>
  37 + </radio-group>
  38 + </view>
  39 +
  40 + <view style="padding: 30px;text-align: center" v-else>暂无抬头,请先添加!</view>
  41 + <view class="billing-all">
  42 + <button type="primary" class="title-submit" @click="addInvoiceTitle">添加发票抬头</button>
  43 + </view>
  44 + </view>
  45 + </view>
39 </template> 46 </template>
40 47
41 <script> 48 <script>
42 - export default {  
43 - data() {  
44 - return {  
45 - items: [{  
46 - value: '1',  
47 - checked: 'true'  
48 -  
49 - },  
50 - {  
51 - value: '2'  
52 -  
53 - },  
54 - {  
55 - value: '3'  
56 -  
57 - },  
58 - ],  
59 - current: 0,  
60 - };  
61 - },  
62 - methods: {  
63 - titleChange: function(evt) {  
64 - for (let i = 0; i < this.items.length; i++) {  
65 - if (this.items[i].value === evt.detail.value) {  
66 - this.current = i;  
67 - break;  
68 - }  
69 - }  
70 - },  
71 - detailLookBtn() {  
72 - uni.navigateTo({  
73 - url: '../companyMsg/companyMsg'  
74 - });  
75 - },  
76 - detailEditBtn() {  
77 - uni.navigateTo({  
78 - url: '../editTitle/editTitle'  
79 - });  
80 - },  
81 - detailDelBtn() {  
82 -  
83 - },  
84 - addInvoiceTitle() {  
85 - uni.navigateTo({  
86 - url: '../addTitle/addTitle'  
87 - });  
88 - },  
89 - }  
90 - } 49 +export default {
  50 + data() {
  51 + return {
  52 + items: [
  53 + // {
  54 + // value: '1',
  55 + // checked: 'true'
  56 + // },
  57 + // {
  58 + // value: '2'
  59 + // },
  60 + // {
  61 + // value: '3'
  62 + // },
  63 + ],
  64 + current: 0,
  65 + };
  66 + },
  67 + onLoad(params) {
  68 +
  69 + },
  70 + onShow(){
  71 + this.queryCustInvoiceInfoList()
  72 + },
  73 + methods: {
  74 + queryCustInvoiceInfoList() {
  75 + let that = this
  76 + var queryCustInvoiceInfoList = this.$common.queryCustInvoiceInfoList;
  77 + var jsondata = {};
  78 + uni.request({
  79 + url: queryCustInvoiceInfoList,
  80 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  81 + dataType: "json",
  82 + method: "POST",
  83 + success: (res) => {
  84 + console.log(res)
  85 + if (res.data.code == 0) {
  86 + this.items = res.data.data
  87 + }
  88 + }
  89 + })
  90 + },
  91 + titleChange: function (evt) {
  92 + console.log(JSON.parse(evt.detail.value))
  93 + let jsonData = JSON.parse(evt.detail.value)
  94 + // for (let i = 0; i < this.items.length; i++) {
  95 + // if (this.items[i].default === evt.detail.value) {
  96 + // this.current = i;
  97 + // break;
  98 + // }
  99 + // }
  100 + var updateCustInvoiceInfo = this.$common.updateCustInvoiceInfo;
  101 + var jsondata = {
  102 + address:jsonData.address,
  103 + bankName:jsonData.bankName,
  104 + cardNo:jsonData.cardNo,
  105 + isDefault:'1',
  106 + phone:jsonData.phone,
  107 + taxid:jsonData.taxid,
  108 + name:jsonData.name,
  109 + invoiceType:jsonData.invoiceType,
  110 + id:jsonData.id,
  111 + remark:jsonData.remark,
  112 + email:jsonData.email,
  113 +
  114 +
  115 + // name: this.baseFormDataPerson.invoicetitle,
  116 + // email: this.baseFormDataPerson.email,
  117 + // remark: this.baseFormDataPerson.remark,
  118 + // isDefault: '1',// 是否默认客户抬头信息,1表示是默认抬头信息,0不是默认抬头信息(默认0)
  119 + // invoiceType: '0', // 发票类型(个人、公司),0 表示个人,1表示公司
  120 +
  121 +
  122 + };
  123 + uni.request({
  124 + url: updateCustInvoiceInfo,
  125 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  126 + dataType: "json",
  127 + method: "POST",
  128 + success: (res) => {
  129 + console.log(res)
  130 + if (res.data.code == 0) {
  131 + uni.showToast({
  132 + icon:'none',
  133 + title: `设置成功`
  134 + })
  135 + }
  136 + }
  137 + })
  138 + },
  139 + detailLookBtn(val) {
  140 + uni.setStorageSync('companyMsg',val)
  141 + uni.navigateTo({
  142 + url: '../companyMsg/companyMsg'
  143 + });
  144 + },
  145 + detailEditBtn(val,i) {
  146 + uni.setStorageSync('titleIfo',val)
  147 + uni.navigateTo({
  148 + url: '../editTitle/editTitle'
  149 + });
  150 + },
  151 + detailDelBtn(val,i) {
  152 + console.log(val)
  153 + console.log(i)
  154 + var deleteCustInvoiceInfoByID = this.$common.deleteCustInvoiceInfoByID;
  155 + var jsondata = {
  156 + id: JSON.parse(val).id,
  157 + };
  158 + uni.request({
  159 + url: deleteCustInvoiceInfoByID,
  160 + data: JSON.stringify(this.$common.requestSign(jsondata)),
  161 + dataType: "json",
  162 + method: "POST",
  163 + success: (res) => {
  164 + console.log(res)
  165 + if (res.data.code == 0) {
  166 + this.queryCustInvoiceInfoList()
  167 + uni.showToast({
  168 + icon:'none',
  169 + title: `删除成功`
  170 + })
  171 + }
  172 + }
  173 + })
  174 + },
  175 + addInvoiceTitle() {
  176 + uni.navigateTo({
  177 + url: '../addTitle/addTitle'
  178 + });
  179 + },
  180 + toUse(val) {
  181 + console.log(val)
  182 + uni.setStorageSync('useTitleIfo',val)
  183 + let i = JSON.parse(val)
  184 + uni.navigateTo({
  185 + url: '../billing/billing?invoiceType='+i.invoiceType+'&email='+i.email+'&name='+i.name+'&remark='+i.remark
  186 + });
  187 + }
  188 + },
  189 + filters:{
  190 + invoiceTypeFilter(val){
  191 + console.log(val)
  192 + if(val=='0'){
  193 + return '个人'
  194 + }
  195 + if(val=='1'){
  196 + return '企业'
  197 + }
  198 + }
  199 + }
  200 +}
91 </script> 201 </script>
92 202
93 <style lang="scss"> 203 <style lang="scss">
94 - .elec-card {  
95 - width: 100%;  
96 - height: 64upx;  
97 - padding: 22upx 30upx;  
98 -  
99 - border-bottom: 1px solid #e5e5e5;  
100 - }  
101 -  
102 - .elec-card-left {  
103 - width: 70%;  
104 - height: 64upx;  
105 -  
106 - }  
107 -  
108 - .elec-card-right {  
109 - width: 30%;  
110 - height: 64upx;  
111 - line-height: 64upx;  
112 - }  
113 -  
114 - .elec-card-msg {  
115 - line-height: 32upx;  
116 - color: rgba(0, 0, 0, .7);  
117 -  
118 - }  
119 -  
120 - .billing-all {  
121 - position: fixed;  
122 - bottom: 0;  
123 - left: 0;  
124 - width: 100%;  
125 - height: 46px;  
126 - line-height: 46px;  
127 - // font-size: 24px;  
128 -  
129 - } 204 + .elec-card {
  205 + width: 100%;
  206 + height: 64upx;
  207 + padding: 22upx 30upx;
  208 +
  209 + border-bottom: 1px solid #e5e5e5;
  210 + }
  211 +
  212 + .elec-card-left {
  213 + width: 70%;
  214 + height: 64upx;
  215 +
  216 + }
  217 +
  218 + .elec-card-right {
  219 + width: 26%;
  220 + height: 64upx;
  221 + line-height: 64upx;
  222 + }
  223 +
  224 + .elec-card-msg {
  225 + line-height: 32upx;
  226 + color: rgba(0, 0, 0, .7);
  227 +
  228 + }
  229 +
  230 + .billing-all {
  231 + position: fixed;
  232 + bottom: 0;
  233 + left: 0;
  234 + width: 100%;
  235 + height: 46px;
  236 + line-height: 46px;
  237 + // font-size: 24px;
  238 +
  239 + }
130 </style> 240 </style>