detailRepayment.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <div class="app-container zap-main">
  3. <div style="background-color: #ffffff;padding: 15px 25px;height:60px;vertical-align:middle;" v-if="form.fileId">
  4. <span style="margin-left:3%;">还款登记附件:</span>
  5. <span>{{form.fileName}}</span>
  6. <el-button style="float:right;margin-right:3%" size="mini" type="text" icon="el-icon-view" @click="handleDownload(form.fileUrl)">下载</el-button>
  7. <el-button style="float:right;margin-right:3%" size="mini" type="text" icon="el-icon-view" @click="handlePreview(form.fileName,form.fileUrl)">预览</el-button>
  8. </div>
  9. <el-form
  10. class="zap-form"
  11. :inline="true"
  12. ref="form"
  13. :model="form"
  14. :rules="rules"
  15. label-width="auto"
  16. style="padding-top: 20px;margin-top:20px"
  17. disabled
  18. >
  19. <el-form-item label="还款明细编号:" prop="zfcName" size="large">
  20. <el-input v-model="form.zfrPayNumber" />
  21. </el-form-item>
  22. <el-form-item label="最终付款方:" prop="core" size="large">
  23. <el-input v-model="form.core" />
  24. </el-form-item>
  25. <el-form-item label="还款承诺函编号:" prop="zfiPaymentNumber" size="large">
  26. <el-input v-model="form.zfiPaymentNumber" />
  27. </el-form-item>
  28. <el-form-item label="付款承诺日期:" prop="zfrRepaymentDate" size="large">
  29. <el-input v-model="form.zfrRepaymentDate" />
  30. </el-form-item>
  31. <el-form-item label="承诺付款金额:" prop="zfrLoanAmount" size="large">
  32. <el-input v-model="form.zfrLoanAmount" />
  33. </el-form-item>
  34. <el-form-item label="融信产品:" prop="zfpName" size="large">
  35. <el-input v-model="form.zfpName" />
  36. </el-form-item>
  37. <el-form-item label="承诺付款账户:" prop="zfpcrAccount" size="large">
  38. <el-input v-model="form.zfpcrAccount" />
  39. </el-form-item>
  40. <el-form-item label="付款账户开户行:" prop="zfpcrAccountBank" size="large">
  41. <el-input v-model="form.zfpcrAccountBank" />
  42. </el-form-item>
  43. <el-form-item label="还款状态:" prop="zfrApplyStatus" size="large">
  44. <el-input v-model="form.zfrApplyStatus" />
  45. </el-form-item>
  46. <el-table v-loading="loading" :data="list" stripe>
  47. <el-table-column
  48. label="收款账户"
  49. align="center"
  50. prop="zfrCollectionAccount"
  51. :show-overflow-tooltip="true"
  52. />
  53. <el-table-column
  54. label="收款账户户名"
  55. align="center"
  56. prop="supplier"
  57. :show-overflow-tooltip="true"
  58. />
  59. <el-table-column
  60. label="收款金额"
  61. align="center"
  62. prop="zfrLoanAmount"
  63. :show-overflow-tooltip="true"
  64. />
  65. </el-table>
  66. <el-dialog :visible.sync="openFile" width="1000px" append-to-body>
  67. <img :src="wordUrl" v-if="show" width='450px' height='500px'/>
  68. <iframe :src="wordUrl" width='800px' height='600px' frameborder='1' v-if="heid"/>
  69. </el-dialog>
  70. </el-form>
  71. <div style="margin-top: 100px; margin-left:45%">
  72. <el-button type="primary" plain @click="cancel">取消</el-button>
  73. </div>
  74. </div>
  75. </template>
  76. <script>
  77. import { getRepayment } from "@/api/service/repayment/repayment";
  78. import {getToken} from "@/utils/auth";
  79. export default {
  80. name: "detailRepayment",
  81. components: {},
  82. data() {
  83. return {
  84. disabled: false,
  85. // 日期范围
  86. dateRange: [],
  87. // 选中数组
  88. ids: [],
  89. // 弹出层标题
  90. title: "",
  91. // 总条数
  92. total: 0,
  93. // 是否显示弹出层
  94. open: false,
  95. openFile:false,
  96. show:false,
  97. heid:false,
  98. list: [],
  99. // 表单参数
  100. form: {},
  101. queryParams: {
  102. pageNum: 1,
  103. pageSize: 10
  104. },
  105. options: [],
  106. value: [],
  107. loading: false,
  108. // 表单校验
  109. rules: {}
  110. };
  111. },
  112. created() {
  113. const zfrId = this.$route.params && this.$route.params.zfrId;
  114. // this.reset();
  115. this.getDicts("zc_zfr_apply_status").then(response => {
  116. this.applyStatusOptions = response.data;
  117. });
  118. getRepayment(zfrId).then(response => {
  119. this.form = response.data[0];
  120. this.form.zfrApplyStatus = this.selectDictLabel(
  121. this.applyStatusOptions,
  122. this.form.zfrApplyStatus
  123. );
  124. if(!response.data[0].zfrCollectionAccount){
  125. response.data[0].zfrCollectionAccount = "线下面签"
  126. }
  127. this.list = response.data;
  128. });
  129. },
  130. activated() {
  131. this.reset();
  132. //this.getList();
  133. },
  134. methods: {
  135. reset() {
  136. this.form = {};
  137. this.resetForm("form");
  138. },
  139. //还款状态字典反显
  140. applyStatusFormat(row, column) {
  141. return this.selectDictLabel(this.applyStatusOptions, row.zfrApplyStatus);
  142. },
  143. // 取消按钮
  144. cancel() {
  145. this.reset();
  146. this.$store.dispatch("tagsView/delView", this.$route);
  147. this.$router.go(-1);
  148. this.open = false;
  149. },
  150. //附件预览
  151. handlePreview(fileName,fileUrl) {
  152. const pfiUrl = fileUrl;
  153. const pfiFileName = fileName;
  154. if (this.form.fileId) {
  155. console.log(pfiFileName.substr(-3));
  156. if (pfiFileName.substr(-3) == "pdf") {
  157. this.wordUrl = pfiUrl + "/" + getToken();
  158. this.show=false;
  159. this.heid=true;
  160. } else if (
  161. pfiFileName.substr(-3) == "jpg" ||
  162. pfiFileName.substr(-3) == "png" ||
  163. pfiFileName.substr(-3) == "JPG" ||
  164. pfiFileName.substr(-3) == "PNG" ||
  165. pfiFileName.substr(-4) == "jpeg" ||
  166. pfiFileName.substr(-3) == "JPEG"
  167. ) {
  168. this.wordUrl =
  169. pfiUrl +
  170. "/" +
  171. getToken();
  172. this.show=true;
  173. this.heid=false;
  174. console.log("====>",this.wordUrl);
  175. } else if (
  176. pfiFileName.substr(-3) == "doc" ||
  177. pfiFileName.substr(-3) == "DOC"||
  178. pfiFileName.substr(-4) == "docx" ||
  179. pfiFileName.substr(-3) == "DOCX"
  180. ) {
  181. this.wordUrl =
  182. "https://view.officeapps.live.com/op/view.aspx?src=" +
  183. pfiUrl +
  184. "/" +
  185. getToken() +
  186. "/" +
  187. pfiFileName;
  188. this.show=false;
  189. this.heid=true;
  190. console.log("====>",this.wordUrl);
  191. } else {
  192. this.$message({
  193. message: "暂不支持该类型文件预览",
  194. type: "warning",
  195. });
  196. return;
  197. }
  198. }
  199. this.openFile = true;
  200. },
  201. //附件下载
  202. handleDownload(url){
  203. const pfiUrl = url;
  204. if(pfiUrl != null && pfiUrl != ''){
  205. window.open(pfiUrl +"/"+ getToken());
  206. }else{
  207. this.$message({
  208. message: '该附件不存在!',
  209. type: 'warning'
  210. });
  211. return;
  212. }
  213. },
  214. }
  215. };
  216. </script>
  217. <style>
  218. .single-select-table thead .el-table-column--selection .cell {
  219. display: none;
  220. }
  221. </style>