userCourseConversionRecord.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
  3. <div class="contentx" v-if="item!=null">
  4. <div class="desct"> 优惠劵领取信息</div>
  5. <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
  6. <el-tab-pane label="全部" name="10"></el-tab-pane>
  7. <el-tab-pane v-for="(item,index) in couponStatusOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  8. </el-tabs>
  9. <el-table v-loading="loading" :data="userCouponList">
  10. <el-table-column label="优惠劵标题" align="center" prop="title" />
  11. <el-table-column label="券号" align="center" prop="couponCode" />
  12. <el-table-column label="会员昵称" align="center" prop="nickName" />
  13. <el-table-column label="会员电话" align="center" prop="phone" />
  14. <el-table-column label="关联订单ID" align="center" prop="businessId" />
  15. <el-table-column label="订单类型" align="center" prop="businessType">
  16. <template slot-scope="scope">
  17. <dict-tag :options="businessTypeOptions" :value="scope.row.businessType"/>
  18. </template>
  19. </el-table-column>
  20. <el-table-column label="状态" align="center" prop="status">
  21. <template slot-scope="scope">
  22. <dict-tag :options="couponStatusOptions" :value="scope.row.status"/>
  23. </template>
  24. </el-table-column>
  25. <el-table-column label="领取时间" align="center" prop="createTime" width="180"/>
  26. <el-table-column label="使用时间" align="center" prop="useTime" width="180"/>
  27. </el-table>
  28. <pagination
  29. v-show="total>0"
  30. :total="total"
  31. :page.sync="queryParams.pageNum"
  32. :limit.sync="queryParams.pageSize"
  33. @pagination="getList"
  34. />
  35. </div>
  36. <div class="contentx" v-if="item!=null" >
  37. <div class="desct">
  38. 用户药品订单
  39. </div>
  40. <userStorerDetails ref="userDetails" />
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import { getPatientByUserId} from "@/api/store/patient";
  46. import { getUser,getUserAddr} from "@/api/store/user";
  47. import { getListUserCoupon } from "@/api/store/userCoupon";
  48. import userStorerDetails from '@/views/store/components/userStorerDetails.vue';
  49. import userPatietDetails from '@/views/store/components/userPatietDetails.vue';
  50. import userInquiryOrderDetails from '@/views/store/components/userInquiryOrderDetails.vue';
  51. import userAddDetails from '@/views/store/components/userAddDetails.vue';
  52. export default {
  53. name: "storedet",
  54. props:["data"],
  55. components: { userStorerDetails ,userInquiryOrderDetails,userPatietDetails,userAddDetails},
  56. data() {
  57. return {
  58. patientInfo: process.env.VUE_APP_PATIENT_INFO,
  59. addr:[],
  60. patient:[],
  61. userOptions: [],
  62. statusOptions: [],
  63. sexOptions: [],
  64. pOptions: [],
  65. item:null,
  66. total: 0,
  67. loading: true,
  68. // 会员优惠券表格数据
  69. userCouponList: [],
  70. queryParams: {
  71. pageNum: 1,
  72. pageSize: 10,
  73. userId: null,
  74. couponId: null,
  75. },
  76. actName:"10",
  77. businessTypeOptions:[],
  78. couponStatusOptions:[],
  79. }
  80. },
  81. created() {
  82. this.getDicts("sys_user_status").then(response => {
  83. this.userOptions = response.data;
  84. });
  85. this.getDicts("sys_company_status").then(response => {
  86. this.statusOptions = response.data;
  87. });
  88. this.getDicts("sys_patient_status").then(response => {
  89. this.pOptions = response.data;
  90. });
  91. this.getDicts("sys_patient_sex").then(response => {
  92. this.sexOptions = response.data;
  93. });
  94. this.getDicts("sys_coupon_business_type").then(response => {
  95. this.businessTypeOptions = response.data;
  96. });
  97. this.getDicts("sys_coupon_status").then(response => {
  98. this.couponStatusOptions = response.data;
  99. });
  100. },
  101. methods: {
  102. handleClickX(tab, event) {
  103. if(tab.name=="10"){
  104. this.queryParams.status=null;
  105. }else{
  106. this.queryParams.status=tab.name;
  107. }
  108. this.queryParams.pageNum = 1;
  109. this.getList();
  110. },
  111. getList() {
  112. this.loading = true;
  113. getListUserCoupon(this.queryParams).then(response => {
  114. this.userCouponList = response.rows;
  115. this.total = response.total;
  116. this.loading = false;
  117. });
  118. },
  119. getDetails(orderId) {
  120. this.item=null;
  121. getUser(orderId).then(response => {
  122. this.item = response.data;
  123. setTimeout(() => {
  124. this.$refs.userDetails.getUserDetails(orderId);
  125. }, 1);
  126. });
  127. this.patient=null;
  128. getPatientByUserId(orderId).then(response => {
  129. this.patient = response.data;
  130. });
  131. getUserAddr(orderId).then(response => {
  132. this.addr = response.data;
  133. });
  134. this.queryParams.userId=orderId;
  135. this.getList();
  136. },
  137. }
  138. }
  139. </script>
  140. <style>
  141. .contentx{
  142. height: 100%;
  143. background-color: #fff;
  144. padding: 0px 20px 20px;
  145. margin: 20px;
  146. }
  147. .el-descriptions-item__label.is-bordered-label{
  148. font-weight: normal;
  149. }
  150. .el-descriptions-item__content {
  151. max-width: 150px;
  152. min-width: 100px;
  153. }
  154. .desct{
  155. padding-top: 20px;
  156. padding-bottom: 20px;
  157. color: #524b4a;
  158. font-weight: bold;
  159. }
  160. </style>