consumption.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <view class="content">
  3. <view class="topbox">
  4. <view class="top">
  5. <picker @change="bindPickerChange" :value="index" :range="array">
  6. <view class="screenName"> <span>车牌号:{{array[index]}}</span>
  7. <image src="../../static/img/icon_arrow_down.png" mode="" class="carUpimg"></image>
  8. </view>
  9. </picker>
  10. <!-- <span>全部车辆</span>
  11. <image class="carUpimg" src="../../static/img/icon_arrow_down.png" mode=""></image> -->
  12. </view>
  13. </view>
  14. <view class="nodataBox" v-show="nodataShow">
  15. <image src="http://dmsphoto.66km.com.cn/thFiles/3C95A4C5-73F8-4B34-902B-703B8A0825C9.png" mode="widthFix" class="nodataImg"></image>
  16. <view class="noTxt">暂无数据</view>
  17. </view>
  18. <view class="cBox" v-show="!nodataShow">
  19. <view class="line" v-for="(item,index) in list">
  20. <view class="lineTop">
  21. <view class="ltLeft">
  22. <view class="cp">{{item.PlateNumber}}</view>
  23. <view class="km" v-if="item.CurrentMileage">{{item.CurrentMileage}}km</view>
  24. </view>
  25. <view class="ltRgiht">
  26. <span class="span1">¥{{item.ReceiptMoney}}</span>
  27. </view>
  28. </view>
  29. <view class="lineCont">
  30. <view class="lineLine1">消费门店:{{item.ShopName}}</view>
  31. <view class="line2">
  32. <view>日期:{{item.PickTime}}</view>
  33. <view>接待人员:{{item.PickName}}</view>
  34. </view>
  35. <view class="line2">
  36. <view>车牌号:{{item.PlateNumber}}</view>
  37. <view style="color: #999999;" v-if="item.PayState == 0">未结算</view>
  38. <view style="color: #00A040;" v-if="item.PayState == 2">已结算</view>
  39. </view>
  40. <view class="lineLine1">备注:{{item.Comment}}</view>
  41. </view>
  42. <view class="lineBottom" @click="seeData">
  43. <span>查看消费明细</span>
  44. </view>
  45. </view>
  46. </view>
  47. <uni-popup ref="popup" type="bottom" >
  48. <view class="popupBox">
  49. <view class="popupTitleBox">
  50. <view class="popupTitle">消费明细</view>
  51. <image src="../../static/img/cha.png" mode="" class="chaImg"></image>
  52. </view>
  53. <view class="popupCp">鲁A9JK82</view>
  54. <view class="popupLcBox">
  55. <view class="popupLc">进店里程:<span style="color: #3C3C3C;">12233km</span> </view>
  56. <view class="shishouamount">实收金额:<span style="color: #FF0000;">2030.43</span> </view>
  57. </view>
  58. <view class="plineBox">
  59. <view class="pline">
  60. <view class="tableTop">
  61. <view class="w50">项目信息</view>
  62. <view class="w25">工时</view>
  63. <view class="w25">金额</view>
  64. </view>
  65. <view class="tableLine">
  66. <view class="w50">
  67. <view class="tableName">
  68. <view class="ka">卡</view>
  69. <view class="itemname">项目名称</view>
  70. </view>
  71. </view>
  72. <view class="w25">
  73. <view class="tableNum">12.00</view>
  74. </view>
  75. <view class="w25">
  76. <view class="tableNum">2312.22</view>
  77. </view>
  78. </view>
  79. <view class="tableLine">
  80. <view class="w50">
  81. <view class="tableName">
  82. <view class="itemname">奖金元</view>
  83. </view>
  84. </view>
  85. <view class="w25">
  86. <view class="tableNum">12.00</view>
  87. </view>
  88. <view class="w25">
  89. <view class="tableNum">2312.22</view>
  90. </view>
  91. </view>
  92. <view class="tableLine">
  93. <view class="w50">
  94. <view class="tableName">
  95. <view class="itemname">奖金元</view>
  96. </view>
  97. <view class="remarks">商品备注有显示,没有不显示行</view>
  98. </view>
  99. <view class="w25">
  100. <view class="tableNum">12.00</view>
  101. </view>
  102. <view class="w25">
  103. <view class="tableNum">2312.22</view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </uni-popup>
  110. </view>
  111. </template>
  112. <script>
  113. export default {
  114. data() {
  115. return {
  116. customerId:'',
  117. list:[],
  118. array:'',
  119. nodataShow:false,
  120. index:0,
  121. plateNumber:'',
  122. }
  123. },
  124. onLoad() {
  125. },
  126. methods: {
  127. getdata(){
  128. var that=this;
  129. this.customerId=uni.getStorageSync('customerId')
  130. this.array=uni.getStorageSync('PlateNumberArr')
  131. this.array.unshift('全部')
  132. if(!this.customerId){
  133. this.nodataShow=true
  134. }else{
  135. this.getList()
  136. }
  137. },
  138. getList(){
  139. this.$http('enterprise/wechat/listIntegralInfoByCustomerId', {
  140. customerID:this.customerId,
  141. unionID:'EEADACCD-8A19-499D-8AD7-6975D2C93243',
  142. page:1,
  143. limit:50,
  144. plateNumber:this.plateNumber
  145. }, 'GET').then(res => {
  146. this.list=res.data.Items
  147. })
  148. },
  149. bindPickerChange: function(e) {
  150. console.log('picker发送选择改变,携带值为', e.detail)
  151. this.index = e.detail.value
  152. this.plateNumber=this.array[this.index]
  153. if(this.index==0){
  154. this.plateNumber=''
  155. }
  156. this.getList()
  157. },
  158. seeData(){
  159. this.$refs.popup.open('bottom')
  160. }
  161. }
  162. }
  163. </script>
  164. <style scoped>
  165. .topbox{
  166. padding: 24rpx;background: #fff;
  167. }
  168. .carUpimg{
  169. width: 26rpx;height: 16rpx;
  170. margin-left: 10rpx;
  171. }
  172. .cBox{
  173. padding: 0 24rpx;
  174. }
  175. .line{
  176. padding: 30rpx 0rpx;background: #FFFFFF;
  177. border-radius: 10rpx;margin-top: 20rpx;
  178. }
  179. .lineTop{
  180. border-bottom: 1px solid #EEEEEE;
  181. display: flex;justify-content: space-between;
  182. padding-bottom: 22rpx;
  183. padding-left: 20rpx;
  184. padding-right: 20rpx;
  185. }
  186. .ltLeft{
  187. display: flex;
  188. }
  189. .km{
  190. height: 36rpx;
  191. border-radius: 4rpx;
  192. border: 1rpx solid #DDDDDD;
  193. line-height: 36rpx;
  194. padding: 0 10rpx;
  195. margin-left: 20rpx;
  196. }
  197. .cp{
  198. line-height: 36rpx;
  199. font-size: 30rpx;
  200. color: #333333;
  201. }
  202. .span1{
  203. line-height: 36rpx;
  204. font-weight: 500;
  205. font-size: 30rpx;
  206. color: #FF0000;
  207. }
  208. .lineLine1{
  209. font-size: 24rpx;
  210. color: #666666;
  211. line-height: 33rpx;
  212. padding-top: 16rpx;
  213. padding-left: 20rpx;
  214. padding-right: 20rpx;
  215. }
  216. .line2{
  217. font-size: 24rpx;
  218. color: #666666;
  219. line-height: 33rpx;
  220. padding-top: 16rpx;
  221. display: flex;
  222. justify-content: space-between;
  223. padding-left: 20rpx;
  224. padding-right: 20rpx;
  225. }
  226. .lineCont{
  227. border-bottom: 1px solid #EEEEEE;
  228. padding-bottom: 16rpx;
  229. }
  230. .lineBottom{
  231. font-size: 24rpx;
  232. color: #3C3C3C;
  233. line-height: 33rpx;
  234. padding: 20rpx;
  235. padding-bottom: 0;
  236. }
  237. .popupBox{
  238. width: 750rpx;
  239. height: 80vh;
  240. background: #FFFFFF;
  241. border-radius: 32rpx 32rpx 0rpx 0rpx;
  242. position: relative;
  243. }
  244. .popupTitleBox{
  245. display: flex;
  246. justify-content: space-between;
  247. padding: 30rpx;
  248. }
  249. .popupTitle{
  250. font-size: 30rpx;
  251. color: #3C3C3C;
  252. line-height: 42rpx;
  253. }
  254. .chaImg{
  255. width: 27rpx;height: 27rpx;margin-top: 9rpx;
  256. }
  257. .popupCp{
  258. font-weight: 500;
  259. font-size: 30rpx;
  260. color: #3C3C3C;
  261. padding-left: 30rpx;
  262. }
  263. .popupLcBox{
  264. display: flex;justify-content: space-between;
  265. font-size: 24rpx;
  266. color: #999999;
  267. padding: 10rpx 30rpx 34rpx 30rpx;
  268. border-bottom: 1px solid #EEEEEE;
  269. }
  270. .tableTop{
  271. display: flex;font-size: 26rpx;
  272. color: #999999;
  273. padding: 20rpx 20rpx 0rpx 20rpx;
  274. }
  275. .tableLine{
  276. display: flex;
  277. border-bottom: 1px solid #EEEEEE;
  278. padding: 20rpx ;
  279. }
  280. .tableLine:last-child{
  281. border-bottom:none;
  282. }
  283. .plineBox{
  284. padding: 24rpx;
  285. }
  286. .pline{
  287. margin-bottom: 20rpx;
  288. background: #F4F5F7;
  289. border-radius: 10rpx;
  290. }
  291. .w50{
  292. width: 50%;
  293. }
  294. .w25{
  295. width: 25%;
  296. text-align: right;
  297. }
  298. .tableName{
  299. display: flex;
  300. }
  301. .ka{
  302. width: 28rpx;
  303. height: 28rpx;
  304. background: #FF8113;
  305. border-radius: 4rpx;
  306. text-align: center;
  307. line-height: 28rpx;
  308. font-size: 22rpx;
  309. color: #FFFFFF;
  310. margin-right: 10rpx;
  311. }
  312. .itemname{
  313. font-size: 26rpx; line-height: 28rpx;
  314. color: #3C3C3C;
  315. }
  316. .tableNum{
  317. font-size: 26rpx; line-height: 28rpx;
  318. color: #3C3C3C;
  319. }
  320. .remarks{
  321. font-size: 24rpx;
  322. color: #999999;
  323. line-height: 33rpx;
  324. padding-top: 10rpx;
  325. }
  326. .nodataImg{
  327. width: 400rpx;
  328. padding-top: 100rpx;
  329. }
  330. .noTxt{
  331. font-size: 32rpx;
  332. color: #999999;
  333. padding-top: 50rpx;
  334. }
  335. .nodataBox{
  336. text-align: center;
  337. }
  338. </style>