signFor.vue 54 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346
  1. <template>
  2. <el-tabs type="border-card">
  3. <!-- 资产信息-->
  4. <el-tab-pane label="资产信息">
  5. <!-- <div class="app-container"> -->
  6. <el-form ref="forms" :model="forms" :inline="true" style="margin-top: 20px" label-width="auto" >
  7. <el-row class="zap-form" style="padding-bottom: 0;">
  8. <el-col :span="12">
  9. <el-form-item label="选择融信:" prop="zfrFinanceId" size="large">
  10. <el-select v-model="forms.zfrFinanceId" clearable @clear="clearBoth">
  11. <el-option v-for="(item,index) in financeInfList" :key="index" :label="item.zfiNumber" :value="item.zfiId" @click.native="amount(item)"></el-option>
  12. </el-select>
  13. </el-form-item>
  14. </el-col>
  15. <el-col :span="12">
  16. <el-form-item label="融资收款账户:" prop="zfrCollectionAccount" size="large" label-width="101px">
  17. <el-input v-model="forms.zfrCollectionAccount" clearable placeholder="请输入融资账户" maxlength="25" :readonly="readonly" />
  18. </el-form-item>
  19. </el-col>
  20. </el-row>
  21. <el-row class="zap-form" style="padding-bottom: 0;">
  22. <el-col :span="12">
  23. <el-form-item label="融信金额:" prop="zfiAmount" size="large">
  24. <el-input v-model="forms.zfiAmount" clearable placeholder="请输入融信金额" maxlength="25" readonly />
  25. </el-form-item>
  26. </el-col>
  27. <el-col :span="12">
  28. <el-form-item label="申请融资方:" prop="companyName" size="large">
  29. <el-input v-model="forms.companyName" clearable placeholder="请输入申请融资方" maxlength="25" readonly />
  30. </el-form-item>
  31. </el-col>
  32. </el-row>
  33. <el-row class="zap-form" style="padding-bottom: 0;">
  34. <el-col :span="12">
  35. <el-form-item label="融资金额:" prop="zfrAmount" size="large">
  36. <el-input v-model="forms.zfrAmount" clearable placeholder="请输入融资金额" maxlength="25" readonly />
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="12">
  40. <el-form-item label="融资利率:" prop="zfrRate" size="large">
  41. <el-input v-model="forms.zfrRate" clearable placeholder="请输入融资利率" maxlength="25" readonly />
  42. </el-form-item>
  43. </el-col>
  44. </el-row>
  45. <el-row class="zap-form" style="padding-bottom: 0;">
  46. <el-col :span="12">
  47. <el-form-item label="承诺还款日期:" prop="zfrRepaymentDate" size="large" label-width="101px">
  48. <el-input v-model="forms.zfrRepaymentDate" clearable placeholder="请输入承诺还款日期" maxlength="25" readonly />
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="12">
  52. <el-form-item label="服务费率:" prop="zfpcrChargeRate" size="large">
  53. <el-input v-model="forms.zfpcrChargeRate" clearable placeholder="请输入服务费率" maxlength="25" readonly />
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. <el-row class="zap-form" style="padding-bottom: 0;">
  58. <el-col :span="12">
  59. <el-form-item label="融资期限:" prop="termIng" size="large" label-width="101px">
  60. <el-input v-model="forms.termIng" clearable placeholder="请输入融资期限" maxlength="25" readonly />
  61. </el-form-item>
  62. </el-col>
  63. </el-row>
  64. </el-form>
  65. <el-form ref="form" :model="form" :rules="rules" :inline="true" style="margin-top: 20px" label-width="auto" >
  66. <el-divider content-position="left">签收</el-divider>
  67. <el-form-item label="融信利率:">
  68. <span>{{this.zfiRate}}</span>%
  69. </el-form-item>
  70. <table class="gridtable" style="width:80%;text-align:center" align="center">
  71. <tr>
  72. <td rowspan="4">开立方</td>
  73. <td>全称</td>
  74. <td>{{openName}}</td>
  75. <td rowspan="4">接收方</td>
  76. <td>全称</td>
  77. <td>{{receiveName}}</td>
  78. </tr>
  79. <tr>
  80. <td>社会统一码</td>
  81. <td>{{openCode}}</td>
  82. <td>社会统一码</td>
  83. <td>{{receiverCode}}</td>
  84. </tr>
  85. <tr>
  86. <td>开户银行</td>
  87. <td>{{openBank}}</td>
  88. <td>开户银行</td>
  89. <td>{{receiverBank}}</td>
  90. </tr>
  91. <tr>
  92. <td>账号</td>
  93. <td>{{openAccount}}</td>
  94. <td>账号</td>
  95. <td>{{receiverAccount}}</td>
  96. </tr>
  97. <tr>
  98. <td colspan="2">粮信金额</td>
  99. <td colspan="4">人民币(大写):{{issuedAmount}}<br>人民币(小写)¥{{form.zfiAmount}}</td>
  100. </tr>
  101. <tr>
  102. <td colspan="2">起止日期</td>
  103. <td colspan="4">{{stopDate}}</td>
  104. </tr>
  105. </table>
  106. <el-form-item style="margin-left: 100px">
  107. <el-button size="mini" type="success" :disabled="isClick" @click="openTicket">选择</el-button>
  108. <el-button size="mini" type="primary" :disabled="isClick" @click="addPay">新增应收账款</el-button>
  109. <el-button size="mini" @click="deleteTicekt" :disabled="isClick" >清空全部</el-button>
  110. <el-form-item label="合计金额:">
  111. <span>{{checkTotalAmt}}</span>
  112. </el-form-item>
  113. <el-form-item label="金额大写:">
  114. <span>{{checkTotalBigAmt}}</span>
  115. </el-form-item>
  116. <el-table :data="ticketList" style="width: 1100px">
  117. <el-table-column label="账款名称" align="center" prop="zbiName" show-overflow-tooltip />
  118. <el-table-column label="应收企业" align="center" prop="receiveName"/>
  119. <el-table-column label="应收企业" align="center" prop="payName" />
  120. <el-table-column label="预计还款期" align="center" prop="zbiPayDate" show-overflow-tooltip />
  121. <el-table-column label="金额" align="center" prop="zbiAmount" />
  122. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
  123. <template slot-scope="scope">
  124. <el-button
  125. size="mini"
  126. type="text"
  127. icon="el-icon-delete"
  128. :disabled="isClick"
  129. @click="handleDelete(scope.$index, ticketList)"
  130. >删除</el-button>
  131. <el-button
  132. size="mini"
  133. type="text"
  134. icon="el-icon-view"
  135. @click="handleDetail(scope.$index, ticketList)"
  136. >详情</el-button>
  137. <!-- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.$index, ticketList)">修改</el-button> -->
  138. </template>
  139. </el-table-column>
  140. </el-table>
  141. </el-form-item>
  142. <el-row>
  143. <el-col :span="8">
  144. <el-form-item label="签发金额" prop="zfiAmount">
  145. <el-input v-model="form.zfiAmount" style="width: 200px" disabled @input="getBigSmall"/>
  146. </el-form-item>
  147. </el-col>
  148. </el-row>
  149. <el-row>
  150. <el-col :span="8">
  151. <el-form-item label="金额大写" prop="issuedAmount">
  152. {{issuedAmount}}
  153. </el-form-item>
  154. </el-col>
  155. </el-row>
  156. <p>请知悉,资产信息仅能接受指定的销售方与购买方的往来账款(含账款基本信息、贸易合同与贸易发票等);如须使用系统尚未维护的往来账款,请点击新增应付账款
  157. </p>
  158. </el-form>
  159. <!-- 发票附件 -->
  160. <!-- <el-divider content-position="left">发票附件</el-divider>
  161. <el-table :data="invoiceFileList" style="width: 100%">
  162. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  163. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
  164. <template slot-scope="scope">
  165. <el-button
  166. size="mini"
  167. type="text"
  168. icon="el-icon-view"
  169. @click="handleDownload(scope.row)"
  170. >下载</el-button>
  171. <el-button
  172. size="mini"
  173. type="text"
  174. icon="el-icon-view"
  175. @click="handlePreview(scope.row)"
  176. >预览</el-button>
  177. </template>
  178. </el-table-column>
  179. </el-table> -->
  180. <!-- 合同附件 -->
  181. <!-- <el-divider content-position="left">合同附件</el-divider>
  182. <el-table :data="contractFileList" style="width: 100%">
  183. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  184. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
  185. <template slot-scope="scope">
  186. <el-button
  187. size="mini"
  188. type="text"
  189. icon="el-icon-view"
  190. @click="handleDownload(scope.row)"
  191. >下载</el-button>
  192. <el-button
  193. size="mini"
  194. type="text"
  195. icon="el-icon-view"
  196. @click="handlePreview(scope.row)"
  197. >预览</el-button>
  198. </template>
  199. </el-table-column>
  200. </el-table> -->
  201. <!-- 其他附件 -->
  202. <!-- <el-divider content-position="left">其他附件</el-divider>
  203. <el-table :data="otherFileList" style="width: 100%">
  204. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  205. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
  206. <template slot-scope="scope">
  207. <el-button
  208. size="mini"
  209. type="text"
  210. icon="el-icon-view"
  211. @click="handleDownload(scope.row)"
  212. >下载</el-button>
  213. <el-button
  214. size="mini"
  215. type="text"
  216. icon="el-icon-view"
  217. @click="handlePreview(scope.row)"
  218. >预览</el-button>
  219. </template>
  220. </el-table-column>
  221. </el-table> -->
  222. <div class="footer" style="float: right;
  223. margin-bottom:2px;">
  224. <el-button type="info" @click="submitForm('01')">拒绝</el-button>
  225. <el-button type="primary" @click="sign()" v-if="!isHas">签收</el-button>
  226. <el-button type="primary" @click="submitForm('00')" v-if="isHas">内部审批</el-button>
  227. <el-button @click="cancel">取 消</el-button>
  228. </div>
  229. <!-- 应收账款信息 -->
  230. <el-dialog :title="payTitle" :visible.sync="open" width="1120px" append-to-body>
  231. <el-form :model="queryParamsPay" ref="formQuery" :inline="true" label-width="68px" style="margin-bottom: -21px">
  232. <el-form-item label="账款名称" prop="zbiName">
  233. <el-input
  234. v-model="queryParamsPay.zbiName"
  235. placeholder="请输入账款名称"
  236. clearable
  237. size="small"
  238. maxlength="11"
  239. @keyup.enter.native="handleQuerys"/>
  240. </el-form-item>
  241. <el-form-item>
  242. <el-button
  243. type="cyan"
  244. icon="el-icon-search"
  245. size="mini"
  246. @click="handleQuerys"
  247. >搜索</el-button>
  248. <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys"
  249. >重置</el-button>
  250. </el-form-item>
  251. </el-form>
  252. <el-table :data="payList"
  253. ref="tablePay"
  254. class="single-select-table"
  255. @selection-change="handleSelectionChange"
  256. :row-key="rowkey">
  257. <el-table-column
  258. type="selection"
  259. :reserve-selection="true"
  260. width="50"
  261. align="center"/>
  262. <el-table-column label="序号" type="index" width="50" align="center">
  263. <template slot-scope="scope">
  264. <span>{{ (queryParamsPay.pageNum - 1) * queryParamsPay.pageSize + scope.$index + 1}}</span>
  265. </template>
  266. </el-table-column>
  267. <el-table-column label="账款名称" align="center" prop="zbiName" show-overflow-tooltip />
  268. <el-table-column label="应收企业" align="center" prop="receiveName"/>
  269. <el-table-column label="应收企业" align="center" prop="payName" />
  270. <el-table-column label="预计还款期" align="center" prop="zbiPayDate" show-overflow-tooltip />
  271. <el-table-column label="金额" align="center" prop="zbiAmount" />
  272. </el-table>
  273. <pagination
  274. v-show="total > 0"
  275. :total="total"
  276. :page.sync="queryParamsPay.pageNum"
  277. :limit.sync="queryParamsPay.pageSize"
  278. @pagination="getAccountsCollection" />
  279. <span slot="footer" class="dialog-footer">
  280. <el-button size="mini" @click="cancelTicket">取消</el-button>
  281. <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
  282. </span>
  283. </el-dialog>
  284. <!-- 新增往来账款 -->
  285. <el-dialog title="新增往来账款" :visible.sync="openAddBill" width="1120px" append-to-body>
  286. <add-bill :companyId="form.zfiCoreId" companyType="01" :payDate="payDate" @addClick="emitAddClick" v-if="openAddBill"></add-bill>
  287. </el-dialog>
  288. <el-dialog title="详情" :visible.sync="openDetailBill" width="1120px" append-to-body>
  289. <detail-bill :zbiId="this.zbiId" v-if="openDetailBill"></detail-bill>
  290. </el-dialog>
  291. <!-- 修改往来账款 -->
  292. <el-dialog title="修改往来账款" :visible.sync="openEditBill" width="1120px" append-to-body>
  293. <edit-bill :zbiId="this.zbiId" @editClick="emitEditClick" v-if="openEditBill"></edit-bill>
  294. </el-dialog>
  295. <!--预览-->
  296. <el-dialog :visible.sync="openFile" width="1000px" append-to-body>
  297. <img :src="wordUrl" v-if="show" width='450px' height='500px'/>
  298. <iframe :src="wordUrl" width='800px' height='600px' frameborder='1' v-if="heid"/>
  299. </el-dialog>
  300. <el-dialog
  301. :visible.sync="pdfShowDialog"
  302. width="70%"
  303. height = "60%"
  304. append-to-body>
  305. <pdf-show :pdfFileList="pdfFileList" :zfiId="this.form.zfiId" :parent="parent">
  306. </pdf-show>
  307. </el-dialog>
  308. <!--去融资-->
  309. <el-dialog :visible.sync="goShow" width="300px" append-to-body :before-close = "cancelGo" center>
  310. <!-- <p>恭喜您成功签收一笔融信</p> -->
  311. <el-form ref="financeSignForm" :model="financeSignForm" label-width="auto" :inline="true">
  312. <el-row>
  313. <el-form-item label="融信编号:">{{financeSignForm.zfiNumber}}</el-form-item>
  314. <el-form-item label="融信金额:">{{handleInput(financeSignForm.zfiAmount)}}</el-form-item>
  315. <el-form-item label="大写:">{{smallToBig(financeSignForm.zfiAmount)}}</el-form-item>
  316. </el-row>
  317. <el-row>
  318. <el-form-item label="融信利率:">{{financeSignForm.zfiRate}}</el-form-item>
  319. <el-form-item label="最长融信期限:">{{financeSignForm.intervalTime + "天"}}</el-form-item>
  320. <el-form-item label="融信有效期:">{{financeSignForm.validity}}</el-form-item>
  321. </el-row>
  322. </el-form>
  323. <div slot="footer" class="dialog-footer">
  324. <el-button type="primary" @click="goFinance">去融资</el-button>
  325. <el-button @click="cancelGo">取 消</el-button>
  326. </div>
  327. </el-dialog>
  328. </el-tab-pane>
  329. <el-tab-pane label="签署合同">
  330. <el-table :data="creditSealList" style="width: 100%">
  331. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip>
  332. <template slot-scope="scope">
  333. <img style="width:30px;height:30px;"
  334. src="../../../assets/images/pdf.png"
  335. />
  336. <span>{{scope.row.pfiFileName}}
  337. </span>
  338. </template>
  339. </el-table-column>
  340. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
  341. <template slot-scope="scope">
  342. <el-button
  343. size="mini"
  344. type="text"
  345. icon="el-icon-view"
  346. @click="handleDownload(scope.row)"
  347. >下载</el-button>
  348. <el-button
  349. size="mini"
  350. type="text"
  351. icon="el-icon-view"
  352. @click="handlePreview(scope.row)"
  353. >预览</el-button>
  354. </template>
  355. </el-table-column>
  356. </el-table>
  357. </el-tab-pane>
  358. </el-tabs>
  359. <!-- </div> -->
  360. </template>
  361. <script>
  362. import {getCreditDetail,getAvailableBalance,getAccountsCollection,getFile,getFinanceSign} from "@/api/service/credit/credit";
  363. import {signFor,getCreditSealFile,getContractFile} from "@/api/service/credit/creditHandle";
  364. import {accAdd} from "@/utils/calculation";
  365. import {getToken} from "@/utils/auth";
  366. import AddBill from "@/views/service/bill/addBill";
  367. import EditBill from "@/views/service/bill/editBill";
  368. import {isOpenApproval} from "@/api/service/credit/approvalRelatedCredit";
  369. import pdfShow from "./pdfShow";
  370. import DetailBill from "@/views/service/credit/billDetail";
  371. import {contractSigning} from "@/api/service/credit/message";
  372. import { listFinanceInf } from "@/api/common/financeInf";
  373. import { amtformat } from "@/utils/amtCommon";
  374. import Cookies from 'js-cookie';
  375. export default {
  376. name: "addCredit",
  377. components: {AddBill,DetailBill,pdfShow,EditBill},
  378. data() {
  379. return {
  380. //往来账款id
  381. zbiId: '',
  382. // 总条数
  383. total: 0,
  384. // 表单参数read
  385. form: {
  386. },
  387. forms:{},
  388. // 表单校验
  389. rules: {
  390. },
  391. financeSignForm:{},
  392. // 是否显示弹出层
  393. open: false,
  394. openAddBill: false,
  395. openDetailBill: false,
  396. openEditBill: false,
  397. //选择的应收账款
  398. payList:[],
  399. //现有的应收账款
  400. ticketList:[],
  401. //签发金额大写
  402. issuedAmount:"零元整",
  403. //合计选中的应收账款的金额
  404. checkTotalAmt:"0.00",
  405. //合计选中的应收账款的大写金额
  406. checkTotalBigAmt:"零元整",
  407. //接收方
  408. supplierList:[],
  409. supplierForm:{},
  410. queryParamsPay: {
  411. pageNum: 1,
  412. pageSize: 10,
  413. zbiName:null
  414. },
  415. //授信额度
  416. creditLineList:[],
  417. //可用额度
  418. availableAmt:"0.00",
  419. //有效期
  420. validityDate:"",
  421. //有效期类型
  422. zfpcrDateType:"" ,
  423. //产品是否可拆分
  424. zfpSplit:"",
  425. //融资放款方式
  426. zfpcrLoanType:"",
  427. //产品编号
  428. zfpId:"",
  429. //标题
  430. payTitle:"",
  431. //利率
  432. zfiRate:"",
  433. //授信额度
  434. creditParams: {
  435. zfpcrId:null,
  436. type:'1'
  437. },
  438. //合同附件
  439. contractFileList:[],
  440. //发票附件
  441. invoiceFileList:[],
  442. //其他文件
  443. otherFileList:[] ,
  444. //盖章文件
  445. creditSealList:[],
  446. //开立方编号
  447. zfiCoreId:"",
  448. //接收方
  449. zfiSupplierId:"" ,
  450. //融信类型
  451. zfiCreateType:"",
  452. //控制按钮是否可点击
  453. isClick:true,
  454. openFile:false,
  455. wordUrl: "",
  456. show:false,
  457. heid:false,
  458. chooseTicket:[],
  459. payDate:null,
  460. //开立方
  461. openName:"",
  462. //开立社会码
  463. openCode:"",
  464. //开立银行
  465. openBank:"",
  466. //开立账户
  467. openAccount:"",
  468. //接收方
  469. receiveName:"",
  470. //接收方社会统一码
  471. receiverCode:"",
  472. //接收方银行
  473. receiverBank:"",
  474. //接收方账户
  475. receiverAccount:"",
  476. //起止日期
  477. stopDate:"",
  478. //控制签收,内部审批按钮展示
  479. isHas:true,
  480. //融资企业审批状态
  481. zfiSupplierStatus:"",
  482. //融信编号
  483. zfiId:"",
  484. pdfFileList : [],
  485. pdfShowDialog : false,
  486. parent : this,
  487. //显示去融资框
  488. goShow:false
  489. };
  490. },
  491. watch:{
  492. 'form.zfiCoreQuotaId':'change'
  493. },
  494. created() {
  495. const zfiId = this.$route.params && this.$route.params.zfiId;
  496. this.zfiId = zfiId;
  497. getCreditDetail(zfiId).then((response) => {
  498. if(response.data){
  499. //签发金额
  500. this.form= response.data.financeInf;
  501. //签发金额大写
  502. this.issuedAmount = this.smallToBig(this.form.zfiAmount);
  503. //开立方编号
  504. this.zfiCoreId = response.data.financeInf.zfiCoreId;
  505. //接收方
  506. this.zfiSupplierId = response.data.financeInf.zfiSupplierId;
  507. //类型
  508. this.zfiCreateType = response.data.financeInf.zfiCreateType;
  509. //融资方审批状态
  510. this.zfiSupplierStatus = response.data.financeInf.zfiSupplierStatus;
  511. //核心
  512. if( this.zfiCreateType == "1"){
  513. this.isClick = false;
  514. }else{
  515. this.isClick = true;
  516. }
  517. //给表格赋值
  518. this.openName = response.data.openName;
  519. this.openCode = response.data.openCode;
  520. this.openBank = response.data.openBank;
  521. this.openAccount = response.data.openAccount;
  522. this.receiveName = response.data.receiveName;
  523. this.receiverCode = response.data.receiverCode;
  524. this.receiverBank = response.data.receiverBank;
  525. this.receiverAccount = response.data.receiverAccount;
  526. this.stopDate = response.data.stopDate;
  527. this.zfiRate = response.data.financeInf.zfiRate;
  528. }
  529. if(response.data.payList){
  530. this.ticketList = response.data.payList.records;
  531. this.getReTotal(this.ticketList);
  532. //附件
  533. this.getFile(this.ticketList);
  534. }
  535. //查询有无签收内部审批
  536. this.isOpenApproval();
  537. //盖章合同
  538. this.getCreditSealFile();
  539. });
  540. this.getFinanceInf(zfiId);
  541. this.getUserProfile();
  542. },
  543. methods: {
  544. /** 查询融信编号 */
  545. getFinanceInf(zfrFinanceId) {
  546. this.loading = true;
  547. listFinanceInf(zfrFinanceId).then(response => {
  548. debugger;
  549. if (response.data) {
  550. this.financeInfList = response.data;
  551. for (let item of this.financeInfList) {
  552. if (item.zfiId == zfrFinanceId) {
  553. this.amount(item);
  554. }
  555. }
  556. this.loading = false;
  557. }
  558. });
  559. },
  560. getUserProfile(){
  561. getUserProfile().then(response => {
  562. debugger
  563. if(response.company){
  564. this.$set(this.forms, "companyName", response.company.scyName);
  565. }
  566. });
  567. },
  568. /* 融信编号赋值融资金额 */
  569. amount(item) {
  570. debugger;
  571. this.$set(this.forms, "zfiAmount", item.zfiAmount);
  572. this.$set(this.forms, "zfrAmount", item.zfiAmount);
  573. this.$set(this.forms, "zfrRepaymentDate", item.zfiExpireDate);
  574. this.$set(this.forms, "zfrRate", item.zfpcrRate);
  575. this.$set(this.forms, "zfpcrLoanType", item.zfpcrLoanType);
  576. this.$set(this.forms, "zfiProductId", item.zfiProductId);
  577. this.$set(this.forms, "zfpcrChargeRate", item.zfpcrChargeRate);
  578. this.$set(this.forms, "termIng", item.termIng);
  579. },
  580. // 取消按钮
  581. cancel() {
  582. this.$store.dispatch("tagsView/delView", this.$route);
  583. this.$router.go(-1);
  584. },
  585. /* 多选框跨页 */
  586. rowkeyCustomer(row) {
  587. return row.cciId;
  588. },
  589. //获取附件信息
  590. getFile(datas){
  591. var queryParamsFile = {};
  592. queryParamsFile.ticketList = datas;
  593. getFile(queryParamsFile).then((response) => {
  594. if(response.data){
  595. //获取发票文件
  596. this.invoiceFileList = response.data.invoiceFileList;
  597. //获取合同文件
  598. this.contractFileList = response.data.contractFileList;
  599. //获取其他文件
  600. this.otherFileList = response.data.otherFileList;
  601. }
  602. });
  603. },
  604. //获取盖章文件
  605. getCreditSealFile(){
  606. getCreditSealFile(this.form).then((response) => {
  607. if(response.data.list){
  608. this.creditSealList = response.data.list;
  609. }
  610. });
  611. },
  612. //文件下载
  613. handleDownload(row){
  614. const pfiUrl = row.pfiUrl;
  615. if(pfiUrl != null && pfiUrl != ''){
  616. window.open(pfiUrl +"/"+ getToken());
  617. }else{
  618. this.$message({
  619. message: '该附件不存在!',
  620. type: 'warning'
  621. });
  622. return;
  623. }
  624. },
  625. resetQuerys() {
  626. this.resetForm("formQuery");
  627. this.handleQuerys();
  628. },
  629. handleQuerys() {
  630. this.queryParamsPay.pageNum = 1;
  631. this.getAccountsCollection();
  632. },
  633. //打开应收账款选择列表
  634. openTicket() {
  635. //清空搜索条件
  636. this.queryParamsPay.zbiName = "";
  637. this.queryParamsPay.pageNum = 1;
  638. this.getAccountsCollection();
  639. this.open = true;
  640. this.payTitle = "应收账款";
  641. },
  642. //应收账款查询列表
  643. getAccountsCollection() {
  644. //开立方为应收企业的
  645. this.queryParamsPay.payId = this.zfiCoreId;
  646. //接收方
  647. this.queryParamsPay.zfiSupplierId = this.zfiSupplierId;
  648. return getAccountsCollection(this.queryParamsPay).then((response) => {
  649. this.payList = response.data.records;
  650. this.selectChecked();
  651. this.total = response.data.total;
  652. return Promise.resolve(response)
  653. });
  654. },
  655. selectChecked() {
  656. //清空选择
  657.             this.$refs.tablePay && this.$refs.tablePay.clearSelection();
  658. this.ticketList.forEach((item) => {
  659. this.payList.forEach(row => {
  660. if (row.zbiId == item.zbiId) {
  661. this.$nextTick(() => {
  662. this.$refs.tablePay && this.$refs.tablePay.toggleRowSelection(row, true);
  663. })
  664. }
  665. });
  666. });
  667. //合计
  668. this.getReTotal(this.ticketList);
  669. //附件
  670. this.getFile(this.ticketList);
  671. },
  672. /* 删除按钮 */
  673. handleDelete(index, rows) {
  674. rows.splice(index, 1);
  675. if(this.$refs.tablePay){
  676. this.$refs.tablePay.clearSelection();
  677. }
  678. this.selectChecked();
  679. },
  680. //详情按钮
  681. handleDetail(index, rows){
  682. this.zbiId = rows[index].zbiId
  683. this.openDetailBill = true
  684. },
  685. /* 修改按钮 */
  686. handleUpdate(index, rows) {
  687. this.zbiId = rows[index].zbiId;
  688. this.openEditBill = true
  689. },
  690. /* 多选框跨页 */
  691. rowkey(row) {
  692. return row.zbiId;
  693. },
  694. // 多选框选中数据
  695. handleSelectionChange(val) {
  696. this.chooseTicket = val
  697. },
  698. //回到父页
  699. cancelGo(){
  700. this.goShow = false;
  701. this.$store.dispatch(
  702. "tagsView/delView",
  703. this.$route
  704. );
  705. this.$router.go(-1);
  706. },
  707. // 确认选择
  708. closeTicket() {
  709. if(this.chooseTicket.length > 0){
  710. var flag = true;
  711. //获取选中第一个的预计还款日期
  712. var zbiPayDate = this.chooseTicket[0].zbiPayDate;
  713. for(var i = 0 ;i < this.chooseTicket.length;i++){
  714. if(zbiPayDate != this.chooseTicket[i].zbiPayDate){
  715. flag = false;
  716. this.$message({
  717. message: '请选择预计还款日期相同的应收账款',
  718. type: 'warning'
  719. });
  720. break;
  721. }
  722. }
  723. if(flag){
  724. //合计
  725. this.getReTotal(this.chooseTicket);
  726. this.ticketList = this.chooseTicket;
  727. //更新附件信息
  728. this.getFile(this.ticketList);
  729. this.open = false;
  730. }
  731. }else{
  732. this.$message({
  733. message: '请选择应收账款',
  734. type: 'warning'
  735. });
  736. }
  737. },
  738. //重新合计
  739. getReTotal(chooseTicket){
  740. //合计
  741. this.checkTotalAmt = "0.00";
  742. for(var i = 0; i < chooseTicket.length;i++){
  743. this.checkTotalAmt = accAdd(this.checkTotalAmt,chooseTicket[i].zbiAmount,2);
  744. }
  745. this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
  746. this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
  747. },
  748. //取消选择按钮
  749. cancelTicket(){
  750. /* this.ticketList = [];
  751. if(this.$refs.tablePay){
  752. this.$refs.tablePay.clearSelection();
  753. } */
  754. this.open = false;
  755. },
  756. /** 清空选择信息 */
  757. deleteTicekt() {
  758. this.ticketList = [];
  759. this.checkTotalAmt = "0.00";
  760. this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
  761. if(this.$refs.tablePay){
  762. this.$refs.tablePay.clearSelection();
  763. }
  764. //更新附件
  765. this.getFile(this.ticketList);
  766. },
  767. /* 删除按钮 */
  768. handleDelete(index, rows) {
  769. rows.splice(index, 1);
  770. if(this.$refs.tablePay){
  771. this.$refs.tablePay.clearSelection();
  772. }
  773. this.selectChecked();
  774. },
  775. onSelectAll() {
  776. if(this.$refs.tablePay){
  777. this.$refs.tablePay.clearSelection();
  778. }
  779. },
  780. //格式化金额
  781. amtFormat(cellValue) {
  782. if(cellValue == null || cellValue== undefined || cellValue == ''){
  783. cellValue = '0.00'
  784. }
  785. cellValue += '';
  786.       if (!cellValue.includes('.')) {
  787. cellValue += '.00';
  788. }
  789.       return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
  790.         return $1 + ',';
  791.       }).replace(/\.$/, '');
  792. },
  793. //获取签发金额大写
  794. getBigSmall(){
  795. this.issuedAmount = this.smallToBig(this.form.zfiAmount);
  796. },
  797. /* // 将数字金额转换为大写金额 */
  798. smallToBig(money) {
  799. // 将数字金额转换为大写金额
  800. var cnNums = new Array(
  801. "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" ); //汉字的数字
  802. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  803. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  804. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  805. var cnInteger = "整"; //整数金额时后面跟的字符
  806. var cnIntLast = "元"; //整数完以后的单位
  807. //最大处理的数字
  808. var maxNum = 999999999999999.9999;
  809. var integerNum; //金额整数部分
  810. var decimalNum; //金额小数部分
  811. //输出的中文金额字符串
  812. var chineseStr = "";
  813. var parts; //分离金额后用的数组,预定义
  814. if (money == "" || money == null || money == undefined) {
  815. return "零元零角零分";
  816. }
  817. money = parseFloat(money);
  818. if (money >= maxNum) {
  819. //超出最大处理数字
  820. return "超出最大处理数字";
  821. }
  822. if (money == 0) {
  823. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  824. return chineseStr;
  825. }
  826. //四舍五入保留两位小数,转换为字符串
  827. money = Math.round(money * 100).toString();
  828. integerNum = money.substr(0, money.length - 2);
  829. decimalNum = money.substr(money.length - 2);
  830. //获取整型部分转换
  831. if (parseInt(integerNum, 10) > 0) {
  832. var zeroCount = 0;
  833. var IntLen = integerNum.length;
  834. for (var i = 0; i < IntLen; i++) {
  835. var n = integerNum.substr(i, 1);
  836. var p = IntLen - i - 1;
  837. var q = p / 4;
  838. var m = p % 4;
  839. if (n == "0") {
  840. zeroCount++;
  841. } else {
  842. if (zeroCount > 0) {
  843. chineseStr += cnNums[0];
  844. }
  845. //归零
  846. zeroCount = 0;
  847. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  848. }
  849. if (m == 0 && zeroCount < 4) {
  850. chineseStr += cnIntUnits[q];
  851. }
  852. }
  853. chineseStr += cnIntLast;
  854. }
  855. //小数部分
  856. if (decimalNum != "") {
  857. var decLen = decimalNum.length;
  858. for (var i = 0; i < decLen; i++) {
  859. var n = decimalNum.substr(i, 1);
  860. if (n != "0") {
  861. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  862. }
  863. }
  864. }
  865. if (chineseStr == "") {
  866. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  867. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  868. chineseStr += cnInteger;
  869. }
  870. return chineseStr;
  871. },
  872. //选择授信触发
  873. change(val) {
  874. if (!val) {
  875. //可用额度
  876. this.availableAmt = "0.00";
  877. //有效期
  878. this.validityDate ="";
  879. //产品是否可拆分
  880. this.zfpSplit= "",
  881. //融资放款方式
  882. this.zfpcrLoanType = "";
  883. //产品
  884. this.zfpId = "";
  885. //利率
  886. this.zfiRate = "";
  887. return;
  888. }
  889. let obj = {};
  890. obj = this.creditLineList.find(item => {
  891. return item.value === val;
  892. });
  893. //获取有效期的类型
  894. this.zfpcrDateType = obj.zfpcrDateType;
  895. //产品是否可拆分
  896. this.zfpSplit= obj.zfpSplit;
  897. //放款方式
  898. this.zfpcrLoanType = obj.zfpcrLoanType;
  899. //产品
  900. this.zfpId = obj.zfpId;
  901. //利率
  902. this.zfiRate = obj.zfpcrRate;
  903. //长期
  904. if("0"== this.zfpcrDateType){
  905. this.validityDate = "长期";
  906. }else{
  907. this.validityDate = obj.zfpcrEndDate;
  908. }
  909. var lineQueryParam = {};
  910. lineQueryParam.zfpcrId = val;
  911. //获取可用额度
  912. getAvailableBalance(lineQueryParam).then((response) => {
  913. this.availableAmt = response.data.remaining;
  914. });
  915. },
  916. //内部审批
  917. submitForm(param){
  918. this.$refs["form"].validate(valid => {
  919. //通过
  920. if(param == "00"){
  921. if(this.ticketList.length < 1){
  922. this.$message({
  923. message: '请选择应收账款',
  924. type: 'warning'
  925. });
  926. return;
  927. }
  928. if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))){
  929. this.$message({
  930. message: '签发金额不可大于合计金额',
  931. type: 'warning'
  932. });
  933. return;
  934. }
  935. }
  936. if (valid) {
  937. const loading = this.$loading({
  938. lock: true,
  939. text: 'Loading',
  940. background: 'rgba(0, 0, 0,0)'
  941. });
  942. //如果签发金额小于合计金额
  943. if((parseFloat(this.form.zfiAmount)) < (parseFloat(this.moneyDelete(this.checkTotalAmt)))){
  944. var _this = this;
  945. this.$confirm('签发金额小于应收金额合计,是否确认提交', "警告", {
  946. confirmButtonText: "确定",
  947. cancelButtonText: "取消",
  948. type: "warning"
  949. }).then(function() {
  950. //应收账款
  951. _this.form.ticketList = _this.ticketList;
  952. _this.form.flag = param;
  953. signFor(_this.form).then(response => {
  954. loading.close();
  955. //通过
  956. if("00" == param){
  957. _this.msgSuccess("融信资料已提交内部审核");
  958. _this.$store.dispatch("tagsView/delView", _this.$route);
  959. _this.$router.go(-1);
  960. }else if ("01" == param){//拒绝
  961. _this.msgSuccess("该笔融信将作废");
  962. _this.$store.dispatch("tagsView/delView", _this.$route);
  963. _this.$router.go(-1);
  964. }
  965. }).catch((response)=>{
  966. loading.close();
  967. });
  968. }).catch((e) => {
  969. loading.close();
  970. });
  971. }else{
  972. //应收账款
  973. this.form.ticketList = this.ticketList;
  974. this.form.flag = param;
  975. signFor(this.form).then(response => {
  976. loading.close();
  977. //通过
  978. if("00" == param){
  979. this.msgSuccess("融信资料已提交内部审核");
  980. this.$store.dispatch("tagsView/delView", this.$route);
  981. this.$router.go(-1);
  982. }else if ("01" == param){//拒绝
  983. this.msgSuccess("该笔融信将作废");
  984. this.$store.dispatch("tagsView/delView", this.$route);
  985. this.$router.go(-1);
  986. }
  987. }).catch((response)=>{
  988. loading.close();
  989. });
  990. }
  991. }
  992. });
  993. },
  994. //金额去掉千分位
  995. moneyDelete(num){
  996. if(num &&num != undefined && num != null){
  997. let _num = num;
  998. _num = _num.toString();
  999. _num = _num.replace(/,/gi,'');
  1000. return _num;
  1001. }else{
  1002. return num;
  1003. }
  1004. },
  1005. //预览
  1006. handlePreview(row) {
  1007. const pfiUrl = row.pfiUrl;
  1008. const pfiFileName = row.pfiFileName;
  1009. if (row.pfiUrl) {
  1010. console.log(pfiFileName.substr(-3));
  1011. if (pfiFileName.substr(-3) == "pdf") {
  1012. this.wordUrl = pfiUrl + "/" + getToken();
  1013. this.show=false;
  1014. this.heid=true;
  1015. } else if (
  1016. pfiFileName.substr(-3) == "jpg" ||
  1017. pfiFileName.substr(-3) == "png" ||
  1018. pfiFileName.substr(-3) == "JPG" ||
  1019. pfiFileName.substr(-3) == "PNG" ||
  1020. pfiFileName.substr(-4) == "jpeg" ||
  1021. pfiFileName.substr(-3) == "JPEG"
  1022. ) {
  1023. this.wordUrl =
  1024. pfiUrl +
  1025. "/" +
  1026. getToken();
  1027. this.show=true;
  1028. this.heid=false;
  1029. console.log("====>",this.wordUrl);
  1030. } else if (
  1031. pfiFileName.substr(-3) == "doc" ||
  1032. pfiFileName.substr(-3) == "DOC"||
  1033. pfiFileName.substr(-4) == "docx" ||
  1034. pfiFileName.substr(-3) == "DOCX"
  1035. ) {
  1036. this.wordUrl =
  1037. "https://view.officeapps.live.com/op/view.aspx?src=" +
  1038. pfiUrl +
  1039. "/" +
  1040. getToken() +
  1041. "/" +
  1042. pfiFileName;
  1043. this.show=false;
  1044. this.heid=true;
  1045. console.log("====>",this.wordUrl);
  1046. } else {
  1047. this.$message({
  1048. message: "暂不支持该类型文件预览",
  1049. type: "warning",
  1050. });
  1051. return;
  1052. }
  1053. }
  1054. this.openFile = true;
  1055. },
  1056. //新增应付
  1057. addPay(){
  1058. //获取选中第一个的预计还款日期
  1059. if(this.chooseTicket[0]){
  1060. var zbiPayDate = this.chooseTicket[0].zbiPayDate;
  1061. this.payDate = zbiPayDate;
  1062. }
  1063. if(this.form.zfiCoreId){
  1064. this.openAddBill = true
  1065. }else{
  1066. this.$message({
  1067. message: "开立方不能为空",
  1068. type: "warning",
  1069. });
  1070. }
  1071. },
  1072. //新增账款回调
  1073. emitAddClick(val){
  1074. var self = this
  1075. this.getAccountsCollection().then((response) => {
  1076. //新增付款返回id直接选中
  1077. if (val) {
  1078. self.payList.forEach(element => {
  1079. if(element.zbiId == val){
  1080. // 将当前点击项选中
  1081. self.chooseTicket.push(element)
  1082. self.closeTicket()
  1083. }
  1084. });
  1085. }
  1086. })
  1087. self.openAddBill = false
  1088. },
  1089. //修改账款回调
  1090. emitEditClick(val) {
  1091. var self = this
  1092. this.getAccountsCollection().then((response) => {
  1093. //修改付款返回id直接选中
  1094. if (val) {
  1095. // self.payList.forEach(element => {
  1096. // if (element.zbiId == val) {
  1097. // // 将当前点击项选中
  1098. // // self.chooseTicket.push(element)
  1099. // //self.closeTicket()
  1100. // }
  1101. // });
  1102. console.log(self.chooseTicket)
  1103. self.ticketList = self.chooseTicket
  1104. self.closeTicket()
  1105. }
  1106. })
  1107. self.openEditBill = false
  1108. },
  1109. //查询有无签收内部审批
  1110. isOpenApproval(){
  1111. var confirmParam = {};
  1112. confirmParam.menuId = "1000000005";
  1113. isOpenApproval(confirmParam).then((response) => {
  1114. var result = response.data.isOpen;
  1115. //有签收内部审批
  1116. if(true == result){
  1117. //获取融资方审批状态(拒绝或者状态为空时显示通过按钮)
  1118. if(this.zfiSupplierStatus == "02" || this.zfiSupplierStatus == "" || this.zfiSupplierStatus == "null" || this.zfiSupplierStatus == null ){
  1119. this.isHas = true;
  1120. }else{
  1121. this.isHas = false;
  1122. //获取文件
  1123. //融资方通过
  1124. if(this.zfiSupplierStatus == '01'){
  1125. //预览文件
  1126. this.getContractFile(true);
  1127. }
  1128. }
  1129. }else{//无签收内部审批,显示签收按钮
  1130. this.isHas = false;
  1131. //融资方通过
  1132. if(this.zfiSupplierStatus == '01'){
  1133. //预览文件
  1134. this.getContractFile(true);
  1135. }
  1136. }
  1137. });
  1138. },
  1139. //签收
  1140. sign(){
  1141. //融资方通过
  1142. if(this.zfiSupplierStatus == '01'){
  1143. //预览文件
  1144. this.getContractFile();
  1145. }else{
  1146. this.$refs["form"].validate(valid => {
  1147. //通过
  1148. if(this.ticketList.length < 1){
  1149. this.$message({
  1150. message: '请选择应收账款',
  1151. type: 'warning'
  1152. });
  1153. return;
  1154. }
  1155. if(parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))){
  1156. this.$message({
  1157. message: '签发金额不可大于合计金额',
  1158. type: 'warning'
  1159. });
  1160. return;
  1161. }
  1162. if (valid) {
  1163. const loading = this.$loading({
  1164. lock: true,
  1165. text: 'Loading',
  1166. background: 'rgba(0, 0, 0,0)'
  1167. });
  1168. //如果签发金额小于合计金额
  1169. if((parseFloat(this.form.zfiAmount)) < (parseFloat(this.moneyDelete(this.checkTotalAmt)))){
  1170. var _this = this;
  1171. this.$confirm('签发金额小于应收金额合计,是否确认提交', "警告", {
  1172. confirmButtonText: "确定",
  1173. cancelButtonText: "取消",
  1174. type: "warning"
  1175. }).then(function() {
  1176. //应收账款
  1177. _this.form.ticketList = _this.ticketList;
  1178. _this.form.flag = "00";
  1179. signFor(_this.form).then(response => {
  1180. loading.close();
  1181. //预览文件
  1182. _this.getContractFile();
  1183. }).catch((response)=>{
  1184. loading.close();
  1185. });
  1186. }).catch((e) => {
  1187. loading.close();
  1188. });
  1189. }else{
  1190. //应收账款
  1191. this.form.ticketList = this.ticketList;
  1192. this.form.flag = "00";
  1193. signFor(this.form).then(response => {
  1194. loading.close();
  1195. //预览文件
  1196. this.getContractFile();
  1197. }).catch((response)=>{
  1198. loading.close();
  1199. });
  1200. }
  1201. }
  1202. });
  1203. }
  1204. },
  1205. //获取合同文件
  1206. getContractFile(nosign){
  1207. const loading = this.$loading({
  1208. lock: true,
  1209. text: 'Loading',
  1210. background: 'rgba(0, 0, 0,0)'
  1211. });
  1212. getContractFile(this.form).then((response) => {
  1213. loading.close();
  1214. if(response.data.list){
  1215. this.pdfFileList = response.data.list;
  1216. }
  1217. //文件存在
  1218. if(this.pdfFileList.length > 0 ){
  1219. this.pdfShowDialog = true;
  1220. }else{
  1221. /* this.$message({
  1222. message: '文件不存在!',
  1223. type: 'warning'
  1224. }); */
  1225. //文件不存在,并且不是一进页面调的文件预览才盖章
  1226. if(!nosign){
  1227. this.contractSigning();
  1228. }
  1229. }
  1230. }).catch((response)=>{
  1231. loading.close();
  1232. });
  1233. },
  1234. closePdfShow(){
  1235. this.pdfShowDialog = false;
  1236. },
  1237. //盖章
  1238. contractSigning(){
  1239. const loading = this.$loading({
  1240. lock: true,
  1241. text: 'Loading',
  1242. background: 'rgba(0, 0, 0,0)'
  1243. });
  1244. contractSigning(this.form).then((response) => {
  1245. loading.close();
  1246. const zfiId = this.$route.params && this.$route.params.zfiId;
  1247. getFinanceSign(zfiId).then((response) => {
  1248. //融信编号
  1249. this.financeSignForm.zfiNumber = response.data.zfiNumber;
  1250. //融信金额
  1251. this.financeSignForm.zfiAmount = response.data.zfiAmount;
  1252. //利率
  1253. this.financeSignForm.zfiRate = response.data.zfiRate;
  1254. //最长融信期限
  1255. this.financeSignForm.intervalTime = response.data.intervalTime;
  1256. //融信有效期
  1257. this.financeSignForm.validity = response.data.validity;
  1258. this.goShow = true;
  1259. });
  1260. }).catch((response) => {
  1261. loading.close();
  1262. });
  1263. },
  1264. //去融资
  1265. goFinance(){
  1266. //关闭当前页
  1267. this.$store.dispatch(
  1268. "tagsView/delView",
  1269. this.$route
  1270. );
  1271. //关闭弹框
  1272. this.goShow = false;
  1273. Cookies.set("/credit/goFinance/"+this.zfiId + "/", this.$route.fullPath)
  1274. this.$router.push({ path: "/credit/goFinance/"+this.zfiId + "/" });
  1275. },
  1276. //返回到列表页
  1277. goParent(){
  1278. var self = this
  1279. this.pdfShowDialog = false;
  1280. self.$store.dispatch(
  1281. "tagsView/delView",
  1282. self.$route
  1283. );
  1284. //self.$router.push("/Bill/credit")
  1285. self.$router.push("/Bill/finance/credit")
  1286. },
  1287. /* 金额展示 */
  1288. handleInput(str) {
  1289. return amtformat(str, 2, ".", ",");
  1290. },
  1291. }
  1292. };
  1293. </script>
  1294. <style lang="scss">
  1295. .uoloadfj .el-upload--picture-card{
  1296. width:110px;
  1297. height:110px;
  1298. line-height:110px;
  1299. }
  1300. .fjUoloadSty .el-upload--picture-card{
  1301. display:none;
  1302. }
  1303. table th.star div::before {
  1304. content: '*';
  1305. color: red;
  1306. }
  1307. </style>
  1308. <style type="text/css">
  1309. table.gridtable {
  1310. font-size:11px;
  1311. color:#333333;
  1312. border-width: 1px;
  1313. border-collapse: collapse;
  1314. }
  1315. table.gridtable th {
  1316. border-width: 1px;
  1317. padding: 8px;
  1318. border-style: solid;
  1319. background-color: #dedede;
  1320. }
  1321. table.gridtable td {
  1322. border-width: 1px;
  1323. padding: 8px;
  1324. border-style: solid;
  1325. }
  1326. </style>