index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. <template>
  2. <view class="content">
  3. <view class="navBg">
  4. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  5. <view class="nav">运营陪伴</view>
  6. </view>
  7. <view style="background-color: #353847;">
  8. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  9. <view style="height: 44px;"></view>
  10. </view>
  11. <!-- topView -->
  12. <view class="topView">
  13. <!-- shopMessage -->
  14. <view class="shopMessage">
  15. <!-- 店铺等级 -->
  16. <view class="typeBg">
  17. <view class="storeType">{{storeMess.Name}}</view>
  18. </view>
  19. <!-- 店名 -->
  20. <view class="storeName">{{storeMess.ShopName}}</view>
  21. <view class="countBg">
  22. <!-- 报告数 -->
  23. <view class="reportBg">
  24. <view class="reportCount count">{{storeMess.checkCount}}</view>
  25. <view class="title">检测报告</view>
  26. </view>
  27. <!-- 得分 -->
  28. <view class="scoreBg">
  29. <view class="scoreCount count">{{storeMess.ShopScore == '' ? '暂无' :storeMess.ShopScore}}</view>
  30. <view class="title">上次得分</view>
  31. </view>
  32. </view>
  33. </view>
  34. <!-- 待点评 -->
  35. <view class="reviewsBg">
  36. <view class="left">
  37. <image src="../../../static/img/icon_team.png" class="icon"></image>
  38. <view class="leftTitle">运营陪伴记录</view>
  39. </view>
  40. <view class="right" @click="goReviews(storeMess)">
  41. <view class="rightTitle">待点评:<text
  42. style="font-size: 30rpx; color: #FF6E00; font-weight: bold;">{{storeMess.reviewCount}}</text>
  43. <image src="../../../static/img/icon_zhanghu_arrow.png"
  44. style="width: 12rpx; height: 22rpx; margin-left: 10rpx;"></image>
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 筛选 -->
  49. <view class="siftBg">
  50. <!-- 日期选择 -->
  51. <view class="timeChose">
  52. <view @click="timeClick">{{dateTime == null ? '日期筛选' : dateTime}}</view>
  53. <image class="downArrow" src="../../../static/img/icon_downArrow.png"></image>
  54. </view>
  55. <!-- 访问人 -->
  56. <picker :value="thirdIndex" mode="selector" :range="thirdArr" @change="bindPickerChange3">
  57. <view class="uni-input">{{thirdIndex == null ? '访问人' : thirdArr[thirdIndex]}}
  58. <image class="downArrow" src="../../../static/img/icon_downArrow.png"></image>
  59. </view>
  60. </picker>
  61. </view>
  62. <!-- 切换tab -->
  63. <view class="tabBox">
  64. <scroll-view scroll-x="true" class="scroll">
  65. <view class="tabCotn">
  66. <view class="tabLine" :class="{tabactive:tabIndex==0}" @click="tabClick(0)">全部</view>
  67. <view class="tabLine" :class="{tabactive:tabIndex==2}" @click="tabClick(2)">待作业</view>
  68. <view class="tabLine" :class="{tabactive:tabIndex==4}" @click="tabClick(4)">待回复</view>
  69. <view class="tabLine" :class="{tabactive:tabIndex==5}" @click="tabClick(5)">已完成</view>
  70. </view>
  71. </scroll-view>
  72. </view>
  73. </view>
  74. <!-- 列表 -->
  75. <view class="shopList">
  76. <view v-for="(item,index) in shopData" :key="index">
  77. <!-- shopBox -->
  78. <view class="shopBox" @click="goAppraise(item)">
  79. <view class=" shopTop">
  80. <view class="shopName">{{item.ShopName}}</view>
  81. <!-- 订单状态 1 待提交 草稿 2 已提交 待作业 3 已作业 待点评 4 已评价 待回复,5 已回复 已完成 -->
  82. <view class="type" v-if="item.State == 2">待作业</view>
  83. <view class="type" v-if="item.State == 4">待回复</view>
  84. <view class="type" v-if="item.State == 5">已完成</view>
  85. </view>
  86. <!-- 第2行 -->
  87. <view class="bottomView">
  88. <!-- 运营经理 -->
  89. <view class="manager">{{item.ManagerName}} · {{item.CheckTime}}</view>
  90. <!-- 评分 -->
  91. <view class="score" v-if="item.ShopScore">{{item.ShopScore}}分</view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. <!-- 上拉 加载更多 -->
  97. <view class="noMore" v-if="noMoreShow">没有更多数据</view>
  98. <!-- 无数据空白页 -->
  99. <view class="nodataBox" v-if="shopData.length == 0">
  100. <image src="../../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
  101. <view class="noTxt">暂无数据</view>
  102. </view>
  103. <timeChose ref="timepop" @returnDate="returnDate" :isShow="timeShow"></timeChose>
  104. </view>
  105. </template>
  106. <script>
  107. export default {
  108. data() {
  109. return {
  110. iStatusBarHeight: '',
  111. tabIndex: 0,
  112. status: '', //订单状态 1 待提交 草稿 2 已提交 待作业 3 已作业 待点评 4 已评价 待回复,5 已回复 已完成
  113. storeMess: {},
  114. thirdIndex: null,
  115. thirdArr: ['请选择'],
  116. managerName: '',
  117. shopData: [],
  118. page: 1,
  119. noMoreShow: false,
  120. timeShow: false,
  121. starTime: '',
  122. endTime: '',
  123. dateTime: null,
  124. }
  125. },
  126. onLoad() {
  127. //页面加载初始化生命周期函数
  128. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  129. this.getMessage()
  130. this.getVisitor()
  131. this.page = 1
  132. this.getShopData()
  133. },
  134. methods: {
  135. //自己定义的方法函数
  136. goRouter(url) {
  137. //uni.navigateTo 路由跳转 url 是地址 路由还分为uni.redirectTo switchTab navigateBackreLaunch
  138. this.$common.isUserId()
  139. uni.navigateTo({
  140. url: url
  141. })
  142. },
  143. goReviews(storeMess){
  144. uni.navigateTo({
  145. url:'reviews'
  146. })
  147. },
  148. timeClick() {
  149. this.$refs.timepop.father();
  150. },
  151. returnDate(e) {
  152. console.log(e)
  153. this.starTime = e.startTime
  154. this.endTime = e.endTime
  155. if (e.startTime) {
  156. this.dateTime = e.startTime + '-' + e.endTime
  157. } else {
  158. this.dateTime = null
  159. }
  160. this.page = 1;
  161. this.getShopData()
  162. },
  163. tabClick(num) {
  164. this.tabIndex = num;
  165. if (num == 0) {
  166. this.status = ''
  167. } else {
  168. this.status = num;
  169. }
  170. this.page = 1;
  171. this.getShopData()
  172. },
  173. getMessage() {
  174. uni.showLoading({
  175. title: '加载中'
  176. })
  177. let url = 'accompany/SuperCheckSheet/queryMyCheckSheet',
  178. params = {}
  179. this.$http(url, params, 'GET').then(res => {
  180. this.storeMess = res.data
  181. for (const key in this.storeMess) {
  182. this.storeMess[key] = this.$praseStrEmpty(this.storeMess[key])
  183. }
  184. })
  185. },
  186. bindPickerChange3(e) {
  187. this.thirdIndex = e.target.value
  188. this.managerName = this.thirdArr[this.thirdIndex]
  189. if (e.target.value == 0) {
  190. this.thirdIndex = null
  191. this.managerName = ''
  192. }
  193. this.page = 1
  194. this.getShopData()
  195. },
  196. getVisitor() {
  197. uni.showLoading({
  198. title: '加载中'
  199. })
  200. let url = 'accompany/SuperCheckSheet/myShopCheckManagerPage',
  201. params = {
  202. }
  203. this.$http(url, params, 'GET').then(res => {
  204. this.thirdArr = this.thirdArr.concat(res.data)
  205. })
  206. },
  207. getShopData() {
  208. uni.showLoading({
  209. title: '加载中'
  210. })
  211. let url = 'accompany/SuperCheckSheet/listMyShopCheckPage',
  212. params = {
  213. page: this.page,
  214. limit: 20,
  215. managerName: this.managerName,
  216. starTime: this.starTime,
  217. endTime: this.endTime,
  218. state: this.status,
  219. }
  220. this.$http(url, params, 'GET').then(res => {
  221. var list = res.data.Items
  222. // 处理 undefined和null转为空白字符串
  223. list.forEach((item, index) => {
  224. for (const key in item) {
  225. item[key] = this.$praseStrEmpty(item[key])
  226. }
  227. })
  228. if (this.page == 1 && list.length == 0) {
  229. this.noMoreShow = false
  230. } else if (list.length < 20) {
  231. this.noMoreShow = true
  232. }
  233. if (this.page == 1) {
  234. this.shopData = list
  235. } else {
  236. this.shopData = this.shopData.concat(list)
  237. }
  238. if(this.shopData.length == 0){
  239. this.noMoreShow = false
  240. }
  241. })
  242. },
  243. },
  244. // 下拉刷新 上拉加载更多
  245. onPullDownRefresh() {
  246. this.getMessage()
  247. this.page = 1
  248. this.getShopData()
  249. setTimeout(function() {
  250. uni.stopPullDownRefresh();
  251. }, 1000);
  252. },
  253. onReachBottom() {
  254. this.page++;
  255. this.getShopData()
  256. },
  257. }
  258. </script>
  259. <style scoped>
  260. .content {
  261. background: #F4F5F7;
  262. min-height: 100vh;
  263. }
  264. /* #ifdef H5 */
  265. .content {
  266. background: #F4F5F7;
  267. min-height: calc(100vh - 44px);
  268. }
  269. /* #endif */
  270. .navBg{
  271. position: fixed;
  272. top: 0rpx;
  273. left: 0rpx;
  274. }
  275. .status_bar {
  276. background: #353847;
  277. }
  278. .nav {
  279. width: 100vw;
  280. height: 44px;
  281. background: #353847;
  282. text-align: center;
  283. line-height: 44px;
  284. font-size: 34rpx;
  285. color: #FFFFFF;
  286. }
  287. .topView {
  288. width: 100%;
  289. height: 580rpx;
  290. background-color: #353847;
  291. padding-top: 20rpx;
  292. /* position: fixed; */
  293. z-index: 99;
  294. }
  295. .shopMessage {
  296. margin-left: 35rpx;
  297. margin-right: 35rpx;
  298. margin-top: 0rpx;
  299. margin-bottom: 40rpx;
  300. height: 260rpx;
  301. background: url('http://phone.66km.cn:8088/marketing/yypb.png');
  302. background-size: 100% 100%;
  303. background-color: #353847;
  304. border-radius: 35rpx;
  305. }
  306. .typeBg {
  307. width: 120rpx;
  308. height: 44rpx;
  309. float: right;
  310. top: 0rpx;
  311. right: 0rpx;
  312. background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAsCAMAAACZpYwBAAAAAXNSR0IArs4c6QAAAJBQTFRFAAAA/9Sq/9uS/8yZ/9SV7ciS89GL/9GX9NSV9cyP8c2V+dKT99KU98+T+M+U9s+T9tCT9s2S9M+R9s+T9c2R9c+T9c6S9c+S9s+T9s6S9c2R9s6T9s6T9s6S9c2R9s6T9c6S9c+T9c2S9s+S9c6S9s6T9c6S9c6S9c6S9s6S9s+S9c6R9s+S9c6R9s+T9c6SqJbrXwAAAC90Uk5TAAYHCgwOFhYYGSQtPkBFVVdweYmVmZufpbKzvcHCw8bHyM7e3+Lq6+/0+Pn5+/7BWE7IAAAAxElEQVRYw8XV2RaBABhF4R+FiAZKxjKUNJ33fzsv4DZ7v8C31rk5ptFq3s/8EG9n9juNXXuJFggsqT/6DCzptoFgDZnHwFIdQLCG/YSBpbMLwXrMIVgPF4J1nkCw9hQ8BBCs2oNgZRQ8bCBYVwqWT8EnCu4XEKyIgi8U3M4gWFsKjin4QME5Bb+sYeC3VQzc2B3a2hIKDinY+UCwpRS86iDYdhQ8LSDYliUE27qEYFsWEGzTXcfAZqv0w8BmTpjcq7+95BckXprWExwToAAAAABJRU5ErkJggg==');
  313. background-size: 100% 100%;
  314. }
  315. .storeType {
  316. font-size: 24rpx;
  317. color: #3C3C3C;
  318. text-align: center;
  319. line-height: 44rpx;
  320. }
  321. .storeName {
  322. padding: 40rpx;
  323. padding-bottom: 20rpx;
  324. font-size: 34rpx;
  325. color: #3C3C3C;
  326. font-weight: bold;
  327. }
  328. .countBg {
  329. padding: 0rpx 38rpx;
  330. display: flex;
  331. justify-content: flex-start;
  332. }
  333. .reportBg,
  334. .countBg {
  335. margin-right: 108rpx;
  336. }
  337. .count {
  338. font-size: 56rpx;
  339. font-weight: bold;
  340. color: #3C3C3C;
  341. text-align: center;
  342. height: 80rpx;
  343. }
  344. .title {
  345. font-size: 24rpx;
  346. color: #555555;
  347. text-align: center;
  348. }
  349. .reviewsBg {
  350. width: 100%;
  351. height: 102rpx;
  352. background-color: #FFFFFF;
  353. border-top-left-radius: 30rpx;
  354. border-top-right-radius: 30rpx;
  355. display: flex;
  356. justify-content: space-between;
  357. align-items: center;
  358. border-bottom: 1rpx #EEEEEE solid;
  359. }
  360. .left {
  361. display: flex;
  362. justify-content: space-between;
  363. align-items: center;
  364. }
  365. .icon {
  366. width: 32rpx;
  367. height: 32rpx;
  368. margin-left: 24rpx;
  369. margin-right: 5rpx;
  370. }
  371. .right {
  372. margin-right: 24rpx;
  373. }
  374. .leftTitle,
  375. .rightTitle {
  376. font-size: 30rpx;
  377. font-weight: bold;
  378. color: #3C3C3C;
  379. }
  380. .siftBg {
  381. width: 100%;
  382. height: 88rpx;
  383. background-color: #FFFFFF;
  384. display: flex;
  385. justify-content: space-around;
  386. align-items: center;
  387. font-size: 28rpx;
  388. color: #3C3C3C;
  389. border-bottom: 1rpx #EEEEEE solid;
  390. }
  391. .timeChose {
  392. display: flex;
  393. justify-content: space-between;
  394. align-items: center;
  395. }
  396. .downArrow {
  397. width: 16rpx;
  398. height: 12rpx;
  399. padding: 6rpx 8rpx;
  400. }
  401. .tabBox {
  402. width: 100%;
  403. height: 88rpx;
  404. background-color: #FFFFFF;
  405. }
  406. .tabCotn {
  407. display: flex;
  408. justify-content: space-around;
  409. }
  410. .tabLine {
  411. text-align: center;
  412. color: #3C3C3C;
  413. font-size: 30rpx;
  414. line-height: 88rpx;
  415. }
  416. .tabactive {
  417. color: #FF4F00;
  418. border-bottom: 4rpx solid #FF4F00;
  419. }
  420. .shopList {
  421. background-color: #F4F5F7;
  422. padding: 0rpx 24rpx;
  423. }
  424. .shopBox {
  425. background-color: #FFFFFF;
  426. border-radius: 10rpx;
  427. margin: 20rpx 0rpx;
  428. }
  429. .shopTop {
  430. display: flex;
  431. padding: 30rpx 20rpx 10rpx 20rpx;
  432. justify-content: space-between;
  433. align-items: center;
  434. }
  435. .shopName {
  436. font-size: 28rpx;
  437. color: #3C3C3C;
  438. font-weight: bold;
  439. width: 500rpx;
  440. }
  441. .type {
  442. font-size: 28rpx;
  443. color: #FF4F00;
  444. margin-left: 10rpx;
  445. }
  446. .bottomView {
  447. padding: 28rpx 20rpx;
  448. display: flex;
  449. justify-content: space-between;
  450. }
  451. .manager {
  452. font-size: 24rpx;
  453. color: #666666;
  454. }
  455. .score {
  456. font-size: 28rpx;
  457. color: #B98B5D;
  458. }
  459. /* 空白页css */
  460. .nodataBox {
  461. text-align: center;
  462. }
  463. .nodataImg {
  464. width: 400rpx;
  465. padding-top: 290rpx;
  466. }
  467. .noTxt {
  468. font-size: 30rpx;
  469. color: #999999;
  470. padding-top: 50rpx;
  471. }
  472. .noMore {
  473. text-align: center;
  474. line-height: 50rpx;
  475. color: #999999;
  476. font-size: 28rpx;
  477. }
  478. </style>