userDetailsTemp.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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">
  5. 基本信息
  6. </div>
  7. <el-descriptions title="" :column="3" border>
  8. <el-descriptions-item label="会员id" >
  9. <span v-if="item!=null">{{item.userId}}</span>
  10. </el-descriptions-item>
  11. <el-descriptions-item label="用户昵称" >
  12. <span v-if="item!=null">{{item.nickName}}</span>
  13. </el-descriptions-item>
  14. <el-descriptions-item label="用户头像" >
  15. <el-image v-if="item.avatar!=null"
  16. style="width: 50px;"
  17. :src="item.avatar">
  18. </el-image>
  19. </el-descriptions-item>
  20. <el-descriptions-item label="手机号码" >
  21. <span v-if="item!=null">{{item.phone}}</span>
  22. </el-descriptions-item>
  23. <el-descriptions-item label="用户积分" >
  24. <span v-if="item!=null">{{item.integral}}</span>
  25. </el-descriptions-item>
  26. <el-descriptions-item label="状态" >
  27. <span v-if="item!=null">
  28. <dict-tag :options="userOptions" :value="item.status"/>
  29. </span>
  30. </el-descriptions-item>
  31. <el-descriptions-item label="上级昵称" >
  32. <span v-if="item!=null">{{item.tuiName}}</span>
  33. </el-descriptions-item>
  34. <el-descriptions-item label="上级手机号码" >
  35. <span v-if="item!=null">{{item.tuiPhone}}</span>
  36. </el-descriptions-item>
  37. <el-descriptions-item label="推广员关联时间" >
  38. <span v-if="item!=null">{{item.tuiTime}}</span>
  39. </el-descriptions-item>
  40. <el-descriptions-item label="下级人数" >
  41. <span v-if="item!=null">{{item.tuiUserCount}}</span>
  42. </el-descriptions-item>
  43. <el-descriptions-item label="最后一次登录ip" >
  44. <span v-if="item!=null">{{item.lastIp}}</span>
  45. </el-descriptions-item>
  46. <el-descriptions-item label="余额" >
  47. <span v-if="item!=null">{{item.balance}}</span>
  48. </el-descriptions-item>
  49. <el-descriptions-item label="创建时间" >
  50. <span v-if="item!=null">{{item.createTime}}</span>
  51. </el-descriptions-item>
  52. <el-descriptions-item label="更新时间" >
  53. <span v-if="item!=null">{{item.updateTime}}</span>
  54. </el-descriptions-item>
  55. </el-descriptions>
  56. </div>
  57. <div class="contentx" v-if="item!=null">
  58. <div class="desct">
  59. <span v-if="patientInfo">
  60. {{ patientInfo }}
  61. </span>
  62. <span v-else>
  63. 患者信息
  64. </span>
  65. </div>
  66. <userPatietDetails ref="userPatietDetail" />
  67. </div>
  68. <div class="contentx" v-if="item!=null" >
  69. <div class="desct">
  70. 用户药品订单
  71. </div>
  72. <userStorerDetails ref="userDetails" />
  73. </div>
  74. </div>
  75. </template>
  76. <script>
  77. import {getPatientByUserId,getUser,getUserAddr,getListUserCoupon} from "@/api/userDetail";
  78. import userStorerDetails from "./userStorerDetails.vue";
  79. import userPatietDetails from "./userPatietDetails.vue";
  80. export default {
  81. name: "storedet",
  82. props:["data"],
  83. components: {
  84. userStorerDetails,
  85. userPatietDetails,
  86. },
  87. data() {
  88. return {
  89. refreshKey: 0, // 每次点击刷新用
  90. patientInfo: process.env.VUE_APP_PATIENT_INFO,
  91. addr:[],
  92. patient:[],
  93. userOptions: [],
  94. statusOptions: [],
  95. sexOptions: [],
  96. pOptions: [],
  97. item:null,
  98. total: 0,
  99. loading: true,
  100. // 积分购相关
  101. integralPurchaseVisible: false,
  102. currentUserId: null,
  103. // 会员优惠券表格数据
  104. userCouponList: [],
  105. queryParams: {
  106. pageNum: 1,
  107. pageSize: 10,
  108. userId: null,
  109. couponId: null,
  110. },
  111. actName:"10",
  112. businessTypeOptions:[],
  113. couponStatusOptions:[],
  114. }
  115. },
  116. created() {
  117. this.getDicts("sys_user_status").then(response => {
  118. this.userOptions = response.data;
  119. });
  120. this.getDicts("sys_company_status").then(response => {
  121. this.statusOptions = response.data;
  122. });
  123. this.getDicts("sys_patient_status").then(response => {
  124. this.pOptions = response.data;
  125. });
  126. this.getDicts("sys_patient_sex").then(response => {
  127. this.sexOptions = response.data;
  128. });
  129. this.getDicts("sys_coupon_business_type").then(response => {
  130. this.businessTypeOptions = response.data;
  131. });
  132. this.getDicts("sys_coupon_status").then(response => {
  133. this.couponStatusOptions = response.data;
  134. });
  135. },
  136. methods: {
  137. getList() {
  138. this.loading = true;
  139. getListUserCoupon(this.queryParams).then(response => {
  140. this.userCouponList = response.rows;
  141. this.total = response.total;
  142. this.loading = false;
  143. });
  144. },
  145. getDetails(orderId) {
  146. this.item=null;
  147. getUser(orderId).then(response => {
  148. this.item = response.data;
  149. setTimeout(() => {
  150. this.$refs.userDetails.getUserDetails(orderId);
  151. }, 1);
  152. setTimeout(() => {
  153. this.$refs.InquiryDetails.getInquiryDetails(orderId,1);
  154. }, 1);
  155. setTimeout(() => {
  156. this.$refs.userPatietDetail.getPatList(orderId);
  157. }, 1);
  158. setTimeout(() => {
  159. this.$refs.userAddDetail.getAddList(orderId);
  160. }, 1);
  161. setTimeout(() => {
  162. this.$refs.userIntegralDetail.getIntegralLogs(orderId);
  163. }, 1);
  164. });
  165. this.patient=null;
  166. getPatientByUserId(orderId).then(response => {
  167. this.patient = response.data;
  168. });
  169. getUserAddr(orderId).then(response => {
  170. this.addr = response.data;
  171. });
  172. this.queryParams.userId=orderId;
  173. this.getList();
  174. },
  175. }
  176. }
  177. </script>
  178. <style>
  179. .contentx{
  180. height: 100%;
  181. background-color: #fff;
  182. padding: 0px 20px 20px;
  183. margin: 20px;
  184. }
  185. .el-descriptions-item__label.is-bordered-label{
  186. font-weight: normal;
  187. }
  188. .el-descriptions-item__content {
  189. max-width: 150px;
  190. min-width: 100px;
  191. }
  192. .desct{
  193. padding-top: 20px;
  194. padding-bottom: 20px;
  195. color: #524b4a;
  196. font-weight: bold;
  197. }
  198. </style>