report-list.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  1. <template>
  2. <view class="container product clearfix">
  3. <view class="club-search clearfix">
  4. <view class="club-search-form">
  5. <view class="search-from name">
  6. <text class="iconfont icon-iconfonticonfontsousuo1"></text>
  7. <input
  8. class="input"
  9. type="text"
  10. confirm-type="search"
  11. v-model="listQuery.keyWord"
  12. @input="onShowClose"
  13. @confirm="userClubReportReportRemarks"
  14. placeholder="搜索商品名称 / 报备关键词"
  15. maxlength="16"
  16. />
  17. <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText()"></text>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="remarks-content" :style="{ paddingBottom: isIphoneX ? '220rpx' : '148rpx' }">
  22. <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
  23. <!-- 空白页 -->
  24. <view class="empty-container" v-if="isEmpty">
  25. <image class="empty-container-image" :src="StaticUrl + '/icon/icon-remarks-empty@2x.png'"></image>
  26. <text class="error-text">暂无任何记录~</text>
  27. </view>
  28. <template v-else>
  29. <!-- 列表 -->
  30. <view
  31. class="tui-remarks-cell tui-mtop clearfix"
  32. v-for="(report, index) in reportList"
  33. :key="index"
  34. @click.stop="details(report.reportId)"
  35. >
  36. <view class="tui-remarks-title">
  37. <view class="tui-remarks-title-top">
  38. <view class="tui-remarks-time tt"><text class="tags">新分配</text>{{ report.clubName }}</view>
  39. </view>
  40. <view class="tui-remarks-title-bot">
  41. <view class="tui-remarks-text-view">
  42. <view class="tui-remarks-text h"></text>报备人:{{ report.recordName }}</view>
  43. <view class="tui-remarks-text y">
  44. {{ report.addDate }}
  45. </view>
  46. </view>
  47. </view>
  48. <view class="tui-remarks-title-icon" :class="{
  49. reviewed: report.type == 1,
  50. failed: report.type == 2,
  51. approved: report.type == 3
  52. }">
  53. </view>
  54. </view>
  55. <view class="tui-remarks-content">
  56. <view class="tui-remarks-goods" v-if="report.product">
  57. <view class="goods-image">
  58. <image
  59. :src="report.product.images"
  60. mode=""
  61. ></image>
  62. </view>
  63. <view class="goods-main">
  64. <view class="name">
  65. {{ report.product.name }}
  66. </view>
  67. <view class="shop">{{ report.reportText }}</view>
  68. </view>
  69. </view>
  70. <view class="tui-remarks-text" v-else>
  71. {{ report.reportText }}
  72. </view>
  73. </view>
  74. <view class="tui-remarks-button">
  75. <view class="btn edit" @click.stop="handReportDetails(report.reportId)">查看关联咨询记录</view>
  76. <view class="btn del" @click.stop="deleteRemark(report.reportId)">删除</view>
  77. </view>
  78. </view>
  79. <!--加载loadding-->
  80. <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
  81. <tui-nomore :visible="!pullUpOn" :backgroundColor="'#F7F7F7'" :text="nomoreText"></tui-nomore>
  82. <!--加载loadding-->
  83. </template>
  84. </view>
  85. </view>
  86. <!-- 弹窗提示 -->
  87. <tui-modal
  88. :show="modal"
  89. @click="handleClick"
  90. @cancel="hideMobel"
  91. :content="contentModalText"
  92. :button="modalButton"
  93. color="#333"
  94. :size="32"
  95. shape="circle"
  96. :maskClosable="false"
  97. >
  98. </tui-modal>
  99. </view>
  100. </template>
  101. <script>
  102. import { mapState, mapMutations } from 'vuex'
  103. import cmRefereepopup from '@/components/cm-module/cm-seller/cm-refereepopup'
  104. import cmClubmodal from '@/components/cm-module/cm-seller/cm-clubmodal'
  105. import cmScreenDrawer from '@/components/cm-module/cm-seller/cm-screen-drawer'
  106. const defaultListQuery = {
  107. keyWord:'',
  108. manager:0,
  109. serviceProviderId: 0,
  110. pageNum: 1,
  111. pageSize: 10
  112. }
  113. export default {
  114. components: {
  115. cmRefereepopup,
  116. cmClubmodal,
  117. cmScreenDrawer
  118. },
  119. data() {
  120. return {
  121. StaticUrl: this.$Static,
  122. isIphoneX: this.$store.state.isIphoneX,
  123. modalButton: [
  124. {
  125. text: '取消',
  126. type: 'gray',
  127. plain: true //是否空心
  128. },
  129. {
  130. text: '确认',
  131. customStyle: {
  132. color: '#fff',
  133. bgColor: 'linear-gradient(90deg, #F28F31 0%, #E15616 100%)'
  134. },
  135. plain: false
  136. }
  137. ],
  138. totalRecord: 0,
  139. popupShow: true,
  140. popupShow1: false,
  141. listQuery: Object.assign({}, defaultListQuery),
  142. reportList: [
  143. {
  144. clubName:'采美信息技术有限公司',
  145. recordName:'吴小研',
  146. addDate:'2022-08-10',
  147. reportText:'请填写报备说明请填写报备说明请填写报备说明请填写报备说明请填写报备说明请填写报备说明',
  148. product:{
  149. images:'https://img.caimei365.com/group1/M00/03/FC/rB-lGGInLUKAJAR0AAOvlb8lQKk394.jpg',
  150. name:'易可美贻贝粘蛋白私密修复精华水易可美贻贝粘蛋白私密修复精华水易可美贻贝粘蛋白私密修复精华水'
  151. },
  152. type:1
  153. },
  154. {
  155. clubName:'采美信息技术有限公司',
  156. recordName:'吴小研',
  157. addDate:'2022-08-10',
  158. reportText:'请填写报备说明请填写报备说明请填写报备说明请填写报备说明请填写报备说明请填写报备说明',
  159. product:{
  160. images:'https://img.caimei365.com/group1/M00/03/FC/rB-lGGInLUKAJAR0AAOvlb8lQKk394.jpg',
  161. name:'易可美贻贝粘蛋白私密修复精华水易可美贻贝粘蛋白私密修复精华水易可美贻贝粘蛋白私密修复精华水'
  162. },
  163. type:2
  164. },
  165. {
  166. clubName:'采美信息技术有限公司',
  167. recordName:'吴小研',
  168. addDate:'2022-08-10',
  169. reportText:'请填写报备说明请填写报备说明请填写报备说明请填写报备说明请填写报备说明请填写报备说明',
  170. product:null,
  171. type:3
  172. }
  173. ],
  174. scrollTop: 0,
  175. isEmpty: false,
  176. loadding: false,
  177. pullUpOn: true,
  178. pullFlag: true,
  179. hasNextPage: false,
  180. navbarHeight: '',
  181. nomoreText: '上拉显示更多',
  182. contentModalText: '', //操作文字提示语句
  183. modal: false,
  184. questionMan: '',
  185. questionManId: '',
  186. handleRemarksId: 0,
  187. }
  188. },
  189. onLoad(option) {
  190. },
  191. computed: {
  192. ...mapState(['hasLogin', 'userInfo'])
  193. },
  194. methods: {
  195. ...mapMutations(['login', 'logout']),
  196. async init() {
  197. const userInfo = await this.$api.getStorage()
  198. this.listQuery.serviceProviderId = userInfo.serviceProviderId ? userInfo.serviceProviderId : 0
  199. this.userClubReportReportRemarks()
  200. },
  201. userClubReportReportRemarks() {
  202. this.reportList = []
  203. this.listQuery.pageNum = 1
  204. this.UserService.userClubReportReportRemarks(this.listQuery)
  205. .then(response => {
  206. let data = response.data
  207. if (data.results && data.results.length > 0) {
  208. this.isEmpty = false
  209. this.hasNextPage = data.hasNextPage
  210. this.totalRecord = data.totalRecord
  211. this.reportList = data.results
  212. this.pullFlag = false
  213. setTimeout(() => {
  214. this.pullFlag = true
  215. }, 500)
  216. if (this.hasNextPage) {
  217. this.pullUpOn = false
  218. this.nomoreText = '上拉显示更多'
  219. } else {
  220. if (this.reportList.length < 8) {
  221. this.pullUpOn = true
  222. } else {
  223. this.pullUpOn = false
  224. this.loadding = false
  225. this.nomoreText = '已至底部'
  226. }
  227. }
  228. } else {
  229. this.isEmpty = true
  230. }
  231. this.isRequest = true
  232. })
  233. .catch(error => {
  234. console.log('=======>查询列表异常~')
  235. })
  236. },
  237. GetOnReachBottomData(index) {
  238. //上拉加载
  239. this.listQuery.pageNum += 1
  240. this.UserService.userClubReportReportRemarks(this.listQuery)
  241. .then(response => {
  242. let data = response.data
  243. if (data.results && data.results.length > 0) {
  244. this.hasNextPage = data.hasNextPage
  245. this.reportList = this.reportList.concat(data.results)
  246. this.pullFlag = false // 防上拉暴滑
  247. setTimeout(() => {
  248. this.pullFlag = true
  249. }, 500)
  250. if (this.hasNextPage) {
  251. this.pullUpOn = false
  252. this.nomoreText = '上拉显示更多'
  253. } else {
  254. this.pullUpOn = false
  255. this.loadding = false
  256. this.nomoreText = '已至底部'
  257. }
  258. }
  259. })
  260. .catch(error => {
  261. console.log('=======>查询列表异常~')
  262. })
  263. },
  264. deleteRemark(remarksId) {
  265. this.handleRemarksId = remarksId
  266. this.modal = true
  267. this.contentModalText = '确定删除该报备吗?'
  268. },
  269. handReportDetails(reportId) {
  270. //跳转报备详情
  271. this.$api.navigateTo(`/pages/seller/remarks/relation-consult-list?reportId=${reportId}`)
  272. },
  273. handleClick(e) {
  274. //操作
  275. if (e.index == 1) {
  276. this.handleDeleteUserLike()
  277. }
  278. this.modal = false
  279. },
  280. handleDeleteUserLike() {
  281. //操作删除资料备注
  282. this.UserService.getUserRemarksVisitDelete({
  283. remarksId: this.handleRemarksId
  284. })
  285. .then(response => {
  286. this.$util.msg('已删除', 2000, true, 'success')
  287. setTimeout(() => {
  288. this.userClubReportReportRemarks()
  289. }, 2000)
  290. })
  291. .catch(error => {
  292. this.$util.msg(error.msg, 2000)
  293. })
  294. },
  295. onShowClose() {
  296. //输入框失去焦点时触发
  297. if (this.listQuery.keyWord != '') {
  298. this.isShowClose = true
  299. } else {
  300. this.isShowClose = false
  301. this.listQuery.pageNum = 1
  302. this.userClubReportReportRemarks()
  303. }
  304. },
  305. delInputText() {
  306. //清除输入框内容
  307. this.listQuery.keyWord = ''
  308. this.isShowClose = false
  309. this.listQuery.pageNum = 1
  310. this.userClubReportReportRemarks()
  311. },
  312. hideMobel() {
  313. this.modal = false
  314. },
  315. details(reportId) {
  316. this.$api.navigateTo(`/pages/seller/remarks/report-details?reportId=${reportId}`)
  317. }
  318. },
  319. onPageScroll(e) {
  320. //实时获取到滚动的值
  321. },
  322. onReachBottom() {
  323. if (this.hasNextPage) {
  324. this.loadding = true
  325. this.pullUpOn = true
  326. this.GetOnReachBottomData()
  327. }
  328. },
  329. onPullDownRefresh() {
  330. setTimeout(() => {
  331. this.listQuery.pageNum = 1
  332. uni.stopPullDownRefresh()
  333. }, 200)
  334. },
  335. onShow() {
  336. this.init()
  337. }
  338. }
  339. </script>
  340. <style lang="scss">
  341. @import '@/uni.scss';
  342. page {
  343. background: #f7f7f7;
  344. }
  345. .empty-container {
  346. z-index: 99;
  347. }
  348. .club-search {
  349. width: 100%;
  350. height: 112rpx;
  351. background: #ffffff;
  352. box-sizing: border-box;
  353. position: fixed;
  354. top: 0;
  355. left: 0;
  356. z-index: 100;
  357. .club-search-form {
  358. width: 100%;
  359. height: 112rpx;
  360. background: #ffffff;
  361. box-sizing: border-box;
  362. padding: 24rpx;
  363. float: left;
  364. .search-from {
  365. width: 100%;
  366. height: 100%;
  367. background: #f7f7f7;
  368. border-radius: 32rpx;
  369. float: left;
  370. position: relative;
  371. .input {
  372. width: 600rpx;
  373. height: 64rpx;
  374. float: left;
  375. line-height: 64rpx;
  376. color: $text-color;
  377. font-size: $font-size-24;
  378. }
  379. .icon-iconfonticonfontsousuo1 {
  380. width: 64rpx;
  381. height: 64rpx;
  382. line-height: 64rpx;
  383. text-align: center;
  384. display: block;
  385. font-size: $font-size-38;
  386. float: left;
  387. color: #999999;
  388. }
  389. .icon-shanchu1 {
  390. font-size: $font-size-32;
  391. color: #999999;
  392. position: absolute;
  393. width: 64rpx;
  394. height: 64rpx;
  395. line-height: 64rpx;
  396. text-align: center;
  397. top: 0;
  398. right: 0;
  399. z-index: 10;
  400. }
  401. }
  402. }
  403. }
  404. .remarks-content {
  405. width: 100%;
  406. height: auto;
  407. position: relative;
  408. padding: 0;
  409. box-sizing: border-box;
  410. padding: 24rpx;
  411. padding-top: 134rpx;
  412. .empty-container-image {
  413. width: 260rpx;
  414. height: 260rpx;
  415. margin-top: -300rpx;
  416. }
  417. .tui-remarks-cell {
  418. width: 100%;
  419. border-radius: 16rpx;
  420. margin-bottom: 24rpx;
  421. background: #FFFFFF;
  422. box-sizing: border-box;
  423. padding:0 24rpx 24rpx 24rpx;
  424. .tui-remarks-title {
  425. width: 100%;
  426. height: auto;
  427. box-sizing: border-box;
  428. padding: 20rpx 0;
  429. position: relative;
  430. .tui-remarks-title-icon{
  431. width: 128rpx;
  432. height: 128rpx;
  433. position: absolute;
  434. top: 0;
  435. right: 32rpx;
  436. &.reviewed{
  437. background: url(https://static.caimei365.com/app/img/icon/icon-verify1@2x.png);
  438. background-size: cover;
  439. }
  440. &.failed{
  441. background: url(https://static.caimei365.com/app/img/icon/icon-verify2@2x.png);
  442. background-size: cover;
  443. }
  444. &.approved{
  445. background: url(https://static.caimei365.com/app/img/icon/icon-verify3@2x.png);
  446. background-size: cover;
  447. }
  448. }
  449. .tui-remarks-title-top {
  450. width: 100%;
  451. height: 56rpx;
  452. line-height: 56rpx;
  453. .tui-remarks-time {
  454. float: left;
  455. &.tt {
  456. width: 70%;
  457. font-size: $font-size-32;
  458. color: #333333;
  459. text-align: left;
  460. text-overflow: ellipsis;
  461. overflow: hidden;
  462. display: -webkit-box;
  463. -webkit-line-clamp: 1;
  464. line-clamp: 1;
  465. -webkit-box-orient: vertical;
  466. font-weight: bold;
  467. .tags{
  468. display: inline-block;
  469. padding: 0 10rpx;
  470. border-radius: 8rpx;
  471. line-height: 36rpx;
  472. font-size: 22rpx;
  473. background-color: #F94B4B;
  474. color: #ffffff;
  475. text-align: center;
  476. float: left;
  477. margin-right: 10rpx;
  478. margin-top: 10rpx;
  479. font-weight: normal;
  480. }
  481. }
  482. }
  483. }
  484. .tui-remarks-title-bot {
  485. width: 100%;
  486. height: auto;
  487. .tui-remarks-text-view{
  488. width: 100%;
  489. height: 48rpx;
  490. .tui-remarks-text {
  491. width: 50%;
  492. height: 48rpx;
  493. line-height: 48rpx;
  494. box-sizing: border-box;
  495. text-align: left;
  496. font-size: $font-size-26;
  497. color: #999999;
  498. float: left;
  499. text-overflow: ellipsis;
  500. overflow: hidden;
  501. display: -webkit-box;
  502. -webkit-line-clamp: 1;
  503. line-clamp: 1;
  504. -webkit-box-orient: vertical;
  505. &.a{
  506. width: 100%;
  507. }
  508. &.y {
  509. text-align: right;
  510. }
  511. }
  512. }
  513. }
  514. }
  515. .tui-remarks-content {
  516. width: 100%;
  517. height: auto;
  518. box-sizing: border-box;
  519. padding-bottom: 32rpx;
  520. .tui-remarks-text{
  521. width: 100%;
  522. height: 180rpx;
  523. box-sizing: border-box;
  524. background-color: #F7F7F7;
  525. padding: 26rpx;
  526. border-radius: 6rpx;
  527. line-height: 42rpx;
  528. color: #333333;
  529. text-overflow: ellipsis;
  530. overflow: hidden;
  531. display: -webkit-box;
  532. -webkit-line-clamp: 3;
  533. line-clamp: 3;
  534. -webkit-box-orient: vertical;
  535. font-size: 30rpx;
  536. }
  537. .tui-remarks-goods{
  538. width: 100%;
  539. height: 180rpx;
  540. box-sizing: border-box;
  541. background-color: #F7F7F7;
  542. padding: 26rpx;
  543. border-radius: 6rpx;
  544. .goods-image{
  545. width: 128rpx;
  546. height: 128rpx;
  547. float: left;
  548. image{
  549. width: 128rpx;
  550. height: 128rpx;
  551. display: block;
  552. border-radius: 4rpx;
  553. }
  554. }
  555. .goods-main{
  556. width: 475rpx;
  557. height: 128rpx;
  558. box-sizing: border-box;
  559. padding-left: 24rpx;
  560. float: right;
  561. .name{
  562. width: 100%;
  563. height: 48rpx;
  564. box-sizing: border-box;
  565. line-height: 48rpx;
  566. color: #333333;
  567. text-overflow: ellipsis;
  568. overflow: hidden;
  569. display: -webkit-box;
  570. -webkit-line-clamp: 1;
  571. line-clamp: 1;
  572. -webkit-box-orient: vertical;
  573. font-size: 26rpx;
  574. }
  575. .shop{
  576. line-height: 36rpx;
  577. color: #999999;
  578. font-size: 26rpx;
  579. text-overflow: ellipsis;
  580. overflow: hidden;
  581. display: -webkit-box;
  582. -webkit-line-clamp: 2;
  583. line-clamp: 2;
  584. -webkit-box-orient: vertical;
  585. font-size: 26rpx;
  586. }
  587. }
  588. }
  589. }
  590. .tui-remarks-button {
  591. width: 100%;
  592. height: 68rpx;
  593. border-top: 1px solid #E1E1E1;
  594. padding-top: 20rpx;
  595. .btn {
  596. width: 50%;
  597. line-height: 48rpx;
  598. box-sizing: border-box;
  599. text-align: center;
  600. font-size: $font-size-34;
  601. float: left;
  602. font-weight: bold;
  603. &.edit{
  604. color: #1890F9;
  605. border-right: 1px solid #E1E1E1;
  606. }
  607. &.del{
  608. color: #F94B4B;
  609. }
  610. }
  611. }
  612. }
  613. }
  614. .tui-popup-box {
  615. position: relative;
  616. box-sizing: border-box;
  617. min-height: 100rpx;
  618. padding: 6rpx 24rpx;
  619. .tui-popup-content {
  620. padding-top: 30rpx;
  621. }
  622. }
  623. .tui-popup-btn {
  624. width: 100%;
  625. height: auto;
  626. float: left;
  627. box-sizing: border-box;
  628. margin-top: 30rpx;
  629. .tui-flex-1 {
  630. width: 100%;
  631. height: 84rpx;
  632. display: flex;
  633. .tui-button {
  634. flex: 1;
  635. line-height: 84rpx;
  636. font-size: $font-size-28;
  637. text-align: center;
  638. border-radius: 42rpx;
  639. padding: 0;
  640. margin: 0 15rpx;
  641. box-sizing: border-box;
  642. &.cancel {
  643. background: #ffe6dc;
  644. color: #e15616;
  645. }
  646. &.disabled {
  647. background: #e1e1e1;
  648. color: #ffffff;
  649. }
  650. &.confirm {
  651. background: $btn-confirm;
  652. color: #ffffff;
  653. }
  654. }
  655. .tui-button-text{
  656. width: 600rpx;
  657. height: 48rpx;
  658. line-height: 48rpx;
  659. text-align: center;
  660. color: #E15616;
  661. font-size: $font-size-26;
  662. margin: 0 auto;
  663. margin-top: 15rpx;
  664. }
  665. }
  666. }
  667. </style>