details.vue 13 KB

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