details.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. <template>
  2. <view class="container qualifications" :style="{ paddingBottom: isIphoneX ? '68rpx' : '0' }">
  3. <view class="remarks-content-club" @click="handleClickClunInfo">
  4. <view class="content-club-le">
  5. <view class="club-le-text">
  6. <text class="label">机构名称:</text> <text class="text">{{ clubInfo.name }}</text>
  7. </view>
  8. <view class="club-le-text">
  9. <text class="label">联系人:</text> <text class="text">{{ clubInfo.linkMan }}</text>
  10. <text class="label phone">手机号:</text> <text class="text">{{ clubInfo.contractMobile }}</text>
  11. </view>
  12. <view class="club-le-text">
  13. <text class="label">地址:</text>
  14. <text class="text" v-if="clubInfo.provincialAddress"
  15. >{{ clubInfo.provincialAddress }}{{ clubInfo.address }}</text
  16. >
  17. </view>
  18. </view>
  19. <view class="content-club-ri"> <text class="iconfont icon-xiayibu"></text> </view>
  20. </view>
  21. <tui-skeleton
  22. v-if="skeletonShow"
  23. backgroundColor="#fafafa"
  24. borderRadius="10rpx"
  25. :isLoading="true"
  26. :loadingType="5"
  27. />
  28. <view class="remarks-content clearfix" v-else>
  29. <view class="list-view-title">
  30. <view class="list-view-h1">
  31. 沟通情况:
  32. <text> {{ remarksParams.communicationSituation === 0 ? '已沟通' : '联系不上' }} </text>
  33. <text v-if="remarksParams.communicationMethods === 1"> (电话) </text>
  34. <text v-if="remarksParams.communicationMethods === 2"> (微信) </text>
  35. <text v-if="remarksParams.communicationMethods ==='1,2' || remarksParams.communicationMethods ==='2,1'"> (电话,微信) </text>
  36. </view>
  37. </view>
  38. <view class="list-view-title">
  39. <view class="list-view-h1"
  40. >咨询人:<text> {{ remarksParams.questionMan }} </text></view
  41. >
  42. </view>
  43. <view class="list-view-title" v-if="remarksParams.consultBack">
  44. <view class="list-view-h1">
  45. 咨询类别:<text>{{ remarksParams.consultBack ? remarksParams.consultBack : '无' }}</text>
  46. </view>
  47. </view>
  48. <view class="list-view-title" v-if="remarksParams.customerSource">
  49. <view class="list-view-h1">
  50. 客户来源:
  51. <text>{{ remarksParams.customerSource | sourceActionsFilters }}</text>
  52. </view>
  53. </view>
  54. <view class="list-view-title" v-if="remarksParams.customerGender">
  55. <view class="list-view-h1">
  56. 客户性别:
  57. <text>{{ remarksParams.customerGender | genderActionsFilters }}</text>
  58. </view>
  59. </view>
  60. <view class="list-view-title" v-if="remarksParams.customerAge">
  61. <view class="list-view-h1">
  62. 客户年龄:
  63. <text>{{ remarksParams.customerAge }}</text>
  64. </view>
  65. </view>
  66. <view class="list-view-title" v-if="remarksParams.groupAddition">
  67. <view class="list-view-h1">
  68. 加群情况:
  69. <text>{{ remarksParams.groupAddition | additiveActionsFilters }}</text>
  70. </view>
  71. </view>
  72. <view class="list-view-title" v-if="remarksParams.productName"> <view class="list-view-h1">咨询商品:</view> </view>
  73. <view class="tui-remarks-content" v-if="remarksParams.productName">
  74. <view class="tui-remarks-goods">
  75. <view class="goods-image"> <image :src="remarksParams.mainImage" mode=""></image> </view>
  76. <view class="goods-main">
  77. <view class="name"> {{ remarksParams.productName }} </view>
  78. <view class="shop"> 供应商:{{ remarksParams.shopName }} </view>
  79. </view>
  80. </view>
  81. </view>
  82. <template v-if="labelsList.length>0">
  83. <view class="list-view-title"> <view class="list-view-h1">标签记录:</view> </view>
  84. <view class="tui-remarks-content">
  85. <text class="tui-remarks-span" v-for="(label, labelIndex) in labelsList" :key="labelIndex">
  86. {{ label.label }}
  87. </text>
  88. </view>
  89. </template>
  90. <view class="list-view-title" v-if="remarksParams.status">
  91. <view class="list-view-h1"
  92. >关联报备:<text>{{ remarksParams.reportText }}</text></view
  93. >
  94. </view>
  95. <view class="tui-remarks-content" v-if="remarksParams.status">
  96. <view class="tui-remarks-text">
  97. <view
  98. class="txt"
  99. :class="{
  100. reviewed: remarksParams.status == 1,
  101. approved: remarksParams.status == 2,
  102. failed: remarksParams.status == 3
  103. }"
  104. >{{ remarksParams.status | statusFilters }}</view
  105. >
  106. <view class="txm" v-if="remarksParams.auditText">{{ remarksParams.auditText }}</view>
  107. </view>
  108. </view>
  109. <view class="list-view-title" v-if="remarksParams.pinceSensitve">
  110. <view class="list-view-h1"
  111. >价格敏感度:<text>{{ remarksParams.pinceSensitve | pinceFilters }}</text>
  112. </view>
  113. </view>
  114. <view class="list-view-title" v-if="remarksParams.satisfied">
  115. <view class="list-view-h1"
  116. >意向程度:<text>{{ remarksParams.satisfied | intenActionsFilters }}</text></view
  117. >
  118. </view>
  119. <view class="list-view-title" v-if="remarksParams.followup">
  120. <view class="list-view-h1"
  121. >跟进状态:<text>{{ remarksParams.followup | followupFilters }}</text></view
  122. >
  123. </view>
  124. <view class="list-view-title" v-if="remarksParams.extra">
  125. <view class="list-view-h1"
  126. >额外说明:<text>{{ remarksParams.extra ? remarksParams.extra : '无' }}</text></view
  127. >
  128. </view>
  129. <view class="list-view-title" v-if="remarksParams.imageList.length > 0">
  130. <view class="list-view-h1">图片</view>
  131. </view>
  132. <view class="list-view-upload clearfix" v-if="remarksParams.imageList.length > 0">
  133. <view class="photo-item" v-for="(image, imageIndex) in remarksParams.imageList" :key="imageIndex">
  134. <image
  135. :src="image"
  136. mode="aspectFill"
  137. @click.stop="previewImg(remarksParams.imageList, imageIndex)"
  138. ></image>
  139. </view>
  140. </view>
  141. <view class="list-view-title" v-if="remarksParams.fileList.length > 0">
  142. <view class="list-view-h1">文件</view>
  143. </view>
  144. <view
  145. class="list-view"
  146. v-for="(file, fileIndex) in remarksParams.fileList"
  147. :key="fileIndex"
  148. v-if="remarksParams.fileList.length > 0"
  149. >
  150. <view class="list-view-text">
  151. <view class="input">{{ file.fileName }}</view>
  152. <view class="delbtn" @click.stop="previewFile(file)">预览</view>
  153. <!-- <view class="delbtn down" @click.stop="downloadFile(file)">下载</view> -->
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. </template>
  159. <script>
  160. import { mapState, mapMutations } from 'vuex'
  161. import authorize from '@/common/config/authorize.js'
  162. import { uploadFileImage, uploadFilePdfDocDocx } from '@/services/public.js'
  163. var isPreviewImg
  164. export default {
  165. data() {
  166. return {
  167. isIphoneX: this.$store.state.isIphoneX,
  168. productActions: [],
  169. remarksParams: {},
  170. remarksId: 0,
  171. clubUserId: 0,
  172. clubInfo: {},
  173. userInfo: {},
  174. categorys: '',
  175. skeletonShow:true,
  176. labelsList:[]
  177. }
  178. },
  179. onLoad(option) {
  180. console.log(option)
  181. this.remarksId = option.remarksId
  182. this.getUserClubRemarksDetail()
  183. },
  184. filters: {
  185. statusFilters(value) {
  186. // 订单来源
  187. const map = {
  188. 1: '报备待审核',
  189. 2: '报备审核通过',
  190. 3: '报备审核未通过'
  191. }
  192. return map[value]
  193. },
  194. followupFilters(value) {
  195. // 订单来源
  196. const map = {
  197. 1: '跟进中',
  198. 2: '跟进完成',
  199. 3: '已放弃'
  200. }
  201. return map[value]
  202. },
  203. pinceFilters(value) {
  204. // 意向
  205. const map = {
  206. 1: '敏感',
  207. 2: '适中',
  208. 3: '不敏感',
  209. 4: '不明确'
  210. }
  211. return map[value]
  212. },
  213. intenActionsFilters(value) {
  214. // 意向
  215. const map = {
  216. 1: '意向强烈',
  217. 2: '意向一般',
  218. 3: '意向平淡',
  219. 4: '随便看看'
  220. }
  221. return map[value]
  222. },
  223. sourceActionsFilters(value) {
  224. // 客户来源
  225. const map = {
  226. 0: '网站',
  227. 1: '小程序',
  228. 2: '公众号',
  229. 3: '小红书',
  230. 4: '微博',
  231. 5: '搜狐',
  232. 6: '其他'
  233. }
  234. return map[value]
  235. },
  236. genderActionsFilters(value) {
  237. // 客户性别
  238. const map = {
  239. 0: '男',
  240. 1: '女'
  241. }
  242. return map[value]
  243. },
  244. additiveActionsFilters(value) {
  245. // 加群情况
  246. const map = {
  247. 0: '已加群',
  248. 1: '未加群'
  249. }
  250. return map[value]
  251. }
  252. },
  253. methods: {
  254. ...mapMutations(['login']),
  255. async getUserClubRemarksDetail() {
  256. //备注详情
  257. try{
  258. const res = await this.UserService.getUserClubRemarksDetail({ remarksId: this.remarksId })
  259. const data = res.data
  260. this.remarksParams = data
  261. const remarks = data.remarks ? data.remarks :[]
  262. const stateKeyword = data.stateKeyword ? data.stateKeyword :[]
  263. const trendsKeyword = data.trendsKeyword ? data.trendsKeyword :[]
  264. this.labelsList = [...remarks,...stateKeyword,...trendsKeyword]
  265. this.clubUserId = res.data.userId
  266. this.getCulbInfo(res.data.userId)
  267. setTimeout(()=>{
  268. this.skeletonShow = false
  269. },500)
  270. }catch(error){
  271. this.$util.msg(error.msg, 2000)
  272. }
  273. },
  274. getCulbInfo(userId) {
  275. // 查询机构信息
  276. this.UserService.OrganizationUpdateModifyInfo({ userId: userId })
  277. .then(response => {
  278. this.clubInfo = response.data.club
  279. this.userInfo = response.data.user
  280. })
  281. .catch(error => {
  282. console.log('=============>', error.msg)
  283. })
  284. },
  285. previewImg(image, index) {
  286. //顶部商品图片预览
  287. isPreviewImg = true
  288. let previewUrls = image
  289. uni.previewImage({
  290. current: index, //图片索引
  291. urls: previewUrls, //必须是http图片,本地图片无效
  292. longPressActions: ''
  293. })
  294. },
  295. previewFile(file) {
  296. //预览文件
  297. this.openDocument(file)
  298. },
  299. openDocument(file) {
  300. // 打开文档
  301. uni.showLoading({ title: '加载中' })
  302. // 获取文件后缀
  303. const index = file.fileName.lastIndexOf('.')
  304. const suffix = file.fileName.substring(index + 1)
  305. // 下载文件
  306. uni.downloadFile({
  307. url: file.fileUrl,
  308. success(res) {
  309. const filePath = res.tempFilePath
  310. // 打开文件
  311. uni.openDocument({
  312. filePath: filePath,
  313. fileType: suffix,
  314. success(res) {
  315. uni.showToast({
  316. icon: 'success',
  317. title: '打开成功',
  318. duration: 1200
  319. })
  320. uni.hideLoading()
  321. },
  322. fail(err) {
  323. if (err.errMsg.indexOf('fail filetype not supported')) {
  324. uni.showModal({
  325. content: '不支持的文件预览',
  326. cancelColor: '#666',
  327. confirmColor: '#FF5B00'
  328. })
  329. }
  330. uni.hideLoading()
  331. }
  332. })
  333. },
  334. fail(err) {
  335. uni.showToast({
  336. title: JSON.stringify(err),
  337. icon: 'none',
  338. duration: 5000
  339. })
  340. uni.hideLoading()
  341. }
  342. })
  343. },
  344. downloadFile(file) {
  345. let self = this
  346. // 下载文件
  347. wx.downloadFile({
  348. url: file.fileUrl,
  349. success(res) {
  350. console.log('保存文件路勁============>', res.tempFilePath)
  351. wx.saveFile({
  352. tempFilePath: res.tempFilePath,
  353. success(res) {
  354. self.$util.msg('下载成功', 2000)
  355. setTimeout(() => {
  356. self.openDocument(file)
  357. }, 2000)
  358. },
  359. fail(error) {
  360. self.$util.msg('下载失败', 2000)
  361. }
  362. })
  363. }
  364. })
  365. },
  366. handleClickClunInfo() {
  367. //修改机构资料
  368. if (this.userInfo.userIdentity === 2) {
  369. this.$api.navigateTo(`/pages/seller/login/apply?userID=${this.userInfo.userId}`)
  370. } else if (this.userInfo.userIdentity === 4) {
  371. this.$api.navigateTo(`/pages/seller/login/information?userID=${this.userInfo.userId}`)
  372. }
  373. }
  374. },
  375. onShow() {}
  376. }
  377. </script>
  378. <style lang="scss">
  379. page {
  380. height: auto;
  381. background: #ffffff;
  382. }
  383. .remarks-content-club {
  384. width: 100%;
  385. height: 252rpx;
  386. padding: 24rpx;
  387. box-sizing: border-box;
  388. border-bottom: 20rpx solid #f7f7f7;
  389. .content-club-le {
  390. width: 660rpx;
  391. float: left;
  392. .club-le-text {
  393. width: 100%;
  394. height: 60rpx;
  395. line-height: 60rpx;
  396. font-size: $font-size-28;
  397. color: #333333;
  398. .label {
  399. color: #999999;
  400. &.phone {
  401. margin-left: 48rpx;
  402. }
  403. }
  404. }
  405. }
  406. .content-club-ri {
  407. width: 40rpx;
  408. height: 160rpx;
  409. float: right;
  410. line-height: 160rpx;
  411. text-align: center;
  412. color: #b2b2b2;
  413. }
  414. }
  415. .remarks-content {
  416. width: 100%;
  417. height: auto;
  418. box-sizing: border-box;
  419. padding: 0 24rpx;
  420. padding-bottom: 80rpx;
  421. .list-view-title {
  422. width: 100%;
  423. height: auto;
  424. margin-bottom: 16rpx;
  425. margin-top: 30rpx;
  426. .list-view-h1 {
  427. line-height: 40rpx;
  428. font-size: $font-size-30;
  429. color: #333333;
  430. text-align: left;
  431. font-weight: bold;
  432. text {
  433. color: #666666;
  434. font-weight: normal;
  435. }
  436. }
  437. }
  438. .tui-remarks-content {
  439. width: 100%;
  440. height: auto;
  441. margin-bottom: 24rpx;
  442. .tui-remarks-text {
  443. width: 100%;
  444. box-sizing: border-box;
  445. background-color: #f7f7f7;
  446. padding: 26rpx;
  447. border-radius: 6rpx;
  448. .txt {
  449. line-height: 36rpx;
  450. color: #0db26d;
  451. font-size: 26rpx;
  452. &.reviewed{
  453. color: #FF5B00;
  454. }
  455. &.approved{
  456. color: #0DB26D;
  457. }
  458. &.failed{
  459. color: #F94B4B;
  460. }
  461. }
  462. .txm {
  463. line-height: 36rpx;
  464. color: #666666;
  465. font-size: 26rpx;
  466. }
  467. }
  468. .tui-remarks-goods {
  469. width: 100%;
  470. height: 180rpx;
  471. box-sizing: border-box;
  472. background-color: #f7f7f7;
  473. padding: 26rpx;
  474. border-radius: 6rpx;
  475. .goods-image {
  476. width: 128rpx;
  477. height: 128rpx;
  478. float: left;
  479. image {
  480. width: 128rpx;
  481. height: 128rpx;
  482. display: block;
  483. border-radius: 4rpx;
  484. }
  485. }
  486. .goods-main {
  487. width: 522rpx;
  488. height: 128rpx;
  489. box-sizing: border-box;
  490. padding: 0 32rpx;
  491. float: right;
  492. .name {
  493. width: 100%;
  494. height: 60rpx;
  495. box-sizing: border-box;
  496. line-height: 60rpx;
  497. color: #333333;
  498. text-overflow: ellipsis;
  499. overflow: hidden;
  500. display: -webkit-box;
  501. -webkit-line-clamp: 1;
  502. line-clamp: 1;
  503. -webkit-box-orient: vertical;
  504. font-size: 26rpx;
  505. }
  506. .shop {
  507. line-height: 60rpx;
  508. color: #999999;
  509. font-size: 26rpx;
  510. }
  511. }
  512. }
  513. .tui-remarks-span {
  514. height: 48rpx;
  515. line-height: 48rpx;
  516. text-align: center;
  517. padding: 0 20rpx;
  518. background-color: #f7f7f7;
  519. font-size: $font-size-26;
  520. color: #666666;
  521. border-radius: 25rpx;
  522. display: inline-block;
  523. margin-right: 24rpx;
  524. margin-bottom: 24rpx;
  525. &:nth-child(4n) {
  526. margin-right: none;
  527. }
  528. }
  529. }
  530. .list-view {
  531. width: 100%;
  532. height: auto;
  533. margin-top: 20rpx;
  534. .list-view-text {
  535. width: 100%;
  536. float: left;
  537. .input {
  538. width: 500rpx;
  539. height: 50rpx;
  540. box-sizing: border-box;
  541. line-height: 50rpx;
  542. color: #333333;
  543. text-overflow: ellipsis;
  544. overflow: hidden;
  545. display: -webkit-box;
  546. -webkit-line-clamp: 1;
  547. line-clamp: 1;
  548. -webkit-box-orient: vertical;
  549. float: left;
  550. font-size: 26rpx;
  551. }
  552. .delbtn {
  553. width: 96rpx;
  554. height: 44rpx;
  555. font-size: $font-size-24;
  556. color: #FF5B00;
  557. line-height: 44rpx;
  558. text-align: center;
  559. float: left;
  560. &.down {
  561. color: #1890f9;
  562. }
  563. }
  564. }
  565. }
  566. .list-view-upload {
  567. width: 100%;
  568. height: auto;
  569. .photo-item {
  570. display: inline-block;
  571. width: 112rpx;
  572. height: 112rpx;
  573. margin: 10rpx 0;
  574. margin-right: 25rpx;
  575. border-radius: 10rpx;
  576. border: 1px solid #f5f5f5;
  577. position: relative;
  578. float: left;
  579. image {
  580. width: 112rpx;
  581. height: 112rpx;
  582. border-radius: 10rpx;
  583. }
  584. }
  585. .photo-list {
  586. width: 100%;
  587. height: 116rpx;
  588. overflow: hidden;
  589. white-space: nowrap;
  590. display: flex;
  591. align-items: flex-start;
  592. }
  593. }
  594. }
  595. </style>