移动端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

347 rader
11 KiB

  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" @click="goAdd"></div>
  7. </div>
  8. <div class="search_info">
  9. <div class="search_block">
  10. <i class="icon"></i>
  11. <input type="text" class="ipt" placeholder="搜索">
  12. </div>
  13. <div class="total">共{{listLength}}个合同</div>
  14. </div>
  15. <div class="list_main">
  16. <van-list
  17. v-model="loading"
  18. :finished="finished"
  19. finished-text="没有更多了"
  20. @load="getList"
  21. >
  22. <!--1-->
  23. <div class="item" v-for="(item,index) in applicationList">
  24. <div class="head_block">
  25. <i class="icon"></i>
  26. <div class="title">{{item.name}}</div>
  27. </div>
  28. <div class="order_block">
  29. <div class="order">{{item.code}}</div>
  30. <div :class="{'describe':true,'suspend':item.contractionStatus == '撤销','normal':item.contractionStatus == '正常','undo':item.contractionStatus == '终止'}">{{item.contractionStatus}}<i class="icon"></i></div>
  31. </div>
  32. <div class="function_block">
  33. <div class="value">合同金额<span class="amount">¥{{item.totalAmount}}</span></div>
  34. <div class="startStop_time">
  35. <div class="time"><div class="unim start">起</div>{{item.startTime}}</div>
  36. <div class="time"><div class="unim stop">止</div>{{item.endTime}}</div>
  37. </div>
  38. </div>
  39. </div>
  40. </van-list>
  41. </div>
  42. <!-- <div class="bottom_tips">-->
  43. <!-- <span class="xs">已经到底啦</span>-->
  44. <!-- </div>-->
  45. </div>
  46. </template>
  47. <script>
  48. import { contractionList } from "@/api/sunVillage_info/fixedAssets";
  49. export default {
  50. name: "certificateList",
  51. data() {
  52. return {
  53. applicationList:[],
  54. applicationListSecond:[],
  55. assetStatusOptions:[],
  56. auditStatus:[],
  57. loading: false,
  58. finished: false,
  59. listLength:'0',
  60. searchInput:'',
  61. queryParams:{
  62. pageNum:1,
  63. pageSize:10,
  64. orderByColumn:'createTime',
  65. isAsc:'desc',
  66. name:'',
  67. }
  68. };
  69. },
  70. created() {
  71. this.houseGetDicts("contraction_status").then((response) => {
  72. this.contractionStatusOptions = response.data;
  73. });
  74. },
  75. methods: {
  76. getList(){
  77. setTimeout(() => {
  78. contractionList(this.queryParams).then(response => {
  79. this.listLength = response.total;
  80. for (var i = 0; i < response.rows.length; i++) {
  81. response.rows[i].contractionStatus = this.selectDictLabel(this.contractionStatusOptions, response.rows[i].contractionStatus);
  82. response.rows[i].totalAmount = Number(response.rows[i].totalAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { return $1 + ","; }).replace(/\.$/, "")
  83. this.applicationList.push(response.rows[i]);
  84. this.applicationListSecond.push(response.rows[i]);
  85. }
  86. if(this.applicationList.length >= response.total){
  87. this.finished = true;
  88. return;
  89. }else{
  90. this.loading = false;
  91. this.queryParams.pageNum += 1 ;
  92. }
  93. });
  94. }, 1000);
  95. },
  96. getSearchList(){
  97. this.loading = true;
  98. if(this.applicationListSecond.length>0&&this.queryParams.name!=""){
  99. let newList = []
  100. for(let j = 0 ;j<this.applicationListSecond.length;j++){
  101. if(this.applicationListSecond[j].name.indexOf(this.queryParams.name)>-1){
  102. newList.push(this.applicationListSecond[j]);
  103. }
  104. }
  105. this.applicationList = newList
  106. }
  107. if(this.queryParams.name==""){
  108. this.applicationList = this.applicationListSecond;
  109. }
  110. this.loading = false;
  111. },
  112. goAdd(){
  113. this.$router.push('/sunVillage_info/informationAdd')
  114. },
  115. },
  116. }
  117. </script>
  118. <style scoped lang="scss">
  119. .home_wrapper{
  120. background: #e9e9e9;
  121. min-height: 100vh;
  122. width: 100vw;
  123. .header_main {
  124. height: 116px;
  125. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  126. background-size: 100% 100%;
  127. position: fixed;
  128. top: 0;
  129. left: 0;
  130. width: 100%;
  131. font-size: 36px;
  132. line-height: 116px;
  133. text-align: center;
  134. color: #fff;
  135. position: relative;
  136. .return_btn {
  137. width: 24px;
  138. height: 43.2px;
  139. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  140. background-size: 20px 36px;
  141. position: absolute;
  142. left: 38px;
  143. top: 36px;
  144. }
  145. .add_btn {
  146. width: 56.4px;
  147. height: 40.8px;
  148. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  149. background-size: 47px 34px;
  150. position: absolute;
  151. right: 38px;
  152. top: 36px;
  153. }
  154. }
  155. .search_info{
  156. padding:20px 23px;
  157. display: flex;
  158. .search_block{
  159. height: 59px;
  160. width: 535px;
  161. border-radius: 59px;
  162. background: #fff;
  163. display: flex;
  164. border:2px solid #3494ff;
  165. padding-right: 35px;
  166. align-items: center;
  167. .icon{
  168. width: 30px;
  169. height: 30px;
  170. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_1.png') no-repeat;
  171. background-size: 100% 100%;
  172. display: block;
  173. margin:0 8px 0 26px;
  174. }
  175. .ipt{
  176. flex: 1;
  177. font-size: 26px;
  178. background: none;
  179. border:0 none;
  180. line-height: 59px;
  181. }
  182. }
  183. .total{
  184. flex: 1;
  185. display: flex;
  186. align-items: center;
  187. justify-content: center;
  188. font-size: 26px;
  189. color: #858585;
  190. }
  191. }
  192. .list_main{
  193. padding:0 22px;
  194. .item{
  195. height: 207px;
  196. border-radius: 30px;
  197. background: #fff;
  198. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  199. padding:25px 32px;
  200. margin-bottom: 20px;
  201. .head_block{
  202. height: 56px;
  203. display: flex;
  204. align-items: center;
  205. width: 100%;
  206. .icon{
  207. width: 34px;
  208. height: 30px;
  209. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_2.png') no-repeat;
  210. background-size: 100% 100%;
  211. display: block;
  212. margin-right: 12px;
  213. }
  214. .title{
  215. flex:1;
  216. font-size: 32px;
  217. color: #252525;
  218. overflow: hidden;
  219. text-overflow: ellipsis;
  220. white-space: nowrap;
  221. padding-right: 20px;
  222. }
  223. }
  224. .order_block{
  225. height: 50px;
  226. display: flex;
  227. align-items: center;
  228. width: 100%;
  229. .order{
  230. flex: 1;
  231. font-size: 26px;
  232. color: #252525;
  233. }
  234. .describe{
  235. font-size: 26px;
  236. display: flex;
  237. align-items: center;
  238. &.suspend{
  239. color: #f69600;
  240. .icon{
  241. width: 27px;
  242. height: 26px;
  243. background: url('../../assets/images/sunVillage_info/information_icon_1.png') no-repeat;
  244. background-size: 100% 100%;
  245. display: block;
  246. margin-left: 15px;
  247. }
  248. }
  249. &.normal{
  250. color: #69c100;
  251. .icon{
  252. width: 32px;
  253. height: 26px;
  254. background: url('../../assets/images/sunVillage_info/information_icon_2.png') no-repeat;
  255. background-size: 100% 100%;
  256. display: block;
  257. margin-left: 15px;
  258. }
  259. }
  260. &.undo{
  261. color: #858585;
  262. .icon{
  263. width: 27px;
  264. height: 26px;
  265. background: url('../../assets/images/sunVillage_info/information_icon_3.png') no-repeat;
  266. background-size: 100% 100%;
  267. display: block;
  268. margin-left: 15px;
  269. }
  270. }
  271. }
  272. }
  273. .function_block{
  274. height: 50px;
  275. display: flex;
  276. align-items: center;
  277. width: 100%;
  278. .value{
  279. flex: 1;
  280. font-size: 24px;
  281. color: #252525;
  282. .amount{
  283. color: #eb1616;
  284. }
  285. }
  286. .startStop_time{
  287. display: flex;
  288. align-items: center;
  289. .time{
  290. display: flex;
  291. align-items: center;
  292. font-size: 24px;
  293. color: #002022;
  294. margin-left: 25px;
  295. .unim{
  296. width: 32px;
  297. height: 32px;
  298. font-size: 22px;
  299. color: #fff;
  300. text-align: center;
  301. line-height: 32px;
  302. border-radius: 6px;
  303. margin-right: 8px;
  304. &.start{background: #3e7df2;}
  305. &.stop{background: #eb1616;}
  306. }
  307. }
  308. }
  309. }
  310. // <div class="function_block">
  311. // <div class="value">合同金额<span class="amount">¥199.00</span></div>
  312. // <div class="startStop_time">
  313. // <div class="time"><div class="unim">起</div>2022.05.04</div>
  314. // <div class="time"><div class="unim">起</div>2022.05.04</div>
  315. // </div>
  316. // </div>
  317. }
  318. }
  319. .bottom_tips{
  320. font-size: 24px;
  321. color: #a7a6a6;
  322. text-align: center;
  323. margin-top: 32px;
  324. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  325. background-size: 260px 2px;
  326. .xs{
  327. padding:0 8px;
  328. background: #e9e9e9;
  329. }
  330. }
  331. }
  332. </style>