goFinance.vue 48 KB

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