userDetailsTemp.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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"> 优惠劵领取信息</div>
  59. <el-tabs type="card" v-model="actName" @tab-click="handleClickX">
  60. <el-tab-pane label="全部" name="10"></el-tab-pane>
  61. <el-tab-pane v-for="(item,index) in couponStatusOptions" :label="item.dictLabel" :name="item.dictValue"></el-tab-pane>
  62. </el-tabs>
  63. <el-table v-loading="loading" :data="userCouponList">
  64. <el-table-column label="优惠劵标题" align="center" prop="title" />
  65. <el-table-column label="券号" align="center" prop="couponCode" />
  66. <el-table-column label="会员昵称" align="center" prop="nickName" />
  67. <el-table-column label="会员电话" align="center" prop="phone" />
  68. <el-table-column label="关联订单ID" align="center" prop="businessId" />
  69. <el-table-column label="订单类型" align="center" prop="businessType">
  70. <template slot-scope="scope">
  71. <dict-tag :options="businessTypeOptions" :value="scope.row.businessType"/>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="状态" align="center" prop="status">
  75. <template slot-scope="scope">
  76. <dict-tag :options="couponStatusOptions" :value="scope.row.status"/>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="领取时间" align="center" prop="createTime" width="180"/>
  80. <el-table-column label="使用时间" align="center" prop="useTime" width="180"/>
  81. </el-table>
  82. <pagination
  83. v-show="total>0"
  84. :total="total"
  85. :page.sync="queryParams.pageNum"
  86. :limit.sync="queryParams.pageSize"
  87. @pagination="getList"
  88. />
  89. </div>
  90. <div class="contentx" v-if="item!=null">
  91. <div class="desct">
  92. <span v-if="patientInfo">
  93. {{ patientInfo }}
  94. </span>
  95. <span v-else>
  96. 患者信息
  97. </span>
  98. </div>
  99. <userPatietDetails ref="userPatietDetail" />
  100. </div>
  101. <div class="contentx" v-if="item!=null" >
  102. <div class="desct">
  103. 用户地址
  104. </div>
  105. <userAddDetails ref="userAddDetail" />
  106. </div>
  107. <div class="contentx" v-if="item!=null" >
  108. <div class="desct">
  109. 用户药品订单
  110. </div>
  111. <userStorerDetails ref="userDetails" />
  112. </div>
  113. <div class="contentx" v-if="item!=null" >
  114. <div class="desct">
  115. 用户问诊订单
  116. </div>
  117. <userInquiryOrderDetails ref="InquiryDetails" />
  118. </div>
  119. </div>
  120. </template>
  121. <script>
  122. import { listPatient, getPatient, delPatient, addPatient, updatePatient, exportPatient ,getPatientByUserId} from "@/api/store/patient";
  123. import { listUser, getUser, delUser, addUser, updateUser, exportUser ,getUserAddr} from "@/api/store/user";
  124. import { getListUserCoupon } from "@/api/store/userCoupon";
  125. import userStorerDetails from "../components/userStorerDetails.vue";
  126. import userPatietDetails from "../components/userPatietDetails.vue";
  127. import userInquiryOrderDetails from "../components/userInquiryOrderDetails.vue";
  128. import userAddDetails from "../components/userAddDetails.vue";
  129. export default {
  130. name: "storedet",
  131. props:["data"],
  132. components: { userStorerDetails ,userInquiryOrderDetails,userPatietDetails,userAddDetails},
  133. data() {
  134. return {
  135. patientInfo: process.env.VUE_APP_PATIENT_INFO,
  136. addr:[],
  137. patient:[],
  138. userOptions: [],
  139. statusOptions: [],
  140. sexOptions: [],
  141. pOptions: [],
  142. item:null,
  143. total: 0,
  144. loading: true,
  145. // 会员优惠券表格数据
  146. userCouponList: [],
  147. queryParams: {
  148. pageNum: 1,
  149. pageSize: 10,
  150. userId: null,
  151. couponId: null,
  152. },
  153. actName:"10",
  154. businessTypeOptions:[],
  155. couponStatusOptions:[],
  156. }
  157. },
  158. created() {
  159. this.getDicts("sys_user_status").then(response => {
  160. this.userOptions = response.data;
  161. });
  162. this.getDicts("sys_company_status").then(response => {
  163. this.statusOptions = response.data;
  164. });
  165. this.getDicts("sys_patient_status").then(response => {
  166. this.pOptions = response.data;
  167. });
  168. this.getDicts("sys_patient_sex").then(response => {
  169. this.sexOptions = response.data;
  170. });
  171. this.getDicts("sys_coupon_business_type").then(response => {
  172. this.businessTypeOptions = response.data;
  173. });
  174. this.getDicts("sys_coupon_status").then(response => {
  175. this.couponStatusOptions = response.data;
  176. });
  177. },
  178. methods: {
  179. handleClickX(tab, event) {
  180. if(tab.name=="10"){
  181. this.queryParams.status=null;
  182. }else{
  183. this.queryParams.status=tab.name;
  184. }
  185. this.queryParams.pageNum = 1;
  186. this.getList();
  187. },
  188. getList() {
  189. this.loading = true;
  190. getListUserCoupon(this.queryParams).then(response => {
  191. this.userCouponList = response.rows;
  192. this.total = response.total;
  193. this.loading = false;
  194. });
  195. },
  196. getDetails(orderId) {
  197. this.item=null;
  198. getUser(orderId).then(response => {
  199. this.item = response.data;
  200. setTimeout(() => {
  201. this.$refs.userDetails.getUserDetails(orderId);
  202. }, 1);
  203. setTimeout(() => {
  204. this.$refs.InquiryDetails.getInquiryDetails(orderId,1);
  205. }, 1);
  206. setTimeout(() => {
  207. this.$refs.userPatietDetail.getPatList(orderId);
  208. }, 1);
  209. setTimeout(() => {
  210. this.$refs.userAddDetail.getAddList(orderId);
  211. }, 1);
  212. });
  213. this.patient=null;
  214. getPatientByUserId(orderId).then(response => {
  215. this.patient = response.data;
  216. });
  217. getUserAddr(orderId).then(response => {
  218. this.addr = response.data;
  219. });
  220. this.queryParams.userId=orderId;
  221. this.getList();
  222. },
  223. }
  224. }
  225. </script>
  226. <style>
  227. .contentx{
  228. height: 100%;
  229. background-color: #fff;
  230. padding: 0px 20px 20px;
  231. margin: 20px;
  232. }
  233. .el-descriptions-item__label.is-bordered-label{
  234. font-weight: normal;
  235. }
  236. .el-descriptions-item__content {
  237. max-width: 150px;
  238. min-width: 100px;
  239. }
  240. .desct{
  241. padding-top: 20px;
  242. padding-bottom: 20px;
  243. color: #524b4a;
  244. font-weight: bold;
  245. }
  246. </style>