record-details.vue 9.9 KB

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