consumption.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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. this.$http('enterprise/wechat/listIntegralInfoByCustomerId', {
  174. customerID:this.customerId,
  175. unionID:'EEADACCD-8A19-499D-8AD7-6975D2C93243',
  176. page:1,
  177. limit:50,
  178. plateNumber:this.plateNumber
  179. }, 'GET').then(res => {
  180. uni.hideLoading();
  181. this.list=res.data.Items
  182. })
  183. },
  184. bindPickerChange: function(e) {
  185. console.log('picker发送选择改变,携带值为', e.detail)
  186. this.index = e.detail.value
  187. this.plateNumber=this.array[this.index]
  188. if(this.index==0){
  189. this.plateNumber=''
  190. }
  191. this.getList()
  192. },
  193. seeData(item){
  194. this.lineId=item.ID;
  195. this.carData=item
  196. this.maintenanceOrderDetail()
  197. this.$refs.popup.open('bottom')
  198. },
  199. maintenanceOrderDetail(){
  200. this.$http('enterprise/wechat/maintenanceOrderDetail', {
  201. id:this.lineId
  202. }, 'GET').then(res => {
  203. this.lineData=res.data
  204. })
  205. },
  206. gaunbi(){
  207. this.$refs.popup.close()
  208. }
  209. }
  210. }
  211. </script>
  212. <style scoped>
  213. .topbox{
  214. padding: 24rpx;background: #fff;
  215. }
  216. .carUpimg{
  217. width: 26rpx;height: 16rpx;
  218. margin-left: 10rpx;
  219. }
  220. .cBox{
  221. padding: 0 24rpx;
  222. padding-bottom: 40rpx;
  223. }
  224. .line{
  225. padding: 30rpx 0rpx;background: #FFFFFF;
  226. border-radius: 10rpx;margin-top: 20rpx;
  227. padding-bottom: 20rpx;
  228. }
  229. .lineTop{
  230. border-bottom: 1px solid #EEEEEE;
  231. display: flex;justify-content: space-between;
  232. padding-bottom: 22rpx;
  233. padding-left: 20rpx;
  234. padding-right: 20rpx;
  235. }
  236. .ltLeft{
  237. display: flex;
  238. }
  239. .km{
  240. border-radius: 4rpx;
  241. border: 2rpx solid #DDDDDD;
  242. /* height: 36rpx; */
  243. padding: 2rpx 10rpx;
  244. margin-left: 20rpx;
  245. /* line-height: 40rpx; */
  246. }
  247. .cp{
  248. line-height: 40rpx;
  249. font-size: 30rpx;
  250. color: #333333;
  251. font-weight: 600;
  252. }
  253. .span1{
  254. line-height: 36rpx;
  255. font-weight: 500;
  256. font-size: 30rpx;
  257. color: #FF0000;
  258. }
  259. .lineLine1{
  260. font-size: 26rpx;
  261. color: #666666;
  262. line-height: 33rpx;
  263. padding-top: 16rpx;
  264. padding-left: 20rpx;
  265. padding-right: 20rpx;
  266. }
  267. .line2{
  268. font-size: 26rpx;
  269. color: #666666;
  270. line-height: 33rpx;
  271. padding-top: 16rpx;
  272. display: flex;
  273. justify-content: space-between;
  274. padding-left: 20rpx;
  275. padding-right: 20rpx;
  276. }
  277. .lineCont{
  278. border-bottom: 1px solid #EEEEEE;
  279. padding-bottom: 16rpx;
  280. }
  281. .lineBottom{
  282. font-size: 26rpx;
  283. color: #3C3C3C;
  284. line-height: 33rpx;
  285. padding: 20rpx;
  286. padding-bottom: 0;
  287. display: flex;
  288. justify-content: space-between;
  289. }
  290. .popupBox{
  291. width: 750rpx;
  292. height: 80vh;
  293. background: #FFFFFF;
  294. border-radius: 32rpx 32rpx 0rpx 0rpx;
  295. position: fixed;
  296. left: 0;
  297. bottom: 0;
  298. }
  299. .popupTitleBox{
  300. display: flex;
  301. justify-content: space-between;
  302. padding: 30rpx;
  303. }
  304. .popupTitle{
  305. font-size: 30rpx;
  306. color: #3C3C3C;
  307. line-height: 42rpx;
  308. font-weight: 600;
  309. }
  310. .chaImg{
  311. width: 27rpx;height: 27rpx;margin-top: 9rpx;
  312. }
  313. .popupCp{
  314. font-weight: 500;
  315. font-size: 30rpx;
  316. color: #3C3C3C;
  317. padding-left: 30rpx;
  318. }
  319. .popupLcBox{
  320. display: flex;justify-content: space-between;
  321. font-size: 26rpx;
  322. color: #999999;
  323. padding: 10rpx 30rpx 34rpx 30rpx;
  324. border-bottom: 1px solid #EEEEEE;
  325. }
  326. .tableTop{
  327. display: flex;font-size: 26rpx;
  328. color: #999999;
  329. padding: 20rpx 20rpx 0rpx 20rpx;
  330. }
  331. .tableLine{
  332. display: flex;
  333. border-bottom: 1px solid #EEEEEE;
  334. padding: 20rpx ;
  335. }
  336. .tableLine:last-child{
  337. border-bottom:none;
  338. }
  339. .plineBox{
  340. margin: 20rpx 24rpx 0 24rpx;
  341. background: #f9f9f9;
  342. border-radius: 10rpx;
  343. }
  344. .pline{
  345. margin-bottom: 20rpx;
  346. background: #f9f9f9;
  347. border-radius: 10rpx;
  348. }
  349. .w50{
  350. width: 50%;
  351. }
  352. .w25{
  353. width: 25%;
  354. text-align: right;
  355. }
  356. .w75{
  357. width: 75%;
  358. }
  359. .tableName{
  360. display: flex;
  361. }
  362. .ka{
  363. padding: 0 4rpx;
  364. height: 28rpx;
  365. background: #FF8113;
  366. border-radius: 4rpx;
  367. text-align: center;
  368. line-height: 30rpx;
  369. font-size: 22rpx;
  370. color: #FFFFFF;
  371. margin-right: 10rpx;
  372. }
  373. .itemname{
  374. font-size: 26rpx; line-height: 28rpx;
  375. color: #3C3C3C;
  376. }
  377. .tableNum{
  378. font-size: 26rpx; line-height: 28rpx;
  379. color: #3C3C3C;
  380. }
  381. .remarks{
  382. font-size: 24rpx;
  383. color: #999999;
  384. line-height: 33rpx;
  385. padding-top: 10rpx;
  386. }
  387. .nodataImg{
  388. width: 400rpx;
  389. padding-top: 100rpx;
  390. }
  391. .noTxt{
  392. font-size: 32rpx;
  393. color: #999999;
  394. padding-top: 50rpx;
  395. }
  396. .nodataBox{
  397. text-align: center;background: #fff;
  398. }
  399. .mxJt{
  400. width: 30rpx;height: 30rpx;
  401. }
  402. .ps{
  403. height:calc(80vh - 250rpx) ;
  404. overflow-y: auto;
  405. }
  406. </style>