reportManage.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. <template>
  2. <view class="content">
  3. <view class="topView">
  4. <!-- 切换tab -->
  5. <view class="tabBox">
  6. <scroll-view scroll-x="true" class="scroll">
  7. <view class="tabCotn">
  8. <view class="tabLine" :class="{tabactive:tabIndex==0}" @click="tabClick(0)">全部</view>
  9. <view class="tabLine" :class="{tabactive:tabIndex==1}" @click="tabClick(1)">待提交</view>
  10. <view class="tabLine" :class="{tabactive:tabIndex==2}" @click="tabClick(2)">待作业</view>
  11. <view class="tabLine" :class="{tabactive:tabIndex==3}" @click="tabClick(3)">待评价</view>
  12. <view class="tabLine" :class="{tabactive:tabIndex==4}" @click="tabClick(4)">待回复</view>
  13. </view>
  14. </scroll-view>
  15. </view>
  16. <!-- 搜索 -->
  17. <view class="searchBox">
  18. <image src="../../static/img/icon_search.png" class="searchImg"></image>
  19. <input type="text" class="searchInput" placeholder="请输入门店名称、联系人、手机号" v-model="searchValue"
  20. @confirm="searchDone" />
  21. </view>
  22. <!-- 条件筛选 -->
  23. <view class="siftBg">
  24. <!-- 日期选择 -->
  25. <picker @change="timeChose" mode="date">
  26. <view class="uni-input">{{data.value == null ? '日期筛选' : data.value}}
  27. <image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
  28. </view>
  29. </picker>
  30. <!-- 省市区 选择 -->
  31. <picker @change="bindChange" mode="region">
  32. <view class="uni-input">{{data.address == null ? '区域筛选' : data.address}}
  33. <image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
  34. </view>
  35. </picker>
  36. <picker :value="thirdIndex" mode="selector" range-key='name' :range="thirdArr"
  37. @change="bindPickerChange3">
  38. <view class="uni-input">{{thirdIndex == null ? '访问人' : thirdArr[thirdIndex].name}}
  39. <image class="downArrow" src="../../static/img/icon_downArrow.png"></image>
  40. </view>
  41. </picker>
  42. </view>
  43. </view>
  44. <!-- 列表 -->
  45. <view class="shopList">
  46. <view v-for="(item,index) in shopData" :key="index">
  47. <!-- shopBox -->
  48. <view class="shopBox" @click="goAppraise(item)">
  49. <view class=" shopTop">
  50. <view class="shopName">{{item.ShopName}}</view>
  51. <!-- 订单状态 1 待提交 草稿 2 已提交 待作业 3 已作业 待点评 4 已评价 待回复,5 已回复 已完成 -->
  52. <view class="type" v-if="item.State == 1">待提交</view>
  53. <view class="type" v-if="item.State == 2">已提交</view>
  54. <view class="type" v-if="item.State == 3">已作业</view>
  55. <view class="type" v-if="item.State == 4">已评价</view>
  56. <view class="type" v-if="item.State == 5">已回复</view>
  57. </view>
  58. <!-- 第2行 -->
  59. <view class="bottomView">
  60. <!-- 运营经理 -->
  61. <view class="manager">{{item.ManagerName}} · {{item.CheckTime}}</view>
  62. <!-- 评分 -->
  63. <view class="score" v-if="item.ShopScore">{{item.ShopScore}}分</view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 上拉 加载更多 -->
  69. <view class="noMore" v-if="noMoreShow">没有更多数据</view>
  70. <!-- 无数据空白页 -->
  71. <view class="nodataBox" v-if="shopData.length == 0">
  72. <image src="../../static/img/pic_empty_def.png" mode="widthFix" class="nodataImg"></image>
  73. <view class="noTxt">暂无数据</view>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. data() {
  80. return {
  81. tabIndex: 0,
  82. status: '', //订单状态 1 待提交 草稿 2 已提交 待作业 3 已作业 待点评 4 已评价 待回复,5 已回复 已完成
  83. searchValue: '',
  84. data: {
  85. provinceCode: '',
  86. province: '',
  87. cityCode: '',
  88. city: '',
  89. areaCode: '',
  90. area: '',
  91. address: null,
  92. },
  93. thirdIndex: null,
  94. thirdArr: [],
  95. managerId: '',
  96. shopData: [],
  97. page: 1,
  98. noMoreShow: false,
  99. }
  100. },
  101. onShow() {
  102. this.getManager()
  103. this.page = 1
  104. this.getShopData()
  105. },
  106. methods: {
  107. tabClick(num) {
  108. this.tabIndex = num;
  109. if (num == 0) {
  110. this.status = ''
  111. } else {
  112. this.status = num;
  113. }
  114. this.page = 1;
  115. this.getShopData()
  116. },
  117. searchDone(e) {
  118. this.searchValue = e.target.value
  119. this.page = 1
  120. this.getShopData()
  121. },
  122. timeChose(e){
  123. },
  124. bindChange: function(e) {
  125. this.data.provinceCode = e.detail.code[0]
  126. this.data.cityCode = e.detail.code[1]
  127. this.data.areaCode = e.detail.code[2]
  128. this.data.province = e.detail.value[0]
  129. this.data.city = e.detail.value[1]
  130. this.data.area = e.detail.value[2]
  131. this.data.address = this.data.province + this.data.city + this.data.area
  132. this.page = 1
  133. this.getShopData()
  134. },
  135. bindPickerChange3(e) {
  136. this.thirdIndex = e.target.value
  137. this.managerId = this.thirdArr[this.thirdIndex].ID
  138. this.page = 1
  139. this.getShopData()
  140. },
  141. getManager() {
  142. uni.showLoading({
  143. title: '加载中'
  144. })
  145. let url = 'accompany/SuperAccounts/queryManagerListByDept',
  146. params = {
  147. name: '',
  148. }
  149. this.$http(url, params, 'GET').then(res => {
  150. this.thirdArr = res.data
  151. })
  152. },
  153. getShopData() {
  154. uni.showLoading({
  155. title: '加载中'
  156. })
  157. let url = 'accompany/SuperAccounts/listShopInfoByDeptCheckPage',
  158. params = {
  159. page: this.page,
  160. limit: 20,
  161. provinceCode: this.data.provinceCode,
  162. cityCode: this.data.cityCode,
  163. areaCode: this.data.areaCode,
  164. manager: this.managerId,
  165. shopName: this.searchValue,
  166. starTime: '',
  167. endTime: '',
  168. state: this.status,
  169. }
  170. this.$http(url, params, 'GET').then(res => {
  171. var list = res.data.Items
  172. // 处理 undefined和null转为空白字符串
  173. list.forEach((item, index) => {
  174. for (const key in item) {
  175. item[key] = this.$praseStrEmpty(item[key])
  176. }
  177. })
  178. if (this.page == 1 && list.length == 0) {
  179. this.noMoreShow = false
  180. } else if (list.length < 20) {
  181. this.noMoreShow = true
  182. }
  183. if (this.page == 1) {
  184. this.shopData = list
  185. } else {
  186. this.shopData = this.shopData.concat(list)
  187. }
  188. })
  189. },
  190. goAppraise(v) {
  191. }
  192. },
  193. // 下拉刷新 上拉加载更多
  194. onPullDownRefresh() {
  195. this.page = 1
  196. this.getShopData()
  197. setTimeout(function() {
  198. uni.stopPullDownRefresh();
  199. }, 1000);
  200. },
  201. onReachBottom() {
  202. this.page++;
  203. this.getShopData()
  204. },
  205. }
  206. </script>
  207. <style>
  208. .content {
  209. background-color: #F4F5F7;
  210. min-height: 100vh;
  211. }
  212. .topView {
  213. width: 100%;
  214. height: 290rpx;
  215. background-color: #FFFFFF;
  216. left: 0rpx;
  217. top: 0rpx;
  218. position: fixed;
  219. z-index: 99;
  220. }
  221. /* #ifdef H5 */
  222. .topView {
  223. top: 44px;
  224. }
  225. /* #endif */
  226. .searchBox {
  227. height: 72rpx;
  228. margin: 24rpx;
  229. background-color: #F4F5F7;
  230. border-radius: 36rpx;
  231. display: flex;
  232. }
  233. .searchImg {
  234. margin-top: 20rpx;
  235. margin-left: 20rpx;
  236. width: 32rpx;
  237. height: 32rpx;
  238. }
  239. .searchInput {
  240. height: 72rpx;
  241. font-size: 28rpx;
  242. padding-left: 16rpx;
  243. width: 85%;
  244. }
  245. .siftBg {
  246. display: flex;
  247. justify-content: space-around;
  248. height: 80rpx;
  249. align-items: center;
  250. }
  251. .downArrow {
  252. width: 16rpx;
  253. height: 12rpx;
  254. padding: 6rpx 8rpx;
  255. }
  256. .tabBox {
  257. width: 100%;
  258. }
  259. .tabCotn {
  260. display: flex;
  261. }
  262. .tabLine {
  263. width: 150rpx;
  264. text-align: center;
  265. color: #3C3C3C;
  266. font-size: 30rpx;
  267. line-height: 88rpx;
  268. }
  269. .tabactive {
  270. color: #FF4F00;
  271. border-bottom: 4rpx solid #FF4F00;
  272. }
  273. .shopList {
  274. background-color: #F4F5F7;
  275. padding: 0rpx 24rpx;
  276. padding-top: 290rpx;
  277. }
  278. .shopBox {
  279. background-color: #FFFFFF;
  280. border-radius: 10rpx;
  281. margin: 20rpx 0rpx;
  282. }
  283. .shopTop {
  284. display: flex;
  285. padding: 30rpx 20rpx 10rpx 20rpx;
  286. justify-content: space-between;
  287. }
  288. .shopName {
  289. font-size: 28rpx;
  290. color: #3C3C3C;
  291. font-weight: bold;
  292. width: 500rpx;
  293. }
  294. .type {
  295. font-size: 28rpx;
  296. color: #FF4F00;
  297. margin-left: 10rpx;
  298. }
  299. .bottomView {
  300. padding: 28rpx 20rpx;
  301. display: flex;
  302. justify-content: space-between;
  303. }
  304. .manager {
  305. font-size: 24rpx;
  306. color: #666666;
  307. }
  308. .score {
  309. font-size: 28rpx;
  310. color: #B98B5D;
  311. }
  312. /* 空白页css */
  313. .nodataBox {
  314. text-align: center;
  315. }
  316. .nodataImg {
  317. width: 400rpx;
  318. padding-top: 290rpx;
  319. }
  320. .noTxt {
  321. font-size: 30rpx;
  322. color: #999999;
  323. padding-top: 50rpx;
  324. }
  325. .noMore {
  326. text-align: center;
  327. line-height: 50rpx;
  328. color: #999999;
  329. font-size: 28rpx;
  330. }
  331. </style>