list.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view>
  3. <!-- 第一种样式 人员管理-->
  4. <block v-if="datainfo.length>0">
  5. <!-- 历史账单 -->
  6. <block v-if="type=='moneybill'">
  7. <view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx">
  8. <view class="ctop flexc" style="padding: 26rpx 24rpx 24rpx;">
  9. <image :src="time" class="imgs"></image>
  10. <view class="tit">2024/01 -2024/12</view>
  11. <view class="btn btnbgb" v-if="ite.type==1">已缴费</view>
  12. <view class="btn btnbgc" v-else>未缴费</view>
  13. <view class="flex1"></view>
  14. <view class="txta">1号楼3单元1102</view>
  15. </view>
  16. <view class="clists flexc">
  17. <view class="mlistl">
  18. <view class="mltit">应缴总额 /元</view>
  19. <view class="mltxt">4307.20</view>
  20. </view>
  21. <view class="mlistr">
  22. <view class="clist"><view class="tit">物业费用:</view>3247.20元</view>
  23. <view class="clist"><view class="tit">车位费用:</view>960.00元</view>
  24. <view class="clist"><view class="tit">能耗费用:</view>100.00元</view>
  25. </view>
  26. </view>
  27. </view>
  28. </block>
  29. <view class="shax" v-if="wtdt">{{wtdt}}</view>
  30. </block>
  31. <!-- 无数据 -->
  32. <view class="nodata" v-else>
  33. <image :src="noiconpimg"></image>
  34. <view>
  35. 暂无数据
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import config from '@/config'
  42. import {selectDictValue} from "@/utils/common.js"
  43. import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
  44. export default{
  45. props:{
  46. datainfo: {
  47. type: Array,
  48. default () {
  49. return []
  50. }
  51. },
  52. wtdt:{
  53. type:String,
  54. default () {
  55. return ''
  56. }
  57. },
  58. type:{
  59. type:String,
  60. default () {
  61. return 0
  62. }
  63. },
  64. bxztList:{
  65. type:Array,
  66. default () {
  67. return []
  68. }
  69. },
  70. fkztList:{
  71. type:Array,
  72. default () {
  73. return []
  74. }
  75. },
  76. bxlbList:{
  77. type:Array,
  78. default () {
  79. return []
  80. }
  81. }
  82. },
  83. data(){
  84. return{
  85. noiconpimg:require("@/static/images/nodata.png"),
  86. rimg:require('@/static/images/rimg.png'),
  87. baseUrl:config.baseUrl,
  88. delBtnWidth:66,//左滑默认宽度
  89. }
  90. },
  91. mounted() {
  92. },
  93. methods:{
  94. checkPermi,checkRole,
  95. kaType(data, list) {
  96. return selectDictValue(list, data);
  97. },
  98. getDetail(e){
  99. this.$emit('getDetail',e)
  100. },
  101. getPut(e,type){
  102. if(type>1){
  103. this.$emit('getDetail',e)
  104. }else{
  105. this.$emit('getPut',e)
  106. }
  107. },
  108. getDelFn(id){
  109. var that=this;
  110. uni.showModal({
  111. title: '确认删除',
  112. content: "是否确认删除",
  113. cancelText: '取消',
  114. confirmText: '确认',
  115. success: function(res) {
  116. if (res.confirm) {
  117. that.$emit('getDelFn',id)
  118. } else if (res.cancel) {
  119. }
  120. }
  121. });
  122. },
  123. getPreview(idx,arr) {
  124. var newArr=[];
  125. arr.forEach(ite=>{
  126. var ds=this.baseUrl+ite
  127. newArr.push(ds)
  128. })
  129. uni.previewImage({
  130. urls: newArr,
  131. current:idx,
  132. success: function(data) {},
  133. fail: function(err) {}
  134. });
  135. },
  136. //开始触摸滑动
  137. drawStart(e) {
  138. // console.log("开始触发");
  139. var touch = e.touches[0];
  140. this.startX = touch.clientX;
  141. },
  142. //触摸滑动
  143. drawMove(e) {
  144. // console.log("滑动");
  145. for (var index in this.datainfo) {
  146. // this.csListArrl[index].right=0
  147. this.$set(this.datainfo[index],'right',0);
  148. }
  149. var idx=e.currentTarget.dataset.idx
  150. var touch = e.touches[0];
  151. var item = this.datainfo[idx];
  152. var disX = this.startX - touch.clientX;
  153. if (disX >= 20) {
  154. if (disX > this.delBtnWidth) {
  155. disX = this.delBtnWidth;
  156. }
  157. // this.csListArrl[idx].right=disX
  158. this.$set(this.datainfo[idx],'right',disX);
  159. } else {
  160. // this.csListArrl[idx].right=0
  161. this.$set(this.datainfo[idx],'right',0);
  162. }
  163. },
  164. //触摸滑动结束
  165. drawEnd(e) {
  166. // console.log("滑动结束");
  167. var idx=e.currentTarget.dataset.idx
  168. var item = this.datainfo[idx];
  169. if (item.right >= this.delBtnWidth / 2) {
  170. // this.datainfo[idx].right=this.delBtnWidth
  171. this.$set(this.datainfo[idx],'right',this.delBtnWidth);
  172. } else {
  173. this.datainfo[idx].right=0
  174. }
  175. },
  176. }
  177. }
  178. </script>
  179. <style lang="scss" scoped>
  180. .flex{display: flex;}
  181. .flexc{display: flex;align-items: center;}
  182. .mb10{margin-bottom: 20rpx;}
  183. // 报修
  184. .walists{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx; position: relative;
  185. .watop{
  186. padding: 0 36rpx 8rpx 38rpx;
  187. .watit{padding: 24rpx 0;margin-bottom: 4rpx;display: flex;
  188. .tit{font-weight: bold;font-size: 28rpx;color: #272727;flex: 1;
  189. .cir{width: 14rpx;margin-left: 8rpx;margin-bottom: 10rpx;height: 14rpx;display: inline-block;background: #FF6969;border-radius: 8rpx;}
  190. }
  191. .txt{font-weight: bold;font-size: 26rpx;flex: 0 0 auto;
  192. }
  193. }
  194. }
  195. .walist{display: flex;font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;
  196. .tit{min-width: 100rpx;text-align-last: justify}
  197. }
  198. .wabtn{display: flex;align-items: center;justify-content: space-between;border-top: 2rpx solid #E5E5E5;height: 80rpx;padding: 0 38rpx;
  199. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  200. image{width: 16rpx;height: 28rpx;}
  201. }
  202. }
  203. .vislist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 26rpx 38rpx 12rpx;
  204. .vistop{
  205. .tit{font-size: 28rpx;color: #272727;font-weight: bold;}
  206. .btns{min-width: 70rpx;font-weight: 500;
  207. font-size: 20rpx;padding: 0 8rpx;box-sizing: border-box;text-align: center;margin-left: 18rpx;color: #00B861;border-radius: 16rpx;border: 2rpx solid #0AC86E;}
  208. .txt{font-weight: bold;font-size: 26rpx;margin-left: 18rpx;}
  209. }
  210. .vlist{
  211. view{font-weight: 500;font-size: 24rpx;color: #666666;margin-bottom: 16rpx;flex: 0 1 auto;min-width: 50%;}
  212. }
  213. }
  214. .carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  215. .carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
  216. .tit{font-weight: bold;font-size: 32rpx;}
  217. .txt{font-weight: 500;font-size: 26rpx;color: #272727;}
  218. .txtbtn{min-width: 82rpx;
  219. height: 32rpx;font-weight: 500;font-size: 20rpx;color: #45CB99;
  220. border-radius: 16rpx;border: 1px solid #45CB99;margin-left: 12rpx;}
  221. .cara{flex: 0 0 auto;width: 232rpx;height: 74rpx;margin-right: 40rpx;}
  222. .carb{flex: 0 0 auto;width: 278rpx;height: 130rpx;}
  223. }
  224. .carlf{padding:26rpx 0 10rpx;
  225. .clflist{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 16rpx;}
  226. }
  227. .ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
  228. .imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
  229. .tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
  230. .txt{font-weight: 500;font-size: 26rpx;
  231. &.ca{color: #3565ED;}
  232. &.cb{color: #FE5A0E;}
  233. &.cc{color: #28C529;}
  234. }
  235. .txta{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
  236. .num{font-size: 24rpx;color: #AAAAAA;}
  237. }
  238. .btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
  239. &.btna{border: 2rpx solid #06C770;color: #06C770;}
  240. &.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
  241. &.btnc{border: 2rpx solid #FE5A0E;color: #FE5A0E;}
  242. &.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 36rpx;}
  243. &.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 36rpx;}
  244. &.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 36rpx;}
  245. }
  246. .clists{padding: 24rpx 24rpx 8rpx;
  247. .clist{font-weight: 500;margin-bottom: 16rpx;
  248. font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
  249. .tit{font-size: 26rpx;color: #AAAAAA;flex: 0 0 auto;margin-right: 16rpx;min-width: 108rpx;text-align-last: justify;}
  250. .imgas{display: flex;align-items: center;flex-wrap: wrap;
  251. image{width: 142rpx;height: 142rpx;margin-right: 30rpx;margin-top: 8rpx;}
  252. }
  253. }
  254. .w50{
  255. .clist{width: 50%;}
  256. }
  257. }
  258. }
  259. // 物业费
  260. .mlistl{width: 40%;display: flex;flex-direction: column;align-items: center;flex: 0 0 auto;
  261. .mltit{font-weight: 500;font-size: 26rpx;color: #666666;margin-bottom: 18rpx;}
  262. .mltxt{font-weight: bold;font-size: 32rpx;color: #0156FE;}
  263. }
  264. // 无数据
  265. .nodata{display: flex;flex-direction: column;align-items: center;
  266. image{width: 440rpx;height: 440rpx;}
  267. view{font-size: 30rpx;color: #666666;font-weight: bold;}
  268. }
  269. </style>