club-info.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. <template>
  2. <view class="container club-info">
  3. <tui-skeleton
  4. v-if="skeletonShow"
  5. backgroundColor="#fafafa"
  6. borderRadius="10rpx"
  7. :isLoading="true"
  8. :loadingType="5"
  9. ></tui-skeleton>
  10. <template v-else>
  11. <view class="info-header clearfix" v-if="clubInfo.describe">
  12. <view class="pp"
  13. >描述:<text>{{ clubInfo.describe }}</text></view
  14. >
  15. </view>
  16. <view class="info-content clearfix">
  17. <view class="info-title">
  18. <view class="info-title-left">
  19. <view
  20. >机构资料:<text>{{ clubInfo.userIdentity === 2 ? '资质机构' : '个人机构' }}</text></view
  21. >
  22. </view>
  23. <view class="info-title-right">
  24. <view v-if="clubInfo.spType === 0">待分配销售</view>
  25. <view v-else>已分配销售:{{ saleName }}</view>
  26. </view>
  27. </view>
  28. <view class="info-main">
  29. <view class="info-h1">注册信息</view>
  30. <view class="info-p"
  31. >联系人:<text>{{ clubInfo.linkMan }}</text></view
  32. >
  33. <view class="info-p"
  34. >手机号:<text>{{ clubInfo.contractMobile }}</text></view
  35. >
  36. </view>
  37. <view class="info-main" v-if="clubInfo.userIdentity === 2 || (clubInfo.userIdentity === 4 && (clubInfo.status == 1 || clubInfo.status == 92))">
  38. <view class="info-h1"
  39. >升级信息
  40. <text
  41. class="info-h1-tag"
  42. :class="{
  43. orange: clubInfo.status == 1,
  44. grey: clubInfo.status == 90,
  45. warn: clubInfo.status == 92
  46. }"
  47. >
  48. {{ clubInfo.status | statusFilters }}
  49. </text>
  50. </view>
  51. <view class="info-p"
  52. >机构名称:<text>{{ clubInfo.name }}</text></view
  53. >
  54. <view class="info-p"
  55. >机构简称:<text>{{ clubInfo.shortName }}</text></view
  56. >
  57. <view class="info-p"
  58. >邮箱:<text>{{ clubInfo.contractEmail }}</text></view
  59. >
  60. <view class="info-p"
  61. >联系地址:<text>{{ clubInfo.provincialAddress }}{{ clubInfo.address }}</text></view
  62. >
  63. <view class="info-p"
  64. >营业执照编号:<text>{{ clubInfo.socialCreditCode }}</text></view
  65. >
  66. <view class="info-p">营业执照:</view>
  67. <view class="info-img"><image :src="clubInfo.businessLicense" alt=""/></view>
  68. <view class="info-p" v-if="clubInfo.shopPhoto">门头照:</view>
  69. <view class="info-img" v-if="clubInfo.shopPhoto"><image :src="clubInfo.shopPhoto" alt=""/></view>
  70. <view class="info-p"
  71. >机构类型:<text>{{ clubInfo.firstClubType | FirstFormat }}</text></view
  72. >
  73. <view class="info-p" v-if="clubInfo.medicalPracticeLicense">医疗许可证:</view>
  74. <view class="info-img" v-if="clubInfo.medicalPracticeLicense"><image :src="clubInfo.medicalPracticeLicense" alt=""/></view>
  75. <view class="info-p" v-if="clubInfo.secondClubType"
  76. >科室:<text>{{ clubInfo.secondClubType | TwoFormat }}</text></view
  77. >
  78. <view class="info-p"
  79. >主营内容:<text>{{ clubInfo.mainProduct }}</text></view
  80. >
  81. </view>
  82. <view class="info-main" v-if="clubInfo.contractPhone || clubInfo.fax || clubInfo.profile">
  83. <view class="info-h1">其他信息</view>
  84. <view class="info-p" v-if="clubInfo.contractPhone"
  85. >固定电话:<text>{{ clubInfo.contractPhone ? clubInfo.contractPhone : '无' }}</text></view
  86. >
  87. <view class="info-p" v-if="clubInfo.fax"
  88. >传真:<text>{{ clubInfo.fax ? clubInfo.fax : '无' }}</text></view
  89. >
  90. <view class="info-p" v-if="clubInfo.profile"
  91. >公司介绍:<text>{{ clubInfo.profile ? clubInfo.profile : '无' }}</text></view
  92. >
  93. </view>
  94. </view>
  95. </template>
  96. <!-- 按钮 -->
  97. <template v-if="clubInfo.spType === 0 && isManage">
  98. <tui-bottom-popup :radius="false" :mask="false" :show="true">
  99. <view class="tui-popup-box clearfix">
  100. <view
  101. class="tui-right-flex tui-popup-btn"
  102. :style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }"
  103. >
  104. <view class="tui-flex-1">
  105. <view class="tui-button" @click="handleShowSellerpopup">分配销售</view>
  106. </view>
  107. </view>
  108. </view>
  109. </tui-bottom-popup>
  110. </template>
  111. <!-- 选择弹窗 -->
  112. <cm-seller-popup
  113. ref="cmresellerpopup"
  114. v-if="isSellerpopup"
  115. :show="isSellerpopup"
  116. @handleChoiceaSeller="handleChoiceaSellerData"
  117. >
  118. </cm-seller-popup>
  119. </view>
  120. </template>
  121. <script>
  122. import { mapState, mapMutations } from 'vuex'
  123. import authorize from '@/common/config/authorize.js'
  124. import wxLogin from '@/common/config/wxLogin.js'
  125. import cmSellerPopup from '../components/cm-seller-popup'
  126. export default {
  127. components: {
  128. cmSellerPopup
  129. },
  130. data() {
  131. return {
  132. skeletonShow: true,
  133. saleName: '',
  134. clubInfo: {},
  135. isSellerpopup: false,
  136. isIphoneX: this.$store.state.isIphoneX,
  137. salesParams: {
  138. clubId: 0,
  139. spId: 0
  140. }
  141. }
  142. },
  143. onLoad(option) {
  144. wxLogin.wxLoginAuthorize()
  145. this.salesParams.clubId = option.clubId
  146. this.userClubRecordLinkage({ clubId: this.salesParams.clubId })
  147. },
  148. filters: {
  149. FirstFormat: function(type) {
  150. //处理金额
  151. let name = ''
  152. switch (type) {
  153. case 1:
  154. name = '医美'
  155. break
  156. case 2:
  157. name = '生美'
  158. break
  159. case 3:
  160. name = '项目公司'
  161. break
  162. case 4:
  163. name = '个人'
  164. break
  165. case 5:
  166. name = '其他'
  167. break
  168. }
  169. return name
  170. },
  171. TwoFormat: function(type) {
  172. //处理金额
  173. let text = ''
  174. switch (type) {
  175. case 1:
  176. text = '诊所'
  177. break
  178. case 2:
  179. text = '门诊'
  180. break
  181. case 3:
  182. text = '医院'
  183. break
  184. }
  185. return text
  186. },
  187. statusFilters(value) {
  188. // 状态
  189. const map = {
  190. 1: '待审核',
  191. 90: '审核通过',
  192. 92: '审核未通过'
  193. }
  194. return map[value]
  195. }
  196. },
  197. computed: {
  198. ...mapState(['isManage'])
  199. },
  200. methods: {
  201. async userClubRecordLinkage(param) {
  202. //查询机构信息
  203. this.SellerService.userClubRecordLinkage(param)
  204. .then(response => {
  205. this.clubInfo = response.data.club
  206. this.saleName = response.data.saleName
  207. setTimeout(() => {
  208. this.skeletonShow = false
  209. }, 1000)
  210. })
  211. .catch(error => {
  212. this.isInvalid = true
  213. })
  214. },
  215. userClubChoseSales(param) {
  216. //分配或更换协销
  217. this.SellerService.userClubChoseSales(param)
  218. .then(response => {
  219. this.$util.msg('分配成功', 2000, true, 'success')
  220. setTimeout(() => {
  221. this.userClubRecordLinkage({ clubId: this.salesParams.clubId })
  222. }, 1000)
  223. })
  224. .catch(error => {
  225. console.log('分配协销异常')
  226. })
  227. },
  228. handleChoiceaSellerData(data) {
  229. // 确定搜索
  230. this.salesParams.spId = data.serviceProviderId
  231. this.userClubChoseSales(this.salesParams)
  232. },
  233. handleShowSellerpopup() {
  234. //显示选择协销弹窗
  235. this.isSellerpopup = true
  236. }
  237. },
  238. onShow() {}
  239. }
  240. </script>
  241. <style lang="scss">
  242. page {
  243. height: auto;
  244. }
  245. .club-info {
  246. width: 100%;
  247. .info-header {
  248. width: 100%;
  249. height: auto;
  250. padding: 24rpx;
  251. float: left;
  252. box-sizing: border-box;
  253. background-color: #ffffff;
  254. .pp {
  255. width: 100%;
  256. font-size: 26rpx;
  257. line-height: 44rpx;
  258. font-weight: bold;
  259. color: #333333;
  260. text {
  261. font-size: 26rpx;
  262. color: #666666;
  263. font-weight: normal;
  264. line-height: 66rpx;
  265. }
  266. }
  267. }
  268. .info-content {
  269. width: 100%;
  270. height: auto;
  271. float: left;
  272. box-sizing: border-box;
  273. padding: 0 24rpx;
  274. background-color: #ffffff;
  275. padding-bottom: 240rpx;
  276. .info-title {
  277. width: 100%;
  278. height: 68rpx;
  279. border-bottom: 1px solid #f0f0f0;
  280. .info-title-left {
  281. width: 50%;
  282. height: 68rpx;
  283. font-size: 30rpx;
  284. font-weight: bold;
  285. color: #333333;
  286. float: left;
  287. line-height: 68rpx;
  288. text {
  289. display: inline-block;
  290. padding: 0 16rpx;
  291. line-height: 40rpx;
  292. background-color: #fff2d5;
  293. font-size: 24rpx;
  294. border-radius: 20rpx;
  295. color: #e4aa43;
  296. text-align: center;
  297. margin-left: 16rpx;
  298. font-weight: normal;
  299. }
  300. }
  301. .info-title-right {
  302. width: 50%;
  303. height: 68rpx;
  304. float: right;
  305. line-height: 68rpx;
  306. font-size: 24rpx;
  307. color: #999999;
  308. text-align: right;
  309. text-overflow: ellipsis;
  310. overflow: hidden;
  311. display: -webkit-box;
  312. -webkit-line-clamp: 1;
  313. line-clamp: 1;
  314. -webkit-box-orient: vertical;
  315. }
  316. }
  317. .info-main {
  318. width: 100%;
  319. height: auto;
  320. .info-h1 {
  321. width: 100%;
  322. box-sizing: border-box;
  323. padding: 0 24rpx;
  324. position: relative;
  325. line-height: 80rpx;
  326. font-size: 30rpx;
  327. color: #333333;
  328. &:before {
  329. content: '';
  330. width: 6rpx;
  331. height: 24rpx;
  332. background-color: #e15616;
  333. position: absolute;
  334. left: 0;
  335. top: 30rpx;
  336. }
  337. .info-h1-tag {
  338. display: inline-block;
  339. padding: 0 16rpx;
  340. line-height: 40rpx;
  341. background-color: #fff2d5;
  342. font-size: 24rpx;
  343. border-radius: 20rpx;
  344. color: #ffffff;
  345. text-align: center;
  346. margin-left: 16rpx;
  347. &.orange{
  348. background-color: #FFF2D5;
  349. color: #E4AA43;
  350. }
  351. &.grey{
  352. background-color: #0DB26D;
  353. }
  354. &.warn{
  355. background-color: #F94B4B;
  356. }
  357. }
  358. }
  359. .info-p {
  360. width: 100%;
  361. box-sizing: border-box;
  362. padding: 0 24rpx;
  363. position: relative;
  364. line-height: 66rpx;
  365. font-size: 30rpx;
  366. color: #999999;
  367. text {
  368. color: #333333;
  369. }
  370. }
  371. .info-img {
  372. width: 200rpx;
  373. height: 200rpx;
  374. image {
  375. width: 200rpx;
  376. height: 200rpx;
  377. display: block;
  378. margin-left: 24rpx;
  379. border: 1px dashed #e2e2e2;
  380. }
  381. }
  382. }
  383. }
  384. }
  385. .tui-popup-box {
  386. position: relative;
  387. box-sizing: border-box;
  388. min-height: 100rpx;
  389. padding: 6rpx 24rpx;
  390. .tui-popup-content {
  391. padding-top: 30rpx;
  392. }
  393. }
  394. .tui-popup-btn {
  395. width: 100%;
  396. height: auto;
  397. float: left;
  398. box-sizing: border-box;
  399. margin-top: 30rpx;
  400. .tui-flex-1 {
  401. width: 100%;
  402. height: 84rpx;
  403. display: flex;
  404. .tui-button {
  405. flex: 1;
  406. line-height: 84rpx;
  407. font-size: $font-size-28;
  408. text-align: center;
  409. border-radius: 42rpx;
  410. padding: 0;
  411. margin: 0 15rpx;
  412. box-sizing: border-box;
  413. background: $btn-confirm;
  414. color: #ffffff;
  415. }
  416. }
  417. }
  418. </style>