details.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  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'"> (电话,微信) </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. getUserClubRemarksDetail() {
  256. //资料详情
  257. this.UserService.getUserClubRemarksDetail({
  258. remarksId: this.remarksId
  259. })
  260. .then(response => {
  261. this.remarksParams = response.data
  262. this.labelsList = [...this.remarksParams.remarks,...this.remarksParams.stateKeyword,...this.remarksParams.trendsKeyword]
  263. this.clubUserId = response.data.userId
  264. this.getCulbInfo()
  265. setTimeout(()=>{
  266. this.skeletonShow = false
  267. },500)
  268. })
  269. .catch(error => {
  270. this.$util.msg(error.msg, 2000)
  271. })
  272. },
  273. getCulbInfo() {
  274. // 查询机构信息
  275. this.UserService.OrganizationUpdateModifyInfo({ userId: this.clubUserId })
  276. .then(response => {
  277. this.clubInfo = response.data.club
  278. this.userInfo = response.data.user
  279. })
  280. .catch(error => {
  281. console.log('=============>', error.msg)
  282. })
  283. },
  284. previewImg(image, index) {
  285. //顶部商品图片预览
  286. isPreviewImg = true
  287. let previewUrls = image
  288. uni.previewImage({
  289. current: index, //图片索引
  290. urls: previewUrls, //必须是http图片,本地图片无效
  291. longPressActions: ''
  292. })
  293. },
  294. previewFile(file) {
  295. //预览文件
  296. this.openDocument(file)
  297. },
  298. openDocument(file) {
  299. // 打开文档
  300. uni.showLoading({ title: '加载中' })
  301. // 获取文件后缀
  302. const index = file.fileName.lastIndexOf('.')
  303. const suffix = file.fileName.substring(index + 1)
  304. // 下载文件
  305. uni.downloadFile({
  306. url: file.fileUrl,
  307. success(res) {
  308. const filePath = res.tempFilePath
  309. // 打开文件
  310. uni.openDocument({
  311. filePath: filePath,
  312. fileType: suffix,
  313. success(res) {
  314. uni.showToast({
  315. icon: 'success',
  316. title: '打开成功',
  317. duration: 1200
  318. })
  319. uni.hideLoading()
  320. },
  321. fail(err) {
  322. if (err.errMsg.indexOf('fail filetype not supported')) {
  323. uni.showModal({
  324. content: '不支持的文件预览',
  325. cancelColor: '#666',
  326. confirmColor: '#FF5B00'
  327. })
  328. }
  329. uni.hideLoading()
  330. }
  331. })
  332. },
  333. fail(err) {
  334. uni.showToast({
  335. title: JSON.stringify(err),
  336. icon: 'none',
  337. duration: 5000
  338. })
  339. uni.hideLoading()
  340. }
  341. })
  342. },
  343. downloadFile(file) {
  344. let self = this
  345. // 下载文件
  346. wx.downloadFile({
  347. url: file.fileUrl,
  348. success(res) {
  349. console.log('保存文件路勁============>', res.tempFilePath)
  350. wx.saveFile({
  351. tempFilePath: res.tempFilePath,
  352. success(res) {
  353. self.$util.msg('下载成功', 2000)
  354. setTimeout(() => {
  355. self.openDocument(file)
  356. }, 2000)
  357. },
  358. fail(error) {
  359. self.$util.msg('下载失败', 2000)
  360. }
  361. })
  362. }
  363. })
  364. },
  365. handleClickClunInfo() {
  366. //修改机构资料
  367. if (this.userInfo.userIdentity === 2) {
  368. this.$api.navigateTo(`/pages/seller/login/apply?userID=${this.userInfo.userId}`)
  369. } else if (this.userInfo.userIdentity === 4) {
  370. this.$api.navigateTo(`/pages/seller/login/information?userID=${this.userInfo.userId}`)
  371. }
  372. }
  373. },
  374. onShow() {}
  375. }
  376. </script>
  377. <style lang="scss">
  378. page {
  379. height: auto;
  380. background: #ffffff;
  381. }
  382. .remarks-content-club {
  383. width: 100%;
  384. height: 252rpx;
  385. padding: 24rpx;
  386. box-sizing: border-box;
  387. border-bottom: 20rpx solid #f7f7f7;
  388. .content-club-le {
  389. width: 660rpx;
  390. float: left;
  391. .club-le-text {
  392. width: 100%;
  393. height: 60rpx;
  394. line-height: 60rpx;
  395. font-size: $font-size-28;
  396. color: #333333;
  397. .label {
  398. color: #999999;
  399. &.phone {
  400. margin-left: 48rpx;
  401. }
  402. }
  403. }
  404. }
  405. .content-club-ri {
  406. width: 40rpx;
  407. height: 160rpx;
  408. float: right;
  409. line-height: 160rpx;
  410. text-align: center;
  411. color: #b2b2b2;
  412. }
  413. }
  414. .remarks-content {
  415. width: 100%;
  416. height: auto;
  417. box-sizing: border-box;
  418. padding: 0 24rpx;
  419. padding-bottom: 80rpx;
  420. .list-view-title {
  421. width: 100%;
  422. height: auto;
  423. margin-bottom: 16rpx;
  424. margin-top: 30rpx;
  425. .list-view-h1 {
  426. line-height: 40rpx;
  427. font-size: $font-size-30;
  428. color: #333333;
  429. text-align: left;
  430. font-weight: bold;
  431. text {
  432. color: #666666;
  433. font-weight: normal;
  434. }
  435. }
  436. }
  437. .tui-remarks-content {
  438. width: 100%;
  439. height: auto;
  440. margin-bottom: 24rpx;
  441. .tui-remarks-text {
  442. width: 100%;
  443. box-sizing: border-box;
  444. background-color: #f7f7f7;
  445. padding: 26rpx;
  446. border-radius: 6rpx;
  447. .txt {
  448. line-height: 36rpx;
  449. color: #0db26d;
  450. font-size: 26rpx;
  451. &.reviewed{
  452. color: #FF5B00;
  453. }
  454. &.approved{
  455. color: #0DB26D;
  456. }
  457. &.failed{
  458. color: #F94B4B;
  459. }
  460. }
  461. .txm {
  462. line-height: 36rpx;
  463. color: #666666;
  464. font-size: 26rpx;
  465. }
  466. }
  467. .tui-remarks-goods {
  468. width: 100%;
  469. height: 180rpx;
  470. box-sizing: border-box;
  471. background-color: #f7f7f7;
  472. padding: 26rpx;
  473. border-radius: 6rpx;
  474. .goods-image {
  475. width: 128rpx;
  476. height: 128rpx;
  477. float: left;
  478. image {
  479. width: 128rpx;
  480. height: 128rpx;
  481. display: block;
  482. border-radius: 4rpx;
  483. }
  484. }
  485. .goods-main {
  486. width: 522rpx;
  487. height: 128rpx;
  488. box-sizing: border-box;
  489. padding: 0 32rpx;
  490. float: right;
  491. .name {
  492. width: 100%;
  493. height: 60rpx;
  494. box-sizing: border-box;
  495. line-height: 60rpx;
  496. color: #333333;
  497. text-overflow: ellipsis;
  498. overflow: hidden;
  499. display: -webkit-box;
  500. -webkit-line-clamp: 1;
  501. line-clamp: 1;
  502. -webkit-box-orient: vertical;
  503. font-size: 26rpx;
  504. }
  505. .shop {
  506. line-height: 60rpx;
  507. color: #999999;
  508. font-size: 26rpx;
  509. }
  510. }
  511. }
  512. .tui-remarks-span {
  513. height: 48rpx;
  514. line-height: 48rpx;
  515. text-align: center;
  516. padding: 0 20rpx;
  517. background-color: #f7f7f7;
  518. font-size: $font-size-26;
  519. color: #666666;
  520. border-radius: 25rpx;
  521. display: inline-block;
  522. margin-right: 24rpx;
  523. margin-bottom: 24rpx;
  524. &:nth-child(4n) {
  525. margin-right: none;
  526. }
  527. }
  528. }
  529. .list-view {
  530. width: 100%;
  531. height: auto;
  532. margin-top: 20rpx;
  533. .list-view-text {
  534. width: 100%;
  535. float: left;
  536. .input {
  537. width: 500rpx;
  538. height: 50rpx;
  539. box-sizing: border-box;
  540. line-height: 50rpx;
  541. color: #333333;
  542. text-overflow: ellipsis;
  543. overflow: hidden;
  544. display: -webkit-box;
  545. -webkit-line-clamp: 1;
  546. line-clamp: 1;
  547. -webkit-box-orient: vertical;
  548. float: left;
  549. font-size: 26rpx;
  550. }
  551. .delbtn {
  552. width: 96rpx;
  553. height: 44rpx;
  554. font-size: $font-size-24;
  555. color: #FF5B00;
  556. line-height: 44rpx;
  557. text-align: center;
  558. float: left;
  559. &.down {
  560. color: #1890f9;
  561. }
  562. }
  563. }
  564. }
  565. .list-view-upload {
  566. width: 100%;
  567. height: auto;
  568. .photo-item {
  569. display: inline-block;
  570. width: 112rpx;
  571. height: 112rpx;
  572. margin: 10rpx 0;
  573. margin-right: 25rpx;
  574. border-radius: 10rpx;
  575. border: 1px solid #f5f5f5;
  576. position: relative;
  577. float: left;
  578. image {
  579. width: 112rpx;
  580. height: 112rpx;
  581. border-radius: 10rpx;
  582. }
  583. }
  584. .photo-list {
  585. width: 100%;
  586. height: 116rpx;
  587. overflow: hidden;
  588. white-space: nowrap;
  589. display: flex;
  590. align-items: flex-start;
  591. }
  592. }
  593. }
  594. </style>