detailFinanceRecord.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942
  1. <template>
  2. <div class="app-container zap-main">
  3. <!-- 添加或修改融资记录对话框 -->
  4. <div class="zap-No">
  5. <el-row type="flex" align="middle" :gutter="10">
  6. <el-col :span="8">
  7. <el-row type="flex" align="middle">
  8. <img class="icon" src="../../../assets/images/icon_contract_no.png" alt />
  9. <span class="label">融资编号</span>
  10. <span class="value">{{number}}</span>
  11. </el-row>
  12. </el-col>
  13. <el-col :span="8">
  14. <el-row type="flex" align="middle">
  15. <img class="icon" src="../../../assets/images/icon_calendar.png" alt />
  16. <span class="label">创建时间</span>
  17. <span class="value">{{time}}</span>
  18. </el-row>
  19. </el-col>
  20. <el-col :span="8">
  21. <el-row type="flex" align="middle">
  22. <img class="icon" src="../../../assets/images/icon_person.png" alt />
  23. <span class="label">创建人</span>
  24. <span class="value">{{user}}</span>
  25. </el-row>
  26. </el-col>
  27. </el-row>
  28. </div>
  29. <el-form
  30. class="zap-form"
  31. ref="form"
  32. :model="form"
  33. :inline="true"
  34. :rules="rules"
  35. label-width="auto"
  36. >
  37. <div class="contain">
  38. <p>资方拒绝放款:
  39. </p>
  40. <p>
  41. 原因:{{reason ? reason : "暂无"}};
  42. </p>
  43. <p>
  44. 注:本次融资申请已作废,请完善或达成相应融资条件后,再使用本融信发起融资;
  45. </p>
  46. </div>
  47. <div class="zap-title zap-margin-top">融资详情</div>
  48. <el-row class="zap-form" style="padding-bottom: 0;">
  49. <el-col :span="12">
  50. <el-form-item label="选择融信:" prop="zfrFinanceId" size="large">
  51. <el-select v-model="form.zfrFinanceId" clearable @clear="clearBoth" disabled>
  52. <el-option v-for="(item,index) in financeInfList" :key="index" :label="item.zfiNumber" :value="item.zfiId" @click.native="amount(item)"></el-option>
  53. </el-select>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="12">
  57. <el-form-item label="融资收款账户:" prop="zfrCollectionAccount" size="large" label-width="101px">
  58. <el-input v-model="form.zfrCollectionAccount" clearable placeholder="请输入融资账户" maxlength="25" readonly />
  59. </el-form-item>
  60. </el-col>
  61. </el-row>
  62. <el-row class="zap-form" style="padding-bottom: 0;">
  63. <el-col :span="12">
  64. <el-form-item label="融信金额:" prop="zfiAmount" size="large">
  65. <el-input v-model="form.zfiAmount" clearable placeholder="请输入融信金额" maxlength="25" readonly />
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="12">
  69. <el-form-item label="申请融资方:" prop="companyName" size="large">
  70. <el-input v-model="form.companyName" clearable placeholder="请输入申请融资方" maxlength="25" readonly />
  71. </el-form-item>
  72. </el-col>
  73. </el-row>
  74. <el-row class="zap-form" style="padding-bottom: 0;">
  75. <el-col :span="12">
  76. <el-form-item label="融资金额:" prop="zfrAmount" size="large">
  77. <el-input v-model="form.zfrAmount" clearable placeholder="请输入融资金额" maxlength="25" readonly />
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="12">
  81. <el-form-item label="融资利率:" prop="zfrRate" size="large">
  82. <el-input v-model="form.zfrRate" clearable placeholder="请输入融资利率" maxlength="25" readonly />
  83. </el-form-item>
  84. </el-col>
  85. </el-row>
  86. <el-row class="zap-form" style="padding-bottom: 0;">
  87. <el-col :span="12">
  88. <el-form-item label="承诺还款日期:" prop="zfrRepaymentDate" size="large" label-width="101px">
  89. <el-input v-model="form.zfrRepaymentDate" clearable placeholder="请输入承诺还款日期" maxlength="25" readonly />
  90. </el-form-item>
  91. </el-col>
  92. <el-col :span="12">
  93. <el-form-item label="服务费率:" prop="zfpcrChargeRate" size="large">
  94. <el-input v-model="form.zfpcrChargeRate" clearable placeholder="请输入服务费率" maxlength="25" readonly />
  95. </el-form-item>
  96. </el-col>
  97. </el-row>
  98. <el-row class="zap-form" style="padding-bottom: 0;">
  99. <el-col :span="12">
  100. <el-form-item label="预计融资成本:" prop="cost" size="large" label-width="101px" v-if="this.status != '01'">
  101. <el-input v-model="form.cost" clearable placeholder="请输入预计融资成本" maxlength="25" readonly />
  102. </el-form-item>
  103. </el-col>
  104. <el-col :span="12">
  105. <el-form-item label="预计融资期限:" prop="term" size="large" label-width="101px" v-if="this.status != '01'">
  106. <el-input v-model="form.term" clearable placeholder="请输入预计融资期限" maxlength="25" readonly />
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. <el-row class="zap-form" style="padding-bottom: 0;">
  111. <el-col :span="12">
  112. <el-form-item label="预计净融资额:" prop="amount" size="large" label-width="101px" v-if="this.status != '01'">
  113. <el-input v-model="form.amount" clearable placeholder="请输入预计净融资额" maxlength="25" readonly />
  114. </el-form-item>
  115. </el-col>
  116. <el-col :span="12">
  117. <el-form-item label="融资状态:" prop="zfrStatus" size="large" label-width="101px" v-if="this.status != '01'">
  118. <el-input v-model="form.zfrStatus" clearable placeholder="请输入融资状态" maxlength="25" readonly />
  119. </el-form-item>
  120. </el-col>
  121. </el-row>
  122. <el-row class="zap-form" style="padding-bottom: 0;">
  123. <el-col :span="12">
  124. <el-form-item label="融资成本:" prop="cost" size="large" label-width="101px" v-if="this.status == '01'">
  125. <el-input v-model="form.costIng" clearable placeholder="请输入融资成本" maxlength="25" readonly />
  126. </el-form-item>
  127. </el-col>
  128. <el-col :span="12">
  129. <el-form-item label="融资期限:" prop="term" size="large" label-width="101px" v-if="this.status == '01'">
  130. <el-input v-model="form.termIng" clearable placeholder="请输入融资期限" maxlength="25" readonly />
  131. </el-form-item>
  132. </el-col>
  133. </el-row>
  134. <el-row class="zap-form" style="padding-bottom: 0;">
  135. <el-col :span="12">
  136. <el-form-item label="净融资额:" prop="amountIng" size="large" label-width="101px" v-if="this.status == '01'">
  137. <el-input v-model="form.amountIng" clearable placeholder="请输入净融资额" maxlength="25" readonly />
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="12">
  141. <el-form-item label="融资状态:" prop="zfrStatus" size="large" label-width="101px" v-if="this.status == '01'">
  142. <el-select v-model="form.zfrStatus" placeholder="请选择状态" clearable>
  143. <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  144. </el-select>
  145. </el-form-item>
  146. </el-col>
  147. </el-row>
  148. <!-- <el-form-item label="融信编号" prop="zfrFinanceId" size="large">
  149. <el-select v-model="form.zfrFinanceId" clearable @clear="clearBoth" disabled>
  150. <el-option
  151. v-for="(item,index) in financeInfList"
  152. :key="index"
  153. :label="item.zfiNumber"
  154. :value="item.zfiId"
  155. @click.native="amount(item)"
  156. ></el-option>
  157. </el-select>
  158. </el-form-item>
  159. <el-form-item label="融资金额" prop="zfrAmount" size="large">
  160. <el-input v-model="form.zfrAmount" placeholder="请输入融资金额" readonly>
  161. <template slot="append">元</template>
  162. </el-input>
  163. </el-form-item>
  164. <el-form-item label="融资账户" prop="zfrCollectionAccount" size="large">
  165. <el-input v-model="form.zfrCollectionAccount" placeholder="请输入融资账户" disabled />
  166. </el-form-item>
  167. <el-form-item label="承诺还款日" prop="zfrRepaymentDate" size="large">
  168. <el-input v-model="form.zfrRepaymentDate" placeholder="请输入承诺还款日" disabled />
  169. </el-form-item>
  170. <el-form-item label="融资利率" prop="zfrRate" v-if="false" size="large">
  171. <el-input v-model="form.zfrRate" placeholder="请输入融资利率" disabled />
  172. </el-form-item>
  173. <el-form-item label="融资放款方式" prop="zfpcrLoantype" v-if="false" size="large">
  174. <el-input v-model="form.zfpcrLoantype" placeholder="请输入融资账户" disabled />
  175. </el-form-item>
  176. <el-form-item label="融资产品" prop="zfiProductId" v-if="false" size="large">
  177. <el-input v-model="form.zfiProductId" placeholder="请输入融资产品" disabled />
  178. </el-form-item> -->
  179. </el-form>
  180. <div class="zap-title">融信信息</div>
  181. <el-row class="zap-form">
  182. <el-col>
  183. <span style="font-size: 14px;color: #333333;">融信凭证</span>
  184. </el-col>
  185. <table class="gridtable" style="width:80%;text-align:center" align="center">
  186. <tr>
  187. <td rowspan="4">开立方</td>
  188. <td>全称</td>
  189. <td>{{openName}}</td>
  190. <td rowspan="4">接收方</td>
  191. <td>全称</td>
  192. <td>{{receiveName}}</td>
  193. </tr>
  194. <tr>
  195. <td>社会统一码</td>
  196. <td>{{openCode}}</td>
  197. <td>社会统一码</td>
  198. <td>{{receiverCode}}</td>
  199. </tr>
  200. <tr>
  201. <td>开户银行</td>
  202. <td>{{openBank}}</td>
  203. <td>开户银行</td>
  204. <td>{{receiverBank}}</td>
  205. </tr>
  206. <tr>
  207. <td>账号</td>
  208. <td>{{openAccount}}</td>
  209. <td>账号</td>
  210. <td>{{receiverAccount}}</td>
  211. </tr>
  212. <tr>
  213. <td colspan="2">粮信金额</td>
  214. <td colspan="4">人民币(大写):{{issuedAmount}}<br>人民币(小写)¥{{form.zfiAmount}}</td>
  215. </tr>
  216. <tr>
  217. <td colspan="2">起止日期</td>
  218. <td colspan="4">{{stopDate}}</td>
  219. </tr>
  220. </table>
  221. </el-row>
  222. <div class="zap-title zap-margin-top">资产信息</div>
  223. <el-row class="zap-form zap-padding-bottom">
  224. <el-row class="zap-accounts-receivable">
  225. <el-col>
  226. <el-row type="flex" align="middle" style="height: 36px;">
  227. <span class="label">金额大写:</span>
  228. <span class="value" style="margin-right: 40px;">{{ smallToBig(allAmount()) }}</span>
  229. <span class="label">消费金额:</span>
  230. <span class="value">{{ allAmount() }} 元</span>
  231. </el-row>
  232. </el-col>
  233. </el-row>
  234. <el-table :data="billInfList" stripe>
  235. <el-table-column label="序号" type="index" width="50" align="center">
  236. <template slot-scope="scope">
  237. <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
  238. </template>
  239. </el-table-column>
  240. <el-table-column label="编号" align="center" prop="zbiNumber" />
  241. <el-table-column label="账款名称" align="center" prop="zbiName" />
  242. <el-table-column label="应收企业" align="center" prop="payee" />
  243. <el-table-column label="应付企业" align="center" prop="payer" />
  244. <el-table-column label="还款时间" align="center" prop="zbiPayDate" />
  245. <el-table-column label="金额" align="center" prop="zbiAmount" />
  246. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
  247. <template slot-scope="scope">
  248. <el-button
  249. size="mini"
  250. type="text"
  251. icon="el-icon-view"
  252. @click="handleDetail(scope.$index, billInfList)"
  253. >详情</el-button>
  254. </template>
  255. </el-table-column>
  256. </el-table>
  257. </el-row>
  258. <!-- 发票附件 -->
  259. <!-- <div class="zap-title zap-margin-top">发票附件</div>
  260. <el-row class="zap-form zap-padding-bottom">
  261. <el-table :data="invoiceFileList" style="width: 100%" stripe>
  262. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  263. <el-table-column
  264. label="操作"
  265. align="center"
  266. class-name="small-padding fixed-width"
  267. width="300"
  268. fixed="right"
  269. >
  270. <template slot-scope="scope">
  271. <el-button
  272. size="mini"
  273. type="text"
  274. icon="el-icon-view"
  275. @click="handlePreview(scope.row)"
  276. >预览</el-button>
  277. </template>
  278. </el-table-column>
  279. </el-table>
  280. </el-row> -->
  281. <!-- 合同附件 -->
  282. <!-- <div class="zap-title zap-margin-top">合同附件</div>
  283. <el-row class="zap-form zap-padding-bottom">
  284. <el-table :data="contractFileList" border style="width: 100%">
  285. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  286. <el-table-column
  287. label="操作"
  288. align="center"
  289. class-name="small-padding fixed-width"
  290. width="300"
  291. fixed="right"
  292. >
  293. <template slot-scope="scope">
  294. <el-button
  295. size="mini"
  296. type="text"
  297. icon="el-icon-view"
  298. @click="handlePreview(scope.row)"
  299. >预览</el-button>
  300. </template>
  301. </el-table-column>
  302. </el-table>
  303. </el-row> -->
  304. <!-- 其他附件 -->
  305. <!-- <div class="zap-title zap-margin-top">其他附件</div>
  306. <el-row class="zap-form zap-padding-bottom">
  307. <el-table :data="otherFileList" border style="width: 100%">
  308. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  309. <el-table-column
  310. label="操作"
  311. align="center"
  312. class-name="small-padding fixed-width"
  313. width="300"
  314. fixed="right"
  315. >
  316. <template slot-scope="scope">
  317. <el-button
  318. size="mini"
  319. type="text"
  320. icon="el-icon-view"
  321. @click="handlePreview(scope.row)"
  322. >预览</el-button>
  323. </template>
  324. </el-table-column>
  325. </el-table>
  326. </el-row> -->
  327. <div class="zap-title zap-margin-top">盖章附件</div>
  328. <el-row>
  329. <img
  330. style="width:50px;height:50px;"
  331. :key="dict.pfiFileId"
  332. src="../../../assets/images/pdf.png"
  333. v-for="dict in recordSealList"
  334. @click="handlePreview(dict)"
  335. :title="dict.pfiFileName"
  336. />
  337. </el-row>
  338. <el-row type="flex" align="middle" justify="center" style="height: 77px;">
  339. <el-button type="primary" plain @click="cancel">取消</el-button>
  340. <!-- <el-button type="success" @click="submitForm"
  341. >提交</el-button>-->
  342. </el-row>
  343. <!-- 附件详情 -->
  344. <el-dialog title="详情" :visible.sync="openDetailBill" width="1120px" append-to-body>
  345. <detail-bill :zbiId="this.zbiId" v-if="openDetailBill"></detail-bill>
  346. </el-dialog>
  347. <!--预览-->
  348. <el-dialog :visible.sync="openFile" width="900px" append-to-body>
  349. <img :src="wordUrl" v-if="show" width="800px" height="500px" />
  350. <iframe :src="wordUrl" width="800px" height="500px" frameborder="1" v-if="heid" />
  351. </el-dialog>
  352. </div>
  353. </template>
  354. <script>
  355. import {
  356. getRecord,
  357. listBillInf,
  358. listAccInf,
  359. getRecordSealFile
  360. } from "@/api/service/financeRecord/record";
  361. import { listFinanceInf } from "@/api/common/financeInf";
  362. import { getFile } from "@/api/service/credit/credit";
  363. import { getToken } from "@/utils/auth";
  364. import { getUserProfile } from "@/api/system/user";
  365. import {getCreditDetail} from "@/api/service/credit/credit";
  366. import DetailBill from "@/views/service/credit/billDetail";
  367. export default {
  368. name: "financeRecord",
  369. components: {DetailBill},
  370. data() {
  371. return {
  372. //往来账款id
  373. zbiId: '',
  374. //融资状态
  375. status: "",
  376. //融资编号
  377. number: "",
  378. //创建时间
  379. time: "",
  380. //创建人
  381. user: "",
  382. // 遮罩层
  383. loading: true,
  384. // 选中数组
  385. ids: [],
  386. // 非单个禁用
  387. single: true,
  388. // 非多个禁用
  389. multiple: true,
  390. // 显示搜索条件
  391. showSearch: true,
  392. // 总条数
  393. total: 0,
  394. // 全部融资记录表格数据
  395. recordList: [],
  396. //融信编号数据
  397. financeInfList: [],
  398. //应收账款
  399. billInfList: [],
  400. //合同附件
  401. contractFileList: [],
  402. //发票附件
  403. invoiceFileList: [],
  404. //其他文件
  405. otherFileList: [],
  406. //盖章文件
  407. recordSealList: [],
  408. //开立方
  409. openName:"",
  410. //开立社会码
  411. openCode:"",
  412. //开立银行
  413. openBank:"",
  414. //开立账户
  415. openAccount:"",
  416. //接收方
  417. receiveName:"",
  418. //接收方社会统一码
  419. receiverCode:"",
  420. //接收方银行
  421. receiverBank:"",
  422. //接收方账户
  423. receiverAccount:"",
  424. //起止日期
  425. stopDate:"",
  426. //签发金额大写
  427. issuedAmount: "零元整",
  428. //拒绝放款原因
  429. reason: "暂无",
  430. // 弹出层标题
  431. title: "",
  432. // 是否显示弹出层
  433. open: false,
  434. openDetailBill: false,
  435. //融资状态数据字典
  436. statusOptions: [],
  437. // 查询参数
  438. queryParams: {
  439. pageNum: 1,
  440. pageSize: 10,
  441. zfrFinanceId: null,
  442. zfrNumber: null,
  443. zfrAmount: null,
  444. zfrRate: null,
  445. zfrHandler: null,
  446. zfrRepaymentDate: null,
  447. zfrApplyDate: null,
  448. zfrLoanDate: null,
  449. zfrApplyAmount: null,
  450. zfrApplyType: null,
  451. zfrStatus: null,
  452. zfrApproveStt: null,
  453. zfpcrLoantype: null,
  454. zfiProductId: null
  455. },
  456. // 表单参数
  457. form: {},
  458. formIng:{},
  459. // 表单校验
  460. rules: {
  461. zfrFinanceId: [
  462. { required: true, message: "融信编号不能为空", trigger: "blur" }
  463. ],
  464. zfrAmount: [
  465. { required: true, message: "融资金额不能为空", trigger: "blur" }
  466. ]
  467. },
  468. openFile: false,
  469. wordUrl: "",
  470. show: false,
  471. heid: false
  472. };
  473. },
  474. created() {
  475. this.getDicts("ser_zfr_status").then(response => {
  476. this.statusOptions = response.data;
  477. });
  478. const zfrId = this.$route.params && this.$route.params.zfrId;
  479. getRecord(zfrId).then(response => {
  480. debugger
  481. this.number = response.data.zfrNumber;
  482. this.status = response.data.zfrStatus;
  483. this.reason = response.data.zfrReason;
  484. this.time = this.parseTime(
  485. new Date(response.data.createTime),
  486. "{y}-{m}-{d} {h}:{m}:{s}"
  487. );
  488. this.user = response.data.createUser;
  489. const zfrFinanceId = response.data.zfrFinanceId;
  490. this.form.zfrFinanceId = response.data.zfrFinanceId;
  491. this.form.zfrStatus = response.data.zfrStatus;
  492. listFinanceInf(zfrFinanceId).then(response => {
  493. if (response.data) {
  494. this.financeInfList = response.data;
  495. for (let item of this.financeInfList) {
  496. if (item.zfiId == zfrFinanceId) {
  497. this.amount(item);
  498. }
  499. }
  500. }
  501. });
  502. listBillInf(zfrFinanceId)
  503. .then(response => {
  504. this.billInfList = response.data;
  505. this.loading = false;
  506. })
  507. .then(() => {
  508. var queryParamsFile = {};
  509. queryParamsFile.ticketList = this.billInfList;
  510. getFile(queryParamsFile).then(response => {
  511. if (response.data) {
  512. //获取发票文件
  513. this.invoiceFileList = response.data.invoiceFileList;
  514. //获取合同文件
  515. this.contractFileList = response.data.contractFileList;
  516. //获取其他文件
  517. this.otherFileList = response.data.otherFileList;
  518. }
  519. });
  520. })
  521. .then(() => {
  522. this.formIng = response.data;
  523. //this.form = response.data;
  524. // this.$set(
  525. // this.form,
  526. // "zfrRepaymentDate",
  527. // this.parseTime(
  528. // new Date(response.data.zfrRepaymentDate),
  529. // "{y}-{m}-{d}"
  530. // )
  531. // );
  532. this.getRecordSealFile();
  533. });
  534. });
  535. getUserProfile().then(response => {
  536. if(response.company){
  537. this.$set(this.form, "companyName", response.company.scyName);
  538. }
  539. });
  540. // this.getFinanceInf();
  541. },
  542. methods: {
  543. /** 查询融信编号 */
  544. getFinanceInf() {
  545. this.loading = true;
  546. listFinanceInf().then(response => {
  547. this.financeInfList = response.data;
  548. this.loading = false;
  549. });
  550. },
  551. // 取消按钮
  552. cancel() {
  553. this.reset();
  554. this.$store.dispatch("tagsView/delView", this.$route);
  555. this.$router.go(-1);
  556. this.open = false;
  557. },
  558. // 表单重置
  559. reset() {
  560. this.form = {
  561. zfrId: null,
  562. zfrFinanceId: null,
  563. zfrNumber: null,
  564. zfrAmount: null,
  565. zfrRate: null,
  566. zfrHandler: null,
  567. zfrRepaymentDate: null,
  568. zfrApplyDate: null,
  569. zfrLoanDate: null,
  570. zfrApplyAmount: null,
  571. zfrApplyType: null,
  572. zfrStatus: "00",
  573. zfrApproveStt: null,
  574. zfrProfitSpare1: null,
  575. zfrProfitSpare2: null,
  576. zfrProfitSpare3: null,
  577. zfrProfitSpare4: null,
  578. zfrProfitSpare5: null,
  579. zfrProfitSpare6: null,
  580. zfrProfitSpare7: null,
  581. zfrProfitSpare8: null,
  582. zfrProfitSpare9: null,
  583. createBy: null,
  584. createTime: null,
  585. updateBy: null,
  586. updateTime: null
  587. };
  588. this.resetForm("form");
  589. },
  590. /** 全部搜索按钮操作 */
  591. handleQuery() {
  592. this.queryParams.pageNum = 1;
  593. this.getList();
  594. },
  595. /** 全部重置按钮操作 */
  596. resetQuery() {
  597. this.resetForm("queryForm");
  598. this.handleQuery();
  599. },
  600. //全部 多选框选中数据
  601. handleSelectionChange(selection) {
  602. this.ids = selection.map(item => item.zfrId);
  603. this.single = selection.length !== 1;
  604. this.multiple = !selection.length;
  605. },
  606. /* 融信编号赋值融资金额 */
  607. amount(item) {
  608. debugger
  609. this.$set(this.form, "zfrAmount", item.zfiAmount);
  610. this.$set(this.form, "zfiAmount", item.zfiAmount);
  611. this.$set(this.form, "zfrRepaymentDate", item.zfiExpireDate);
  612. this.$set(this.form, "zfrRate", item.zfpcrRate);
  613. this.$set(this.form, "zfpcrLoanType", item.zfpcrLoanType);
  614. this.$set(this.form, "zfiProductId", item.zfiProductId);
  615. this.$set(this.form, "zfpcrChargeRate", item.zfpcrChargeRate);
  616. this.$set(this.form, "cost", item.cost);
  617. this.$set(this.form, "term", item.term);
  618. this.$set(this.form, "amount", item.amount);
  619. this.$set(this.form, "costIng", item.costIng);
  620. this.$set(this.form, "termIng", item.termIng);
  621. this.$set(this.form, "amountIng", item.amountIng);
  622. if (item.zfiId) {
  623. this.loading = true;
  624. listBillInf(item.zfiId)
  625. .then(response => {
  626. this.billInfList = response.data;
  627. this.loading = false;
  628. })
  629. .then(() => {
  630. var queryParamsFile = {};
  631. queryParamsFile.ticketList = this.billInfList;
  632. getFile(queryParamsFile).then(response => {
  633. if (response.data) {
  634. //获取发票文件
  635. this.invoiceFileList = response.data.invoiceFileList;
  636. //获取合同文件
  637. this.contractFileList = response.data.contractFileList;
  638. //获取其他文件
  639. this.otherFileList = response.data.otherFileList;
  640. }
  641. });
  642. if (item.zfpcrLoanType == "0") {
  643. listAccInf(item.zfiProductId).then(response => {
  644. this.$set(this.form, "zfrCollectionAccount", response.msg);
  645. });
  646. }
  647. });
  648. getCreditDetail(item.zfiId).then((response) => {
  649. debugger
  650. if(response.data){
  651. //签发金额大写
  652. this.issuedAmount = this.smallToBig(response.data.financeInf.zfiAmount);
  653. //给表格赋值
  654. this.openName = response.data.openName;
  655. this.openCode = response.data.openCode;
  656. this.openBank = response.data.openBank;
  657. this.openAccount = response.data.openAccount;
  658. this.receiveName = response.data.receiveName;
  659. this.receiverCode = response.data.receiverCode;
  660. this.receiverBank = response.data.receiverBank;
  661. this.receiverAccount = response.data.receiverAccount;
  662. this.stopDate = response.data.stopDate;
  663. this.zfiRate = response.data.financeInf.zfiRate;
  664. }
  665. })
  666. }
  667. },
  668. //详情按钮
  669. handleDetail(index, rows){
  670. this.zbiId = rows[index].zbiId
  671. this.openDetailBill = true
  672. },
  673. /** 提交按钮 */
  674. submitForm() {
  675. this.$refs["form"].validate(valid => {
  676. if (valid) {
  677. const loading = this.$loading({
  678. lock: true,
  679. text: "Loading",
  680. spinner: "el-icon-loading",
  681. background: "rgba(0, 0, 0, 0.7)"
  682. });
  683. addRecord(this.form)
  684. .then(response => {
  685. this.msgSuccess("新增成功");
  686. loading.close();
  687. this.$store.dispatch("tagsView/delView", this.$route);
  688. this.$router.go(-1);
  689. })
  690. .catch(response => {
  691. loading.close();
  692. });
  693. }
  694. });
  695. },
  696. /* 清空 */
  697. clearBoth() {
  698. this.form.zfrAmount = "";
  699. this.form, (zfrRepaymentDate = "");
  700. this.form.zfrRate = "";
  701. this.form.zfpcrLoantype = "";
  702. this.billInfList = [];
  703. this.contractFileList = [];
  704. this.invoiceFileList = [];
  705. this.otherFileList = [];
  706. },
  707. //预览
  708. handlePreview(row) {
  709. const pfiUrl = row.pfiUrl;
  710. const pfiFileName = row.pfiFileName;
  711. if (row.pfiUrl) {
  712. console.log(pfiFileName.substr(-3));
  713. if (pfiFileName.substr(-3) == "pdf") {
  714. this.wordUrl = pfiUrl + "/" + getToken();
  715. this.show = false;
  716. this.heid = true;
  717. } else if (
  718. pfiFileName.substr(-3) == "jpg" ||
  719. pfiFileName.substr(-3) == "png" ||
  720. pfiFileName.substr(-3) == "JPG" ||
  721. pfiFileName.substr(-3) == "PNG" ||
  722. pfiFileName.substr(-4) == "jpeg" ||
  723. pfiFileName.substr(-3) == "JPEG"
  724. ) {
  725. this.wordUrl = pfiUrl + "/" + getToken();
  726. this.show = true;
  727. this.heid = false;
  728. console.log("====>", this.wordUrl);
  729. } else if (
  730. pfiFileName.substr(-3) == "doc" ||
  731. pfiFileName.substr(-3) == "DOC" ||
  732. pfiFileName.substr(-4) == "docx" ||
  733. pfiFileName.substr(-3) == "DOCX"
  734. ) {
  735. this.wordUrl =
  736. "https://view.officeapps.live.com/op/view.aspx?src=" +
  737. pfiUrl +
  738. "/" +
  739. getToken() +
  740. "/" +
  741. pfiFileName;
  742. this.show = false;
  743. this.heid = true;
  744. console.log("====>", this.wordUrl);
  745. } else {
  746. this.$message({
  747. message: "暂不支持该类型文件预览",
  748. type: "warning"
  749. });
  750. return;
  751. }
  752. }
  753. this.openFile = true;
  754. },
  755. //获取盖章文件
  756. getRecordSealFile() {
  757. var self = this
  758. getRecordSealFile(self.formIng).then(response => {
  759. debugger;
  760. if (response.data.list) {
  761. self.recordSealList = response.data.list;
  762. }
  763. });
  764. },
  765. //应收账款合计
  766. allAmount() {
  767. var strarr = [0.0];
  768. for (let i in this.billInfList) {
  769. strarr.push(this.billInfList[i]["zbiAmount"]);
  770. }
  771. return Math.floor(eval(strarr.join("+")) * 100) / 100; //结果
  772. },
  773. /* // 将数字金额转换为大写金额 */
  774. smallToBig(money) {
  775. // 将数字金额转换为大写金额
  776. var cnNums = new Array(
  777. "零",
  778. "壹",
  779. "贰",
  780. "叁",
  781. "肆",
  782. "伍",
  783. "陆",
  784. "柒",
  785. "捌",
  786. "玖"
  787. ); //汉字的数字
  788. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  789. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  790. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  791. var cnInteger = "整"; //整数金额时后面跟的字符
  792. var cnIntLast = "元"; //整数完以后的单位
  793. //最大处理的数字
  794. var maxNum = 999999999999999.9999;
  795. var integerNum; //金额整数部分
  796. var decimalNum; //金额小数部分
  797. //输出的中文金额字符串
  798. var chineseStr = "";
  799. var parts; //分离金额后用的数组,预定义
  800. if (money == "" || money == null || money == undefined) {
  801. return "零元零角零分";
  802. }
  803. money = parseFloat(money);
  804. if (money >= maxNum) {
  805. //超出最大处理数字
  806. return "超出最大处理数字";
  807. }
  808. if (money == 0) {
  809. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  810. return chineseStr;
  811. }
  812. //四舍五入保留两位小数,转换为字符串
  813. money = Math.round(money * 100).toString();
  814. integerNum = money.substr(0, money.length - 2);
  815. decimalNum = money.substr(money.length - 2);
  816. //获取整型部分转换
  817. if (parseInt(integerNum, 10) > 0) {
  818. var zeroCount = 0;
  819. var IntLen = integerNum.length;
  820. for (var i = 0; i < IntLen; i++) {
  821. var n = integerNum.substr(i, 1);
  822. var p = IntLen - i - 1;
  823. var q = p / 4;
  824. var m = p % 4;
  825. if (n == "0") {
  826. zeroCount++;
  827. } else {
  828. if (zeroCount > 0) {
  829. chineseStr += cnNums[0];
  830. }
  831. //归零
  832. zeroCount = 0;
  833. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  834. }
  835. if (m == 0 && zeroCount < 4) {
  836. chineseStr += cnIntUnits[q];
  837. }
  838. }
  839. chineseStr += cnIntLast;
  840. }
  841. //小数部分
  842. if (decimalNum != "") {
  843. var decLen = decimalNum.length;
  844. for (var i = 0; i < decLen; i++) {
  845. var n = decimalNum.substr(i, 1);
  846. if (n != "0") {
  847. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  848. }
  849. }
  850. }
  851. if (chineseStr == "") {
  852. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  853. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  854. chineseStr += cnInteger;
  855. }
  856. return chineseStr;
  857. },
  858. /** 导出按钮操作 */
  859. handleExport() {
  860. this.download(
  861. "sc-service/record/export",
  862. {
  863. ...this.queryParams
  864. },
  865. `sc-service_record.xlsx`
  866. );
  867. }
  868. }
  869. };
  870. </script>
  871. <style lang="scss" scoped>
  872. .zap-No {
  873. padding: 14px 25px;
  874. background-color: #ffffff;
  875. .icon {
  876. width: 18px;
  877. margin-right: 10px;
  878. }
  879. .label {
  880. white-space: nowrap;
  881. margin-right: 8px;
  882. font-size: 14px;
  883. color: #999999;
  884. }
  885. .value {
  886. font-size: 14px;
  887. color: #333333;
  888. }
  889. }
  890. .zap-title {
  891. padding: 25px;
  892. font-size: 16px;
  893. color: #333333;
  894. background-color: #ffffff;
  895. }
  896. .zap-form {
  897. padding: 0 25px;
  898. background-color: #ffffff;
  899. }
  900. .zap-table ::v-deep .el-form-item__content {
  901. width: 100%;
  902. }
  903. .zap-accounts-receivable {
  904. height: 36px;
  905. .label {
  906. font-size: 12px;
  907. color: #999999;
  908. }
  909. .value {
  910. font-size: 14px;
  911. color: #333333;
  912. }
  913. }
  914. </style>
  915. <style type="text/css">
  916. table.gridtable {
  917. font-size:11px;
  918. color:#333333;
  919. border-width: 1px;
  920. border-collapse: collapse;
  921. }
  922. table.gridtable th {
  923. border-width: 1px;
  924. padding: 8px;
  925. border-style: solid;
  926. background-color: #dedede;
  927. }
  928. table.gridtable td {
  929. border-width: 1px;
  930. padding: 8px;
  931. border-style: solid;
  932. }
  933. </style>