club-info.vue 11 KB

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