package.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. <template>
  2. <view class="content">
  3. <view class="nodataBox" v-show="nodataShow">
  4. <image src="http://dmsphoto.66km.com.cn/thFiles/3C95A4C5-73F8-4B34-902B-703B8A0825C9.png" mode="widthFix" class="nodataImg"></image>
  5. <view class="noTxt">暂无数据</view>
  6. </view>
  7. <view class="box" v-show="!nodataShow">
  8. <view class="line" @click="detailFn(1,item.listCar)" v-for="(item,index) in czList">
  9. <view class="lineNameBox">
  10. <view class="lnameLeft">
  11. <view class="type">储值</view>
  12. <view class="lname">{{item.PacKName}}</view>
  13. </view>
  14. <view class="lBtn">使用条款</view>
  15. </view>
  16. <view class="lprice">
  17. <span class="price1">¥</span>
  18. <span class="price2">4566</span>
  19. <span class="price3">( 充{{item.ChargeMoney}}送{{item.GiftMoney}} )</span>
  20. </view>
  21. <view class="lShop">
  22. <view class="lShopName">可用门店:{{item.ShopName}}</view>
  23. <image class="carUpimg" src="../../static/img/icon_arrow_up.png" mode=""></image>
  24. </view>
  25. </view>
  26. <view class="line" @click="detailFn(2,item.maps)" v-for="(item,index) in jcList">
  27. <view class="lineNameBox">
  28. <view class="lnameLeft">
  29. <view class="type">计次</view>
  30. <view class="lname">{{item.packName}}</view>
  31. </view>
  32. <view class="lBtn">使用条款</view>
  33. </view>
  34. <!-- <view class="lprice">
  35. <span class="price1">¥</span>
  36. <span class="price2">4566</span>
  37. <span class="price3">( 充10000送1000 )</span>
  38. </view> -->
  39. <view class="lShop">
  40. <view class="lShopName" v-if="item.shoplist.length==0">可用门店:全部</view>
  41. <view class="lShopName" v-else>可用门店:
  42. <span v-for="(s,i) in item.shoplist">{{s.shopName}}</span>
  43. </view>
  44. <image class="carUpimg" src="../../static/img/icon_arrow_up.png" mode=""></image>
  45. </view>
  46. </view>
  47. </view>
  48. <uni-popup ref="popup" type="bottom" >
  49. <view class="popupBox" v-if="type==1">
  50. <view class="popupTitleBox">
  51. <view class="popupTitle">储值详情</view>
  52. <image src="../../static/img/cha.png" mode="" class="chaImg" @click="guanbi"></image>
  53. </view>
  54. <view class="dlineBox">
  55. <view class="dLine" v-for="(item,index) in listCar">
  56. <view class="dlineTime">06-13 11:28</view>
  57. <view class="dlineprice1">-¥1.00</view>
  58. </view>
  59. </view>
  60. </view>
  61. <view class="popupBox" v-if="type==2">
  62. <view class="popupTitleBox">
  63. <view class="popupTitle">计次详情</view>
  64. <image src="../../static/img/cha.png" mode="" class="chaImg" @click="guanbi"></image>
  65. </view>
  66. <view class="dlineBox">
  67. <view class="dLine2" v-for="(item,index) in maps">
  68. <view class="jcNameBox">
  69. <view class="jcType" v-if="item.FlowType==2">项目</view>
  70. <view class="jcType" v-if="item.FlowType==1">商品</view>
  71. <view class="jcNameTxt">{{item.FlowName}}</view>
  72. </view>
  73. <view class="jcTitme">
  74. <view class="jcYxq" v-if="item.ExpireTime&&item.ExpireTime!=null&&item.ExpireTime!='null'">有效期:{{item.ExpireTime.slice(0,10)}}</view>
  75. <view class="jcYxq" v-else>有效期:永久</view>
  76. <view class="jcNum">
  77. <span>剩余/总:<span style="color: #FF3B30;">{{item.AmountQty}}</span> /{{item.TotalQty}}</span>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </uni-popup>
  84. </view>
  85. </template>
  86. <script>
  87. export default {
  88. data() {
  89. return {
  90. type:1,
  91. czList:[],
  92. jcList:[],
  93. listCar:'',
  94. maps:'',
  95. nodataShow:false,
  96. }
  97. },
  98. onLoad() {
  99. },
  100. methods: {
  101. getdata(){
  102. var that=this;
  103. this.customerId=uni.getStorageSync('customerId')
  104. //储值信息
  105. if(!this.customerId){
  106. this.nodataShow=true
  107. }else{
  108. this.$http('enterprise/wechat/cardMoneyInfo', {
  109. id:this.customerId,
  110. }, 'GET').then(res => {
  111. this.czList=res.data
  112. })
  113. //计次信息
  114. this.$http('enterprise/wechat/listCardTimesInfo', {
  115. id:this.customerId,
  116. }, 'GET').then(res => {
  117. this.jcList=res.data
  118. })
  119. }
  120. },
  121. detailFn(num,list){
  122. this.type=num;
  123. if(num==1){
  124. this.listCar=list
  125. }
  126. if(num==2){
  127. this.maps=list
  128. }
  129. this.$refs.popup.open('bottom')
  130. },
  131. guanbi(){
  132. this.$refs.popup.close()
  133. }
  134. }
  135. }
  136. </script>
  137. <style scoped>
  138. .carUpimg{
  139. width: 26rpx;height: 16rpx;
  140. }
  141. .box{
  142. padding: 0 24rpx;
  143. }
  144. .line{
  145. background: #fff;
  146. padding: 30rpx 20rpx;
  147. border-radius: 10rpx;
  148. margin-top: 20rpx;
  149. }
  150. .lineNameBox{
  151. display: flex;justify-content: space-between;
  152. padding-bottom: 10rpx;
  153. }
  154. .lnameLeft{
  155. display: flex;
  156. }
  157. .type{
  158. idth: 64rpx;
  159. height: 36rpx;
  160. background: #FF8113;
  161. border-radius: 5rpx;
  162. font-size: 24rpx;
  163. color: #FFFFFF;
  164. text-align: center;
  165. line-height: 36rpx;
  166. margin-top: 8rpx;
  167. }
  168. .lname{
  169. font-size: 28rpx;
  170. color: #333333;
  171. line-height: 52rpx;
  172. padding-left: 12rpx;
  173. }
  174. .lBtn{
  175. width: 136rpx;
  176. height: 52rpx;
  177. background: #FFFFFF;
  178. border-radius: 28rpx;
  179. border: 1rpx solid #DDDDDD;
  180. font-size: 24rpx;
  181. color: #3C3C3C;
  182. text-align: center;
  183. line-height: 52rpx;
  184. }
  185. .price1{
  186. font-size: 24rpx;
  187. color: #FF3B30;
  188. }
  189. .price2{
  190. font-size: 36rpx;
  191. color: #FF3B30;
  192. }
  193. .price3{
  194. font-size: 24rpx;
  195. color: #3C3C3C;
  196. }
  197. .lShop{
  198. display: flex;
  199. justify-content: space-between;
  200. padding-top: 10rpx;
  201. }
  202. .lShopName{
  203. font-size: 24rpx;
  204. color: #999999;
  205. }
  206. .popupBox{
  207. width: 750rpx;
  208. height: 60vh;
  209. background: #FFFFFF;
  210. border-radius: 32rpx 32rpx 0rpx 0rpx;
  211. position: relative;
  212. }
  213. .popupTitleBox{
  214. display: flex;
  215. justify-content: space-between;
  216. padding: 30rpx;
  217. }
  218. .popupTitle{
  219. font-size: 30rpx;
  220. color: #3C3C3C;
  221. line-height: 42rpx;
  222. }
  223. .chaImg{
  224. width: 27rpx;height: 27rpx;margin-top: 9rpx;
  225. }
  226. .dLine{
  227. display: flex;
  228. justify-content: space-between;
  229. padding: 24rpx;
  230. border-bottom: 1px solid #EEEEEE;
  231. }
  232. .dLine2{
  233. padding: 24rpx;
  234. border-bottom: 1px solid #EEEEEE;
  235. }
  236. .dlineTime{
  237. font-size: 26rpx;
  238. color: #3C3C3C;
  239. }
  240. .dlineprice1{
  241. font-weight: 500;
  242. font-size: 26rpx;
  243. color: #3C3C3C;
  244. }
  245. .dlineBox{
  246. height: calc(60vh - 120rpx);
  247. overflow-y: auto;
  248. }
  249. .jcNameBox{
  250. display: flex;
  251. }
  252. .jcType{
  253. width: 62rpx;
  254. height: 32rpx;
  255. border-radius: 5rpx;
  256. border: 1px solid #F19D01;
  257. text-align: center;
  258. line-height: 32rpx;
  259. font-size: 24rpx;
  260. color: #F19D01;
  261. }
  262. .jcNameTxt{
  263. font-size: 26rpx;
  264. color: #333333;
  265. padding-left: 10rpx;
  266. line-height: 36rpx;
  267. }
  268. .jcTitme{
  269. display: flex;justify-content: space-between;
  270. padding-top: 20rpx;
  271. }
  272. .jcYxq{
  273. font-size: 24rpx;
  274. color: #999999;
  275. }
  276. .jcNum{
  277. font-size: 24rpx;
  278. color: #999999;
  279. }
  280. .nodataImg{
  281. width: 400rpx;
  282. padding-top: 100rpx;
  283. }
  284. .noTxt{
  285. font-size: 32rpx;
  286. color: #999999;
  287. padding-top: 50rpx;
  288. }
  289. .nodataBox{
  290. text-align: center;
  291. }
  292. </style>