移动端
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

431 rinda
14 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="搜索" v-model="queryParams.name" @input="getSearchList">
  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. <van-swipe-cell right-width="150" class="item" v-for="(item,index) in applicationList" :key="index">
  24. <div class="item_box" @click="$router.push({name:'sunVillageInfoInformationDetail',query:{id:item.id}})">
  25. <div class="head_block">
  26. <i class="icon"></i>
  27. <div class="title">{{item.name}}</div>
  28. </div>
  29. <div class="order_block">
  30. <div class="order">{{item.code}}</div>
  31. <div :class="{'describe':true,'suspend':item.contractionStatus == '撤销','normal':item.contractionStatus == '正常','undo':item.contractionStatus == '终止'}">{{item.contractionStatus}}<i class="icon"></i></div>
  32. </div>
  33. <div class="function_block">
  34. <div class="value">合同金额<span class="amount">¥{{item.totalAmount}}</span></div>
  35. <div class="startStop_time">
  36. <div class="time"><div class="unim start">起</div>{{item.startTime}}</div>
  37. <div class="time"><div class="unim stop">止</div>{{item.endTime}}</div>
  38. </div>
  39. </div>
  40. </div>
  41. <template #right>
  42. <div @click="handleDelete(item,index)" style="background-color: #ee0a24;height: 100%">删除</div>
  43. <router-link :to="{name:'sunVillageInfoInformationEdit',query:{id:item.id}}" style="background-color: #07c160">修改</router-link>
  44. <div @click="openLoader(item.id,0)" style="background-color: rgba(98,173,102,0.2);color: #62AD66;">附件</div>
  45. <router-link :to="{name:'sunVillageInfoInformationFunPlan',query:{id:item.id}}" style="background-color: #4169E1;">结款</router-link>
  46. </template>
  47. </van-swipe-cell>
  48. </van-list>
  49. </div>
  50. <!-- <div class="bottom_tips">-->
  51. <!-- <span class="xs">已经到底啦</span>-->
  52. <!-- </div>-->
  53. <van-popup v-model="show" lock-scroll closeable position="top" :style="{ height: '30%' }" >
  54. <div style="padding: 0 13% 0 5%;">
  55. <van-divider>附件</van-divider>
  56. <van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple />
  57. </div>
  58. </van-popup>
  59. </div>
  60. </template>
  61. <script>
  62. import { contractionList , delInfo , commonAttach , attachmentList , systemAttachment } from "@/api/sunVillage_info/fixedAssets";
  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. fileList:[],
  76. listLength:'0',
  77. searchInput:'',
  78. queryParams:{
  79. pageNum:1,
  80. pageSize:10,
  81. orderByColumn:'createTime',
  82. isAsc:'desc',
  83. name:'',
  84. },
  85. uploadFiles1:[],
  86. projectId:'',
  87. projectIndex:''
  88. };
  89. },
  90. created() {
  91. this.houseGetDicts("contraction_status").then((response) => {
  92. this.contractionStatusOptions = response.data;
  93. });
  94. },
  95. methods: {
  96. getList(){
  97. setTimeout(() => {
  98. contractionList(this.queryParams).then(response => {
  99. this.listLength = response.total;
  100. for (var i = 0; i < response.rows.length; i++) {
  101. response.rows[i].contractionStatus = this.selectDictLabel(this.contractionStatusOptions, response.rows[i].contractionStatus);
  102. response.rows[i].totalAmount = Number(response.rows[i].totalAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => { return $1 + ","; }).replace(/\.$/, "")
  103. this.applicationList.push(response.rows[i]);
  104. this.applicationListSecond.push(response.rows[i]);
  105. }
  106. if(this.applicationList.length >= response.total){
  107. this.finished = true;
  108. return;
  109. }else{
  110. this.loading = false;
  111. this.queryParams.pageNum += 1 ;
  112. }
  113. });
  114. }, 1000);
  115. },
  116. getSearchList(){
  117. this.applicationList = [];
  118. this.queryParams.pageNum = 1;
  119. this.getList();
  120. },
  121. afterRead(file) {
  122. // 此时可以自行将文件上传至服务器
  123. this.uploadFiles1.push(file.file);
  124. let params1 = new FormData();
  125. params1.append("tableId", this.projectId);
  126. params1.append("tableName", "t_contraction_info");
  127. params1.append("bizPath", "contraction");
  128. params1.append("fileType", this.projectIndex);
  129. params1.append("file", file.file);
  130. commonAttach(params1).then((r1) => {
  131. this.$notify({ type: 'success', message: '上传成功' });
  132. })
  133. },
  134. openLoader(id,index){
  135. this.show = true;
  136. this.projectId = id;
  137. this.projectIndex = index;
  138. this.fileList = [];
  139. let oData1= {
  140. tableId: id,
  141. tableName: "t_contraction_info",
  142. bizPath: "contraction",
  143. fileType: '',
  144. }
  145. attachmentList(oData1).then(res => {
  146. res.rows.map(r => {
  147. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  148. this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
  149. })
  150. })
  151. },
  152. /** 删除按钮操作 */
  153. handleDelete(row,index) {
  154. const ids = row.id || this.ids;
  155. this.$dialog.alert(
  156. {
  157. message:'是否确认删除合同信息?',
  158. title:"警告",
  159. showCancelButton:true,
  160. confirmButtonText: "确定",
  161. cancelButtonText: "取消",
  162. }
  163. )
  164. .then(function () {
  165. return delInfo(ids);
  166. })
  167. .then(() => {
  168. this.applicationList.splice(index, 1);
  169. this.$notify({ type: 'success', message: '删除成功' });
  170. });
  171. },
  172. deleteFile1(file){
  173. console.log(file)
  174. systemAttachment(file.id).then(res => {
  175. this.$notify({ type: 'success', message: '删除成功' });
  176. })
  177. },
  178. goAdd(){
  179. this.$router.push('/sunVillage_info/informationAdd')
  180. },
  181. },
  182. }
  183. </script>
  184. <style scoped lang="scss">
  185. .home_wrapper{
  186. background: #e9e9e9;
  187. min-height: 100vh;
  188. width: 100vw;
  189. .header_main {
  190. height: 116px;
  191. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  192. background-size: 100% 100%;
  193. position: fixed;
  194. top: 0;
  195. left: 0;
  196. width: 100%;
  197. font-size: 36px;
  198. line-height: 116px;
  199. text-align: center;
  200. color: #fff;
  201. position: relative;
  202. .return_btn {
  203. width: 24px;
  204. height: 43.2px;
  205. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  206. background-size: 20px 36px;
  207. position: absolute;
  208. left: 38px;
  209. top: 36px;
  210. }
  211. .add_btn {
  212. width: 56.4px;
  213. height: 40.8px;
  214. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  215. background-size: 47px 34px;
  216. position: absolute;
  217. right: 38px;
  218. top: 36px;
  219. }
  220. }
  221. .search_info{
  222. padding:20px 23px;
  223. display: flex;
  224. .search_block{
  225. height: 59px;
  226. width: 535px;
  227. border-radius: 59px;
  228. background: #fff;
  229. display: flex;
  230. border:2px solid #3494ff;
  231. padding-right: 35px;
  232. align-items: center;
  233. .icon{
  234. width: 30px;
  235. height: 30px;
  236. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_1.png') no-repeat;
  237. background-size: 100% 100%;
  238. display: block;
  239. margin:0 8px 0 26px;
  240. }
  241. .ipt{
  242. flex: 1;
  243. font-size: 26px;
  244. background: none;
  245. border:0 none;
  246. line-height: 59px;
  247. }
  248. }
  249. .total{
  250. flex: 1;
  251. display: flex;
  252. align-items: center;
  253. justify-content: center;
  254. font-size: 26px;
  255. color: #858585;
  256. }
  257. }
  258. .list_main{
  259. padding:0 22px;
  260. .item{
  261. height: 207px;
  262. border-radius: 30px;
  263. background: #fff;
  264. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  265. margin-bottom: 20px;
  266. .item_box{
  267. padding:25px 32px;
  268. }
  269. .head_block{
  270. height: 56px;
  271. display: flex;
  272. align-items: center;
  273. width: 100%;
  274. .icon{
  275. width: 34px;
  276. height: 30px;
  277. background: url('../../assets/images/sunVillage_info/fixedAssets_icon_2.png') no-repeat;
  278. background-size: 100% 100%;
  279. display: block;
  280. margin-right: 12px;
  281. }
  282. .title{
  283. flex:1;
  284. font-size: 32px;
  285. color: #252525;
  286. overflow: hidden;
  287. text-overflow: ellipsis;
  288. white-space: nowrap;
  289. padding-right: 20px;
  290. }
  291. }
  292. .order_block{
  293. height: 50px;
  294. display: flex;
  295. align-items: center;
  296. width: 100%;
  297. .order{
  298. flex: 1;
  299. font-size: 26px;
  300. color: #252525;
  301. }
  302. .describe{
  303. font-size: 26px;
  304. display: flex;
  305. align-items: center;
  306. &.suspend{
  307. color: #f69600;
  308. .icon{
  309. width: 27px;
  310. height: 26px;
  311. background: url('../../assets/images/sunVillage_info/information_icon_1.png') no-repeat;
  312. background-size: 100% 100%;
  313. display: block;
  314. margin-left: 15px;
  315. }
  316. }
  317. &.normal{
  318. color: #69c100;
  319. .icon{
  320. width: 32px;
  321. height: 26px;
  322. background: url('../../assets/images/sunVillage_info/information_icon_2.png') no-repeat;
  323. background-size: 100% 100%;
  324. display: block;
  325. margin-left: 15px;
  326. }
  327. }
  328. &.undo{
  329. color: #858585;
  330. .icon{
  331. width: 27px;
  332. height: 26px;
  333. background: url('../../assets/images/sunVillage_info/information_icon_3.png') no-repeat;
  334. background-size: 100% 100%;
  335. display: block;
  336. margin-left: 15px;
  337. }
  338. }
  339. }
  340. }
  341. .function_block{
  342. height: 50px;
  343. display: flex;
  344. align-items: center;
  345. width: 100%;
  346. .value{
  347. flex: 1;
  348. font-size: 24px;
  349. color: #252525;
  350. .amount{
  351. color: #eb1616;
  352. }
  353. }
  354. .startStop_time{
  355. display: flex;
  356. align-items: center;
  357. .time{
  358. display: flex;
  359. align-items: center;
  360. font-size: 24px;
  361. color: #002022;
  362. margin-left: 25px;
  363. .unim{
  364. width: 32px;
  365. height: 32px;
  366. font-size: 22px;
  367. color: #fff;
  368. text-align: center;
  369. line-height: 32px;
  370. border-radius: 6px;
  371. margin-right: 8px;
  372. &.start{background: #3e7df2;}
  373. &.stop{background: #eb1616;}
  374. }
  375. }
  376. }
  377. }
  378. // <div class="function_block">
  379. // <div class="value">合同金额<span class="amount">¥199.00</span></div>
  380. // <div class="startStop_time">
  381. // <div class="time"><div class="unim">起</div>2022.05.04</div>
  382. // <div class="time"><div class="unim">起</div>2022.05.04</div>
  383. // </div>
  384. // </div>
  385. }
  386. }
  387. .bottom_tips{
  388. font-size: 24px;
  389. color: #a7a6a6;
  390. text-align: center;
  391. margin-top: 32px;
  392. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  393. background-size: 260px 2px;
  394. .xs{
  395. padding:0 8px;
  396. background: #e9e9e9;
  397. }
  398. }
  399. /deep/ .van-swipe-cell__right{
  400. display: flex;
  401. align-items: center;
  402. width: 150PX;
  403. margin-left: 5PX;
  404. a,div{
  405. margin: 0;
  406. display: flex;
  407. align-items: center;
  408. justify-content: center;
  409. color: #ffffff;
  410. font-size: 14PX;
  411. height: 100%;
  412. flex: 1;
  413. }
  414. }
  415. }
  416. </style>