userDetailsTemp.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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. <!-- 积分记录 -->
  120. <div class="contentx" v-if="item!=null" >
  121. <div class="desct">
  122. 用户积分记录
  123. </div>
  124. <userIntegralDetails ref="userIntegralDetail" />
  125. </div>
  126. </div>
  127. </template>
  128. <script>
  129. import { listPatient, getPatient, delPatient, addPatient, updatePatient, exportPatient ,getPatientByUserId} from "@/api/store/patient";
  130. import { listUser, getUser, delUser, addUser, updateUser, exportUser ,getUserAddr} from "@/api/store/user";
  131. import { getListUserCoupon } from "@/api/store/userCoupon";
  132. import userStorerDetails from "../components/userStorerDetails.vue";
  133. import userPatietDetails from "../components/userPatietDetails.vue";
  134. import userInquiryOrderDetails from "../components/userInquiryOrderDetails.vue";
  135. import userAddDetails from "../components/userAddDetails.vue";
  136. import userIntegralDetails from "../components/userIntegralDetails.vue";
  137. export default {
  138. name: "storedet",
  139. props:["data"],
  140. components: { userStorerDetails ,userInquiryOrderDetails,userPatietDetails,userAddDetails,userIntegralDetails},
  141. data() {
  142. return {
  143. patientInfo: process.env.VUE_APP_PATIENT_INFO,
  144. addr:[],
  145. patient:[],
  146. userOptions: [],
  147. statusOptions: [],
  148. sexOptions: [],
  149. pOptions: [],
  150. item:null,
  151. total: 0,
  152. loading: true,
  153. // 会员优惠券表格数据
  154. userCouponList: [],
  155. queryParams: {
  156. pageNum: 1,
  157. pageSize: 10,
  158. userId: null,
  159. couponId: null,
  160. },
  161. actName:"10",
  162. businessTypeOptions:[],
  163. couponStatusOptions:[],
  164. }
  165. },
  166. created() {
  167. this.getDicts("sys_user_status").then(response => {
  168. this.userOptions = response.data;
  169. });
  170. this.getDicts("sys_company_status").then(response => {
  171. this.statusOptions = response.data;
  172. });
  173. this.getDicts("sys_patient_status").then(response => {
  174. this.pOptions = response.data;
  175. });
  176. this.getDicts("sys_patient_sex").then(response => {
  177. this.sexOptions = response.data;
  178. });
  179. this.getDicts("sys_coupon_business_type").then(response => {
  180. this.businessTypeOptions = response.data;
  181. });
  182. this.getDicts("sys_coupon_status").then(response => {
  183. this.couponStatusOptions = response.data;
  184. });
  185. },
  186. methods: {
  187. handleClickX(tab, event) {
  188. if(tab.name=="10"){
  189. this.queryParams.status=null;
  190. }else{
  191. this.queryParams.status=tab.name;
  192. }
  193. this.queryParams.pageNum = 1;
  194. this.getList();
  195. },
  196. getList() {
  197. this.loading = true;
  198. getListUserCoupon(this.queryParams).then(response => {
  199. this.userCouponList = response.rows;
  200. this.total = response.total;
  201. this.loading = false;
  202. });
  203. },
  204. getDetails(orderId) {
  205. this.item=null;
  206. getUser(orderId).then(response => {
  207. this.item = response.data;
  208. setTimeout(() => {
  209. this.$refs.userDetails.getUserDetails(orderId);
  210. }, 1);
  211. setTimeout(() => {
  212. this.$refs.InquiryDetails.getInquiryDetails(orderId,1);
  213. }, 1);
  214. setTimeout(() => {
  215. this.$refs.userPatietDetail.getPatList(orderId);
  216. }, 1);
  217. setTimeout(() => {
  218. this.$refs.userAddDetail.getAddList(orderId);
  219. }, 1);
  220. setTimeout(() => {
  221. this.$refs.userIntegralDetail.getIntegralLogs(orderId);
  222. }, 1);
  223. });
  224. this.patient=null;
  225. getPatientByUserId(orderId).then(response => {
  226. this.patient = response.data;
  227. });
  228. getUserAddr(orderId).then(response => {
  229. this.addr = response.data;
  230. });
  231. this.queryParams.userId=orderId;
  232. this.getList();
  233. },
  234. }
  235. }
  236. </script>
  237. <style>
  238. .contentx{
  239. height: 100%;
  240. background-color: #fff;
  241. padding: 0px 20px 20px;
  242. margin: 20px;
  243. }
  244. .el-descriptions-item__label.is-bordered-label{
  245. font-weight: normal;
  246. }
  247. .el-descriptions-item__content {
  248. max-width: 150px;
  249. min-width: 100px;
  250. }
  251. .desct{
  252. padding-top: 20px;
  253. padding-bottom: 20px;
  254. color: #524b4a;
  255. font-weight: bold;
  256. }
  257. </style>