consumption.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  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(item)">
  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" @click="gaunbi"></image>
  52. </view>
  53. <view class="popupCp">{{carData.PlateNumber}}</view>
  54. <view class="popupLcBox">
  55. <view class="popupLc">进店里程:<span style="color: #3C3C3C;" v-if="carData.CurrentMileage">{{carData.CurrentMileage}}km</span> </view>
  56. <view class="shishouamount">实收金额:<span style="color: #FF0000;">{{carData.ReceiptMoney}}</span> </view>
  57. </view>
  58. <view class="plineBox" v-if="lineData.billItemDetailList.length" >
  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" v-for="(item,index) in lineData.billItemDetailList">
  66. <view class="w50">
  67. <view class="tableName">
  68. <view class="ka" v-if="item.cardDetailID">卡</view>
  69. <view class="itemname">{{item.itemName}}</view>
  70. </view>
  71. <view class="remarks"v-if="item.comment">{{item.comment}}</view>
  72. </view>
  73. <view class="w25">
  74. <view class="tableNum">{{item.saleQty}}</view>
  75. </view>
  76. <view class="w25">
  77. <view class="tableNum">{{item.salePrice}}</view>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="plineBox" v-if="lineData.billPartDetailList.length" >
  83. <view class="pline">
  84. <view class="tableTop">
  85. <view class="w50">商品信息</view>
  86. <view class="w25">数量</view>
  87. <view class="w25">金额</view>
  88. </view>
  89. <view class="tableLine" v-for="(item,index) in lineData.billPartDetailList">
  90. <view class="w50">
  91. <view class="tableName">
  92. <view class="ka" v-if="item.cardDetailID">卡</view>
  93. <view class="itemname">{{item.goodsName}}</view>
  94. </view>
  95. <view class="remarks"v-if="item.comment">{{item.comment}}</view>
  96. </view>
  97. <view class="w25">
  98. <view class="tableNum">{{item.saleQty}}</view>
  99. </view>
  100. <view class="w25">
  101. <view class="tableNum">{{item.salePrice}}</view>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. <view class="plineBox" v-if="lineData.billSurchargesList.length" >
  107. <view class="pline">
  108. <view class="tableTop">
  109. <view class="w75">附加费</view>
  110. <view class="w25">金额</view>
  111. </view>
  112. <view class="tableLine" v-for="(item,index) in lineData.billSurchargesList">
  113. <view class="w75">
  114. <view class="tableName">
  115. <view class="itemname">{{item.surchargesName}}</view>
  116. </view>
  117. </view>
  118. <view class="w25">
  119. <view class="tableNum">{{item.surchargesMoeny}}</view>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </uni-popup>
  126. </view>
  127. </template>
  128. <script>
  129. export default {
  130. data() {
  131. return {
  132. customerId:'',
  133. list:[],
  134. array:[],
  135. nodataShow:false,
  136. index:0,
  137. plateNumber:'',
  138. lineId:'',
  139. lineData:{
  140. billItemDetailList:[],
  141. billPartDetailList:[],
  142. billSurchargesList:[]
  143. },
  144. carData:'',
  145. }
  146. },
  147. onLoad() {
  148. },
  149. methods: {
  150. getdata(){
  151. var that=this;
  152. this.customerId=uni.getStorageSync('customerId')
  153. this.array=uni.getStorageSync('PlateNumberArr')
  154. this.array.unshift('全部')
  155. if(!this.customerId){
  156. this.nodataShow=true
  157. }else{
  158. this.getList()
  159. }
  160. },
  161. getList(){
  162. this.$http('enterprise/wechat/listIntegralInfoByCustomerId', {
  163. customerID:this.customerId,
  164. unionID:'EEADACCD-8A19-499D-8AD7-6975D2C93243',
  165. page:1,
  166. limit:50,
  167. plateNumber:this.plateNumber
  168. }, 'GET').then(res => {
  169. this.list=res.data.Items
  170. })
  171. },
  172. bindPickerChange: function(e) {
  173. console.log('picker发送选择改变,携带值为', e.detail)
  174. this.index = e.detail.value
  175. this.plateNumber=this.array[this.index]
  176. if(this.index==0){
  177. this.plateNumber=''
  178. }
  179. this.getList()
  180. },
  181. seeData(item){
  182. this.lineId=item.ID;
  183. this.carData=item
  184. this.maintenanceOrderDetail()
  185. this.$refs.popup.open('bottom')
  186. },
  187. maintenanceOrderDetail(){
  188. this.$http('enterprise/wechat/maintenanceOrderDetail', {
  189. id:this.lineId
  190. }, 'GET').then(res => {
  191. this.lineData=res.data
  192. })
  193. },
  194. gaunbi(){
  195. this.$refs.popup.close()
  196. }
  197. }
  198. }
  199. </script>
  200. <style scoped>
  201. .topbox{
  202. padding: 24rpx;background: #fff;
  203. }
  204. .carUpimg{
  205. width: 26rpx;height: 16rpx;
  206. margin-left: 10rpx;
  207. }
  208. .cBox{
  209. padding: 0 24rpx;
  210. }
  211. .line{
  212. padding: 30rpx 0rpx;background: #FFFFFF;
  213. border-radius: 10rpx;margin-top: 20rpx;
  214. }
  215. .lineTop{
  216. border-bottom: 1px solid #EEEEEE;
  217. display: flex;justify-content: space-between;
  218. padding-bottom: 22rpx;
  219. padding-left: 20rpx;
  220. padding-right: 20rpx;
  221. }
  222. .ltLeft{
  223. display: flex;
  224. }
  225. .km{
  226. height: 36rpx;
  227. border-radius: 4rpx;
  228. border: 1rpx solid #DDDDDD;
  229. line-height: 36rpx;
  230. padding: 0 10rpx;
  231. margin-left: 20rpx;
  232. }
  233. .cp{
  234. line-height: 36rpx;
  235. font-size: 30rpx;
  236. color: #333333;
  237. }
  238. .span1{
  239. line-height: 36rpx;
  240. font-weight: 500;
  241. font-size: 30rpx;
  242. color: #FF0000;
  243. }
  244. .lineLine1{
  245. font-size: 24rpx;
  246. color: #666666;
  247. line-height: 33rpx;
  248. padding-top: 16rpx;
  249. padding-left: 20rpx;
  250. padding-right: 20rpx;
  251. }
  252. .line2{
  253. font-size: 24rpx;
  254. color: #666666;
  255. line-height: 33rpx;
  256. padding-top: 16rpx;
  257. display: flex;
  258. justify-content: space-between;
  259. padding-left: 20rpx;
  260. padding-right: 20rpx;
  261. }
  262. .lineCont{
  263. border-bottom: 1px solid #EEEEEE;
  264. padding-bottom: 16rpx;
  265. }
  266. .lineBottom{
  267. font-size: 24rpx;
  268. color: #3C3C3C;
  269. line-height: 33rpx;
  270. padding: 20rpx;
  271. padding-bottom: 0;
  272. }
  273. .popupBox{
  274. width: 750rpx;
  275. height: 80vh;
  276. background: #FFFFFF;
  277. border-radius: 32rpx 32rpx 0rpx 0rpx;
  278. position: fixed;
  279. left: 0;
  280. bottom: 0;
  281. }
  282. .popupTitleBox{
  283. display: flex;
  284. justify-content: space-between;
  285. padding: 30rpx;
  286. }
  287. .popupTitle{
  288. font-size: 30rpx;
  289. color: #3C3C3C;
  290. line-height: 42rpx;
  291. }
  292. .chaImg{
  293. width: 27rpx;height: 27rpx;margin-top: 9rpx;
  294. }
  295. .popupCp{
  296. font-weight: 500;
  297. font-size: 30rpx;
  298. color: #3C3C3C;
  299. padding-left: 30rpx;
  300. }
  301. .popupLcBox{
  302. display: flex;justify-content: space-between;
  303. font-size: 24rpx;
  304. color: #999999;
  305. padding: 10rpx 30rpx 34rpx 30rpx;
  306. border-bottom: 1px solid #EEEEEE;
  307. }
  308. .tableTop{
  309. display: flex;font-size: 26rpx;
  310. color: #999999;
  311. padding: 20rpx 20rpx 0rpx 20rpx;
  312. }
  313. .tableLine{
  314. display: flex;
  315. border-bottom: 1px solid #EEEEEE;
  316. padding: 20rpx ;
  317. }
  318. .tableLine:last-child{
  319. border-bottom:none;
  320. }
  321. .plineBox{
  322. padding: 20rpx 24rpx 0 24rpx;
  323. background: #F4F5F7;
  324. }
  325. .pline{
  326. margin-bottom: 20rpx;
  327. background: #F4F5F7;
  328. border-radius: 10rpx;
  329. }
  330. .w50{
  331. width: 50%;
  332. }
  333. .w25{
  334. width: 25%;
  335. text-align: right;
  336. }
  337. .w75{
  338. width: 75%;
  339. }
  340. .tableName{
  341. display: flex;
  342. }
  343. .ka{
  344. width: 28rpx;
  345. height: 28rpx;
  346. background: #FF8113;
  347. border-radius: 4rpx;
  348. text-align: center;
  349. line-height: 28rpx;
  350. font-size: 22rpx;
  351. color: #FFFFFF;
  352. margin-right: 10rpx;
  353. }
  354. .itemname{
  355. font-size: 26rpx; line-height: 28rpx;
  356. color: #3C3C3C;
  357. }
  358. .tableNum{
  359. font-size: 26rpx; line-height: 28rpx;
  360. color: #3C3C3C;
  361. }
  362. .remarks{
  363. font-size: 24rpx;
  364. color: #999999;
  365. line-height: 33rpx;
  366. padding-top: 10rpx;
  367. }
  368. .nodataImg{
  369. width: 400rpx;
  370. padding-top: 100rpx;
  371. }
  372. .noTxt{
  373. font-size: 32rpx;
  374. color: #999999;
  375. padding-top: 50rpx;
  376. }
  377. .nodataBox{
  378. text-align: center;
  379. }
  380. </style>