club-info.vue 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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 && isManage">
  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. computed: {
  175. ...mapState(['isManage'])
  176. },
  177. methods: {
  178. async userClubRecordLinkage(param) {
  179. //查询机构信息
  180. console.log('=========<查询机构信息>===========')
  181. this.SellerService.userClubRecordLinkage(param)
  182. .then(response => {
  183. this.clubInfo = response.data.club
  184. this.saleName = response.data.saleName
  185. setTimeout(() => {
  186. this.skeletonShow = false
  187. }, 1000)
  188. })
  189. .catch(error => {
  190. this.isInvalid = true
  191. })
  192. },
  193. userClubChoseSales(param) {
  194. //分配或更换协销
  195. this.SellerService.userClubChoseSales(param)
  196. .then(response => {
  197. this.$util.msg('分配成功', 2000, true, 'success')
  198. setTimeout(() => {
  199. this.userClubRecordLinkage({ clubId: this.salesParams.clubId })
  200. }, 1000)
  201. })
  202. .catch(error => {
  203. console.log('分配协销异常')
  204. })
  205. },
  206. handleChoiceaSellerData(data) {
  207. // 确定搜索
  208. this.salesParams.spId = data.serviceProviderId
  209. this.userClubChoseSales(this.salesParams)
  210. },
  211. handleShowSellerpopup() {
  212. //显示选择协销弹窗
  213. this.isSellerpopup = true
  214. }
  215. },
  216. onShow() {
  217. }
  218. }
  219. </script>
  220. <style lang="scss">
  221. page {
  222. height: auto;
  223. }
  224. .club-info {
  225. width: 100%;
  226. .info-header {
  227. width: 100%;
  228. height: auto;
  229. padding: 24rpx;
  230. float: left;
  231. box-sizing: border-box;
  232. background-color: #ffffff;
  233. .pp {
  234. width: 100%;
  235. font-size: 26rpx;
  236. line-height: 44rpx;
  237. font-weight: bold;
  238. color: #333333;
  239. text {
  240. font-size: 26rpx;
  241. color: #666666;
  242. font-weight: normal;
  243. line-height: 66rpx;
  244. }
  245. }
  246. }
  247. .info-content {
  248. width: 100%;
  249. height: auto;
  250. float: left;
  251. box-sizing: border-box;
  252. padding: 0 24rpx;
  253. background-color: #ffffff;
  254. padding-bottom: 240rpx;
  255. .info-title {
  256. width: 100%;
  257. height: 68rpx;
  258. border-bottom: 1px solid #f0f0f0;
  259. .info-title-left {
  260. width: 50%;
  261. height: 68rpx;
  262. font-size: 30rpx;
  263. font-weight: bold;
  264. color: #333333;
  265. float: left;
  266. line-height: 68rpx;
  267. text {
  268. display: inline-block;
  269. padding: 0 16rpx;
  270. line-height: 40rpx;
  271. background-color: #fff2d5;
  272. font-size: 24rpx;
  273. border-radius: 20rpx;
  274. color: #e4aa43;
  275. text-align: center;
  276. margin-left: 16rpx;
  277. font-weight: normal;
  278. }
  279. }
  280. .info-title-right {
  281. width: 50%;
  282. height: 68rpx;
  283. float: right;
  284. line-height: 68rpx;
  285. font-size: 24rpx;
  286. color: #999999;
  287. text-align: right;
  288. text-overflow: ellipsis;
  289. overflow: hidden;
  290. display: -webkit-box;
  291. -webkit-line-clamp: 1;
  292. line-clamp: 1;
  293. -webkit-box-orient: vertical;
  294. }
  295. }
  296. .info-main {
  297. width: 100%;
  298. height: auto;
  299. .info-h1 {
  300. width: 100%;
  301. box-sizing: border-box;
  302. padding: 0 24rpx;
  303. position: relative;
  304. line-height: 80rpx;
  305. font-size: 30rpx;
  306. color: #333333;
  307. &:before {
  308. content: '';
  309. width: 6rpx;
  310. height: 24rpx;
  311. background-color: #e15616;
  312. position: absolute;
  313. left: 0;
  314. top: 30rpx;
  315. }
  316. }
  317. .info-p {
  318. width: 100%;
  319. box-sizing: border-box;
  320. padding: 0 24rpx;
  321. position: relative;
  322. line-height: 66rpx;
  323. font-size: 30rpx;
  324. color: #999999;
  325. text {
  326. color: #333333;
  327. }
  328. }
  329. .info-img {
  330. width: 200rpx;
  331. height: 200rpx;
  332. image {
  333. width: 200rpx;
  334. height: 200rpx;
  335. display: block;
  336. margin-left: 24rpx;
  337. border: 1px dashed #e2e2e2;
  338. }
  339. }
  340. }
  341. }
  342. }
  343. .tui-popup-box {
  344. position: relative;
  345. box-sizing: border-box;
  346. min-height: 100rpx;
  347. padding: 6rpx 24rpx;
  348. .tui-popup-content {
  349. padding-top: 30rpx;
  350. }
  351. }
  352. .tui-popup-btn {
  353. width: 100%;
  354. height: auto;
  355. float: left;
  356. box-sizing: border-box;
  357. margin-top: 30rpx;
  358. .tui-flex-1 {
  359. width: 100%;
  360. height: 84rpx;
  361. display: flex;
  362. .tui-button {
  363. flex: 1;
  364. line-height: 84rpx;
  365. font-size: $font-size-28;
  366. text-align: center;
  367. border-radius: 42rpx;
  368. padding: 0;
  369. margin: 0 15rpx;
  370. box-sizing: border-box;
  371. background: $btn-confirm;
  372. color: #ffffff;
  373. }
  374. }
  375. }
  376. </style>