Withholdingrecord.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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. let getDictDataList=uni.getStorageSync('getDictDataList');
  103. for(let i=0;i<getDictDataList.length;i++){
  104. if(getDictDataList[i].dictType=='PayType'){
  105. this.columnstype=getDictDataList[i]
  106. }
  107. }
  108. // console.log('111111111111111111',this.columnstype)
  109. this.getfloor();
  110. // this.loadmore();
  111. },
  112. //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
  113. onReady() {
  114. // 微信小程序需要用此写法
  115. },
  116. //监听页面隐藏
  117. onHide() {},
  118. //监听窗口尺寸变化
  119. onResize() {},
  120. //监听页面卸载
  121. onUnload() {},
  122. //监听用户下拉动作,一般用于下拉刷新
  123. onPullDownRefresh() {},
  124. methods: {
  125. seedetail(e){
  126. console.log('222',e)
  127. },
  128. scrolltolower() {
  129. // this.loadmore()
  130. this.dataForm.page = this.dataForm.page + 1;
  131. console.log('111111111111111111', this.dataForm.page)
  132. this.$api.get('/billinfo/paypage', this.dataForm)
  133. .then(res => {
  134. if (res.data.data.list.length != 0) {
  135. this.indexList.push(...res.data.data.list);
  136. } else {
  137. uni.showToast({
  138. title:'暂无更多数据了',
  139. icon: 'none',
  140. duration: 1500
  141. })
  142. }
  143. console.log('111111111111111111', this.indexList)
  144. })
  145. },
  146. loadmore() {
  147. // for (let i = 0; i < 30; i++) {
  148. // this.indexList.push({
  149. // url: this.urls[uni.$u.random(0, this.urls.length - 1)]
  150. // })
  151. // }
  152. },
  153. getalldata() {
  154. this.$api.get('/payrecord/page', this.dataForm)
  155. .then(res => {
  156. this.indexList = [];
  157. this.indexList = res.data.data.list;
  158. })
  159. },
  160. canceltype() {
  161. this.showtype = false;
  162. },
  163. confirmtype(e) {
  164. console.log('111111111111111111', e.value[0])
  165. this.showtype = false;
  166. if( e.value[0].dictValue=='all'){
  167. this.mytype = e.value[0].dictLabel;
  168. this.dataForm.type ='';
  169. this.dataForm.page=1;
  170. this.getalldata();
  171. }else{
  172. this.mytype = e.value[0].dictLabel;
  173. this.dataForm.type = e.value[0].dictValue;
  174. this.dataForm.page=1;
  175. this.getalldata();
  176. }
  177. },
  178. typechange() {
  179. this.showtype = true;
  180. },
  181. getfloor() {
  182. this.$api.get('/control/getOrgStructureTree/', {})
  183. .then(res => {
  184. if (res.data.code == 0) {
  185. this.dataForm.projectId = res.data.data[0].orgId;
  186. this.mytitle = res.data.data[0].orgName;
  187. this.alldata = res.data.data[0].childrenList;
  188. //console.log('111111111111111111', res.data.data[0].childrenList)
  189. this.columns = [
  190. res.data.data[0].childrenList,
  191. res.data.data[0].childrenList[0].childrenList
  192. ]
  193. let allfloor = [];
  194. for (let i = 0; i < res.data.data[0].childrenList.length; i++) {
  195. allfloor.push(res.data.data[0].childrenList[i].childrenList)
  196. }
  197. // console.log('111111111111111111',allfloor)
  198. this.columnData = allfloor;
  199. this.dataForm.page=1;
  200. this.getalldata();
  201. } else {
  202. this.showdct = true
  203. }
  204. })
  205. },
  206. floorchange() {
  207. this.showfloor = true;
  208. },
  209. changeHandler(e) {
  210. const {
  211. columnIndex,
  212. index,
  213. // 微信小程序无法将picker实例传出来,只能通过ref操作
  214. picker = this.$refs.uPicker
  215. } = e
  216. if (columnIndex === 0) {
  217. this.loading = true
  218. picker.setColumnValues(1, this.columnData[index])
  219. this.loading = false
  220. }
  221. this.getalldata();
  222. },
  223. confirmfloor(e) {
  224. console.log('222222', e.value)
  225. this.mytitle = e.value[0].orgName + e.value[1].orgName;
  226. this.dataForm.buildingId = e.value[0].orgId;
  227. this.dataForm.storeyId = e.value[1].orgId;
  228. this.showfloor = false;
  229. this.getalldata();
  230. },
  231. cancelfloor() {
  232. this.showfloor = false;
  233. },
  234. }
  235. }
  236. </script>
  237. <style lang="scss">
  238. .Currentamount {
  239. padding-left: 30rpx;
  240. height: 50rpx;
  241. line-height: 50rpx;
  242. color: #BCB3A7;
  243. span {
  244. color: #FA5555;
  245. padding-left: 9rpx;
  246. }
  247. }
  248. .Callfee{
  249. width: 100rpx;
  250. height: 45rpx;
  251. text-align: center;
  252. line-height:45rpx;
  253. color: #5C8FFF;
  254. border: 1px solid #5C8FFF;
  255. font-size: 22rpx;
  256. position: absolute;
  257. bottom: 10rpx;
  258. right: 10px;
  259. font-weight: bold;
  260. }
  261. .companylist {
  262. margin: 20rpx 30rpx;
  263. background: #fff;
  264. height: 280rpx;
  265. border-radius: 10px;
  266. position: relative;
  267. h3 {
  268. height: 70rpx;
  269. line-height: 70rpx;
  270. padding-left: 30rpx;
  271. }
  272. }
  273. .settled {
  274. background-color: #09C700;
  275. width: 100rpx;
  276. height: 40rpx;
  277. text-align: center;
  278. line-height: 40rpx;
  279. color: #fff;
  280. font-size: 14rpx;
  281. position: absolute;
  282. top: 0px;
  283. right: 0px;
  284. border-top-right-radius: 10rpx;
  285. border-bottom-left-radius: 10rpx;
  286. }
  287. .outstanding {
  288. background-color: #30D3A2;
  289. width: 100rpx;
  290. height: 40rpx;
  291. text-align: center;
  292. line-height: 40rpx;
  293. color: #fff;
  294. font-size: 14rpx;
  295. position: absolute;
  296. top: 0px;
  297. right: 0px;
  298. border-top-right-radius: 10rpx;
  299. border-bottom-left-radius: 10rpx;
  300. }
  301. .billall {}
  302. .topbill {
  303. display: flex;
  304. justify-content: center;
  305. align-items: center;
  306. height: 100rpx;
  307. background-color: #e6e6e6;
  308. }
  309. .topbilledit {
  310. display: flex;
  311. justify-content: space-around;
  312. align-items: center;
  313. }
  314. .changetime1 {
  315. padding-right: 10rpx;
  316. }
  317. </style>