Blame view

pages/invoiceForm/invoiceForm.vue 3.31 KB
28010de0   chenbiao   add 发票申领 发票填充
1
  <template>
81028275   刘淇   发票
2
3
4
5
      <view>
          <!--<uni-notice-bar backgroundColor="#f2fded" color="#51c24e" single showIcon text="已发送电子邮箱"></uni-notice-bar>-->
          <uni-list>
              <uni-list-item title="发票预览" clickable showArrow @click="previewCell"/>
28010de0   chenbiao   add 发票申领 发票填充
6
  
81028275   刘淇   发票
7
          </uni-list>
28010de0   chenbiao   add 发票申领 发票填充
8
  
81028275   刘淇   发票
9
10
11
12
13
14
15
16
          <uni-list>
              <view class="recordCon uni-list-cell-pd">
                  <text class="color-black">发票信息</text>
              </view>
              <view class="recordCon uni-list-cell-pd">
                  <text>电子邮箱:{{invoiceInfo.email}}</text>
              </view>
          </uni-list>
28010de0   chenbiao   add 发票申领 发票填充
17
  
81028275   刘淇   发票
18
19
20
21
22
23
24
25
26
27
          <view class="bg-white border-bottom-1 pos-rel" @click="recordClick">
              <view class="recordCon uni-list-cell-pd">
                  <text class="color-black">发票包含内容</text>
              </view>
              <view class="recordCon uni-list-cell-pd">
                  <text>该发票包含{{len}}笔交易</text>
              </view>
              <view class="uni-icon pos-abs icon-arrowright uni-icon-arrowright">
              </view>
          </view>
28010de0   chenbiao   add 发票申领 发票填充
28
  
81028275   刘淇   发票
29
30
31
32
33
34
35
36
37
          <view class="margin-top-30">
              <button type="primary" class="tel-btn" @click="sentEmail">重发邮件</button>
          </view>
  
          <view class="margin-top-30">
              <button class="tel-btn" v-if="tel.length>0" type="primary" plain="true" @click="call">客服电话:{{tel}}</button>
          </view>
  
      </view>
28010de0   chenbiao   add 发票申领 发票填充
38
39
40
  </template>
  
  <script>
81028275   刘淇   发票
41
42
43
44
  export default {
    data() {
      return {
        invoiceInfo: {
3eab2497   刘淇   发票
45
          email: '',
81028275   刘淇   发票
46
47
          number: 0
        },
3eab2497   刘淇   发票
48
        tel: '051086166660',
81028275   刘淇   发票
49
50
51
52
53
54
55
56
57
58
59
        invoiceId:'',
        invoiceUrl:'',
        index:0,
        len:0
      }
    },
    onLoad(params){
      var pages = getCurrentPages();//当前页
      var beforePage = pages[pages.length - 2];//上个页面
      console.log(beforePage.$vm.list)
      console.log(params)
28010de0   chenbiao   add 发票申领 发票填充
60
  
81028275   刘淇   发票
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
      this.invoiceInfo.email = params.custEmail
      this.invoiceId = params.invoiceId
      this.index = params.index
      this.invoiceUrl =beforePage.$vm.list[this.index].invoiceUrl
      this.len = params.len
    },
    methods: {
      call(){
        var me = this;
        uni.makePhoneCall({
          phoneNumber: me.tel //仅为示例
        });
      },
      previewCell() {
        uni.navigateTo({
          url: '../invoicePreview/invoicePreview?index='+this.index
        });
        // window.open(this.invoiceUrl)
      },
      recordClick() {
        uni.navigateTo({
          url: '../elecRecord/elecRecord?index='+this.index
        });
      },
      sentEmail(){
        var resendInvoiceMail = this.$common.resendInvoiceMail;
        var jsondata = {
          invoiceId:this.invoiceId,
          orgId:this.$common.public_orgId
        };
        uni.request({
          url: resendInvoiceMail,
          data: JSON.stringify(this.$common.requestSign(jsondata)),
          dataType: "json",
          method: "POST",
          success: (res) => {
          console.log(res)
        console.log(res.data)
        console.log(res.code)
        if (res.data.code == 0) {
          uni.showToast({
            icon:'none',
            title: `邮件发送成功`
          })
        }
      }
      })
      }
    }
  }
28010de0   chenbiao   add 发票申领 发票填充
111
112
  </script>
  
81028275   刘淇   发票
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
  <style scoped>
      .icon-arrowright {
          color: #bbb;
          font-size: 20px;
          right: 15upx;
          top: 60upx;
      }
  
      .tel-btn {
          width: 90%;
          margin: 30upx auto;
      }
  
      >>> .uni-list-cell__content-title {
          margin-left: 0 !important;
      }
28010de0   chenbiao   add 发票申领 发票填充
129
  
28010de0   chenbiao   add 发票申领 发票填充
130
  </style>