移动端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2 лет назад
1 год назад
2 лет назад
1 год назад
1 год назад
1 год назад
2 лет назад
1 год назад
2 лет назад
1 год назад
2 лет назад
2 лет назад
2 лет назад
1 год назад
2 лет назад
1 год назад
2 лет назад
2 лет назад
1 год назад
2 лет назад
1 год назад
2 лет назад
2 лет назад
2 лет назад
1 год назад
2 лет назад
1 год назад
1 год назад
1 год назад
1 год назад
1 год назад
2 лет назад
1 год назад
1 год назад
1 год назад
2 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. <template>
  2. <div class="home_wrapper">
  3. <div
  4. class="header_main"
  5. :style="`background-image:url(${require(showBtn?'@/assets/images/sunVillage_info/list_head.png':'@/assets/images/sunVillage_info/list_head_red.png')})`"
  6. >
  7. 承包合同
  8. <div class="return_btn" @click="onClickLeft"></div>
  9. <!-- <div class="add_btn" @click="goAdd" v-show="showBtn"></div>-->
  10. </div>
  11. <div class="list_main">
  12. <van-search
  13. v-model="searchKeyword"
  14. shape="round"
  15. background="transparent"
  16. placeholder="请输入承包方姓名搜索"
  17. @search="onSearch"
  18. @clear="onSearch"
  19. ></van-search>
  20. <van-list
  21. v-model="loading"
  22. :finished="finished"
  23. finished-text="没有更多了"
  24. @load="getList"
  25. >
  26. <van-swipe-cell v-for="item in applicationList" :key="item.id">
  27. <div class="item" @click="goDetail(item.id)">
  28. <div class="info">
  29. <div class="title">
  30. <i class="icon_box" v-if="item.firstSigning == null"></i>
  31. <i class="icon_box1" v-if="item.firstSigning != null"></i>
  32. <p class="news_title" :style="{'color': item.firstSigning != null ? '#2bc30c' : '#eb1616'}">{{item.cbhtbm}}</p>
  33. <p class="tips_mark"
  34. :style="{'color': item.firstSigning != null ? '#79bc29' : '#f8a83d','background': item.firstSigning != null ? '#e8ffcd' : '#ffedcd'}">
  35. {{item.signingMode}}</p>
  36. <p class="tips_mark2" v-if="item.signingMode === '线上'" :style="{'background': item.firstSigning != null ? '#2bc30c' : '#eb1616'}">{{item.signingStatus}}</p>
  37. </div>
  38. <div class="time">
  39. <p style="color:#eb1616;">{{item.cbfmc}}</p>
  40. <!-- <p>{{item.cbhtmc}}</p>-->
  41. <p style="color:#eb1616;font-weight: bold;">{{item.htzmjm.toFixed(2)}} 亩</p>
  42. </div>
  43. </div>
  44. </div>
  45. <template #right>
  46. <div class="operation">
  47. <div class="opera_btn" v-if="item.signingMode == '线上' && item.firstIsSign =='否'"
  48. @click="openPopup(item.id)">
  49. <img src="../../assets/images/sunVillage_info/signature_icon_02.png" alt="" width="35">
  50. <p>签名</p>
  51. </div>
  52. <!-- <div class="opera_btn" v-if="item.signingMode == '线上' && item.attachement != null " @click="$router.push({path:'/sunVillage_info/list_signature_pdf',query: {id:item.id,type:$route.query.type}})">
  53. <img src="../../assets/images/sunVillage_info/signature_icon_03.png" alt="" width="35">
  54. <p>预览</p>
  55. </div> -->
  56. <div class="opera_btn" v-if="item.signingMode == '线上' && item.fbfqszt !='2'" @click="contractSign(item)">
  57. <img src="../../assets/images/sunVillage_info/signature_icon_03.png" alt="" width="35">
  58. <p>合同网签</p>
  59. </div>
  60. <div class="opera_btn" v-if="item.signingMode === '线上' && item.signingStatus === '签字完成'"
  61. @click="handleArchive(item.id)">
  62. <img src="../../assets/images/sunVillage_info/archive.png" alt="" width="35">
  63. <p>归档</p>
  64. </div>
  65. <div class="opera_btn" v-if="item.signingMode === '线上' && item.signingStatus === '合同归档'"
  66. @click="handleDownload(item.id)">
  67. <img src="../../assets/images/sunVillage_info/download.png" alt="" width="35">
  68. <p>下载合同</p>
  69. </div>
  70. <div class="opera_btn">
  71. <img src="../../assets/images/sunVillage_info/signature_icon_03.png" alt="" width="35">
  72. <p>预览</p>
  73. </div>
  74. <div class="opera_btn" @click="openPopupFile(item.id)">
  75. <img src="../../assets/images/sunVillage_info/signature_icon_04.png" alt="" width="35">
  76. <p>附件</p>
  77. </div>
  78. </div>
  79. </template>
  80. </van-swipe-cell>
  81. </van-list>
  82. </div>
  83. <van-dialog v-model="htqsShow" title="合同签署" confirmButtonText="关闭" @confirm="confirmn">
  84. <iframe width="100%" height="600px;" :src="noticeUrl"></iframe>
  85. </van-dialog>
  86. <!-- 签字弹出层 -->
  87. <van-popup v-model="show" closeable position="right" :style="{ height: '100%' }">
  88. <van-cell-group style="width: 100%;height:100%;overflow: hidden;padding-top: 10px;padding-bottom: 10px;">
  89. <div class="signature-box" @mousedown="canvasTTdown" @touchstart="canvasTTdown">
  90. <vue-esign
  91. ref="esign"
  92. class="mySign"
  93. :width="500"
  94. :height="height"
  95. :isCrop="signature.isCrop"
  96. :lineWidth="signature.lineWidth"
  97. :lineColor="signature.lineColor"
  98. :bgColor.sync="signature.bgColor"
  99. />
  100. </div>
  101. <img src="../../assets/images/sunVillage_info/signature_icon_10.png" id="canvasTT"
  102. style="position:absolute;top: 50%;left: 50%;transform: translate(-50%,-50%)" alt="">
  103. <div class="signature-footer">
  104. <van-button @click="handleGenerate" type="info" size="small">保存签字</van-button>
  105. <van-button @click="handleReset" class="clearBtn" type="info" plain size="small">清空画板</van-button>
  106. </div>
  107. </van-cell-group>
  108. </van-popup>
  109. <!-- 附件弹出层 -->
  110. <van-popup v-model="showFile" round closeable position="bottom" :style="{ height: '30%' }" >
  111. <div style="padding: 0 3%;">
  112. <van-divider>附件</van-divider>
  113. <van-uploader v-model="fileList" accept="" :after-read="afterRead" @delete="deleteFile" /> <!-- accept=".jpg, .gif, .png, .jpeg, .txt, .pdf, .doc, .docx, .xls, .xlsx" -->
  114. </div>
  115. </van-popup>
  116. </div>
  117. </template>
  118. <script>
  119. import { listCbht,eqbFbfhtwq, signProcessArchive, signedContractDownload, cbhtFirstSign, attachmentList, commonAttach, systemAttachment } from "@/api/sunVillage_info/fixedAssets";
  120. import vueEsign from "vue-esign";
  121. import $ from "jquery";
  122. export default {
  123. name: "sunVillageInfoListCbht",
  124. components: { vueEsign },
  125. data() {
  126. return {
  127. applicationList: [],
  128. loading: false,
  129. finished: false,
  130. show: false,
  131. showFile: false,
  132. htqsShow:false,
  133. noticeUrl:"",
  134. fileList: [],
  135. listLength: '0',
  136. queryParams: {
  137. pageNum: 1,
  138. pageSize: 15,
  139. cbfmc: null,
  140. translate_dict: 1,
  141. // 查询排序
  142. orderByColumn: "id",
  143. isAsc: "desc",
  144. },
  145. showBtn: true,
  146. signatureImg: '',
  147. //电子签名
  148. signature: {
  149. lineWidth: 6, // 画笔的线条粗细
  150. lineColor: "#000000", // 画笔的颜色
  151. bgColor: "", // 画布的背景颜色
  152. resultImg: "", // 最终画布生成的base64图片
  153. isCrop: false, // 是否裁剪,在画布设定尺寸基础上裁掉四周空白部分
  154. },
  155. signaId: '',
  156. height: null,
  157. // 查询关键字
  158. searchKeyword: null,
  159. };
  160. },
  161. created() {
  162. if (this.$route.query.type == 'code') {
  163. this.showBtn = false;
  164. }
  165. this.height = window.screen.height * 1.28 - 20;
  166. },
  167. methods: {
  168. canvasTTdown() {
  169. $('#canvasTT').css('display', 'none');
  170. },
  171. getList() {
  172. this.loading = true;
  173. listCbht(this.queryParams).then(response => {
  174. response.rows.forEach(item => {
  175. this.applicationList.push(item);
  176. });
  177. if (this.applicationList.length >= response.total) {
  178. this.finished = true;
  179. return;
  180. } else {
  181. this.loading = false;
  182. this.queryParams.pageNum += 1;
  183. }
  184. });
  185. },
  186. goDetail(id) {
  187. this.$router.push({
  188. path: '/sunVillage_info/list_cbht_detail',
  189. query: { id: id }
  190. })
  191. },
  192. openPopup(id, url) {
  193. this.show = true;
  194. this.signaId = id;
  195. },
  196. openPopupFile(id){
  197. this.fileList = [];
  198. this.signaId = id;
  199. this.showFile = true;
  200. let queryParams = {
  201. tableId: id,
  202. tableName: 't_sys_cbht',
  203. };
  204. attachmentList(queryParams).then(response => {
  205. response.rows.map(res => {
  206. // let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  207. this.fileList.push({
  208. url: '/api'+res.fileUrl,
  209. file: new File([], res.fileName,{}),
  210. id: res.id
  211. });
  212. })
  213. });
  214. },
  215. afterRead(file) {
  216. // 此时可以自行将文件上传至服务器
  217. let params = new FormData();
  218. params.append("tableId", this.signaId);
  219. params.append("tableName", "t_sys_cbht");
  220. params.append("bizPath", "service");
  221. params.append("fileType", '0');
  222. params.append("file", file.file);
  223. commonAttach(params).then(response => {
  224. this.$notify({ type: 'success', message: '上传成功' });
  225. let newFile = this.fileList[this.fileList.length - 1];
  226. this.$set(newFile, 'id', response.id);
  227. });
  228. },
  229. deleteFile(file){
  230. systemAttachment(file.id).then(res => {
  231. this.$notify({ type: 'success', message: '删除成功' });
  232. });
  233. },
  234. signaImgFun(url) {
  235. this.signatureImg = url;
  236. },
  237. confirmn(){
  238. this.applicationList = [];
  239. this.getList();
  240. },
  241. // 清空画板
  242. handleReset() {
  243. this.$refs.esign.reset();
  244. $('#canvasTT').css('display', 'block')
  245. },
  246. contractSign(val){
  247. eqbFbfhtwq(val).then(response => {
  248. this.noticeUrl = response.data;
  249. this.htqsShow = true;
  250. });
  251. },
  252. // 生成签字图
  253. handleGenerate() {
  254. this.$refs.esign
  255. .generate() // 使用生成器调用把签字的图片转换成为base64图片格式
  256. .then((res) => {
  257. this.signature.resultImg = res;
  258. let wj = this.dataURLtoBlob(res);
  259. let param = new FormData(); // 创建form对象
  260. param.append('file', wj); // 通过append向form对象添加数据
  261. param.append('date', this.format(new Date(), 'yyyy-MM-dd')); // 通过append向form对象添加数据
  262. cbhtFirstSign(param, this.signaId).then(response => {
  263. this.$notify({type: 'success', message: '签字成功'});
  264. this.show = false;
  265. location.reload();
  266. });
  267. })
  268. .catch((err) => {
  269. // 画布没有签字时会执行这里提示一下
  270. this.$toast.fail('请签名后再保存签字');
  271. });
  272. },
  273. dataURLtoBlob(dataurl, filename = 'file') {
  274. let arr = dataurl.split(',')
  275. let mime = arr[0].match(/:(.*?);/)[1]
  276. let suffix = mime.split('/')[1]
  277. let bstr = atob(arr[1])
  278. let n = bstr.length
  279. let u8arr = new Uint8Array(n)
  280. while (n--) {
  281. u8arr[n] = bstr.charCodeAt(n)
  282. }
  283. return new File([u8arr], `${filename}.${suffix}`, {
  284. type: mime
  285. })
  286. },
  287. // 签字流程归档
  288. handleArchive(id) {
  289. this.$dialog.confirm({
  290. message: '是否确认归档?',
  291. }).then(() => {
  292. // on confirm
  293. signProcessArchive(id).then(res => {
  294. if (res.code === 200) {
  295. this.$toast({
  296. icon: 'success',
  297. message: '归档完成',
  298. duration: "1000",
  299. onClose: () => {
  300. this.queryParams.pageNum = 1;
  301. this.finished = false;
  302. this.applicationList = [];
  303. this.getList();
  304. }
  305. });
  306. }
  307. });
  308. }).catch(() => {
  309. // on cancel
  310. });
  311. },
  312. // 签署合同下载
  313. handleDownload(id) {
  314. this.$dialog.confirm({
  315. message: '是否确认下载签署合同?',
  316. }).then(() => {
  317. // on confirm
  318. signedContractDownload(id).then(res => {
  319. if (res.code === 200) {
  320. window.location.href = res.data;
  321. }
  322. });
  323. }).catch(() => {
  324. // on cancel
  325. });
  326. },
  327. onSearch(){
  328. this.queryParams.cbfmc = this.searchKeyword;
  329. this.queryParams.pageNum = 1;
  330. this.finished = false;
  331. this.applicationList = [];
  332. this.getList();
  333. }
  334. },
  335. }
  336. </script>
  337. <style scoped lang="scss">
  338. .home_wrapper {
  339. background: #e9e9e9;
  340. min-height: 100vh;
  341. width: 100vw;
  342. .header_main {
  343. height: 116px;
  344. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  345. background-size: 100% 100%;
  346. position: fixed;
  347. top: 0;
  348. left: 0;
  349. width: 100%;
  350. font-size: 36px;
  351. line-height: 116px;
  352. text-align: center;
  353. color: #fff;
  354. position: relative;
  355. .return_btn {
  356. width: 24px;
  357. height: 43.2px;
  358. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  359. background-size: 20px 36px;
  360. position: absolute;
  361. left: 38px;
  362. top: 36px;
  363. }
  364. .add_btn {
  365. width: 56.4px;
  366. height: 40.8px;
  367. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  368. background-size: 47px 34px;
  369. position: absolute;
  370. right: 38px;
  371. top: 36px;
  372. }
  373. }
  374. .record_main {
  375. padding: 30px 22px;
  376. .record_det {
  377. height: 38px;
  378. line-height: 38px;
  379. display: flex;
  380. justify-content: space-between;
  381. .year_l {
  382. font-size: 30px;
  383. display: flex;
  384. align-items: center;
  385. color: #858585;
  386. .unit {
  387. padding-left: 5px;
  388. }
  389. .icon {
  390. width: 23px;
  391. height: 12px;
  392. display: block;
  393. background: url('../../assets/images/sunVillage_info/list_icon_1.png') no-repeat;
  394. background-size: 100% 100%;
  395. margin-bottom: 4px;
  396. margin-right: 8px;
  397. &.zk {
  398. transform: rotate(0deg)
  399. }
  400. &.ss {
  401. transform: rotate(180deg)
  402. }
  403. }
  404. }
  405. .total_r {
  406. font-size: 26px;
  407. letter-spacing: 2px;
  408. }
  409. }
  410. .record_list {
  411. display: flex;
  412. flex-flow: wrap;
  413. margin-top: 12PX;
  414. .flex_block {
  415. font-size: 30px;
  416. color: #878787;
  417. padding-right: 30px;
  418. &.current {
  419. color: #4199fe;
  420. font-weight: bold;
  421. }
  422. }
  423. }
  424. }
  425. .list_main {
  426. padding: 0 22px;
  427. margin-top: 15PX;
  428. .item {
  429. border-radius: 30px;
  430. background: #fff;
  431. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  432. padding: 25px 32px;
  433. margin-bottom: 20px;
  434. .info {
  435. .title {
  436. display: flex;
  437. font-size: 32px;
  438. align-items: center;
  439. height: 58px;
  440. .icon_box {
  441. width: 34px;
  442. display: block;
  443. height: 30px;
  444. background: url('../../assets/images/sunVillage_info/signature_icon_01.png') no-repeat;
  445. background-size: 100% 100%;
  446. margin-right: 10px;
  447. flex-shrink: 0;
  448. }
  449. .icon_box1 {
  450. width: 34px;
  451. display: block;
  452. height: 30px;
  453. background: url('../../assets/images/sunVillage_info/signature_icon_01g.png') no-repeat;
  454. background-size: 100% 100%;
  455. margin-right: 10px;
  456. flex-shrink: 0;
  457. }
  458. .news_title {
  459. display: -webkit-box;
  460. -webkit-box-orient: vertical;
  461. -webkit-line-clamp: 1;
  462. word-break: break-all;
  463. overflow: hidden;
  464. }
  465. .tips_mark {
  466. background: #ffedcd;
  467. border-radius: 8px;
  468. font-size: 24px;
  469. color: #f8a83d;
  470. text-align: center;
  471. line-height: 34px;
  472. flex-shrink: 0;
  473. padding: 0 5Px;
  474. margin-left: auto;
  475. }
  476. .tips_mark2 {
  477. background: #eb1616;
  478. border-radius: 8px;
  479. font-size: 24px;
  480. color: #ffffff;
  481. text-align: center;
  482. line-height: 34px;
  483. flex-shrink: 0;
  484. padding: 0 5Px;
  485. margin-left: 10PX;
  486. }
  487. }
  488. .time {
  489. font-size: 16PX;
  490. color: #333333;
  491. display: flex;
  492. align-items: center;
  493. margin-top: 5PX;
  494. justify-content: space-between;
  495. .icon_time {
  496. width: 25px;
  497. height: 25px;
  498. background: url('../../assets/images/sunVillage_info/list_icon_4.png') no-repeat;
  499. background-size: 100% 100%;
  500. margin-right: 10px;
  501. }
  502. }
  503. }
  504. }
  505. .operation {
  506. display: flex;
  507. align-items: center;
  508. justify-content: right;
  509. text-align: center;
  510. border-radius: 30px;
  511. background: #fff;
  512. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  513. height: 100%;
  514. padding: 0 15Px;
  515. margin-left: 10PX;
  516. .opera_btn {
  517. border-radius: 50%;
  518. padding: 0 10px;
  519. &.delete {
  520. background: #df0707;
  521. margin-left: 10PX;
  522. .icon {
  523. width: 22PX;
  524. height: 29PX;
  525. background: url('../../assets/images/sunVillage_info/signature_icon_03.png') no-repeat;
  526. background-size: 100% 100%;
  527. display: block;
  528. }
  529. }
  530. &.edit {
  531. background: #79cf13;
  532. margin-left: 10PX;
  533. .icon {
  534. width: 26PX;
  535. height: 25PX;
  536. background: url('../../assets/images/sunVillage_info/signature_icon_02.png') no-repeat;
  537. background-size: 100% 100%;
  538. display: block;
  539. }
  540. }
  541. &.view {
  542. background: #3494ff;
  543. margin-left: 10PX;
  544. .icon {
  545. width: 29PX;
  546. height: 21PX;
  547. background: url('../../assets/images/sunVillage_info/signature_icon_04.png') no-repeat;
  548. background-size: 100% 100%;
  549. display: block;
  550. }
  551. }
  552. &.list {
  553. background: #79cf13;
  554. margin-left: 10PX;
  555. .icon {
  556. width: 29px;
  557. height: 21px;
  558. background: url('../../assets/images/sunVillage_info/list_icon_10.png') no-repeat;
  559. background-size: 100% 100%;
  560. display: block;
  561. }
  562. }
  563. }
  564. }
  565. }
  566. .bottom_tips {
  567. font-size: 24px;
  568. color: #a7a6a6;
  569. text-align: center;
  570. margin-top: 32px;
  571. background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
  572. background-size: 260px 2px;
  573. .xs {
  574. padding: 0 8px;
  575. background: #e9e9e9;
  576. }
  577. }
  578. .signature-box {
  579. border: 1px dashed #666;
  580. margin: 2px 20px;
  581. height: 100%;
  582. /*canvas{*/
  583. /* height: 100%!important;*/
  584. /*}*/
  585. }
  586. .signature-footer {
  587. transform: rotate(90deg);
  588. width: auto;
  589. position: absolute;
  590. top: 50%;
  591. left: 0PX;
  592. .clearBtn {
  593. margin-left: 15px;
  594. }
  595. }
  596. .esigh-result {
  597. margin: 15px 20px;
  598. // height: 110px;
  599. border: 1px solid #666;
  600. font-size: 0;
  601. .imgs {
  602. width: 100%;
  603. }
  604. }
  605. }
  606. </style>