Withholdingrecord.vue 8.1 KB

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