detail.vue 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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-ph',
  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(
  182. `${this.routePrefix}/record/device?authId=${this.authId}`
  183. )
  184. },
  185. onEdit() {
  186. this.$router.push(`${this.routePrefix}/record/club/edit`)
  187. },
  188. },
  189. }
  190. </script>
  191. <style lang="scss" scoped>
  192. @media screen and (min-width: 768px) {
  193. .page {
  194. @include useTheme() {
  195. background: #fff;
  196. .page-top {
  197. height: 360px;
  198. background: fetch('pc-banner-record-club');
  199. background-size: auto 360px;
  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. border: 1px solid fetch('color');
  268. color: fetch('color');
  269. }
  270. &.search {
  271. background-color: fetch('color');
  272. color: #fff;
  273. }
  274. }
  275. }
  276. }
  277. }
  278. }
  279. }
  280. @media screen and (max-width: 768px) {
  281. .page {
  282. @include useTheme() {
  283. background: #fff;
  284. .page-top {
  285. height: 46vw;
  286. background: fetch('h5-banner-record-club');
  287. background-size: auto 46vw;
  288. .logo {
  289. display: block;
  290. width: 14.8vw;
  291. height: 14.8vw;
  292. border-radius: 50%;
  293. background: #fff;
  294. }
  295. .name {
  296. font-size: 4vw;
  297. color: #fff;
  298. }
  299. }
  300. .page-content {
  301. box-sizing: border-box;
  302. padding: 8vw 7.2vw;
  303. .page-title {
  304. font-size: 4.2vw;
  305. font-weight: bold;
  306. text-align: center;
  307. margin-bottom: 8vw;
  308. color: #282828;
  309. }
  310. .row {
  311. display: flex;
  312. justify-content: flex-start;
  313. align-items: flex-start;
  314. font-size: 3.4vw;
  315. margin-bottom: 5.6vw;
  316. flex-wrap: wrap;
  317. .status {
  318. .success {
  319. color: #f3920d !important;
  320. }
  321. .warning {
  322. color: #1890ff !important;
  323. }
  324. .danger {
  325. color: #f94b4b !important;
  326. }
  327. }
  328. .col {
  329. &:first-child {
  330. width: 17vw;
  331. color: #666;
  332. // text-align: right;
  333. &.max-width {
  334. width: 100% !important;
  335. margin-bottom: 2.6vw;
  336. }
  337. }
  338. &:last-child {
  339. color: #282828;
  340. }
  341. }
  342. .el-image {
  343. width: 25.6vw;
  344. height: 25.6vw;
  345. }
  346. }
  347. .control {
  348. margin-top: 22.8vw;
  349. .button {
  350. width: 100%;
  351. height: 12vw;
  352. cursor: pointer;
  353. &.edit {
  354. border: 1px solid fetch('color');
  355. color: fetch('color');
  356. }
  357. &.search {
  358. background-color: fetch('color');
  359. color: #fff;
  360. }
  361. }
  362. }
  363. }
  364. }
  365. }
  366. }
  367. </style>