goFinance.vue 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659
  1. <template>
  2. <div class="app-container zap-main">
  3. <!-- 添加或修改融资记录对话框 -->
  4. <div class="zap-title">融资信息</div>
  5. <el-form
  6. class="zap-form"
  7. ref="form"
  8. :model="form"
  9. :rules="rules"
  10. :inline="true"
  11. label-width="auto"
  12. >
  13. <el-row class="zap-form" style="padding-bottom: 0">
  14. <el-col :span="12">
  15. <el-form-item label="选择融信:" prop="zfrFinanceId" size="large">
  16. <el-select
  17. v-model="form.zfrFinanceId"
  18. clearable
  19. @clear="clearBoth"
  20. :disabled="true"
  21. >
  22. <el-option
  23. v-for="(item, index) in financeInfList"
  24. :key="index"
  25. :label="item.zfiNumber"
  26. :value="item.zfiId"
  27. @click.native="amount(item)"
  28. disabled
  29. ></el-option>
  30. </el-select>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :span="12">
  34. <el-form-item
  35. label="融资收款账户:"
  36. prop="zfrCollectionAccount"
  37. size="large"
  38. label-width="101px"
  39. >
  40. <el-input
  41. v-model="form.zfrCollectionAccount"
  42. clearable
  43. placeholder="请输入融资账户"
  44. maxlength="25"
  45. :readonly="onlyRead"
  46. />
  47. </el-form-item>
  48. </el-col>
  49. </el-row>
  50. <el-row class="zap-form" style="padding-bottom: 0">
  51. <el-col :span="12">
  52. <el-form-item label="融信金额:" prop="zfiAmount" size="large">
  53. <el-input
  54. v-model="form.zfiAmount"
  55. clearable
  56. placeholder="请输入融信金额"
  57. maxlength="25"
  58. readonly
  59. >
  60. <template slot="append">元</template>
  61. </el-input>
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="12">
  65. <el-form-item label="申请融资方:" prop="companyName" size="large">
  66. <el-input
  67. v-model="form.companyName"
  68. clearable
  69. placeholder="请输入申请融资方"
  70. maxlength="25"
  71. readonly
  72. />
  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
  80. v-model="form.zfrAmount"
  81. clearable
  82. placeholder="请输入融资金额"
  83. maxlength="25"
  84. readonly
  85. >
  86. <template slot="append">元</template>
  87. </el-input>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="12">
  91. <el-form-item label="融资利率:" prop="zfrRate" size="large">
  92. <el-input
  93. v-model="form.zfrRate"
  94. clearable
  95. placeholder="请输入融资利率"
  96. maxlength="25"
  97. readonly
  98. >
  99. <template slot="append">%</template>
  100. </el-input>
  101. </el-form-item>
  102. </el-col>
  103. </el-row>
  104. <el-row class="zap-form" style="padding-bottom: 0">
  105. <el-col :span="12">
  106. <el-form-item
  107. label="承诺还款日期:"
  108. prop="zfrRepaymentDate"
  109. size="large"
  110. label-width="101px"
  111. >
  112. <el-input
  113. v-model="form.zfrRepaymentDate"
  114. clearable
  115. placeholder="请输入承诺还款日期"
  116. maxlength="25"
  117. readonly
  118. />
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="12">
  122. <el-form-item label="服务费率:" prop="zfpcrChargeRate" size="large">
  123. <el-input
  124. v-model="form.zfpcrChargeRate"
  125. clearable
  126. placeholder="请输入服务费率"
  127. maxlength="25"
  128. readonly
  129. >
  130. <template slot="append">%</template>
  131. </el-input>
  132. </el-form-item>
  133. </el-col>
  134. </el-row>
  135. <el-row class="zap-form" style="padding-bottom: 0">
  136. <el-col :span="12">
  137. <el-form-item
  138. label="预计融资成本:"
  139. prop="cost"
  140. size="large"
  141. label-width="101px"
  142. >
  143. <el-input
  144. v-model="form.cost"
  145. clearable
  146. placeholder="请输入预计融资成本"
  147. maxlength="25"
  148. readonly
  149. >
  150. <template slot="append">元</template>
  151. </el-input>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="12">
  155. <el-form-item
  156. label="预计融资期限:"
  157. prop="term"
  158. size="large"
  159. label-width="101px"
  160. >
  161. <el-input
  162. v-model="form.term"
  163. clearable
  164. placeholder="请输入预计融资期限"
  165. maxlength="25"
  166. readonly
  167. >
  168. <template slot="append">天</template>
  169. </el-input>
  170. </el-form-item>
  171. </el-col>
  172. </el-row>
  173. <el-row class="zap-form" style="padding-bottom: 0">
  174. <el-col :span="12">
  175. <el-form-item
  176. label="预计净融资额:"
  177. prop="amount"
  178. size="large"
  179. label-width="101px"
  180. >
  181. <el-input
  182. v-model="form.amount"
  183. clearable
  184. placeholder="请输入预计净融资额"
  185. maxlength="25"
  186. readonly
  187. >
  188. <template slot="append">元</template>
  189. </el-input>
  190. </el-form-item>
  191. </el-col>
  192. </el-row>
  193. <div class="contain">
  194. <p>说明:</p>
  195. <p>1. 因银行结算原因,资金到账可能会在申请日期后2-5工作日;</p>
  196. <p>
  197. 2.
  198. 申请融资时,预计融资成本、预计融资期限、预计净融资额,由申请日期单日开始计算;准确数值以银行实际放款日期为准;
  199. </p>
  200. <p>
  201. 3.
  202. 因填写融资收款账户错误,或其他原因导致银行无法正常放款,款项将汇入备用收款账户,可在电子账户管理查看;
  203. </p>
  204. <p>4. 服务费缴纳与退还要求,可详细阅读《融信产品使用协议》</p>
  205. </div>
  206. </el-form>
  207. <div class="zap-title">融信信息</div>
  208. <el-row class="zap-form">
  209. <el-col>
  210. <span style="font-size: 14px; color: #333333">融信凭证</span>
  211. </el-col>
  212. <table
  213. class="gridtable"
  214. style="width: 80%; text-align: center"
  215. align="center"
  216. >
  217. <tr>
  218. <td rowspan="4">开立方</td>
  219. <td>全称</td>
  220. <td>{{ openName }}</td>
  221. <td rowspan="4">接收方</td>
  222. <td>全称</td>
  223. <td>{{ receiveName }}</td>
  224. </tr>
  225. <tr>
  226. <td>社会统一码</td>
  227. <td>{{ openCode }}</td>
  228. <td>社会统一码</td>
  229. <td>{{ receiverCode }}</td>
  230. </tr>
  231. <tr>
  232. <td>开户银行</td>
  233. <td>{{ openBank }}</td>
  234. <td>开户银行</td>
  235. <td>{{ receiverBank }}</td>
  236. </tr>
  237. <tr>
  238. <td>账号</td>
  239. <td>{{ openAccount }}</td>
  240. <td>账号</td>
  241. <td>{{ receiverAccount }}</td>
  242. </tr>
  243. <tr>
  244. <td colspan="2">粮信金额</td>
  245. <td colspan="4">
  246. 人民币(大写):{{ issuedAmount }}<br />人民币(小写)¥{{
  247. amtFormat(form.zfiAmount)
  248. }}
  249. </td>
  250. </tr>
  251. <tr>
  252. <td colspan="2">起止日期</td>
  253. <td colspan="4">{{ stopDate }}</td>
  254. </tr>
  255. </table>
  256. </el-row>
  257. <div class="zap-title zap-margin-top">资产信息</div>
  258. <el-row class="zap-form zap-padding-bottom">
  259. <el-row class="zap-accounts-receivable">
  260. <el-col>
  261. <el-row type="flex" align="middle" style="height: 36px">
  262. <span class="label">金额大写:</span>
  263. <span class="value" style="margin-right: 40px">{{
  264. smallToBig(allAmount())
  265. }}</span>
  266. <span class="label">消费金额:</span>
  267. <span class="value">{{ amtFormat(allAmount()) }} 元</span>
  268. </el-row>
  269. </el-col>
  270. </el-row>
  271. <el-table :data="billInfList" stripe>
  272. <el-table-column label="序号" type="index" width="50" align="center">
  273. <template slot-scope="scope">
  274. <span>{{
  275. (queryParams.pageNum - 1) * queryParams.pageSize +
  276. scope.$index +
  277. 1
  278. }}</span>
  279. </template>
  280. </el-table-column>
  281. <el-table-column label="编号" align="center" prop="zbiNumber" />
  282. <el-table-column label="账款名称" align="center" prop="zbiName" />
  283. <el-table-column label="应收企业" align="center" prop="payee" />
  284. <el-table-column label="应付企业" align="center" prop="payer" />
  285. <el-table-column label="还款时间" align="center" prop="zbiPayDate" />
  286. <el-table-column label="金额" align="center" prop="zbiAmount" />
  287. <el-table-column
  288. label="操作"
  289. align="center"
  290. class-name="small-padding fixed-width"
  291. width="250"
  292. >
  293. <template slot-scope="scope">
  294. <el-button
  295. size="mini"
  296. type="text"
  297. icon="el-icon-view"
  298. @click="handleDetail(scope.$index, billInfList)"
  299. >详情</el-button
  300. >
  301. </template>
  302. </el-table-column>
  303. </el-table>
  304. </el-row>
  305. <!-- 签署合同 -->
  306. <el-row class="zap-margin-top zap-form">
  307. <div class="zap-title">签署合同</div>
  308. <el-table :data="creditSealList" style="width: 100%">
  309. <el-table-column
  310. label="文件名称"
  311. align="center"
  312. prop="pfiFileName"
  313. show-overflow-tooltip
  314. >
  315. <template slot-scope="scope">
  316. <img
  317. style="width: 30px; height: 30px"
  318. src="../../../assets/images/pdf.png"
  319. />
  320. <span>{{ scope.row.pfiFileName }} </span>
  321. </template>
  322. </el-table-column>
  323. <el-table-column
  324. label="操作"
  325. align="center"
  326. class-name="small-padding fixed-width"
  327. width="300"
  328. fixed="right"
  329. >
  330. <template slot-scope="scope">
  331. <el-button
  332. size="mini"
  333. type="text"
  334. icon="el-icon-view"
  335. @click="handleDownload(scope.row)"
  336. >下载</el-button
  337. >
  338. <el-button
  339. size="mini"
  340. type="text"
  341. icon="el-icon-view"
  342. @click="handlePreview(scope.row)"
  343. >预览</el-button
  344. >
  345. </template>
  346. </el-table-column>
  347. </el-table>
  348. </el-row>
  349. <!-- 发票附件 -->
  350. <!-- <div class="zap-title zap-margin-top">发票附件</div>
  351. <el-row class="zap-form">
  352. <el-table :data="invoiceFileList" style="width: 100%" stripe>
  353. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  354. <el-table-column
  355. label="操作"
  356. align="center"
  357. class-name="small-padding fixed-width"
  358. width="300"
  359. fixed="right"
  360. >
  361. <template slot-scope="scope">
  362. <el-button
  363. size="mini"
  364. type="text"
  365. icon="el-icon-view"
  366. @click="handleDownload(scope.row)"
  367. >下载</el-button>
  368. <el-button
  369. size="mini"
  370. type="text"
  371. icon="el-icon-view"
  372. @click="handlePreview(scope.row)"
  373. >预览</el-button>
  374. </template>
  375. </el-table-column>
  376. </el-table>
  377. </el-row> -->
  378. <!-- 合同附件 -->
  379. <!-- <div class="zap-title zap-margin-top">合同附件</div>
  380. <el-row class="zap-form">
  381. <el-table :data="contractFileList" style="width: 100%" stripe>
  382. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  383. <el-table-column
  384. label="操作"
  385. align="center"
  386. class-name="small-padding fixed-width"
  387. width="300"
  388. fixed="right"
  389. >
  390. <template slot-scope="scope">
  391. <el-button
  392. size="mini"
  393. type="text"
  394. icon="el-icon-view"
  395. @click="handleDownload(scope.row)"
  396. >下载</el-button>
  397. <el-button
  398. size="mini"
  399. type="text"
  400. icon="el-icon-view"
  401. @click="handlePreview(scope.row)"
  402. >预览</el-button>
  403. </template>
  404. </el-table-column>
  405. </el-table>
  406. </el-row> -->
  407. <!-- 其他附件 -->
  408. <!-- <div class="zap-title zap-margin-top">其他附件</div>
  409. <el-row class="zap-form">
  410. <el-table :data="otherFileList" style="width: 100%" stripe>
  411. <el-table-column label="文件名称" align="center" prop="pfiFileName" show-overflow-tooltip />
  412. <el-table-column
  413. label="操作"
  414. align="center"
  415. class-name="small-padding fixed-width"
  416. width="300"
  417. fixed="right"
  418. >
  419. <template slot-scope="scope">
  420. <el-button
  421. size="mini"
  422. type="text"
  423. icon="el-icon-view"
  424. @click="handleDownload(scope.row)"
  425. >下载</el-button>
  426. <el-button
  427. size="mini"
  428. type="text"
  429. icon="el-icon-view"
  430. @click="handlePreview(scope.row)"
  431. >预览</el-button>
  432. </template>
  433. </el-table-column>
  434. </el-table>
  435. </el-row> -->
  436. <el-row style="height: 109px" type="flex" align="middle" justify="center">
  437. <el-button type="primary" plain @click="cancel">取 消</el-button>
  438. <el-button type="primary" @click="submitForm" v-if="!zfrId"
  439. >确 定</el-button
  440. >
  441. </el-row>
  442. <!-- 附件详情 -->
  443. <el-dialog
  444. title="详情"
  445. :visible.sync="openDetailBill"
  446. width="1120px"
  447. append-to-body
  448. >
  449. <detail-bill :zbiId="this.zbiId" v-if="openDetailBill"></detail-bill>
  450. </el-dialog>
  451. <!--预览-->
  452. <el-dialog :visible.sync="openFile" width="900px" append-to-body>
  453. <img :src="wordUrl" v-if="show" width="800px" height="500px" />
  454. <iframe
  455. :src="wordUrl"
  456. width="800px"
  457. height="500px"
  458. frameborder="1"
  459. v-if="heid"
  460. />
  461. </el-dialog>
  462. <!-- 合同预览 -->
  463. <el-dialog title="预览" :visible.sync="pdfShowDialog" width="60%" append-to-body :show-close="pdfIsShow">
  464. <pdf-show
  465. :pdfFileList="pdfFileList"
  466. :zfiId="this.form.zfiId"
  467. :parent="parent"
  468. ></pdf-show>
  469. <span slot="footer" class="dialog-footer" style="float: right">
  470. <el-button type="primary" @click="selectType" v-if="pdfIsShow">签署</el-button>
  471. <el-button type="primary" plain="" @click="pdfShowDialog = false" v-if="pdfIsShow">取消</el-button>
  472. <el-button type="primary" @click="closePDF" v-if="!pdfIsShow">确定</el-button>
  473. </span>
  474. </el-dialog>
  475. <!--选择签署意愿类型-->
  476. <el-dialog
  477. :visible.sync="confirmIsShow"
  478. width="600px"
  479. append-to-body
  480. :before-close="cancelUpdate"
  481. center
  482. >
  483. <el-form
  484. ref="updateForm"
  485. :disabled="false"
  486. :model="updateForm"
  487. v-if="confirmIsShow"
  488. label-width="150px"
  489. class="demo-form-inline"
  490. :inline="true"
  491. >
  492. <el-radio-group v-model="updateForm.radio">
  493. <el-radio label="01">人脸</el-radio>
  494. <el-radio label="02">短信</el-radio>
  495. </el-radio-group>
  496. </el-form>
  497. <div slot="footer" class="dialog-footer">
  498. <el-button type="primary" @click="confirmSelect">确 定</el-button>
  499. <el-button @click="cancelUpdate">取 消</el-button>
  500. </div>
  501. </el-dialog>
  502. <!--盖章短信-->
  503. <el-dialog
  504. :visible.sync="messageIsShow"
  505. width="600px"
  506. append-to-body
  507. :before-close="cancelMessage"
  508. center
  509. >
  510. <el-form
  511. ref="messageForm"
  512. :disabled="false"
  513. :model="messageForm"
  514. v-if="messageIsShow"
  515. label-width="150px"
  516. class="demo-form-inline"
  517. :inline="true"
  518. @submit.native.prevent
  519. >
  520. <el-form-item label="验证码" prop="validCode">
  521. <el-input
  522. v-model="messageForm.validCode"
  523. style="width: 200px"
  524. maxlength="6"
  525. />
  526. </el-form-item>
  527. <el-form-item>
  528. <el-button :disabled="!showCode" type="success" @click="send">
  529. 点击获取验证码
  530. <span v-show="!showCode" class="count">{{ count }} s</span>
  531. </el-button>
  532. </el-form-item>
  533. </el-form>
  534. <div slot="footer" class="dialog-footer">
  535. <el-button type="primary" @click="checkCode">确定</el-button>
  536. <el-button @click="cancelMessage">取 消</el-button>
  537. </div>
  538. </el-dialog>
  539. <!--授权编号激活短信-->
  540. <el-dialog
  541. :visible.sync="messageIfShow"
  542. width="600px"
  543. append-to-body
  544. :before-close="cancelMessages"
  545. center
  546. >
  547. <el-divider content-position="left">cfca签章授权编号激活</el-divider>
  548. <el-form
  549. ref="messageForm"
  550. :disabled="false"
  551. :model="messagesForm"
  552. v-if="messageIfShow"
  553. label-width="150px"
  554. class="demo-form-inline"
  555. :inline="true"
  556. @submit.native.prevent
  557. >
  558. <el-form-item label="验证码" prop="validCode">
  559. <el-input
  560. v-model="messagesForm.validCode"
  561. style="width: 200px"
  562. maxlength="6"
  563. />
  564. </el-form-item>
  565. <el-form-item>
  566. <el-button :disabled="!showCodes" type="success" @click="proSend">
  567. 点击获取验证码
  568. <span v-show="!showCodes" class="count">{{ countCode }} s</span>
  569. </el-button>
  570. </el-form-item>
  571. </el-form>
  572. <div slot="footer" class="dialog-footer">
  573. <el-button type="primary" @click="checkProCode">确定</el-button>
  574. <el-button @click="cancelMessages">取 消</el-button>
  575. </div>
  576. </el-dialog>
  577. <!--人脸二维码-->
  578. <el-dialog
  579. :visible.sync="faceIsShow"
  580. width="500px"
  581. append-to-body
  582. :before-close="cancelFace"
  583. center
  584. >
  585. <img
  586. :src="'data:image/jpeg;base64,' + this.fileUrl"
  587. style="overflow: auto; width: 100%; height: 100%"
  588. />
  589. </el-dialog>
  590. </div>
  591. </template>
  592. <script>
  593. import {
  594. addRecord,
  595. listBillInf,
  596. listAccInf,
  597. getContractFile,
  598. getRecord,
  599. contractSigning,
  600. updateChargeStatus,
  601. listChargeStatus,
  602. cancelContract,
  603. } from "@/api/service/financeRecord/record";
  604. import { listFinanceInf } from "@/api/common/financeInf";
  605. import { getFile } from "@/api/service/credit/credit";
  606. import { getToken } from "@/utils/auth";
  607. import { getUserProfile } from "@/api/system/user";
  608. import { getCreditDetail } from "@/api/service/credit/credit";
  609. import DetailBill from "@/views/service/credit/billDetail";
  610. import { getCreditSealFile } from "@/api/service/credit/creditHandle";
  611. import { isOpenApproval } from "@/api/service/credit/approvalRelatedCredit";
  612. import { listCompanyHandler } from "@/api/common/companyHandler";
  613. import {
  614. sendMessage,
  615. checkCode,
  616. faceAuth,
  617. checkFaceAuth,
  618. } from "@/api/service/credit/message";
  619. import {
  620. cfcaProjectNo,
  621. projectSendMessage,
  622. checkProCode,
  623. } from "@/api/service/credit/cfcaProject";
  624. import { balance, transfer } from "@/api/bank/bankInterface";
  625. import pdfShow from "@/views/service/financeRecord/pdfShow";
  626. export default {
  627. name: "financeRecord",
  628. components: { DetailBill, pdfShow },
  629. data() {
  630. return {
  631. pdfIsShow: true,
  632. //往来账款id
  633. zbiId: "",
  634. //融资账户是够编辑
  635. onlyRead: false,
  636. labelPosition: "top",
  637. // 遮罩层
  638. loading: true,
  639. // 选中数组
  640. ids: [],
  641. // 非单个禁用
  642. single: true,
  643. // 非多个禁用
  644. multiple: true,
  645. // 显示搜索条件
  646. showSearch: true,
  647. // 总条数
  648. total: 0,
  649. // 全部融资记录表格数据
  650. recordList: [],
  651. //融信编号数据
  652. financeInfList: [],
  653. //应收账款
  654. billInfList: [],
  655. //合同附件
  656. contractFileList: [],
  657. //发票附件
  658. invoiceFileList: [],
  659. //其他文件
  660. otherFileList: [],
  661. //盖章文件
  662. creditSealList: [],
  663. //开立方
  664. openName: "",
  665. //开立社会码
  666. openCode: "",
  667. //开立银行
  668. openBank: "",
  669. //开立账户
  670. openAccount: "",
  671. //接收方
  672. receiveName: "",
  673. //接收方社会统一码
  674. receiverCode: "",
  675. //接收方银行
  676. receiverBank: "",
  677. //接收方账户
  678. receiverAccount: "",
  679. //起止日期
  680. stopDate: "",
  681. //签发金额大写
  682. issuedAmount: "零元整",
  683. // 弹出层标题
  684. title: "",
  685. // 是否显示弹出层
  686. open: false,
  687. openDetailBill: false,
  688. // 查询参数
  689. queryParams: {
  690. pageNum: 1,
  691. pageSize: 10,
  692. zfrFinanceId: null,
  693. zfrNumber: null,
  694. zfrAmount: null,
  695. zfrRate: null,
  696. zfrHandler: null,
  697. zfrRepaymentDate: null,
  698. zfrApplyDate: null,
  699. zfrLoanDate: null,
  700. zfrApplyAmount: null,
  701. zfrApplyType: null,
  702. zfrStatus: null,
  703. zfrApproveStt: null,
  704. zfpcrLoanType: null,
  705. zfiProductId: null,
  706. },
  707. queryParamsDown: {
  708. pfiFileUrl: null,
  709. },
  710. // 表单参数
  711. form: {},
  712. forms: {},
  713. openFile: false,
  714. wordUrl: "",
  715. show: false,
  716. heid: false,
  717. // 表单校验
  718. rules: {
  719. zfrFinanceId: [
  720. { required: true, message: "融信编号不能为空", trigger: "blur" },
  721. ],
  722. zfrAmount: [
  723. { required: true, message: "融资金额不能为空", trigger: "blur" },
  724. ],
  725. },
  726. //盖章预览
  727. parent: this,
  728. pdfShowDialog: false,
  729. pdfFileList: [],
  730. confirmIsShow: false,
  731. messageIsShow: false,
  732. messageIfShow: false,
  733. faceIsShow: false,
  734. fileUrl: "",
  735. //意愿
  736. updateForm: {},
  737. messageForm: {},
  738. messagesForm: {},
  739. count: "",
  740. timer: null,
  741. //授权编号激活短信验证码倒计时
  742. //项目编号
  743. projectCode: "",
  744. showCode: true,
  745. showCodes: true,
  746. countCode: "",
  747. timerCode: null,
  748. zfrId: null,
  749. };
  750. },
  751. created() {
  752. const zfiId = this.$route.params && this.$route.params.zfiId;
  753. this.$set(this.form, "zfrFinanceId", zfiId);
  754. this.getFinanceInf(zfiId);
  755. this.getUserProfile();
  756. },
  757. methods: {
  758. //格式化金额
  759. amtFormat(cellValue) {
  760. if (cellValue == null || cellValue == undefined || cellValue == "") {
  761. cellValue = "0.00";
  762. }
  763. cellValue += "";
  764. if (!cellValue.includes(".")) {
  765. cellValue += ".00";
  766. }
  767. console.log(cellValue);
  768. return cellValue
  769. .replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
  770. return $1 + ",";
  771. })
  772. .replace(/\.$/, "");
  773. },
  774. /** 查询融信编号 */
  775. getFinanceInf(zfrFinanceId) {
  776. this.loading = true;
  777. listFinanceInf(zfrFinanceId).then((response) => {
  778. if (response.data) {
  779. this.financeInfList = response.data;
  780. for (let item of this.financeInfList) {
  781. if (item.zfiId == zfrFinanceId) {
  782. this.amount(item);
  783. }
  784. }
  785. this.loading = false;
  786. }
  787. });
  788. },
  789. getUserProfile() {
  790. getUserProfile().then((response) => {
  791. if (response.company) {
  792. this.$set(this.form, "companyName", response.company.scyName);
  793. }
  794. });
  795. },
  796. //获取盖章文件
  797. getCreditSealFile() {
  798. getCreditSealFile(this.forms).then((response) => {
  799. if (response.data.list) {
  800. this.creditSealList = response.data.list;
  801. }
  802. });
  803. },
  804. // 取消按钮
  805. cancel() {
  806. this.$store.dispatch("tagsView/delView", this.$route);
  807. this.$router.go(-1);
  808. },
  809. //文件下载
  810. handleDownload(row) {
  811. const pfiFileUrl = row.pfiFileUrl;
  812. if (pfiFileUrl != null && pfiFileUrl != "") {
  813. const pfiFileName = row.pfiFileName;
  814. this.queryParamsDown.pfiFileUrl = pfiFileUrl;
  815. this.download(
  816. "sc-service/creditLine/jpgAuthorization",
  817. {
  818. ...this.queryParamsDown,
  819. },
  820. pfiFileName
  821. );
  822. // window.open(pfiUrl + "/" + getToken());
  823. } else {
  824. this.$message({
  825. message: "该附件不存在!",
  826. type: "warning",
  827. });
  828. return;
  829. }
  830. },
  831. // 表单重置
  832. reset() {
  833. this.form = {
  834. zfrId: null,
  835. zfrFinanceId: null,
  836. zfrNumber: null,
  837. zfrAmount: null,
  838. zfrRate: null,
  839. zfrHandler: null,
  840. zfrRepaymentDate: null,
  841. zfrApplyDate: null,
  842. zfrLoanDate: null,
  843. zfrApplyAmount: null,
  844. zfrApplyType: null,
  845. zfrStatus: "00",
  846. zfrApproveStt: null,
  847. zfrProfitSpare1: null,
  848. zfrProfitSpare2: null,
  849. zfrProfitSpare3: null,
  850. zfrProfitSpare4: null,
  851. zfrProfitSpare5: null,
  852. zfrProfitSpare6: null,
  853. zfrProfitSpare7: null,
  854. zfrProfitSpare8: null,
  855. zfrProfitSpare9: null,
  856. createBy: null,
  857. createTime: null,
  858. updateBy: null,
  859. updateTime: null,
  860. };
  861. this.resetForm("form");
  862. },
  863. /** 全部搜索按钮操作 */
  864. handleQuery() {
  865. this.queryParams.pageNum = 1;
  866. this.getList();
  867. },
  868. /** 全部重置按钮操作 */
  869. resetQuery() {
  870. this.resetForm("queryForm");
  871. this.handleQuery();
  872. },
  873. //全部 多选框选中数据
  874. handleSelectionChange(selection) {
  875. this.ids = selection.map((item) => item.zfrId);
  876. this.single = selection.length !== 1;
  877. this.multiple = !selection.length;
  878. },
  879. /* 融信编号赋值融资金额 */
  880. amount(item) {
  881. this.$set(this.form, "zfiAmount", item.zfiAmount);
  882. this.$set(this.form, "zfrAmount", item.zfiAmount);
  883. this.$set(this.form, "zfrRepaymentDate", item.zfiExpireDate);
  884. this.$set(this.form, "zfrRate", item.zfpcrRate);
  885. this.$set(this.form, "zfpcrLoanType", item.zfpcrLoanType);
  886. this.$set(this.form, "zfiProductId", item.zfiProductId);
  887. this.$set(this.form, "zfpcrChargeRate", item.zfpcrChargeRate);
  888. this.$set(this.form, "cost", item.cost);
  889. this.$set(this.form, "term", item.term);
  890. this.$set(this.form, "amount", item.amount);
  891. if (item.zfiId) {
  892. this.loading = true;
  893. listBillInf(item.zfiId)
  894. .then((response) => {
  895. this.billInfList = response.data;
  896. this.loading = false;
  897. })
  898. .then(() => {
  899. var queryParamsFile = {};
  900. queryParamsFile.ticketList = this.billInfList;
  901. getFile(queryParamsFile).then((response) => {
  902. if (response.data) {
  903. //获取发票文件
  904. this.invoiceFileList = response.data.invoiceFileList;
  905. //获取合同文件
  906. this.contractFileList = response.data.contractFileList;
  907. //获取其他文件
  908. this.otherFileList = response.data.otherFileList;
  909. }
  910. });
  911. if (item.zfpcrLoanType == "0") {
  912. listAccInf(item.zfiProductId).then((response) => {
  913. this.$set(this.form, "zfrCollectionAccount", response.msg);
  914. this.onlyRead = true;
  915. });
  916. }
  917. });
  918. getCreditDetail(item.zfiId).then((response) => {
  919. if (response.data) {
  920. this.forms = response.data.financeInf;
  921. //签发金额大写
  922. this.issuedAmount = this.smallToBig(this.form.zfiAmount);
  923. //给表格赋值
  924. this.openName = response.data.openName;
  925. this.openCode = response.data.openCode;
  926. this.openBank = response.data.openBank;
  927. this.openAccount = response.data.openAccount;
  928. this.receiveName = response.data.receiveName;
  929. this.receiverCode = response.data.receiverCode;
  930. this.receiverBank = response.data.receiverBank;
  931. this.receiverAccount = response.data.receiverAccount;
  932. this.stopDate = response.data.stopDate;
  933. this.zfiRate = response.data.financeInf.zfiRate;
  934. }
  935. //盖章合同
  936. this.getCreditSealFile();
  937. });
  938. }
  939. },
  940. //详情按钮
  941. handleDetail(index, rows) {
  942. this.zbiId = rows[index].zbiId;
  943. this.openDetailBill = true;
  944. },
  945. /** 提交按钮 */
  946. submitForm() {
  947. this.$refs["form"].validate((valid) => {
  948. if (valid) {
  949. const loading = this.$loading({
  950. lock: true,
  951. text: "Loading",
  952. spinner: "el-icon-loading",
  953. background: "rgba(0, 0, 0, 0.7)",
  954. });
  955. console.log(this.form, "AAHAHAHAH");
  956. addRecord(this.form)
  957. .then((response) => {
  958. console.log(response);
  959. loading.close();
  960. this.zfrId = response.data.zfrId;
  961. this.isOpenApproval();
  962. // this.msgSuccess("融资申请成功");
  963. // this.$store.dispatch("tagsView/delView", this.$route);
  964. // this.$router.go(-1);
  965. })
  966. .catch((response) => {
  967. loading.close();
  968. });
  969. }
  970. });
  971. },
  972. /* 清空 */
  973. clearBoth() {
  974. this.form.zfrAmount = "";
  975. this.form, (zfrRepaymentDate = "");
  976. this.form.zfrRate = "";
  977. this.form.zfpcrLoanType = "";
  978. this.billInfList = [];
  979. this.contractFileList = [];
  980. this.invoiceFileList = [];
  981. this.otherFileList = [];
  982. },
  983. //应收账款合计
  984. allAmount() {
  985. var strarr = [0.0];
  986. for (let i in this.billInfList) {
  987. strarr.push(this.billInfList[i]["zbiAmount"]);
  988. }
  989. return Math.floor(eval(strarr.join("+")) * 100) / 100; //结果
  990. },
  991. /* // 将数字金额转换为大写金额 */
  992. smallToBig(money) {
  993. // 将数字金额转换为大写金额
  994. var cnNums = new Array(
  995. "零",
  996. "壹",
  997. "贰",
  998. "叁",
  999. "肆",
  1000. "伍",
  1001. "陆",
  1002. "柒",
  1003. "捌",
  1004. "玖"
  1005. ); //汉字的数字
  1006. var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
  1007. var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
  1008. var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
  1009. var cnInteger = "整"; //整数金额时后面跟的字符
  1010. var cnIntLast = "元"; //整数完以后的单位
  1011. //最大处理的数字
  1012. var maxNum = 999999999999999.9999;
  1013. var integerNum; //金额整数部分
  1014. var decimalNum; //金额小数部分
  1015. //输出的中文金额字符串
  1016. var chineseStr = "";
  1017. var parts; //分离金额后用的数组,预定义
  1018. if (money == "" || money == null || money == undefined) {
  1019. return "零元零角零分";
  1020. }
  1021. money = parseFloat(money);
  1022. if (money >= maxNum) {
  1023. //超出最大处理数字
  1024. return "超出最大处理数字";
  1025. }
  1026. if (money == 0) {
  1027. chineseStr = cnNums[0] + cnIntLast + cnInteger;
  1028. return chineseStr;
  1029. }
  1030. //四舍五入保留两位小数,转换为字符串
  1031. money = Math.round(money * 100).toString();
  1032. integerNum = money.substr(0, money.length - 2);
  1033. decimalNum = money.substr(money.length - 2);
  1034. //获取整型部分转换
  1035. if (parseInt(integerNum, 10) > 0) {
  1036. var zeroCount = 0;
  1037. var IntLen = integerNum.length;
  1038. for (var i = 0; i < IntLen; i++) {
  1039. var n = integerNum.substr(i, 1);
  1040. var p = IntLen - i - 1;
  1041. var q = p / 4;
  1042. var m = p % 4;
  1043. if (n == "0") {
  1044. zeroCount++;
  1045. } else {
  1046. if (zeroCount > 0) {
  1047. chineseStr += cnNums[0];
  1048. }
  1049. //归零
  1050. zeroCount = 0;
  1051. chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
  1052. }
  1053. if (m == 0 && zeroCount < 4) {
  1054. chineseStr += cnIntUnits[q];
  1055. }
  1056. }
  1057. chineseStr += cnIntLast;
  1058. }
  1059. //小数部分
  1060. if (decimalNum != "") {
  1061. var decLen = decimalNum.length;
  1062. for (var i = 0; i < decLen; i++) {
  1063. var n = decimalNum.substr(i, 1);
  1064. if (n != "0") {
  1065. chineseStr += cnNums[Number(n)] + cnDecUnits[i];
  1066. }
  1067. }
  1068. }
  1069. if (chineseStr == "") {
  1070. chineseStr += cnNums[0] + cnIntLast + cnInteger;
  1071. } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
  1072. chineseStr += cnInteger;
  1073. }
  1074. return chineseStr;
  1075. },
  1076. /** 导出按钮操作 */
  1077. handleExport() {
  1078. this.download(
  1079. "sc-service/record/export",
  1080. {
  1081. ...this.queryParams,
  1082. },
  1083. `sc-service_record.xlsx`
  1084. );
  1085. },
  1086. //预览
  1087. handlePreview(row) {
  1088. const pfiUrl = row.pfiUrl;
  1089. const pfiFileName = row.pfiFileName;
  1090. if (row.pfiUrl) {
  1091. console.log(pfiFileName.substr(-3));
  1092. if (pfiFileName.substr(-3) == "pdf") {
  1093. this.wordUrl = pfiUrl + "/" + getToken();
  1094. this.show = false;
  1095. this.heid = true;
  1096. } else if (
  1097. pfiFileName.substr(-3) == "jpg" ||
  1098. pfiFileName.substr(-3) == "png" ||
  1099. pfiFileName.substr(-3) == "JPG" ||
  1100. pfiFileName.substr(-3) == "PNG" ||
  1101. pfiFileName.substr(-4) == "jpeg" ||
  1102. pfiFileName.substr(-3) == "JPEG"
  1103. ) {
  1104. this.wordUrl = pfiUrl + "/" + getToken();
  1105. this.show = true;
  1106. this.heid = false;
  1107. console.log("====>", this.wordUrl);
  1108. } else if (
  1109. pfiFileName.substr(-3) == "doc" ||
  1110. pfiFileName.substr(-3) == "DOC" ||
  1111. pfiFileName.substr(-4) == "docx" ||
  1112. pfiFileName.substr(-3) == "DOCX"
  1113. ) {
  1114. this.wordUrl =
  1115. "https://view.officeapps.live.com/op/view.aspx?src=" +
  1116. pfiUrl +
  1117. "/" +
  1118. getToken() +
  1119. "/" +
  1120. pfiFileName;
  1121. this.show = false;
  1122. this.heid = true;
  1123. console.log("====>", this.wordUrl);
  1124. } else {
  1125. this.$message({
  1126. message: "暂不支持该类型文件预览",
  1127. type: "warning",
  1128. });
  1129. return;
  1130. }
  1131. }
  1132. this.openFile = true;
  1133. },
  1134. // 取消按钮
  1135. cancelFtp() {
  1136. let form = {};
  1137. form.zfrId = this.zfrId;
  1138. cancelContract(form).then((response) => {
  1139. this.cancel();
  1140. });
  1141. this.pdfShowDialog = false;
  1142. },
  1143. //查询有无融资内部审批
  1144. isOpenApproval() {
  1145. var confirmParam = {};
  1146. confirmParam.menuId = "1000000006";
  1147. isOpenApproval(confirmParam).then((response) => {
  1148. var result = response.data.isOpen;
  1149. //有融资内部审批
  1150. if (true == result) {
  1151. this.msgSuccess("已提交内部审批,请内部审批通过后签署融资协议");
  1152. this.cancel();
  1153. } else {
  1154. //无融资内部审批,显示融资合同预览页面
  1155. // this.zfrId = '2c83a92dc238468aabd9cd3261748ae0'
  1156. getRecord(this.zfrId).then((response) => {
  1157. this.zcFinanceInf = response.data.zcFinanceInf;
  1158. this.needPay = response.data.needPay;
  1159. //意愿类型
  1160. this.zfpAuthType = response.data.zfpAuthType;
  1161. this.selectPayment();
  1162. });
  1163. }
  1164. });
  1165. },
  1166. //取消选择意愿
  1167. cancelUpdate() {
  1168. this.confirmIsShow = false;
  1169. this.resetUpdate();
  1170. },
  1171. //关闭盖章短信
  1172. cancelMessage() {
  1173. this.messageIsShow = false;
  1174. this.resetMessage();
  1175. },
  1176. //关闭授权编号激活短信
  1177. cancelMessages() {
  1178. this.messageIfShow = false;
  1179. this.resetMessages();
  1180. },
  1181. //关闭二维码
  1182. cancelFace() {
  1183. this.faceIsShow = false;
  1184. },
  1185. closePdfShow() {
  1186. this.pdfShowDialog = false;
  1187. },
  1188. resetUpdate() {
  1189. this.updateForm = {
  1190. radio: "",
  1191. };
  1192. //意愿类型还原为全部
  1193. this.zfpAuthType = "00";
  1194. this.resetForm("updateForm");
  1195. },
  1196. resetMessage() {
  1197. this.messageForm = {
  1198. validCode: "",
  1199. };
  1200. this.resetForm("messageForm");
  1201. },
  1202. resetMessages() {
  1203. this.messagesForm = {
  1204. validCode: "",
  1205. };
  1206. this.resetForm("messagesForm");
  1207. },
  1208. //获取合同文件
  1209. getContractFile() {
  1210. const loading = this.$loading({
  1211. lock: true,
  1212. text: "Loading",
  1213. background: "rgba(0, 0, 0,0)",
  1214. });
  1215. getContractFile(this.zcFinanceInf)
  1216. .then((response) => {
  1217. loading.close();
  1218. if (response.data.list) {
  1219. this.pdfFileList = response.data.list;
  1220. }
  1221. //文件存在
  1222. if (this.pdfFileList.length > 0) {
  1223. this.pdfShowDialog = true;
  1224. } else {
  1225. this.$message({
  1226. message: "文件不存在!",
  1227. type: "warning",
  1228. });
  1229. }
  1230. })
  1231. .catch((response) => {
  1232. loading.close();
  1233. });
  1234. },
  1235. //缴费查询
  1236. selectPayment() {
  1237. listCompanyHandler().then((response) => {
  1238. var self = this;
  1239. // self.paiAccno = '3115730025233104147';
  1240. if (response.data == true) {
  1241. cfcaProjectNo().then((response) => {
  1242. if (response.data.scyCfcaAuthNumber == null) {
  1243. this.messageIfShow = true;
  1244. } else {
  1245. var zfrId = self.zfrId;
  1246. listChargeStatus(zfrId).then((response) => {
  1247. if (response.data.accInfList[0]) {
  1248. self.paiAccno = response.data.accInfList[0].paiAccno;
  1249. }
  1250. if (response.data.chargeInfList[0]) {
  1251. if (response.data.chargeInfList[0].zciStatus == "00") {
  1252. self.zciId = response.data.chargeInfList[0].zciId;
  1253. self
  1254. .$confirm("请缴纳手续费" + self.needPay + "元", "警告", {
  1255. confirmButtonText: "去缴费",
  1256. cancelButtonText: "取消",
  1257. type: "warning",
  1258. })
  1259. .then(function () {
  1260. const loading = self.$loading({
  1261. lock: true,
  1262. text: "Loading",
  1263. spinner: "el-icon-loading",
  1264. background: "rgba(0, 0, 0, 0.7)",
  1265. });
  1266. if (self.paiAccno) {
  1267. balance(self.paiAccno)
  1268. .then((response) => {
  1269. if (
  1270. eval(self.needPay) > eval(response.data.kyAmt)
  1271. ) {
  1272. self.$message({
  1273. message:
  1274. "余额为" +
  1275. response.data.kyAmt +
  1276. "不足以抵扣本次缴费费用,请及时充值",
  1277. type: "warning",
  1278. });
  1279. loading.close();
  1280. } else {
  1281. console.log();
  1282. var map = {
  1283. recvAccNo: "",
  1284. recvAccNm: "",
  1285. tranAmt: self.needPay,
  1286. businessId: self.zciId,
  1287. type: "00",
  1288. };
  1289. transfer(map)
  1290. .then((response) => {
  1291. loading.close();
  1292. setTimeout(() => {
  1293. if (response.data.status == "1") {
  1294. self.msgSuccess("缴费成功");
  1295. updateChargeStatus(zfrId, "02").then(
  1296. (res) => {
  1297. self.getContractFile();
  1298. }
  1299. );
  1300. } else if (response.data.status == "0") {
  1301. self.message("正在缴费中,请稍后再试");
  1302. updateChargeStatus(zfrId, "01").then(
  1303. (res) => {}
  1304. );
  1305. } else if (response.data.status == "2") {
  1306. self.msgError(
  1307. "缴费失败,前去费用管理再次缴费"
  1308. );
  1309. updateChargeStatus(zfrId, "05").then(
  1310. (res) => {}
  1311. );
  1312. }
  1313. }, 1000);
  1314. })
  1315. .catch(() => {
  1316. loading.close();
  1317. });
  1318. }
  1319. })
  1320. .catch(() => {
  1321. loading.close();
  1322. });
  1323. } else {
  1324. self.$message({
  1325. message: "您还没有电子账户,请联系平台开通电子账户",
  1326. type: "warning",
  1327. });
  1328. loading.close();
  1329. }
  1330. });
  1331. } else {
  1332. self.getContractFile();
  1333. }
  1334. } else {
  1335. self.getContractFile();
  1336. }
  1337. });
  1338. }
  1339. });
  1340. } else {
  1341. this.$message.error("此操作需经办人权限,请确认您是否是经办人");
  1342. }
  1343. });
  1344. },
  1345. //缴费
  1346. selectType() {
  1347. //选择签署意愿
  1348. if (this.zfpAuthType == "00") {
  1349. this.confirmIsShow = true;
  1350. } else {
  1351. this.checking();
  1352. }
  1353. },
  1354. //确认选择
  1355. confirmSelect() {
  1356. if (!this.updateForm.radio) {
  1357. this.$message({
  1358. message: "请选择签署意愿类型",
  1359. type: "warning",
  1360. });
  1361. return;
  1362. }
  1363. this.confirmIsShow = false;
  1364. this.zfpAuthType = this.updateForm.radio;
  1365. //调用人脸识别或者短信验证
  1366. this.checking();
  1367. },
  1368. //去签署
  1369. checking() {
  1370. //人脸
  1371. if (this.zfpAuthType == "01") {
  1372. //调用人脸识别生成二维码
  1373. faceAuth().then((response) => {
  1374. if (response.data) {
  1375. //获取二维码
  1376. this.fileUrl = response.data.fileUrl;
  1377. //获取源流水号
  1378. var originalTxSN = response.data.originalTxSN;
  1379. this.faceIsShow = true;
  1380. //每5秒查证人脸识别结果
  1381. var timeInterval = window.setInterval(() => {
  1382. setTimeout(() => {
  1383. //源流水不为空并且结果为空
  1384. if (originalTxSN && !this.faceResult) {
  1385. this.authForm.originalTxSN = originalTxSN;
  1386. //调用查证方法
  1387. checkFaceAuth(this.authForm).then((res) => {
  1388. //认证结果
  1389. this.faceResult = res.data.Verification;
  1390. //成功
  1391. if (this.faceResult == "20") {
  1392. this.msgSuccess("验证成功");
  1393. //关闭验证码
  1394. this.faceIsShow = false;
  1395. //关闭定时
  1396. window.clearInterval(timeInterval);
  1397. //调用盖章
  1398. this.contractSigning();
  1399. } else if (this.faceResult == "30") {
  1400. this.$message({
  1401. message: "验证失败",
  1402. type: "warning",
  1403. });
  1404. //关闭验证码
  1405. this.faceIsShow = false;
  1406. window.clearInterval(timeInterval);
  1407. }
  1408. });
  1409. }
  1410. }, 0);
  1411. }, 10000);
  1412. }
  1413. });
  1414. } else if (this.zfpAuthType == "02") {
  1415. //短信
  1416. this.messageIsShow = true;
  1417. }
  1418. },
  1419. //发送短信验证码
  1420. send() {
  1421. //发送
  1422. sendMessage().then((response) => {
  1423. if (response.data) {
  1424. //手机号
  1425. var newIphone = response.data.newIphone;
  1426. //结果
  1427. var result = response.data.result;
  1428. //倒计时
  1429. const TIME_COUNT = 60;
  1430. if (!this.timer) {
  1431. this.count = TIME_COUNT;
  1432. this.showCode = false;
  1433. this.timer = setInterval(() => {
  1434. if (this.count > 0 && this.count <= TIME_COUNT) {
  1435. this.count--;
  1436. } else {
  1437. this.showCode = true;
  1438. clearInterval(this.timer);
  1439. this.timer = null;
  1440. }
  1441. }, 1000);
  1442. }
  1443. //成功
  1444. if ("20" == result) {
  1445. this.$message({
  1446. message:
  1447. "已向经办人手机号为" + newIphone + "发送短信验证码,请注意查收",
  1448. type: "warning",
  1449. });
  1450. } else if ("10" == result) {
  1451. //失败
  1452. this.$message({
  1453. message: "短信发送失败",
  1454. type: "warning",
  1455. });
  1456. }
  1457. }
  1458. });
  1459. },
  1460. //校验验证码是否正确
  1461. checkCode() {
  1462. if (!this.messageForm.validCode) {
  1463. this.$message({
  1464. message: "请输入验证码",
  1465. type: "warning",
  1466. });
  1467. return;
  1468. }
  1469. //校验验证码
  1470. checkCode(this.messageForm).then((response) => {
  1471. if (response.data) {
  1472. //结果
  1473. var verification = response.data.verification;
  1474. //匹配
  1475. if ("20" == verification) {
  1476. //进行下一步-- 盖章
  1477. this.contractSigning();
  1478. } else if ("30" == verification) {
  1479. //不匹配
  1480. this.$message({
  1481. message: "验证有误,请重新输入",
  1482. type: "warning",
  1483. });
  1484. }
  1485. }
  1486. });
  1487. },
  1488. //生成项目授权编号发送短信
  1489. proSend() {
  1490. //发送
  1491. projectSendMessage().then((response) => {
  1492. if (response.data) {
  1493. //手机号
  1494. var newIphone = response.data.newIphone;
  1495. //结果
  1496. var result = response.data.result;
  1497. //项目编号
  1498. this.projectCode = response.data.projectCode;
  1499. //倒计时
  1500. const TIME_COUNT = 60;
  1501. if (!this.timerCode) {
  1502. this.countCode = TIME_COUNT;
  1503. this.showCodes = false;
  1504. this.timerCode = setInterval(() => {
  1505. if (this.countCode > 0 && this.countCode <= TIME_COUNT) {
  1506. this.countCode--;
  1507. } else {
  1508. this.showCodes = true;
  1509. clearInterval(this.timerCode);
  1510. this.timerCode = null;
  1511. }
  1512. }, 1000);
  1513. }
  1514. //成功
  1515. if ("60000000" == result) {
  1516. this.$message({
  1517. message:
  1518. "已向经办人手机号为" + newIphone + "发送短信验证码,请注意查收",
  1519. type: "warning",
  1520. });
  1521. } else {
  1522. //失败
  1523. this.$message({
  1524. message: "短信发送失败",
  1525. type: "warning",
  1526. });
  1527. }
  1528. }
  1529. });
  1530. },
  1531. //校验授权编号验证码
  1532. checkProCode() {
  1533. if (!this.projectForm.code) {
  1534. this.$message({
  1535. message: "请输入验证码",
  1536. type: "warning",
  1537. });
  1538. return;
  1539. }
  1540. //项目编号
  1541. this.projectForm.projectCode = this.projectCode;
  1542. //校验验证码
  1543. checkProCode(this.projectForm).then((response) => {
  1544. if (response.data) {
  1545. //结果
  1546. var verification = response.data.verification;
  1547. //匹配
  1548. if ("60000000" == verification) {
  1549. var zfrId = this.zfrId;
  1550. listChargeStatus(zfrId).then((response) => {
  1551. if (response.data[0]) {
  1552. if (response.data[0].zciStatus == "00") {
  1553. this.$confirm("请缴纳手续费" + this.needPay + "元", "警告", {
  1554. confirmButtonText: "去缴费",
  1555. cancelButtonText: "取消",
  1556. type: "warning",
  1557. })
  1558. .then(function () {
  1559. return updateChargeStatus(zfrId);
  1560. })
  1561. .then(() => {
  1562. this.getContractFile();
  1563. });
  1564. } else {
  1565. this.getContractFile();
  1566. }
  1567. } else {
  1568. this.getContractFile();
  1569. }
  1570. });
  1571. } else {
  1572. //不匹配
  1573. this.$message({
  1574. message: "验证有误,请重新输入",
  1575. type: "warning",
  1576. });
  1577. }
  1578. }
  1579. });
  1580. },
  1581. //盖章
  1582. contractSigning() {
  1583. var self = this;
  1584. const loading = this.$loading({
  1585. lock: true,
  1586. text: "Loading",
  1587. background: "rgba(0, 0, 0,0)",
  1588. });
  1589. self.zcFinanceInf.zfrId = self.zfrId;
  1590. contractSigning(self.zcFinanceInf)
  1591. .then((response) => {
  1592. loading.close();
  1593. self.msgSuccess("盖章成功");
  1594. if (self.zfpAuthType == "02") {
  1595. //关闭短信验证
  1596. self.messageIsShow = false;
  1597. } else if (self.zfpAuthType == "01") {
  1598. //关闭人脸二维码
  1599. self.faceIsShow = false;
  1600. }
  1601. //self.closePdfShow();
  1602. //self.$router.push({ path: "/Bill/financeRecord"});
  1603. //self.cancel();
  1604. let queryStamped = {};
  1605. queryStamped.zfrId = this.zfrId
  1606. const load = self.$loading({
  1607. lock: true,
  1608. text: "Loading",
  1609. background: "rgba(0, 0, 0,0)",
  1610. });
  1611. listStamped(queryStamped).then((response) =>{
  1612. if(response.data){
  1613. this.pdfFileList = response.data.list;
  1614. }
  1615. this.pdfShowDialog = true;
  1616. this.pdfIsShow = false;
  1617. load.close()
  1618. }).catch((response) => {
  1619. load.close();
  1620. });
  1621. })
  1622. .catch((response) => {
  1623. loading.close();
  1624. });
  1625. },
  1626. closePDF(){
  1627. //关闭预览合同
  1628. this.closePdfShow();
  1629. this.$router.push({ path: "/Bill/financeRecord"});
  1630. }
  1631. },
  1632. };
  1633. </script>
  1634. <style type="text/css">
  1635. table.gridtable {
  1636. font-size: 11px;
  1637. color: #333333;
  1638. border-width: 1px;
  1639. border-collapse: collapse;
  1640. }
  1641. table.gridtable th {
  1642. border-width: 1px;
  1643. padding: 8px;
  1644. border-style: solid;
  1645. background-color: #dedede;
  1646. }
  1647. table.gridtable td {
  1648. border-width: 1px;
  1649. padding: 8px;
  1650. border-style: solid;
  1651. }
  1652. </style>