index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  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. goAppraise(item){
  144. console.log(item);
  145. uni.navigateTo({
  146. url:'../../reportManage/reportDetail?id='+item.ID
  147. })
  148. },
  149. goReviews(storeMess){
  150. uni.navigateTo({
  151. url:'reviews'
  152. })
  153. },
  154. timeClick() {
  155. this.$refs.timepop.father();
  156. },
  157. returnDate(e) {
  158. console.log(e)
  159. this.starTime = e.startTime
  160. this.endTime = e.endTime
  161. if (e.startTime) {
  162. this.dateTime = e.startTime + '-' + e.endTime
  163. } else {
  164. this.dateTime = null
  165. }
  166. this.page = 1;
  167. this.getShopData()
  168. },
  169. tabClick(num) {
  170. this.tabIndex = num;
  171. if (num == 0) {
  172. this.status = ''
  173. } else {
  174. this.status = num;
  175. }
  176. this.page = 1;
  177. this.getShopData()
  178. },
  179. getMessage() {
  180. uni.showLoading({
  181. title: '加载中'
  182. })
  183. let url = 'accompany/SuperCheckSheet/queryMyCheckSheet',
  184. params = {}
  185. this.$http(url, params, 'GET').then(res => {
  186. this.storeMess = res.data
  187. for (const key in this.storeMess) {
  188. this.storeMess[key] = this.$praseStrEmpty(this.storeMess[key])
  189. }
  190. })
  191. },
  192. bindPickerChange3(e) {
  193. this.thirdIndex = e.target.value
  194. this.managerName = this.thirdArr[this.thirdIndex]
  195. if (e.target.value == 0) {
  196. this.thirdIndex = null
  197. this.managerName = ''
  198. }
  199. this.page = 1
  200. this.getShopData()
  201. },
  202. getVisitor() {
  203. uni.showLoading({
  204. title: '加载中'
  205. })
  206. let url = 'accompany/SuperCheckSheet/myShopCheckManagerPage',
  207. params = {
  208. }
  209. this.$http(url, params, 'GET').then(res => {
  210. this.thirdArr = this.thirdArr.concat(res.data)
  211. })
  212. },
  213. getShopData() {
  214. uni.showLoading({
  215. title: '加载中'
  216. })
  217. let url = 'accompany/SuperCheckSheet/listMyShopCheckPage',
  218. params = {
  219. page: this.page,
  220. limit: 20,
  221. managerName: this.managerName,
  222. starTime: this.starTime,
  223. endTime: this.endTime,
  224. state: this.status,
  225. }
  226. this.$http(url, params, 'GET').then(res => {
  227. var list = res.data.Items
  228. // 处理 undefined和null转为空白字符串
  229. list.forEach((item, index) => {
  230. for (const key in item) {
  231. item[key] = this.$praseStrEmpty(item[key])
  232. }
  233. })
  234. if (this.page == 1 && list.length == 0) {
  235. this.noMoreShow = false
  236. } else if (list.length < 20) {
  237. this.noMoreShow = true
  238. }
  239. if (this.page == 1) {
  240. this.shopData = list
  241. } else {
  242. this.shopData = this.shopData.concat(list)
  243. }
  244. if(this.shopData.length == 0){
  245. this.noMoreShow = false
  246. }
  247. })
  248. },
  249. },
  250. // 下拉刷新 上拉加载更多
  251. onPullDownRefresh() {
  252. this.getMessage()
  253. this.page = 1
  254. this.getShopData()
  255. setTimeout(function() {
  256. uni.stopPullDownRefresh();
  257. }, 1000);
  258. },
  259. onReachBottom() {
  260. this.page++;
  261. this.getShopData()
  262. },
  263. }
  264. </script>
  265. <style scoped>
  266. .content {
  267. background: #F4F5F7;
  268. min-height: 100vh;
  269. }
  270. /* #ifdef H5 */
  271. .content {
  272. background: #F4F5F7;
  273. min-height: calc(100vh - 44px);
  274. }
  275. /* #endif */
  276. .navBg{
  277. position: fixed;
  278. top: 0rpx;
  279. left: 0rpx;
  280. }
  281. .status_bar {
  282. background: #353847;
  283. }
  284. .nav {
  285. width: 100vw;
  286. height: 44px;
  287. background: #353847;
  288. text-align: center;
  289. line-height: 44px;
  290. font-size: 34rpx;
  291. color: #FFFFFF;
  292. }
  293. .topView {
  294. width: 100%;
  295. height: 580rpx;
  296. background-color: #353847;
  297. padding-top: 20rpx;
  298. /* position: fixed; */
  299. z-index: 99;
  300. }
  301. .shopMessage {
  302. margin-left: 35rpx;
  303. margin-right: 35rpx;
  304. margin-top: 0rpx;
  305. margin-bottom: 40rpx;
  306. height: 260rpx;
  307. background: url('http://phone.66km.cn:8088/marketing/yypb.png');
  308. background-size: 100% 100%;
  309. background-color: #353847;
  310. border-radius: 35rpx;
  311. }
  312. .typeBg {
  313. width: 120rpx;
  314. height: 44rpx;
  315. float: right;
  316. top: 0rpx;
  317. right: 0rpx;
  318. 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==');
  319. background-size: 100% 100%;
  320. }
  321. .storeType {
  322. font-size: 24rpx;
  323. color: #3C3C3C;
  324. text-align: center;
  325. line-height: 44rpx;
  326. }
  327. .storeName {
  328. padding: 40rpx;
  329. padding-bottom: 20rpx;
  330. font-size: 34rpx;
  331. color: #3C3C3C;
  332. font-weight: bold;
  333. }
  334. .countBg {
  335. padding: 0rpx 38rpx;
  336. display: flex;
  337. justify-content: flex-start;
  338. }
  339. .reportBg,
  340. .countBg {
  341. margin-right: 108rpx;
  342. }
  343. .count {
  344. font-size: 56rpx;
  345. font-weight: bold;
  346. color: #3C3C3C;
  347. text-align: center;
  348. height: 80rpx;
  349. }
  350. .title {
  351. font-size: 24rpx;
  352. color: #555555;
  353. text-align: center;
  354. }
  355. .reviewsBg {
  356. width: 100%;
  357. height: 102rpx;
  358. background-color: #FFFFFF;
  359. border-top-left-radius: 30rpx;
  360. border-top-right-radius: 30rpx;
  361. display: flex;
  362. justify-content: space-between;
  363. align-items: center;
  364. border-bottom: 1rpx #EEEEEE solid;
  365. }
  366. .left {
  367. display: flex;
  368. justify-content: space-between;
  369. align-items: center;
  370. }
  371. .icon {
  372. width: 32rpx;
  373. height: 32rpx;
  374. margin-left: 24rpx;
  375. margin-right: 5rpx;
  376. }
  377. .right {
  378. margin-right: 24rpx;
  379. }
  380. .leftTitle,
  381. .rightTitle {
  382. font-size: 30rpx;
  383. font-weight: bold;
  384. color: #3C3C3C;
  385. }
  386. .siftBg {
  387. width: 100%;
  388. height: 88rpx;
  389. background-color: #FFFFFF;
  390. display: flex;
  391. justify-content: space-around;
  392. align-items: center;
  393. font-size: 28rpx;
  394. color: #3C3C3C;
  395. border-bottom: 1rpx #EEEEEE solid;
  396. }
  397. .timeChose {
  398. display: flex;
  399. justify-content: space-between;
  400. align-items: center;
  401. }
  402. .downArrow {
  403. width: 16rpx;
  404. height: 12rpx;
  405. padding: 6rpx 8rpx;
  406. }
  407. .tabBox {
  408. width: 100%;
  409. height: 88rpx;
  410. background-color: #FFFFFF;
  411. }
  412. .tabCotn {
  413. display: flex;
  414. justify-content: space-around;
  415. }
  416. .tabLine {
  417. text-align: center;
  418. color: #3C3C3C;
  419. font-size: 30rpx;
  420. line-height: 88rpx;
  421. }
  422. .tabactive {
  423. color: #FF4F00;
  424. border-bottom: 4rpx solid #FF4F00;
  425. }
  426. .shopList {
  427. background-color: #F4F5F7;
  428. padding: 0rpx 24rpx;
  429. }
  430. .shopBox {
  431. background-color: #FFFFFF;
  432. border-radius: 10rpx;
  433. margin: 20rpx 0rpx;
  434. }
  435. .shopTop {
  436. display: flex;
  437. padding: 30rpx 20rpx 10rpx 20rpx;
  438. justify-content: space-between;
  439. align-items: center;
  440. }
  441. .shopName {
  442. font-size: 28rpx;
  443. color: #3C3C3C;
  444. font-weight: bold;
  445. width: 500rpx;
  446. }
  447. .type {
  448. font-size: 28rpx;
  449. color: #FF4F00;
  450. margin-left: 10rpx;
  451. }
  452. .bottomView {
  453. padding: 28rpx 20rpx;
  454. display: flex;
  455. justify-content: space-between;
  456. }
  457. .manager {
  458. font-size: 24rpx;
  459. color: #666666;
  460. }
  461. .score {
  462. font-size: 28rpx;
  463. color: #B98B5D;
  464. }
  465. /* 空白页css */
  466. .nodataBox {
  467. text-align: center;
  468. }
  469. .nodataImg {
  470. width: 400rpx;
  471. padding-top: 290rpx;
  472. }
  473. .noTxt {
  474. font-size: 30rpx;
  475. color: #999999;
  476. padding-top: 50rpx;
  477. }
  478. .noMore {
  479. text-align: center;
  480. line-height: 50rpx;
  481. color: #999999;
  482. font-size: 28rpx;
  483. }
  484. </style>