proxyInfo.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. <template>
  2. <view>
  3. <u-navbar :title="title" title-color="#101010"></u-navbar>
  4. <u-picker-select title="日期选择" :maskCloseAble="true" v-model="tabsFrom.show2" :defaultTime="tabsFrom.show2Index" :endYear="endYear"
  5. mode="time" :params="params" @confirm="selector2confirm" @cancel="selector2cancel"
  6. @reset="selector2reset">
  7. </u-picker-select>
  8. <view>
  9. <view class="u-subsection" style="margin: 8rpx 0;border-bottom: 1px solid rgba(232,232,232,1);">
  10. <u-subsection :list="list" bgColor="#fff" activeColor="#1684FC" buttonColor="#1684FC"
  11. :current="homePageManageType" @change="sectionChange"
  12. font-size="32"></u-subsection>
  13. <view style="margin-top: 18rpx; text-align: end;" v-if="homePageManageType==5&&tabsFrom.show2Text">
  14. 指定时间:{{tabsFrom.show2Text}}
  15. </view>
  16. </view>
  17. </view>
  18. <!-- 统计 -->
  19. <view class="statistics">
  20. <view class="statistics-total">
  21. <view class="total-title">
  22. 合计代缴费收入
  23. </view>
  24. <view class="total-number">
  25. {{monthQuery}}元
  26. </view>
  27. </view>
  28. <view class="statistics-group">
  29. <view v-for="(item,i) in proxyList" :key="i"
  30. @click="gotoUrl('')"
  31. class="statistics-item">
  32. <view class="content">
  33. <view class="item-icon">
  34. <image class="img" v-if="item.name.indexOf('水')>-1" src="@/assets/img/deadline2.png" mode=""></image>
  35. <image class="img" v-else-if="item.name.indexOf('房')>-1||item.name.indexOf('租')>-1" src="@/assets/img/deadline1.png" mode=""></image>
  36. <image class="img" v-else-if="item.name.indexOf('保洁')>-1" src="@/assets/img/deadline4.png" mode=""></image>
  37. <image class="img" v-else-if="item.name.indexOf('物业')>-1" src="@/assets/img/deadline3.png" mode=""></image>
  38. <image class="img" v-else src="@/assets/img/deadline3.png" mode=""></image>
  39. </view>
  40. <!-- 收入 -->
  41. <view class="income">
  42. <view class="income-title">
  43. {{item.name}}
  44. </view>
  45. <view class="income-number" v-if="item.prepaidEndTime">
  46. 已缴费至 <text class="state">{{item.prepaidEndTime}}</text>
  47. </view>
  48. <view class="income-number" v-else>
  49. <text class="state">{{item.paymentMethodN}}</text>
  50. </view>
  51. </view>
  52. </view>
  53. <!-- 电量 -->
  54. <view class="electric-quantity">
  55. {{item.proxyFee.toFixed(2)}}元
  56. </view>
  57. </view>
  58. <u-divider :isnone="proxyList.length==0" nonetext="没有找到相关内容"
  59. border-color="#CFD2D5">已经到底了</u-divider>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. import * as API from '@/apis/pagejs/proxy.js'
  66. import {
  67. parseUnixTime
  68. } from '@/apis/utils'
  69. export default {
  70. data() {
  71. return {
  72. title:"",
  73. value: '2',
  74. clickType: -1,
  75. homePageManageType:2,
  76. queryDate:"",
  77. tenantName:"",
  78. monthQuery:0,
  79. tabsFrom: {
  80. show1: false,
  81. show1Index: 0,
  82. show2Index: '',
  83. show2: false,
  84. show1Text: "全部类型",
  85. show2Text: "",
  86. },
  87. proxyList:[],
  88. list: [{
  89. name: '上月',
  90. value: "2"
  91. },
  92. {
  93. name: '当月',
  94. value: "1"
  95. },
  96. {
  97. name: '今日',
  98. value: "4"
  99. }, {
  100. name: '当年',
  101. value: "3"
  102. }, {
  103. name: '合计',
  104. value: "0"
  105. },
  106. {
  107. name: '指定时间',
  108. value: "10"
  109. }
  110. ],
  111. sp:0,
  112. tenantId:"",
  113. endYear: '',
  114. params: {
  115. year: true,
  116. month: true,
  117. day: false,
  118. hour: false,
  119. minute: false,
  120. second: false
  121. },
  122. }
  123. },
  124. onLoad(op) {
  125. this.tenantId=op.id
  126. this.title=op.name
  127. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  128. this.endYear = new Date().getFullYear();
  129. if(op.type!=5){
  130. this.homePageManageType=op.type
  131. }
  132. this.getList()
  133. },
  134. computed:{
  135. },
  136. methods: {
  137. getList(){
  138. uni.showLoading({
  139. title: "加载中",
  140. mask: true,
  141. })
  142. var type=this.list[this.homePageManageType].value
  143. API.proxyPaymentDetails({
  144. queryDate:this.queryDate,
  145. tenantId:this.tenantId,
  146. type:type
  147. }).then((response) => {
  148. uni.hideLoading();
  149. this.proxyList=response.data.itemList
  150. this.monthQuery=response.data.proxyFee
  151. }).catch(error => {
  152. uni.showToast({
  153. title: error,
  154. icon: "none"
  155. })
  156. })
  157. },
  158. selector2reset(e) {
  159. //console.log(e)
  160. this.tabsFrom.show2Text = '全部时间'
  161. this.tabsFrom.show2Index = '';
  162. if (e.day) {
  163. this.queryDate = parseUnixTime(new Date(), '{y}-{m}-{d}');
  164. this.getList();
  165. } else {
  166. this.homePageManageType = this.clickType;
  167. if (this.homePageManageType != 5) {
  168. this.list[5].name = '指定时间';
  169. }
  170. this.getList();
  171. }
  172. },
  173. selector2cancel() {
  174. if(this.clickType != -1) {
  175. }
  176. this.homePageManageType = this.clickType;
  177. },
  178. queryDateMethod(queryTime, day) {
  179. this.homePageManageType = "5";
  180. if (day) {
  181. this.queryDate = queryTime;
  182. this.list[5].value = '9';
  183. } else {
  184. this.queryDate = queryTime + "-01";
  185. this.list[5].value = '10';
  186. }
  187. //this.list[5].name = queryTime;
  188. this.getList();
  189. },
  190. selector2confirm(e) {
  191. this.tabsFrom.show2Text = e.year + "年" + e.month + "月"
  192. this.tabsFrom.show2Index = e.year + "-" + e.month
  193. if (e.day) {
  194. this.tabsFrom.show2Text += e.day + "日"
  195. this.tabsFrom.show2Index += '-' + e.day
  196. this.queryDateMethod(this.tabsFrom.show2Index, true)
  197. } else {
  198. this.queryDateMethod(this.tabsFrom.show2Index, false)
  199. }
  200. },
  201. sectionChange(index) {
  202. this.clickType = this.homePageManageType ;
  203. this.homePageManageType = index;
  204. if (index == 5) {
  205. this.tabsFrom.show2 = true;
  206. //this.params.day = false;
  207. } else {
  208. this.list[5].name = '指定时间'
  209. this.getList()
  210. }
  211. },
  212. }
  213. }
  214. </script>
  215. <style>
  216. page {
  217. background-color: #fff;
  218. }
  219. </style>
  220. <style lang="scss" scoped >
  221. /deep/.u-item-5{
  222. .u-item-text{
  223. font-size: 26rpx !important;
  224. }
  225. }
  226. /deep/.u-item-bg{
  227. height: 2px !important;
  228. }
  229. /deep/.u-back-wrap{
  230. background-color: #fff;
  231. }
  232. // 统计
  233. .statistics {
  234. .statistics-total {
  235. display: flex;
  236. align-items: center;
  237. justify-content: space-between;
  238. padding: 36rpx 32rpx;
  239. //background-color: rgba(22, 119, 255, 1);
  240. background: linear-gradient(88.25deg, rgba(31,85,255,1) 0.65%,rgba(39,171,255,1) 99.34%);
  241. color: rgba(255, 255, 255, 1);
  242. font-size: 40rpx;
  243. font-weight: bold;
  244. }
  245. .statistics-group {
  246. .statistics-item {
  247. padding: 24rpx 32rpx;
  248. display: flex;
  249. align-items: center;
  250. justify-content: space-between;
  251. border-bottom: 1px solid rgba(245, 245, 245, 1);
  252. .electric-quantity {
  253. font-size: 40rpx;
  254. color: rgb(16,16,16);
  255. width: 200rpx;
  256. text-align: end;
  257. }
  258. .content {
  259. .item-icon {
  260. width: 80rpx;
  261. height: 80rpx;
  262. margin-right: 12rpx;
  263. .img {
  264. width: 100%;
  265. height: 100%;
  266. vertical-align: middle;
  267. }
  268. }
  269. flex: 0.99;
  270. display: flex;
  271. align-items: center;
  272. .income {
  273. .income-title {
  274. font-weight: bold;
  275. font-size: 32rpx;
  276. color: rgba(51, 51, 51, 1);
  277. }
  278. .income-number {
  279. font-size: 28rpx;
  280. color: rgba(119,119,119,1);
  281. }
  282. }
  283. }
  284. }
  285. }
  286. }
  287. .head-head{
  288. // box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
  289. background: #fff;
  290. padding:24rpx;
  291. }
  292. </style>