移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

list_finance.vue 14 KiB

2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 财务公开榜
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. <div class="add_btn" v-show="showBtn" @click="goAdd"></div>
  7. </div>
  8. <div class="record_main">
  9. <div class="record_det">
  10. <div class="year_l" @click="tabShow"><i :class="{'icon':true , 'zk':!showTab , 'ss':showTab } "></i>{{queryParams.year == '' ? '全部': queryParams.year}}<span class="unit">{{queryParams.year == '' ? '': '年'}}</span></div>
  11. <div class="total_r">共{{listLength}}条公告</div>
  12. </div>
  13. <div class="record_list" v-if="showTab">
  14. <div :class="{'flex_block':true , 'current':queryParams.year == ''}" @click="tabClick('')">全部</div>
  15. <div :class="{'flex_block':true , 'current':queryParams.year == '2022'}" @click="tabClick('2022')">2022</div>
  16. <div :class="{'flex_block':true , 'current':queryParams.year == '2021'}" @click="tabClick('2021')">2021</div>
  17. <div :class="{'flex_block':true , 'current':queryParams.year == '2020'}" @click="tabClick('2020')">2020</div>
  18. </div>
  19. </div>
  20. <div class="list_main">
  21. <van-list
  22. v-model="loading"
  23. :finished="finished"
  24. finished-text="没有更多了"
  25. @load="getList"
  26. >
  27. <!----1-->
  28. <div class="item" v-for="(item,index) in applicationList" :key="index">
  29. <div class="info" @click="goDetail(item.id)">
  30. <div class="title">
  31. <i class="icon_box"></i>
  32. <p class="news_title">{{item.openName}}</p>
  33. <p class="tips_mark">新</p>
  34. </div>
  35. <div class="time">
  36. <div class="icon_time"></div>
  37. {{item.openNy}}
  38. </div>
  39. </div>
  40. <div class="operation">
  41. <!-- delete 删除 edit编辑 view查看 -->
  42. <div class="opera_btn edit" @click="goEdit(item.id)" v-show="showBtn">
  43. <i class="icon "></i>
  44. </div>
  45. <div class="opera_btn delete" @click="goRemove(item.id)" v-show="showBtn">
  46. <i class="icon"></i>
  47. </div>
  48. <div class="opera_btn view" @click="goDetail(item.id)" v-show="!showBtn">
  49. <i class="icon "></i>
  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 { financePublicList,openRemove } 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. auditStatus:[],
  72. loading: false,
  73. finished: false,
  74. show: false,
  75. showTab: false,
  76. fileList:[],
  77. listLength:'0',
  78. searchInput:'',
  79. queryParams:{
  80. pageNum:1,
  81. pageSize:10,
  82. orderByColumn:'createTime',
  83. isAsc:'desc',
  84. year:'',
  85. },
  86. uploadFiles1:[],
  87. projectId:'',
  88. projectIndex:'',
  89. showBtn:true,
  90. };
  91. },
  92. created() {
  93. this.houseGetDicts("asset_status").then((response) => {
  94. this.assetStatusOptions = response.data;
  95. });
  96. this.houseGetDicts("asset_type").then((response) => {
  97. this.assetTypeOptions = response.data;
  98. });
  99. this.houseGetDicts("use_type").then((response) => {
  100. this.useTypeOptions = response.data;
  101. });
  102. console.log(Cookies.get('bookId'))
  103. this.queryParams.bookId = Cookies.get('bookId');
  104. this.queryParams.deptId = Cookies.get('deptId');
  105. if (this.$route.query.type == 'code'){
  106. this.showBtn = false;
  107. }
  108. },
  109. methods: {
  110. getList(){
  111. var _this = this;
  112. setTimeout(() => {
  113. console.log(_this.queryParams)
  114. financePublicList(_this.queryParams).then(response => {
  115. _this.listLength = response.total;
  116. _this.applicationList = response.rows;
  117. if(_this.applicationList.length >= response.total){
  118. _this.finished = true;
  119. return;
  120. }else{
  121. _this.loading = false;
  122. _this.queryParams.pageNum += 1 ;
  123. }
  124. });
  125. }, 1000);
  126. },
  127. tabClick(year){
  128. this.queryParams.year = year ;
  129. this.applicationList = [];
  130. this.getList();
  131. },
  132. tabShow(){
  133. this.showTab = !this.showTab;
  134. },
  135. /** 删除按钮操作 */
  136. handleDelete(row,index) {
  137. let assetStatus = row.assetStatus ? row.assetStatus : data[0].assetStatus;
  138. if (assetStatus === '2' || assetStatus === '3') {
  139. this.$notify({
  140. message: "不允许删除已出售或已报废的资产",
  141. type: "warning",
  142. });
  143. return;
  144. }
  145. let useType = row.useType;
  146. if(useType == 3) {
  147. this.$notify({
  148. message: "出租或出借的资产不允许删除",
  149. type: "warning",
  150. });
  151. return ;
  152. }
  153. const ids = row.id || this.ids;
  154. this.$dialog.alert(
  155. {
  156. message:'是否确认删除固定资产?',
  157. title:"警告",
  158. confirmButtonText: "确定",
  159. cancelButtonText: "取消",
  160. }
  161. )
  162. .then(function () {
  163. return delPermanent(ids);
  164. })
  165. .then(() => {
  166. this.applicationList.splice(index, 1);
  167. this.$notify({ type: 'success', message: '删除成功' });
  168. });
  169. },
  170. goAdd(){
  171. this.$router.push('/sunVillage_info/list_finance_add')
  172. },
  173. goDetail(id){
  174. this.$router.push({path:'/sunVillage_info/list_finance_detail',query: {id:id,type:'finance'}})
  175. },
  176. goEdit(id){
  177. this.$router.push({path:'/sunVillage_info/list_finance_edit',query: {id:id,type:'finance'}})
  178. },
  179. goRemove(id){
  180. this.$dialog.alert({
  181. title: '提示',
  182. message: '确认删除?',
  183. })
  184. .then(() => {
  185. openRemove(id).then(response => {
  186. this.$notify({ type: 'success', message: '删除成功' });
  187. this.getList()
  188. });
  189. })
  190. .catch(() => {
  191. // on cancel
  192. });
  193. }
  194. },
  195. }
  196. </script>
  197. <style scoped lang="scss">
  198. .home_wrapper{
  199. background: #e9e9e9;
  200. min-height: 100vh;
  201. width: 100vw;
  202. .header_main{
  203. height: 116px;
  204. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  205. background-size: 100% 100%;
  206. position: fixed;
  207. top: 0;
  208. left: 0;
  209. width: 100%;
  210. font-size: 36px;
  211. line-height: 116px;
  212. text-align: center;
  213. color: #fff;
  214. position: relative;
  215. .return_btn{
  216. width: 24px;
  217. height: 43.2px;
  218. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  219. background-size: 20px 36px;
  220. position: absolute;
  221. left: 38px;
  222. top: 36px;
  223. }
  224. .add_btn{
  225. width: 56.4px;
  226. height: 40.8px;
  227. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  228. background-size: 47px 34px;
  229. position: absolute;
  230. right: 38px;
  231. top: 36px;
  232. }
  233. }
  234. .record_main{
  235. padding:30px 22px;
  236. .record_det{
  237. height: 38px;
  238. line-height: 38px;
  239. display: flex;
  240. justify-content:space-between;
  241. .year_l{
  242. font-size: 30px;
  243. display: flex;
  244. align-items: center;
  245. color: #858585;
  246. .unit{
  247. padding-left: 5px;
  248. }
  249. .icon{
  250. width: 23px;
  251. height: 12px;
  252. display: block;
  253. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  254. background-size: 100% 100%;
  255. margin-bottom: 4px;
  256. margin-right: 8px;
  257. &.zk {
  258. transform: rotate(0deg)
  259. }
  260. &.ss{
  261. transform: rotate(180deg)
  262. }
  263. }
  264. }
  265. .total_r{
  266. font-size: 26px;
  267. letter-spacing: 2px;
  268. }
  269. }
  270. .record_list{
  271. display: flex;
  272. flex-flow: wrap;
  273. margin-top: 12PX;
  274. .flex_block{
  275. font-size: 30px;
  276. color: #878787;
  277. padding-right: 30px;
  278. &.current{
  279. color: #4199fe;
  280. font-weight: bold;
  281. }
  282. }
  283. }
  284. }
  285. .list_main{
  286. padding:0 22px;
  287. .item{
  288. height: 140px;
  289. border-radius: 30px;
  290. background: #fff;
  291. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  292. padding:25px 32px;
  293. display: flex;
  294. margin-bottom: 20px;
  295. .info{
  296. flex:0 0 510px;
  297. .title{
  298. display: flex;
  299. font-size: 32px;
  300. align-items: center;
  301. height: 58px;
  302. .icon_box{
  303. width: 34px;
  304. display: block;
  305. height: 30px;
  306. background: url('../../assets/images/sunVillage_info/list_icon_2.png') no-repeat;
  307. background-size: 100% 100%;
  308. margin-right: 10px;
  309. }
  310. .news_title{
  311. max-width:416px;
  312. overflow: hidden;
  313. white-space: nowrap;
  314. text-overflow: ellipsis;
  315. -o-text-overflow: ellipsis;
  316. }
  317. .tips_mark{
  318. width: 34px;
  319. height: 34px;
  320. background: #fa0c0c;
  321. border-radius: 8px;
  322. font-size: 24px;
  323. color: #fff;
  324. text-align: center;
  325. line-height: 34px;
  326. margin-left: 10px;
  327. }
  328. }
  329. .time{
  330. font-size: 24px;
  331. color: #858585;
  332. display: flex;
  333. align-items: center;
  334. height: 30px;
  335. margin-top: 6px;
  336. .icon_time{
  337. width: 25px;
  338. height: 25px;
  339. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  340. background-size: 100% 100%;
  341. margin-right: 10px;
  342. }
  343. }
  344. }
  345. .operation{
  346. flex: 1;
  347. display: flex;
  348. align-items: center;
  349. justify-content: flex-end;
  350. text-align: right;
  351. .opera_btn{
  352. width: 52px;
  353. height: 52px;
  354. border-radius: 50%;
  355. display: flex;
  356. align-items: center;
  357. justify-content:center;
  358. &.delete{
  359. background:#df0707;
  360. margin-left: 28px;
  361. .icon{
  362. width: 22px;
  363. height: 29px;
  364. background: url('../../assets/images/sunVillage_info/list_icon_7.png') no-repeat;
  365. background-size: 100% 100%;
  366. display: block;
  367. }
  368. }
  369. &.edit{
  370. background: #79cf13;
  371. .icon {
  372. width: 26px;
  373. height: 25px;
  374. background: url('../../assets/images/sunVillage_info/list_icon_6.png') no-repeat;
  375. background-size: 100% 100%;
  376. display: block;
  377. }
  378. }
  379. &.view{
  380. background: #3494ff;
  381. .icon {
  382. width: 29px;
  383. height: 21px;
  384. background: url('../../assets/images/sunVillage_info/list_icon_3.png') no-repeat;
  385. background-size: 100% 100%;
  386. display: block;
  387. }
  388. }
  389. }
  390. }
  391. }
  392. }
  393. .bottom_tips{
  394. font-size: 24px;
  395. color: #a7a6a6;
  396. text-align: center;
  397. margin-top: 32px;
  398. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  399. background-size: 260px 2px;
  400. .xs{
  401. padding:0 8px;
  402. background: #e9e9e9;
  403. }
  404. }
  405. }
  406. </style>