Withholdingrecord.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <template>
  2. <view class="billall">
  3. <u-cell-group>
  4. <u-cell :title="mytitle" value="修改" :isLink="true" @click="floorchange">
  5. <u-icon slot="icon" size="40" name="map"></u-icon>
  6. </u-cell>
  7. </u-cell-group>
  8. <view class="topbill">
  9. <view class="topbilledit">
  10. <!-- <view class="changetime1">
  11. <picker mode="date" :value="myday" fields="month" @change="dateChange">
  12. <view class="selestDate">{{myday}}</view>
  13. </picker>
  14. </view>
  15. <view class="changetime2">
  16. <u-icon name="arrow-down-fill" color="#666666" size="20"></u-icon>
  17. </view> -->
  18. </view>
  19. <view class="topbilledit" @click="typechange">
  20. <view class="changetime1">
  21. {{mytype}}
  22. </view>
  23. <view class="changetime2">
  24. <u-icon name="arrow-down-fill" color="#666666" size="20"></u-icon>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="u-listdata">
  29. <u-list @scrolltolower="scrolltolower" :pagingEnabled='true'>
  30. <u-list-item v-for="(item, index) in indexList" :key="index">
  31. <view class="companylist" @click="seedetail(item)">
  32. <!-- <view class="settled" v-if="item.status==1">
  33. 已结清
  34. </view> -->
  35. <!-- <view class="outstanding" v-if="item.status==0">
  36. 未结清
  37. </view> -->
  38. <view class="outstanding">
  39. 预存
  40. </view>
  41. <h3>{{item.tenantInfo.name}}</h3>
  42. <view class="Currentamount">
  43. 扣缴金额: <span>¥{{item.surplus}}</span>
  44. </view>
  45. <view class="Currentamount">
  46. 租户电话: {{item.tenantInfo.tel}}
  47. </view>
  48. <view class="Currentamount">
  49. 操作人:{{item.createName}}
  50. </view>
  51. <view class="Currentamount">
  52. 扣缴时间: {{item.createDate}}
  53. </view>
  54. </view>
  55. </u-list-item>
  56. </u-list>
  57. </view>
  58. <u-picker :show="showtype" :columns="columnstype" keyName="dictLabel" @confirm="confirmtype" @cancel='canceltype'>
  59. </u-picker>
  60. <u-picker :show="showfloor" ref="uPicker" :loading="loading" @confirm="confirmfloor" @cancel='cancelfloor'
  61. :columns="columns" keyName="orgName" @change="changeHandler"></u-picker>
  62. <u-notify ref="uNotify" :show="showdct" message="服务器请求失败"></u-notify>
  63. </view>
  64. </template>
  65. <script>
  66. import { isEmpty, getDictDataList } from "@/utils/index";
  67. export default {
  68. components: {
  69. },
  70. data() {
  71. return {
  72. setyesno: true,
  73. indexList: [],
  74. dataList: [],
  75. dataForm: {
  76. projectId: "",
  77. buildingId: "",
  78. storeyId: "",
  79. type: "",
  80. tenantId: "",
  81. page: 1,
  82. limit: 10,
  83. },
  84. showtype: false,
  85. showdct: false,
  86. mytitle: '',
  87. alldata: [],
  88. showfloor: false,
  89. loading: false,
  90. columns: [],
  91. columnData: [],
  92. myday: '',
  93. mytype: '全部',
  94. showPicker: false,
  95. //myday: currentDate,
  96. columnstype: [
  97. ],
  98. }
  99. },
  100. //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参
  101. onLoad() {
  102. this.columnstype=[getDictDataList("PayType")]
  103. // console.log('111111111111111111',this.columnstype)
  104. this.getfloor();
  105. // this.loadmore();
  106. },
  107. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  108. onReady() {
  109. // 微信小程序需要用此写法
  110. },
  111. //监听页面隐藏
  112. onHide() {},
  113. //监听窗口尺寸变化
  114. onResize() {},
  115. //监听页面卸载
  116. onUnload() {},
  117. //监听用户下拉动作,一般用于下拉刷新
  118. onPullDownRefresh() {},
  119. methods: {
  120. seedetail(e){
  121. console.log('222',e)
  122. },
  123. scrolltolower() {
  124. // this.loadmore()
  125. this.dataForm.page = this.dataForm.page + 1;
  126. console.log('111111111111111111', this.dataForm.page)
  127. this.$api.get('/billinfo/paypage', this.dataForm)
  128. .then(res => {
  129. if (res.data.data.list.length != 0) {
  130. this.indexList.push(...res.data.data.list);
  131. } else {
  132. uni.showToast({
  133. title:'暂无更多数据了',
  134. icon: 'none',
  135. duration: 1500
  136. })
  137. }
  138. console.log('111111111111111111', this.indexList)
  139. })
  140. },
  141. loadmore() {
  142. // for (let i = 0; i < 30; i++) {
  143. // this.indexList.push({
  144. // url: this.urls[uni.$u.random(0, this.urls.length - 1)]
  145. // })
  146. // }
  147. },
  148. getalldata() {
  149. this.$api.get('/payrecord/page', this.dataForm)
  150. .then(res => {
  151. this.indexList = [];
  152. this.indexList = res.data.data.list;
  153. })
  154. },
  155. canceltype() {
  156. this.showtype = false;
  157. },
  158. confirmtype(e) {
  159. console.log('111111111111111111', e.value[0])
  160. this.showtype = false;
  161. if( e.value[0].dictValue=='all'){
  162. this.mytype = e.value[0].dictLabel;
  163. this.dataForm.type ='';
  164. this.dataForm.page=1;
  165. this.getalldata();
  166. }else{
  167. this.mytype = e.value[0].dictLabel;
  168. this.dataForm.type = e.value[0].dictValue;
  169. this.dataForm.page=1;
  170. this.getalldata();
  171. }
  172. },
  173. typechange() {
  174. this.showtype = true;
  175. },
  176. getfloor() {
  177. this.$api.get('/control/getOrgStructureTree/', {})
  178. .then(res => {
  179. if (res.data.code == 0) {
  180. this.dataForm.projectId = res.data.data[0].orgId;
  181. this.mytitle = res.data.data[0].orgName;
  182. this.alldata = res.data.data[0].childrenList;
  183. //console.log('111111111111111111', res.data.data[0].childrenList)
  184. this.columns = [
  185. res.data.data[0].childrenList,
  186. res.data.data[0].childrenList[0].childrenList
  187. ]
  188. let allfloor = [];
  189. for (let i = 0; i < res.data.data[0].childrenList.length; i++) {
  190. allfloor.push(res.data.data[0].childrenList[i].childrenList)
  191. }
  192. // console.log('111111111111111111',allfloor)
  193. this.columnData = allfloor;
  194. this.dataForm.page=1;
  195. this.getalldata();
  196. } else {
  197. this.showdct = true
  198. }
  199. })
  200. },
  201. floorchange() {
  202. this.showfloor = true;
  203. },
  204. changeHandler(e) {
  205. const {
  206. columnIndex,
  207. index,
  208. // 微信小程序无法将picker实例传出来,只能通过ref操作
  209. picker = this.$refs.uPicker
  210. } = e
  211. if (columnIndex === 0) {
  212. this.loading = true
  213. picker.setColumnValues(1, this.columnData[index])
  214. this.loading = false
  215. }
  216. this.getalldata();
  217. },
  218. confirmfloor(e) {
  219. console.log('222222', e.value)
  220. this.mytitle = e.value[0].orgName + e.value[1].orgName;
  221. this.dataForm.buildingId = e.value[0].orgId;
  222. this.dataForm.storeyId = e.value[1].orgId;
  223. this.showfloor = false;
  224. this.getalldata();
  225. },
  226. cancelfloor() {
  227. this.showfloor = false;
  228. },
  229. }
  230. }
  231. </script>
  232. <style lang="scss">
  233. .Currentamount {
  234. padding-left: 30rpx;
  235. height: 50rpx;
  236. line-height: 50rpx;
  237. color: #BCB3A7;
  238. span {
  239. color: #FA5555;
  240. padding-left: 9rpx;
  241. }
  242. }
  243. .Callfee{
  244. width: 100rpx;
  245. height: 45rpx;
  246. text-align: center;
  247. line-height:45rpx;
  248. color: #5C8FFF;
  249. border: 1px solid #5C8FFF;
  250. font-size: 22rpx;
  251. position: absolute;
  252. bottom: 10rpx;
  253. right: 10px;
  254. font-weight: bold;
  255. }
  256. .companylist {
  257. margin: 20rpx 30rpx;
  258. background: #fff;
  259. height: 280rpx;
  260. border-radius: 10px;
  261. position: relative;
  262. h3 {
  263. height: 70rpx;
  264. line-height: 70rpx;
  265. padding-left: 30rpx;
  266. }
  267. }
  268. .settled {
  269. background-color: #09C700;
  270. width: 100rpx;
  271. height: 40rpx;
  272. text-align: center;
  273. line-height: 40rpx;
  274. color: #fff;
  275. font-size: 14rpx;
  276. position: absolute;
  277. top: 0px;
  278. right: 0px;
  279. border-top-right-radius: 10rpx;
  280. border-bottom-left-radius: 10rpx;
  281. }
  282. .outstanding {
  283. background-color: #30D3A2;
  284. width: 100rpx;
  285. height: 40rpx;
  286. text-align: center;
  287. line-height: 40rpx;
  288. color: #fff;
  289. font-size: 14rpx;
  290. position: absolute;
  291. top: 0px;
  292. right: 0px;
  293. border-top-right-radius: 10rpx;
  294. border-bottom-left-radius: 10rpx;
  295. }
  296. .billall {}
  297. .topbill {
  298. display: flex;
  299. justify-content: center;
  300. align-items: center;
  301. height: 100rpx;
  302. background-color: #e6e6e6;
  303. }
  304. .topbilledit {
  305. display: flex;
  306. justify-content: space-around;
  307. align-items: center;
  308. }
  309. .changetime1 {
  310. padding-right: 10rpx;
  311. }
  312. </style>