移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

471 righe
14 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div
  4. class="header_main"
  5. style=""
  6. >
  7. 收支明细公开
  8. <div class="return_btn" @click="onClickLeft"></div>
  9. </div>
  10. <div class="record_main">
  11. <div class="record_det">
  12. <div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{queryParams.ny == '' ? '全部': queryParams.ny}}</div>
  13. <div class="total_r">共{{listLength}}条</div>
  14. </div>
  15. <van-popup v-model="showTab" position="bottom">
  16. <van-datetime-picker
  17. v-model="currentDate"
  18. type="year-month"
  19. title="选择年月"
  20. :min-date="minDate"
  21. :max-date="maxDate"
  22. :formatter="formatter"
  23. @confirm="onConfirmOpenNy"
  24. />
  25. </van-popup>
  26. <!-- <div class="record_list" v-if="showTab">-->
  27. <!-- <div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div>-->
  28. <!-- <div v-for="(item,index) in yearList" :key="index" :class="{'flex_block':true , 'current':queryParams.year == item}" @click="tabClick(item)">{{item}}</div>-->
  29. <!-- </div>-->
  30. </div>
  31. <div class="list_main">
  32. <van-list
  33. v-model="loading"
  34. :finished="finished"
  35. finished-text="没有更多了"
  36. @load="getList"
  37. >
  38. <!----1-->
  39. <div class="item" v-for="(item,index) in applicationList" :key="index" >
  40. <div class="info">
  41. <div class="title">
  42. <i class="icon_box"></i>
  43. <p class="news_title">{{item.voucherSummary}}</p>
  44. </div>
  45. <div class="time">
  46. <!-- <div class="icon_time"></div>-->
  47. {{item.bookDate}}
  48. <p v-if="item.jieAmount" style="color: #1ddf07">¥ <span>{{item.jieAmount}}</span>元</p>
  49. <p v-if="item.daiAmount" style="color: #df0707">¥ <span>{{item.daiAmount}}</span>元</p>
  50. </div>
  51. </div>
  52. </div>
  53. </van-list>
  54. </div>
  55. <!-- <div class="bottom_tips">-->
  56. <!-- <span class="xs">已经到底啦</span>-->
  57. <!-- </div>-->
  58. </div>
  59. </template>
  60. <script>
  61. import { financialPublicDetailReport , otherRemove } from "@/api/sunVillage_info/fixedAssets";
  62. import Cookies from "js-cookie";
  63. import request from '@/utils/request'
  64. export default {
  65. name: "certificateList",
  66. data() {
  67. return {
  68. applicationList:[],
  69. applicationListSecond:[],
  70. assetStatusOptions:[],
  71. otherGkTypeOptions:[],
  72. auditStatus:[],
  73. loading: false,
  74. finished: false,
  75. show: false,
  76. showTab: false,
  77. fileList:[],
  78. listLength:'0',
  79. searchInput:'',
  80. queryParams:{
  81. pageNum:1,
  82. pageSize:10,
  83. ny: this.format(new Date(),'yyyy-MM'),
  84. isAsc:'desc'
  85. },
  86. uploadFiles1:[],
  87. projectId:'',
  88. projectIndex:'',
  89. showBtn:true,
  90. nowYear:new Date().getFullYear(),
  91. minDate: new Date(2020, 0, 1),
  92. maxDate: new Date(),
  93. currentDate: new Date(),
  94. yearList:[]
  95. };
  96. },
  97. created() {
  98. this.queryParams.bookId = Cookies.get('bookId');
  99. this.queryParams.deptId = Cookies.get('deptId');
  100. this.queryParams.otherType = this.$route.query.typeX;
  101. if (this.$route.query.type == 'code'){
  102. this.showBtn = false;
  103. }
  104. },
  105. methods: {
  106. getList(){
  107. var _this = this;
  108. console.log(_this.queryParams)
  109. financialPublicDetailReport(_this.queryParams).then(response => {
  110. _this.listLength = response.total == 0 ? 0 : (response.total - 1);
  111. response.rows.map(res=>{
  112. // res.pictureType = this.selectDictLabel(this.pictureTypeOptions, res.pictureType);
  113. _this.applicationList.push(res);
  114. })
  115. if(_this.applicationList.length >= response.total){
  116. _this.finished = true;
  117. return;
  118. }else{
  119. _this.loading = false;
  120. _this.queryParams.pageNum += 1 ;
  121. }
  122. });
  123. },
  124. formatter(type, val) {
  125. if (type === 'year') {
  126. return `${val}年`;
  127. } else if (type === 'month') {
  128. return `${val}月`;
  129. }
  130. return val;
  131. },
  132. onConfirmOpenNy(data){
  133. this.queryParams.ny = this.format(data,'yyyy-MM');
  134. this.currentDate = data;
  135. this.showTab = false;
  136. this.applicationList = [];
  137. this.queryParams.pageNum = 1;
  138. this.loading = true;
  139. this.finished = false;
  140. this.getList();
  141. },
  142. tabClick(year){
  143. this.queryParams.year = year ;
  144. this.applicationList = [];
  145. this.getList();
  146. },
  147. tabShow(){
  148. this.showTab = !this.showTab;
  149. },
  150. /** 删除按钮操作 */
  151. handleDelete(row,index) {
  152. let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus;
  153. if (assetStatus === '2' || assetStatus === '3') {
  154. this.$notify({
  155. message: "不允许删除已出售或已报废的资产",
  156. type: "warning",
  157. });
  158. return;
  159. }
  160. let useType = row.useType;
  161. if(useType == 3) {
  162. this.$notify({
  163. message: "出租或出借的资产不允许删除",
  164. type: "warning",
  165. });
  166. return ;
  167. }
  168. const ids = row.id || this.ids;
  169. this.$dialog.alert(
  170. {
  171. message:'是否确认删除固定资产?',
  172. title:"警告",
  173. confirmButtonText: "确定",
  174. cancelButtonText: "取消",
  175. }
  176. )
  177. .then(function () {
  178. return delPermanent(ids);
  179. })
  180. .then(() => {
  181. this.applicationList.splice(index, 1);
  182. this.$notify({ type: 'success', message: '删除成功' });
  183. });
  184. },
  185. goAdd(){
  186. this.$router.push({path: '/sunVillage_info/list_contract_add', query: {type: this.$route.query.typeX}})
  187. },
  188. goDetail(id){
  189. this.$router.push({path:'/sunVillage_info/list_contract_detail',query: {id:id,type:this.$route.query.typeX,showBtn:this.showBtn}})
  190. },
  191. goEdit(id, operation){
  192. this.$router.push({path:'/sunVillage_info/list_contract_edit',query: {id:id,type:this.$route.query.typeX,operation: operation}})
  193. },
  194. goRanking(id,time){
  195. this.$router.push({path:'/sunVillage_info/list_tourists_ranking',query: {id:id,time:time}})
  196. },
  197. goRemove(id,index){
  198. this.$dialog.alert({
  199. title: '提示',
  200. message: '确认删除?',
  201. showCancelButton:true,
  202. })
  203. .then(() => {
  204. otherRemove(id).then(response => {
  205. this.$notify({ type: 'success', message: '删除成功' });
  206. this.applicationList.splice(index,1);
  207. });
  208. })
  209. .catch(() => {
  210. // on cancel
  211. });
  212. }
  213. },
  214. }
  215. </script>
  216. <style scoped lang="scss">
  217. .home_wrapper{
  218. background: #e9e9e9;
  219. min-height: 100vh;
  220. width: 100vw;
  221. .header_main{
  222. height: 116px;
  223. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  224. background-size: 100% 100%;
  225. position: fixed;
  226. top: 0;
  227. left: 0;
  228. width: 100%;
  229. font-size: 36px;
  230. line-height: 116px;
  231. text-align: center;
  232. color: #fff;
  233. position: relative;
  234. .return_btn{
  235. width: 24px;
  236. height: 43.2px;
  237. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  238. background-size: 20px 36px;
  239. position: absolute;
  240. left: 38px;
  241. top: 36px;
  242. }
  243. .add_btn{
  244. width: 56.4px;
  245. height: 40.8px;
  246. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  247. background-size: 47px 34px;
  248. position: absolute;
  249. right: 38px;
  250. top: 36px;
  251. }
  252. }
  253. .record_main{
  254. padding:30px 22px;
  255. .record_det{
  256. height: 38px;
  257. line-height: 38px;
  258. display: flex;
  259. justify-content:space-between;
  260. .year_l{
  261. font-size: 30px;
  262. display: flex;
  263. align-items: center;
  264. color: #858585;
  265. .unit{
  266. padding-left: 5px;
  267. }
  268. .icon{
  269. width: 23px;
  270. height: 12px;
  271. display: block;
  272. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  273. background-size: 100% 100%;
  274. margin-bottom: 4px;
  275. margin-right: 8px;
  276. &.zk {
  277. transform: rotate(0deg)
  278. }
  279. &.ss{
  280. transform: rotate(180deg)
  281. }
  282. }
  283. }
  284. .total_r{
  285. font-size: 26px;
  286. letter-spacing: 2px;
  287. }
  288. }
  289. .record_list{
  290. display: flex;
  291. flex-flow: wrap;
  292. margin-top: 12PX;
  293. .flex_block{
  294. font-size: 30px;
  295. color: #878787;
  296. padding-right: 30px;
  297. &.current{
  298. color: #4199fe;
  299. font-weight: bold;
  300. }
  301. }
  302. }
  303. }
  304. .list_main{
  305. padding:0 22px;
  306. .item{
  307. height: 140px;
  308. border-radius: 30px;
  309. background: #fff;
  310. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  311. padding:25px 32px;
  312. display: flex;
  313. margin-bottom: 20px;
  314. justify-content: space-between;
  315. .info{
  316. width: 100%;
  317. .title{
  318. display: flex;
  319. font-size: 32px;
  320. align-items: center;
  321. height: 58px;
  322. .icon_box{
  323. width: 34px;
  324. display: block;
  325. height: 34px;
  326. background: url('../../../static/images/sunVillage_info/code_new/list_icon.png') no-repeat;
  327. background-size: 100% 100%;
  328. margin-right: 10px;
  329. flex-shrink: 0;
  330. }
  331. .news_title{
  332. display: -webkit-box;
  333. -webkit-box-orient: vertical;
  334. -webkit-line-clamp: 1;
  335. word-break: break-all;
  336. overflow: hidden;
  337. }
  338. .tips_mark{
  339. width: 34px;
  340. height: 34px;
  341. background: #fa0c0c;
  342. border-radius: 8px;
  343. font-size: 24px;
  344. color: #fff;
  345. text-align: center;
  346. line-height: 34px;
  347. margin-left: 10px;
  348. flex-shrink: 0;
  349. }
  350. }
  351. .time{
  352. font-size: 24px;
  353. color: #858585;
  354. display: flex;
  355. align-items: center;
  356. height: 30px;
  357. margin-top: 6px;
  358. width: 100%;
  359. .icon_time{
  360. width: 25px;
  361. height: 25px;
  362. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  363. background-size: 100% 100%;
  364. margin-right: 10px;
  365. }
  366. p{
  367. margin-left: auto;
  368. color:#df0707;
  369. span{
  370. font-size: 2.45vh;
  371. }
  372. }
  373. }
  374. }
  375. .operation{
  376. display: flex;
  377. align-items: center;
  378. justify-content: right;
  379. text-align: right;
  380. .opera_btn{
  381. width: 52px;
  382. height: 52px;
  383. border-radius: 50%;
  384. display: flex;
  385. align-items: center;
  386. justify-content:center;
  387. &.delete{
  388. background:#df0707;
  389. margin-left: 10PX;
  390. .icon{
  391. width: 22px;
  392. height: 29px;
  393. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  394. background-size: 100% 100%;
  395. display: block;
  396. }
  397. }
  398. &.edit{
  399. background: #79cf13;
  400. margin-left: 10PX;
  401. .icon {
  402. width: 26px;
  403. height: 25px;
  404. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  405. background-size: 100% 100%;
  406. display: block;
  407. }
  408. }
  409. &.view{
  410. background: #3494ff;
  411. margin-left: 10PX;
  412. .icon {
  413. width: 29px;
  414. height: 21px;
  415. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  416. background-size: 100% 100%;
  417. display: block;
  418. }
  419. }
  420. &.list{
  421. background: #79cf13;
  422. margin-left: 10PX;
  423. .icon {
  424. width: 29px;
  425. height: 21px;
  426. background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat;
  427. background-size: 100% 100%;
  428. display: block;
  429. }
  430. }
  431. &.copy{
  432. background: #79cf13;
  433. margin-left: 10PX;
  434. .icon {
  435. width: 25px;
  436. height: 25px;
  437. background: url('../../assets/images/sunVillage_info/list_icon_copy.png') no-repeat;
  438. background-size: 100% 100%;
  439. display: block;
  440. }
  441. }
  442. }
  443. }
  444. }
  445. }
  446. .bottom_tips{
  447. font-size: 24px;
  448. color: #a7a6a6;
  449. text-align: center;
  450. margin-top: 32px;
  451. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  452. background-size: 260px 2px;
  453. .xs{
  454. padding:0 8px;
  455. background: #e9e9e9;
  456. }
  457. }
  458. }
  459. </style>