club-info.vue 8.7 KB

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