consumption.vue 10 KB

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