detail.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <template>
  2. <div class="page">
  3. <div class="page-top flex flex-col justify-center items-center">
  4. <img class="logo" :src="supplierInfo.logo" />
  5. <div class="name mt-2" v-text="supplierInfo.shopName + '认证记录'"></div>
  6. </div>
  7. <div class="page-content">
  8. <template v-if="clubInfo">
  9. <div class="page-title">机构认证</div>
  10. <div class="row">
  11. <div class="col">机构名称:</div>
  12. <div class="col">{{ clubInfo.authParty }}</div>
  13. </div>
  14. <div class="row">
  15. <div class="col">联系电话:</div>
  16. <div class="col">{{ clubInfo.mobile }}</div>
  17. </div>
  18. <div class="row">
  19. <div class="col">运营联系人:</div>
  20. <div class="col">{{ clubInfo.linkMan }}</div>
  21. </div>
  22. <div class="row">
  23. <div class="col">运营联系人手机号:</div>
  24. <div class="col">{{ clubInfo.linkMobile }}</div>
  25. </div>
  26. <div class="row">
  27. <div class="col">所在地区:</div>
  28. <div class="col">{{ clubInfo.area }}</div>
  29. </div>
  30. <div class="row">
  31. <div class="col">所在位置:</div>
  32. <div class="col">{{ clubInfo.address }}</div>
  33. </div>
  34. <div class="row">
  35. <div class="col max-width">logo:</div>
  36. <div class="col">
  37. <el-image
  38. v-if="clubInfo.logo"
  39. :src="clubInfo.logo"
  40. :preview-src-list="[clubInfo.logo]"
  41. >
  42. </el-image>
  43. <span v-else>暂无图片</span>
  44. </div>
  45. </div>
  46. <div class="row">
  47. <div class="col max-width">门头照:</div>
  48. <div class="col">
  49. <template
  50. v-if="clubInfo.bannerList && clubInfo.bannerList.length > 0"
  51. >
  52. <template v-for="(image, index) in clubInfo.bannerList">
  53. <el-image
  54. :key="index"
  55. :src="image"
  56. :preview-src-list="clubInfo.bannerList"
  57. />
  58. </template>
  59. </template>
  60. <span v-else>暂无图片</span>
  61. </div>
  62. </div>
  63. <div class="row">
  64. <div class="col">机构类型:</div>
  65. <div class="col">
  66. {{
  67. ['医美', '生美', '项目公司', '个人', '其他'][
  68. clubInfo.firstClubType - 1
  69. ]
  70. }}
  71. </div>
  72. </div>
  73. <div
  74. class="row"
  75. v-if="clubInfo.firstClubType === 1 || clubInfo.firstClubType === 2"
  76. >
  77. <div class="col">医美类型:</div>
  78. <div class="col">
  79. {{
  80. ['诊所', '门诊', '医院', '其他', '美容院', '养生馆', '其他'][
  81. clubInfo.secondClubType - 1
  82. ]
  83. }}
  84. </div>
  85. </div>
  86. <div class="row" v-if="clubInfo.firstClubType === 1">
  87. <div class="col max-width">医疗许可证:</div>
  88. <div class="col">
  89. <el-image
  90. v-if="clubInfo.medicalLicenseImage"
  91. :src="clubInfo.medicalLicenseImage"
  92. :preview-src-list="[clubInfo.medicalLicenseImage]"
  93. />
  94. <span v-else>暂无图片</span>
  95. </div>
  96. </div>
  97. <div class="row">
  98. <div class="col">员工人数:</div>
  99. <div class="col">{{ clubInfo.empNum }}</div>
  100. </div>
  101. <div class="row">
  102. <div class="col">状态:</div>
  103. <div class="col">
  104. <div class="status">
  105. <span class="success" v-if="clubInfo.auditStatus === 1"
  106. >认证成功</span
  107. >
  108. <span class="warning" v-else-if="clubInfo.auditStatus === 2"
  109. >认证中</span
  110. >
  111. <span class="danger" v-else>认证失败</span>
  112. </div>
  113. </div>
  114. </div>
  115. <div class="row" v-if="clubInfo.auditStatus === 0">
  116. <div class="col">原因:</div>
  117. <div class="col">
  118. {{ clubInfo.invalidReason ? clubInfo.invalidReason : '暂无' }}
  119. </div>
  120. </div>
  121. <div class="control flex flex-col items-center">
  122. <div
  123. class="button edit flex justify-center items-center mb-2"
  124. @click="onEdit"
  125. v-if="clubInfo.auditStatus === 0"
  126. >
  127. 编辑
  128. </div>
  129. <div
  130. class="button search flex justify-center items-center"
  131. @click="onToDeviceList"
  132. >
  133. 查看认证设备
  134. </div>
  135. </div>
  136. </template>
  137. <template v-else>
  138. <SimpleEmpty name="icon-empty-club.png" description="暂无机构认证~" />
  139. </template>
  140. </div>
  141. </div>
  142. </template>
  143. <script>
  144. import SimpleEmpty from '@/components/SimpleEmpty'
  145. import { mapGetters } from 'vuex'
  146. export default {
  147. layout: 'app-ross',
  148. components: {
  149. SimpleEmpty,
  150. },
  151. data() {
  152. return {
  153. clubInfo: null,
  154. authId: ''
  155. }
  156. },
  157. computed: {
  158. ...mapGetters(['supplierInfo', 'routePrefix', 'clubUserId', 'userInfo']),
  159. },
  160. created() {
  161. this.fetchAuthDetail()
  162. },
  163. methods: {
  164. // 获取认证机构信息
  165. async fetchAuthDetail() {
  166. try {
  167. const result = await this.$http.api.fetchClubAuthInfo({
  168. clubUserId: this.clubUserId,
  169. })
  170. if(!result.data.auth) return
  171. this.authId = result.data.auth.authId
  172. const res = await this.$http.api.fetchClubAuthInfoData({
  173. authId: result.data.auth.authId,
  174. })
  175. this.clubInfo = res.data
  176. } catch (error) {
  177. console.log(error)
  178. }
  179. },
  180. onToDeviceList() {
  181. this.$router.push(`${this.routePrefix}/record/device?authId=${this.authId}`)
  182. },
  183. onEdit() {
  184. this.$router.push(`${this.routePrefix}/record/club/edit`)
  185. },
  186. },
  187. }
  188. </script>
  189. <style lang="scss" scoped>
  190. @media screen and (min-width: 768px) {
  191. .page {
  192. background: #fff;
  193. }
  194. .page-top {
  195. height: 360px;
  196. @include themify($themes) {
  197. background: themed('pc-banner-record-club');
  198. background-size: auto 360px;
  199. }
  200. .logo {
  201. display: block;
  202. width: 120px;
  203. height: 120px;
  204. border-radius: 50%;
  205. background: #fff;
  206. }
  207. .name {
  208. font-size: 30px;
  209. color: #fff;
  210. }
  211. }
  212. .page-content {
  213. width: 600px;
  214. margin: 0 auto;
  215. overflow: hidden;
  216. min-height: calc(100vh - 80px - 80px - 360px);
  217. box-sizing: border-box;
  218. padding-bottom: 40px;
  219. .page-title {
  220. font-size: 24px;
  221. font-weight: bold;
  222. text-align: center;
  223. padding: 40px 0;
  224. }
  225. .row {
  226. display: flex;
  227. justify-content: flex-start;
  228. align-items: flex-start;
  229. font-size: 18px;
  230. margin: 24px 0;
  231. .status {
  232. .success {
  233. color: #f3920d !important;
  234. }
  235. .warning {
  236. color: #1890ff !important;
  237. }
  238. .danger {
  239. color: #f94b4b !important;
  240. }
  241. }
  242. .col {
  243. &:first-child {
  244. white-space: nowrap;
  245. width: 170px;
  246. color: #666;
  247. text-align: right;
  248. flex-shrink: 0;
  249. }
  250. &:last-child {
  251. color: #282828;
  252. }
  253. }
  254. .el-image {
  255. width: 120px;
  256. height: 120px;
  257. margin-right: 12px;
  258. }
  259. }
  260. .control {
  261. margin-top: 62px;
  262. .button {
  263. width: 295px;
  264. height: 50px;
  265. cursor: pointer;
  266. &.edit {
  267. @include themify($themes) {
  268. border: 1px solid themed('color');
  269. color: themed('color');
  270. }
  271. }
  272. &.search {
  273. @include themify($themes) {
  274. background-color: themed('color');
  275. color: #fff;
  276. }
  277. }
  278. }
  279. }
  280. }
  281. }
  282. @media screen and (max-width: 768px) {
  283. .page {
  284. background: #fff;
  285. }
  286. .page-top {
  287. height: 46vw;
  288. @include themify($themes) {
  289. background: themed('h5-banner-record-club');
  290. background-size: auto 46vw;
  291. }
  292. .logo {
  293. display: block;
  294. width: 14.8vw;
  295. height: 14.8vw;
  296. border-radius: 50%;
  297. background: #fff;
  298. }
  299. .name {
  300. font-size: 4vw;
  301. color: #fff;
  302. }
  303. }
  304. .page-content {
  305. box-sizing: border-box;
  306. padding: 8vw 7.2vw;
  307. .page-title {
  308. font-size: 4.2vw;
  309. font-weight: bold;
  310. text-align: center;
  311. margin-bottom: 8vw;
  312. color: #282828;
  313. }
  314. .row {
  315. display: flex;
  316. justify-content: flex-start;
  317. align-items: flex-start;
  318. font-size: 3.4vw;
  319. margin-bottom: 5.6vw;
  320. flex-wrap: wrap;
  321. .status {
  322. .success {
  323. color: #f3920d !important;
  324. }
  325. .warning {
  326. color: #1890ff !important;
  327. }
  328. .danger {
  329. color: #f94b4b !important;
  330. }
  331. }
  332. .col {
  333. &:first-child {
  334. width: 17vw;
  335. color: #666;
  336. // text-align: right;
  337. &.max-width {
  338. width: 100% !important;
  339. margin-bottom: 2.6vw;
  340. }
  341. }
  342. &:last-child {
  343. color: #282828;
  344. }
  345. }
  346. .el-image {
  347. width: 25.6vw;
  348. height: 25.6vw;
  349. }
  350. }
  351. .control {
  352. margin-top: 22.8vw;
  353. .button {
  354. width: 100%;
  355. height: 12vw;
  356. cursor: pointer;
  357. &.edit {
  358. @include themify($themes) {
  359. border: 1px solid themed('color');
  360. color: themed('color');
  361. }
  362. }
  363. &.search {
  364. @include themify($themes) {
  365. background-color: themed('color');
  366. color: #fff;
  367. }
  368. }
  369. }
  370. }
  371. }
  372. }
  373. </style>