userDetails.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
  3. <!--
  4. <div style="padding: 20px; background-color: #fff;">
  5. 会员详情
  6. </div>
  7. -->
  8. <div class="contentx" v-if="item!=null" >
  9. <div class="desct">
  10. 基本信息
  11. </div>
  12. <el-descriptions title="" :column="3" border>
  13. <el-descriptions-item label="会员id" >
  14. <span v-if="item!=null">{{item.userId}}</span>
  15. </el-descriptions-item>
  16. <el-descriptions-item label="用户昵称" >
  17. <span v-if="item!=null">{{item.nickName}}</span>
  18. </el-descriptions-item>
  19. <el-descriptions-item label="用户头像" >
  20. <el-image v-if="item.avatar!=null"
  21. style="width: 50px;"
  22. :src="item.avatar">
  23. </el-image>
  24. </el-descriptions-item>
  25. <el-descriptions-item label="手机号码" >
  26. <span v-if="item!=null">{{item.phone}}</span>
  27. </el-descriptions-item>
  28. <el-descriptions-item label="用户积分" >
  29. <span v-if="item!=null">{{item.integral}}</span>
  30. </el-descriptions-item>
  31. <el-descriptions-item label="状态" >
  32. <span v-if="item!=null">
  33. <dict-tag :options="userOptions" :value="item.status"/>
  34. </span>
  35. </el-descriptions-item>
  36. <el-descriptions-item label="上级昵称" >
  37. <span v-if="item!=null">{{item.tuiName}}</span>
  38. </el-descriptions-item>
  39. <el-descriptions-item label="上级手机号码" >
  40. <span v-if="item!=null">{{item.tuiPhone}}</span>
  41. </el-descriptions-item>
  42. <el-descriptions-item label="推广员关联时间" >
  43. <span v-if="item!=null">{{item.tuiTime}}</span>
  44. </el-descriptions-item>
  45. <el-descriptions-item label="下级人数" >
  46. <span v-if="item!=null">{{item.tuiUserCount}}</span>
  47. </el-descriptions-item>
  48. <el-descriptions-item label="最后一次登录ip" >
  49. <span v-if="item!=null">{{item.lastIp}}</span>
  50. </el-descriptions-item>
  51. <el-descriptions-item label="余额" >
  52. <span v-if="item!=null">{{item.balance}}</span>
  53. </el-descriptions-item>
  54. <el-descriptions-item label="创建时间" >
  55. <span v-if="item!=null">{{item.createTime}}</span>
  56. </el-descriptions-item>
  57. <el-descriptions-item label="更新时间" >
  58. <span v-if="item!=null">{{item.updateTime}}</span>
  59. </el-descriptions-item>
  60. </el-descriptions>
  61. </div>
  62. <div class="contentx" v-if="item!=null">
  63. <div class="desct"> 优惠劵领取信息</div>
  64. <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
  65. <el-tab-pane label="全部" name="10"></el-tab-pane>
  66. <el-tab-pane v-for="(item,index) in couponStatusOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  67. </el-tabs>
  68. <el-table v-loading="loading" :data="userCouponList">
  69. <el-table-column label="优惠劵标题" align="center" prop="title" />
  70. <el-table-column label="券号" align="center" prop="couponCode" />
  71. <el-table-column label="会员昵称" align="center" prop="nickName" />
  72. <el-table-column label="会员电话" align="center" prop="phone" />
  73. <el-table-column label="关联订单ID" align="center" prop="businessId" />
  74. <el-table-column label="订单类型" align="center" prop="businessType">
  75. <template slot-scope="scope">
  76. <dict-tag :options="businessTypeOptions" :value="scope.row.businessType"/>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="状态" align="center" prop="status">
  80. <template slot-scope="scope">
  81. <dict-tag :options="couponStatusOptions" :value="scope.row.status"/>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="领取时间" align="center" prop="createTime" width="180"/>
  85. <el-table-column label="使用时间" align="center" prop="useTime" width="180"/>
  86. </el-table>
  87. <pagination
  88. v-show="total>0"
  89. :total="total"
  90. :page.sync="queryParams.pageNum"
  91. :limit.sync="queryParams.pageSize"
  92. @pagination="getList"
  93. />
  94. </div>
  95. <div class="contentx" v-if="item!=null">
  96. <div class="desct">
  97. <span v-if="patientInfo">
  98. {{ patientInfo }}
  99. </span>
  100. <span v-else>
  101. 患者信息
  102. </span>
  103. </div>
  104. <userPatietDetails ref="userPatietDetail" />
  105. </div>
  106. <div class="contentx" v-if="item!=null" >
  107. <div class="desct">
  108. 用户地址
  109. </div>
  110. <userAddDetails ref="userAddDetail" />
  111. </div>
  112. <div class="contentx" v-if="item!=null" >
  113. <div class="desct">
  114. 用户药品订单
  115. </div>
  116. <userStorerDetails ref="userDetails" />
  117. </div>
  118. <div class="contentx" v-if="item!=null" >
  119. <div class="desct">
  120. 用户问诊订单
  121. </div>
  122. <userInquiryOrderDetails ref="InquiryDetails" />
  123. </div>
  124. </div>
  125. </template>
  126. <script>
  127. import { listPatient, getPatient, delPatient, addPatient, updatePatient, exportPatient ,getPatientByUserId} from "@/api/his/patient";
  128. import { listUser, getUser, delUser, addUser, updateUser, exportUser ,getUserAddr} from "@/api/his/user";
  129. import { getListUserCoupon } from "@/api/his/userCoupon";
  130. import userStorerDetails from "../his/userStorerDetails.vue";
  131. import userPatietDetails from "../his/userPatietDetails.vue";
  132. import userInquiryOrderDetails from "../his/userInquiryOrderDetails.vue";
  133. import userAddDetails from "../his/userAddDetails.vue";
  134. export default {
  135. name: "storedet",
  136. props:["data"],
  137. components: { userStorerDetails ,userInquiryOrderDetails,userPatietDetails,userAddDetails},
  138. data() {
  139. return {
  140. patientInfo: process.env.VUE_APP_PATIENT_INFO,
  141. addr:[],
  142. patient:[],
  143. userOptions: [],
  144. statusOptions: [],
  145. sexOptions: [],
  146. pOptions: [],
  147. item:null,
  148. total: 0,
  149. loading: true,
  150. // 会员优惠券表格数据
  151. userCouponList: [],
  152. queryParams: {
  153. pageNum: 1,
  154. pageSize: 10,
  155. userId: null,
  156. couponId: null,
  157. },
  158. actName:"10",
  159. businessTypeOptions:[],
  160. couponStatusOptions:[],
  161. }
  162. },
  163. created() {
  164. this.getDicts("sys_user_status").then(response => {
  165. this.userOptions = response.data;
  166. });
  167. this.getDicts("sys_company_status").then(response => {
  168. this.statusOptions = response.data;
  169. });
  170. this.getDicts("sys_patient_status").then(response => {
  171. this.pOptions = response.data;
  172. });
  173. this.getDicts("sys_patient_sex").then(response => {
  174. this.sexOptions = response.data;
  175. });
  176. this.getDicts("sys_coupon_business_type").then(response => {
  177. this.businessTypeOptions = response.data;
  178. });
  179. this.getDicts("sys_coupon_status").then(response => {
  180. this.couponStatusOptions = response.data;
  181. });
  182. },
  183. methods: {
  184. handleClickX(tab, event) {
  185. if(tab.name=="10"){
  186. this.queryParams.status=null;
  187. }else{
  188. this.queryParams.status=tab.name;
  189. }
  190. this.queryParams.pageNum = 1;
  191. this.getList();
  192. },
  193. getList() {
  194. this.loading = true;
  195. getListUserCoupon(this.queryParams).then(response => {
  196. this.userCouponList = response.rows;
  197. this.total = response.total;
  198. this.loading = false;
  199. });
  200. },
  201. getDetails(orderId) {
  202. this.item=null;
  203. getUser(orderId).then(response => {
  204. this.item = response.data;
  205. setTimeout(() => {
  206. this.$refs.userDetails.getUserDetails(orderId);
  207. }, 1);
  208. setTimeout(() => {
  209. this.$refs.InquiryDetails.getInquiryDetails(orderId,1);
  210. }, 1);
  211. setTimeout(() => {
  212. this.$refs.userPatietDetail.getPatList(orderId);
  213. }, 1);
  214. setTimeout(() => {
  215. this.$refs.userAddDetail.getAddList(orderId);
  216. }, 1);
  217. });
  218. this.patient=null;
  219. getPatientByUserId(orderId).then(response => {
  220. this.patient = response.data;
  221. });
  222. getUserAddr(orderId).then(response => {
  223. this.addr = response.data;
  224. });
  225. this.queryParams.userId=orderId;
  226. this.getList();
  227. },
  228. }
  229. }
  230. </script>
  231. <style>
  232. .contentx{
  233. height: 100%;
  234. background-color: #fff;
  235. padding: 0px 20px 20px;
  236. margin: 20px;
  237. }
  238. .el-descriptions-item__label.is-bordered-label{
  239. font-weight: normal;
  240. }
  241. .el-descriptions-item__content {
  242. max-width: 150px;
  243. min-width: 100px;
  244. }
  245. .desct{
  246. padding-top: 20px;
  247. padding-bottom: 20px;
  248. color: #524b4a;
  249. font-weight: bold;
  250. }
  251. </style>