package.vue 8.3 KB

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