quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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
111
112
113
114
115
<template>
  <!--
      作者:yj
      时间:2022-06-1
      描述:插件中心-小票-详情
    -->
  <div class="product-add pb50" v-loading="loading">
    <!--详情-->
       <div class="common-form">凭证详情</div>
       <div class="fl"><img :src="detail.user.avatarUrl" width="60px" height="60px" /></div>
       <div class="fl mt10 ml10 ">
         {{ detail.user.nickName }}
         <div class="mt10">{{ detail.user.mobile }}</div>
       </div>
       <div style="clear: both;"></div>
       <div class="mt10">{{ detail.content }}</div>
       <div>
         <div v-for="(item, index) in img_list" :key="index"><a target="_blank" :href="item.file_path"><img style="max-width: 32%;" v-img-url="item.file_path" /></a></div>
       </div>
     <el-form size="small" label-width="100px">
       <div class="common-button-wrapper">
         <el-button size="small" type="info" @click="cancelFunc">返回列表</el-button>
         <el-button size="small" type="primary" @click="addClick(detail.user_id)">充值</el-button>
       </div>
     </el-form>
 
     <!--会员充值-->
     <Recharge v-if="open_add" :open_add="open_add" :form="userModel"
       @closeDialog="closeDialogFunc($event, 'add')"></Recharge>
 
  </div>
</template>
 
<script>
import TicketApi from '@/api/ticket.js';
import UserApi from '@/api/user.js';
import Recharge from './dialog/Recharge.vue';
export default {
  components: {
    Recharge,
  },
  data() {
    return {
      /*是否加载完成*/
      loading: true,
      detail:[],
      img_list:[],
      /*是否打开添加弹窗*/
      open_add: false,
      userModel:[],
    };
  },
  created() {
    this.getDetail();
  },
 
  methods: {
    getDetail() {
      let self = this;
      // 取到路由带过来的参数
      const params = self.$route.query.upload_id;
      TicketApi.toEdit({upload_id: params},true).then(res => {
          self.detail = res.data;
          self.img_list = res.data.image;
          self.loading = false;
        })
        .catch(error => {});
    },
 
    /*打开添加*/
    addClick(item) {
      let self = this;
      self.userModel = [];
      let Params = {};
      Params.user_id = item;
      UserApi.getDetail(Params, true)
        .then(data => {
          self.userModel = data.data.detail;
          if(self.userModel){
            self.open_add = true;
          }
 
        })
        .catch(error => {
          self.loading = false;
        });
    },
    /*关闭弹窗*/
    closeDialogFunc(e, f) {
      this.open_add = e.openDialog;
    },
 
    /*取消返回列表*/
    cancelFunc() {
      this.$router.push({
        path: '/plus/ticket/index'
      });
    }
  }
};
</script>
 
<style>
.edit_container {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
 
.ql-editor {
  height: 400px;
}
</style>