detailFinanceRecord.vue 35 KB

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