Source.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021
  1. <template>
  2. <div>
  3. <div class="p-2">
  4. <el-form
  5. :inline="true"
  6. :model="pageRequest"
  7. size="small"
  8. label-width="120px"
  9. >
  10. <el-row>
  11. <el-col :span="6">
  12. <el-form-item label="车牌号">
  13. <el-input
  14. v-model="pageRequest.licenseno"
  15. placeholder="请输入车牌号"
  16. class="widths"
  17. clearable
  18. ></el-input>
  19. </el-form-item>
  20. </el-col>
  21. <el-col :span="6">
  22. <el-form-item label="险种">
  23. <el-input
  24. v-model="pageRequest.risk"
  25. placeholder="请输入险种"
  26. class="widths"
  27. clearable
  28. ></el-input>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="6">
  32. <el-form-item label="保险公司">
  33. <el-select
  34. v-model="pageRequest.insuranceId"
  35. filterable
  36. class="widths"
  37. clearable
  38. >
  39. <el-option
  40. v-for="val in companyList"
  41. :key="val.id"
  42. :label="val.name"
  43. :value="val.id"
  44. ></el-option>
  45. </el-select>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="6">
  49. <el-form-item label="保司机构">
  50. <el-input
  51. v-model="pageRequest.insuranceDept"
  52. placeholder="请输入保司机构"
  53. class="widths"
  54. clearable
  55. ></el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="6">
  59. <el-form-item label="被保险人">
  60. <el-input
  61. v-model="pageRequest.insuredName"
  62. placeholder="请输入被保险人"
  63. class="widths"
  64. clearable
  65. ></el-input>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="6">
  69. <el-form-item label="结算日期">
  70. <el-date-picker
  71. v-model="clearingTime"
  72. type="daterange"
  73. @change="clearingTimeChange"
  74. start-placeholder="开始日期"
  75. end-placeholder="结束日期"
  76. value-format="yyyy-MM-dd"
  77. clearable
  78. style="width: 250px"
  79. >
  80. </el-date-picker>
  81. </el-form-item>
  82. </el-col>
  83. <el-col :span="6">
  84. <el-form-item label="出单日期">
  85. <el-date-picker
  86. v-model="signingTime"
  87. type="daterange"
  88. @change="signingTimeChange"
  89. start-placeholder="开始日期"
  90. end-placeholder="结束日期"
  91. value-format="yyyy-MM-dd"
  92. style="width: 250px"
  93. clearable
  94. >
  95. </el-date-picker>
  96. </el-form-item>
  97. </el-col>
  98. <el-col :span="6">
  99. <el-form-item label="结算状态">
  100. <el-select
  101. v-model="pageRequest.clearingState"
  102. placeholder="请选择状态"
  103. class="widths"
  104. >
  105. <el-option label="未结算" value="0"></el-option>
  106. <el-option label="已结算" value="1"></el-option>
  107. <el-option label="孤儿单" value="2"></el-option>
  108. </el-select>
  109. </el-form-item>
  110. </el-col>
  111. <el-col :span="6">
  112. <el-form-item label="保司结算状态">
  113. <el-select
  114. v-model="pageRequest.insuranceClearingState"
  115. placeholder="请选择状态"
  116. class="widths"
  117. >
  118. <el-option label="未结算" value="0"></el-option>
  119. <el-option label="已结算" value="1"></el-option>
  120. </el-select>
  121. </el-form-item>
  122. </el-col>
  123. <el-col :span="6">
  124. <el-form-item label="交强保单号">
  125. <el-input
  126. v-model="pageRequest.jqPolicyId"
  127. placeholder="请输入交强保单号"
  128. class="widths"
  129. clearable
  130. ></el-input>
  131. </el-form-item>
  132. </el-col>
  133. <el-col :span="6">
  134. <el-form-item label="商业保单号">
  135. <el-input
  136. v-model="pageRequest.syPolicyId"
  137. placeholder="请输入商业保单号"
  138. class="widths"
  139. clearable
  140. ></el-input>
  141. </el-form-item>
  142. </el-col>
  143. <el-col :span="6">
  144. <el-form-item label="非车保单号">
  145. <el-input
  146. v-model="pageRequest.nonCarPolicyId"
  147. placeholder="请输入非车保单号"
  148. class="widths"
  149. clearable
  150. ></el-input>
  151. </el-form-item>
  152. </el-col>
  153. </el-row>
  154. </el-form>
  155. <div class="flex j-end" style="margin-right: 100px">
  156. <el-button
  157. type="success"
  158. size="small"
  159. @click="createOrUpdateVisible = true"
  160. style="margin-right: 20px"
  161. >新增数据</el-button
  162. >
  163. <el-button
  164. type="primary"
  165. size="small"
  166. @click="Search"
  167. style="margin-right: 20px"
  168. >查询</el-button
  169. >
  170. <el-upload
  171. class="upload-demo"
  172. :auto-upload="false"
  173. :on-change="writeOffUpload"
  174. action="###"
  175. :show-file-list="false"
  176. >
  177. <el-button size="small" type="primary">数据导入</el-button>
  178. </el-upload>
  179. </div>
  180. </div>
  181. <el-main ref="elMain" style="padding: 0px">
  182. <kt-common-table
  183. :SerialShow="false"
  184. :operationWidth="180"
  185. :showOperation="true"
  186. :showSummary="true"
  187. :showSummaryFieldList="['premium', 'nonCopying', 'receivable']"
  188. permsDelete="sys:user:delete"
  189. :showBatchDelete="true"
  190. :showBatchSettled="true"
  191. :showBatchPrint="true"
  192. permsButton1="sys:user:edit"
  193. permsButton2="sys:user:edit"
  194. permsButton3="sys:user:edit"
  195. :data="pageResult"
  196. :columns="columns"
  197. @findPage="findPage"
  198. keyName="id"
  199. settledName="批量修改"
  200. @handleSettled="handleTableSettled"
  201. @handlePrint="handlePrint"
  202. @handleDelete="handleDelete"
  203. button1Name="修改"
  204. button1Background="#E6A23C"
  205. @handleButton1="sourceUpdate"
  206. button1Icon=""
  207. button2Name="删除"
  208. button2Background="#F56C6C"
  209. @handleButton2="sourceDelete"
  210. button2Icon=""
  211. >
  212. </kt-common-table>
  213. </el-main>
  214. <el-dialog
  215. title="信息修改"
  216. :visible.sync="dialogFormVisible"
  217. v-dialogDrag
  218. :close-on-click-modal="false"
  219. width="80%"
  220. >
  221. <el-form
  222. :model="updateform"
  223. :inline="true"
  224. label-width="130px"
  225. size="small"
  226. >
  227. <el-form-item label="险种:">
  228. <el-input
  229. v-model="updateform.risk"
  230. autocomplete="off"
  231. class="widths"
  232. ></el-input>
  233. </el-form-item>
  234. <el-form-item label="交强保费:">
  235. <el-input
  236. v-model="updateform.jqPremiumTax"
  237. autocomplete="off"
  238. class="widths"
  239. ></el-input>
  240. </el-form-item>
  241. <el-form-item label="商业保费:">
  242. <el-input
  243. v-model="updateform.syPremiumTax"
  244. autocomplete="off"
  245. class="widths"
  246. ></el-input>
  247. </el-form-item>
  248. <el-form-item label="非车保费:">
  249. <el-input
  250. v-model="updateform.nonCarPremiumTax"
  251. autocomplete="off"
  252. class="widths"
  253. ></el-input>
  254. </el-form-item>
  255. <el-form-item label="被保险人:">
  256. <el-input
  257. v-model="updateform.insuredName"
  258. autocomplete="off"
  259. class="widths"
  260. ></el-input>
  261. </el-form-item>
  262. <el-form-item label="车牌号:">
  263. <el-input
  264. v-model="updateform.licenseno"
  265. autocomplete="off"
  266. class="widths"
  267. ></el-input>
  268. </el-form-item>
  269. <el-form-item label="交强应收比例:">
  270. <el-input
  271. v-model="updateform.jqReceivableRatio"
  272. autocomplete="off"
  273. class="widths"
  274. ></el-input>
  275. </el-form-item>
  276. <el-form-item label="商业应收比例:">
  277. <el-input
  278. v-model="updateform.syReceivableRatio"
  279. autocomplete="off"
  280. class="widths"
  281. ></el-input>
  282. </el-form-item>
  283. <el-form-item label="非车应收比例:">
  284. <el-input
  285. v-model="updateform.nonCarReceivableRatio"
  286. autocomplete="off"
  287. class="widths"
  288. ></el-input>
  289. </el-form-item>
  290. <el-form-item label="保司结算状态:">
  291. <el-select
  292. v-model="updateform.insuranceClearingState"
  293. placeholder="请选择状态"
  294. class="widths"
  295. >
  296. <el-option
  297. :disabled="insuranceClearingStatedisableStatus"
  298. label="未结算"
  299. value="0"
  300. ></el-option>
  301. <el-option label="已结算" value="1"></el-option>
  302. </el-select>
  303. </el-form-item>
  304. </el-form>
  305. <div slot="footer" class="dialog-footer">
  306. <el-button size="small" @click="dialogFormVisible = false"
  307. >取 消</el-button
  308. >
  309. <el-button size="small" type="primary" @click="updateSubmit"
  310. >确 定</el-button
  311. >
  312. </div>
  313. </el-dialog>
  314. <el-dialog title="批量修改" :visible.sync="dialogUpdateVisible" width="20%">
  315. <el-select
  316. v-model="insuranceClearingState"
  317. placeholder="请选择"
  318. class="widths"
  319. size="small"
  320. >
  321. <el-option disabled label="未结算" value="0"></el-option>
  322. <el-option label="已结算" value="1"></el-option>
  323. </el-select>
  324. <div slot="footer" class="dialog-footer">
  325. <el-button size="small" @click="dialogUpdateVisible = false"
  326. >取 消</el-button
  327. >
  328. <el-button size="small" type="primary" @click="BulkUpdate"
  329. >确 定</el-button
  330. >
  331. </div>
  332. </el-dialog>
  333. <el-dialog
  334. title="新增数据"
  335. :visible.sync="createOrUpdateVisible"
  336. v-dialogDrag
  337. :close-on-click-modal="false"
  338. width="90%"
  339. >
  340. <el-form
  341. :model="createOrUpdateForm"
  342. :inline="true"
  343. label-width="130px"
  344. size="small"
  345. >
  346. <el-form-item label="保险公司">
  347. <el-select
  348. v-model="createOrUpdateForm.insuranceId"
  349. filterable
  350. placeholder="请选择保险公司"
  351. class="widths"
  352. @change="conmpanydropdownEvent"
  353. clearable
  354. >
  355. <el-option
  356. v-for="val in companyList"
  357. :key="val.id"
  358. :label="val.name"
  359. :value="val.id"
  360. ></el-option>
  361. </el-select>
  362. </el-form-item>
  363. <el-form-item label="保司机构">
  364. <el-input
  365. v-model="createOrUpdateForm.insuranceDept"
  366. autocomplete="off"
  367. placeholder="录入保司机构"
  368. class="widths"
  369. ></el-input>
  370. </el-form-item>
  371. <el-form-item label="保司机构代码">
  372. <el-input
  373. v-model="createOrUpdateForm.insuranceDeptId"
  374. autocomplete="off"
  375. placeholder="录入保司机构代码"
  376. class="widths"
  377. ></el-input>
  378. </el-form-item>
  379. <el-form-item label="险种">
  380. <el-input
  381. v-model="createOrUpdateForm.risk"
  382. autocomplete="off"
  383. placeholder="录入险种"
  384. class="widths"
  385. ></el-input>
  386. </el-form-item>
  387. <el-form-item label="交强保单号">
  388. <el-input
  389. v-model="createOrUpdateForm.jqPolicyId"
  390. autocomplete="off"
  391. placeholder="录入交强保单号"
  392. class="widths"
  393. ></el-input>
  394. </el-form-item>
  395. <el-form-item label="交强险保费">
  396. <el-input
  397. v-model="createOrUpdateForm.jqPremiumTax"
  398. autocomplete="off"
  399. placeholder="录入交强险保费"
  400. class="widths"
  401. ></el-input>
  402. </el-form-item>
  403. <el-form-item label="商业保单号">
  404. <el-input
  405. v-model="createOrUpdateForm.syPolicyId"
  406. autocomplete="off"
  407. placeholder="录入商业保单号"
  408. class="widths"
  409. ></el-input>
  410. </el-form-item>
  411. <el-form-item label="商业险保费">
  412. <el-input
  413. v-model="createOrUpdateForm.syPremiumTax"
  414. autocomplete="off"
  415. placeholder="录入商业险保费"
  416. class="widths"
  417. ></el-input>
  418. </el-form-item>
  419. <el-form-item label="非车保单号">
  420. <el-input
  421. v-model="createOrUpdateForm.nonCarPolicyId"
  422. autocomplete="off"
  423. placeholder="录入非车保单号"
  424. class="widths"
  425. ></el-input>
  426. </el-form-item>
  427. <el-form-item label="非车保费">
  428. <el-input
  429. v-model="createOrUpdateForm.nonCarPremiumTax"
  430. autocomplete="off"
  431. placeholder="录入非车保费"
  432. class="widths"
  433. ></el-input>
  434. </el-form-item>
  435. <el-form-item label="被保险人">
  436. <el-input
  437. v-model="createOrUpdateForm.insuredName"
  438. autocomplete="off"
  439. placeholder="录入被保险人"
  440. class="widths"
  441. ></el-input>
  442. </el-form-item>
  443. <el-form-item label="车牌号">
  444. <el-input
  445. v-model="createOrUpdateForm.licenseno"
  446. autocomplete="off"
  447. placeholder="录入车牌号"
  448. class="widths"
  449. ></el-input>
  450. </el-form-item>
  451. <el-form-item label="出单日期">
  452. <el-date-picker
  453. v-model="createOrUpdateForm.signingTime"
  454. type="date"
  455. value-format="yyyy-MM-dd"
  456. style="width: 250px"
  457. clearable
  458. placeholder="选择出单日期"
  459. >
  460. </el-date-picker>
  461. </el-form-item>
  462. <el-form-item label="结算日期">
  463. <el-date-picker
  464. v-model="createOrUpdateForm.clearingTime"
  465. type="date"
  466. value-format="yyyy-MM-dd"
  467. clearable
  468. placeholder="选择结算日期"
  469. style="width: 250px"
  470. >
  471. </el-date-picker>
  472. </el-form-item>
  473. <el-form-item label="车船税">
  474. <el-input
  475. v-model="createOrUpdateForm.taxamount"
  476. autocomplete="off"
  477. placeholder="录入车船税"
  478. class="widths"
  479. ></el-input>
  480. </el-form-item>
  481. <el-form-item label="交强应收比例">
  482. <el-input
  483. v-model="createOrUpdateForm.jqReceivableRatio"
  484. autocomplete="off"
  485. placeholder="录入交强应收比例"
  486. class="widths"
  487. ></el-input>
  488. </el-form-item>
  489. <el-form-item label="交强手续费比例">
  490. <el-input
  491. v-model="createOrUpdateForm.jqPremiumRatio"
  492. autocomplete="off"
  493. placeholder="录入交强手续费比例"
  494. class="widths"
  495. ></el-input>
  496. </el-form-item>
  497. <el-form-item label="交强非跟单比例">
  498. <el-input
  499. v-model="createOrUpdateForm.jqNonCopyingRatio"
  500. autocomplete="off"
  501. placeholder="录入交强非跟单比例"
  502. class="widths"
  503. ></el-input>
  504. </el-form-item>
  505. <el-form-item label="商业应收比例">
  506. <el-input
  507. v-model="createOrUpdateForm.syReceivableRatio"
  508. autocomplete="off"
  509. placeholder="录入商业应收比例"
  510. class="widths"
  511. ></el-input>
  512. </el-form-item>
  513. <el-form-item label="商业手续费比例">
  514. <el-input
  515. v-model="createOrUpdateForm.syPremiumRatio"
  516. autocomplete="off"
  517. placeholder="录入商业手续费比例"
  518. class="widths"
  519. ></el-input>
  520. </el-form-item>
  521. <el-form-item label="商业非跟单比例">
  522. <el-input
  523. v-model="createOrUpdateForm.syNonCopyingRatio"
  524. autocomplete="off"
  525. placeholder="录入商业非跟单比例"
  526. class="widths"
  527. ></el-input>
  528. </el-form-item>
  529. <el-form-item label="非车应收比例">
  530. <el-input
  531. v-model="createOrUpdateForm.nonCarReceivableRatio"
  532. autocomplete="off"
  533. placeholder="录入非车应收比例"
  534. class="widths"
  535. ></el-input>
  536. </el-form-item>
  537. <el-form-item label="非车手续费比例">
  538. <el-input
  539. v-model="createOrUpdateForm.nonCarPremiumRatio"
  540. autocomplete="off"
  541. placeholder="录入非车手续费比例"
  542. class="widths"
  543. ></el-input>
  544. </el-form-item>
  545. <el-form-item label="非车非跟单比例">
  546. <el-input
  547. v-model="createOrUpdateForm.nonCarNonCopyingRatio"
  548. autocomplete="off"
  549. placeholder="录入非车非跟单比例"
  550. class="widths"
  551. ></el-input>
  552. </el-form-item>
  553. <el-form-item label="最大交强应付比例">
  554. <el-input
  555. v-model="createOrUpdateForm.maxJqReceivableRatio"
  556. autocomplete="off"
  557. placeholder="录入最大交强应付比例"
  558. class="widths"
  559. ></el-input>
  560. </el-form-item>
  561. <el-form-item label="最大商业应付比例">
  562. <el-input
  563. v-model="createOrUpdateForm.maxSyReceivableRatio"
  564. autocomplete="off"
  565. placeholder="录入最大商业应付比例"
  566. class="widths"
  567. ></el-input>
  568. </el-form-item>
  569. <el-form-item label="最大非车应付比例">
  570. <el-input
  571. v-model="createOrUpdateForm.maxNonCarReceivableRatio"
  572. autocomplete="off"
  573. placeholder="录入最大非车应付比例"
  574. class="widths"
  575. ></el-input>
  576. </el-form-item>
  577. <el-form-item label="补贴比例">
  578. <el-input
  579. v-model="createOrUpdateForm.subsidyRatio"
  580. autocomplete="off"
  581. placeholder="录入补贴比例"
  582. class="widths"
  583. ></el-input>
  584. </el-form-item>
  585. <el-form-item label="结算状态">
  586. <el-select
  587. v-model="createOrUpdateForm.clearingState"
  588. placeholder="请选择状态"
  589. class="widths"
  590. >
  591. <el-option label="未结算" value="0"></el-option>
  592. <el-option label="已结算" value="1"></el-option>
  593. </el-select>
  594. </el-form-item>
  595. <el-form-item label="保司结算状态">
  596. <el-select
  597. v-model="createOrUpdateForm.insuranceClearingState"
  598. placeholder="请选择状态"
  599. class="widths"
  600. >
  601. <el-option label="未结算" value="0"></el-option>
  602. <el-option label="已结算" value="1"></el-option>
  603. </el-select>
  604. </el-form-item>
  605. </el-form>
  606. <div slot="footer" class="dialog-footer">
  607. <el-button size="small" @click="createOrUpdateVisible = false"
  608. >取 消</el-button
  609. >
  610. <el-button size="small" type="primary" @click="insertData"
  611. >提交</el-button
  612. >
  613. </div>
  614. </el-dialog>
  615. </div>
  616. </template>
  617. <script>
  618. import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
  619. import CommonUtil from "@/utils/comutil.js";
  620. export default {
  621. components: {
  622. KtCommonTable,
  623. },
  624. data() {
  625. return {
  626. insuranceClearingState: "",
  627. clearingTime: [],
  628. signingTime: [],
  629. pageRequest: {
  630. //查询的默认条件
  631. pageNum: 1,
  632. pageSize: 20,
  633. licenseno: "", //车牌号
  634. risk: "", //险种
  635. insuranceId: "", //保险公司
  636. insuredName: "", //被保险人
  637. clearingTime: "", //结算日期
  638. signingTime: "", //出单日期
  639. jqPolicyId: "", //交强保单号
  640. syPolicyId: "", //商业保单号
  641. nonCarPolicyId: "", //非车保单号
  642. insuranceClearingState: "",
  643. insuranceDept: "", //保司机构
  644. },
  645. createOrUpdateVisible: false,
  646. dialogUpdateVisible: false,
  647. dialogFormVisible: false,
  648. // 右侧列表查询数据Start
  649. pageResult: [],
  650. createOrUpdateForm: {
  651. insuranceId: "", //保司编码
  652. insuranceName: "", //保司名称
  653. insuranceDept: "", //保司机构
  654. insuranceDeptId: "", //保司机构代码
  655. risk: "", //险种
  656. jqPolicyId: "", //交强保单号
  657. jqPremiumTax: "", //交强险保费
  658. syPolicyId: "", //商业保单号
  659. syPremiumTax: "", //商业险保费
  660. nonCarPolicyId: "", //非车保单号
  661. nonCarPremiumTax: "", //非车保费
  662. insuredName: "", //被保险人
  663. licenseno: "", //车牌号
  664. signingTime: "", //出单日期
  665. clearingTime: "", //结算日期
  666. taxamount: "", //车船税
  667. jqReceivableRatio: "", //交强应收比例
  668. jqPremiumRatio: "", //交强手续费比例
  669. jqNonCopyingRatio: "", //交强非跟单比例
  670. syReceivableRatio: "", //商业应收比例
  671. syPremiumRatio: "", //商业手续费比例
  672. syNonCopyingRatio: "", //商业非跟单比例
  673. nonCarReceivableRatio: "", //非车应收比例
  674. nonCarPremiumRatio: "", //非车手续费比例
  675. nonCarNonCopyingRatio: "", //非车非跟单比例
  676. maxJqReceivableRatio: "", //最大交强应付比例
  677. maxSyReceivableRatio: "", //最大商业应付比例
  678. maxNonCarReceivableRatio: "", //最大非车应付比例
  679. subsidyRatio: "", //补贴比例
  680. clearingState: "", //结算状态
  681. insuranceClearingState: "", //保司结算状态
  682. },
  683. updateform: {
  684. risk: "",
  685. jqPremiumTax: "",
  686. syPremiumTax: "",
  687. nonCarPremiumTax: "",
  688. insuredName: "",
  689. licenseno: "",
  690. jqReceivableRatio: "",
  691. syReceivableRatio: "",
  692. nonCarReceivableRatio: "",
  693. insuranceClearingState: "",
  694. },
  695. row: {},
  696. companyList: [],
  697. UpdateList: [],
  698. columns: [
  699. //数据列
  700. { prop: "id", label: " 编号", minWidth: 160 },
  701. { prop: "insuranceId", label: "保司编码", minWidth: 120 },
  702. { prop: "insuranceName", label: "保司名称", minWidth: 180 },
  703. { prop: "insuranceDept", label: "保司机构", minWidth: 100 },
  704. { prop: "insuranceDeptId", label: "保司机构代码", minWidth: 100 },
  705. { prop: "risk", label: "险种", minWidth: 100 },
  706. { prop: "jqPolicyId", label: "交强保单号", minWidth: 180 },
  707. { prop: "jqPremiumTax", label: "交强险保费", minWidth: 140 },
  708. {
  709. prop: "jqPremium",
  710. label: "交强险不含税保费",
  711. minWidth: 140,
  712. },
  713. { prop: "syPolicyId", label: "商业保单号", minWidth: 180 },
  714. { prop: "syPremiumTax", label: "商业险保费", minWidth: 140 },
  715. { prop: "syPremium", label: "商业险不含税保费", minWidth: 140 },
  716. { prop: "nonCarPolicyId", label: "非车保单号", minWidth: 180 },
  717. { prop: "nonCarPremiumTax", label: "非车保费", minWidth: 140 },
  718. { prop: "nonCarPremium", label: "非车险不含税保费", minWidth: 140 },
  719. { prop: "insuredName", label: "被保险人", minWidth: 100 },
  720. { prop: "licenseno", label: "车牌号", minWidth: 120 },
  721. { prop: "signingTime", label: "出单日期", minWidth: 160 },
  722. { prop: "clearingTime", label: "结算日期", minWidth: 160 },
  723. { prop: "taxamount", label: "车船税", minWidth: 140 },
  724. { prop: "jqReceivableRatio", label: "交强应收比例", minWidth: 140 },
  725. { prop: "jqPremiumRatio", label: "交强手续费比例", minWidth: 140 },
  726. { prop: "jqNonCopyingRatio", label: "交强非跟单比例", minWidth: 140 },
  727. { prop: "syReceivableRatio", label: "商业应收比例", minWidth: 140 },
  728. { prop: "syPremiumRatio", label: "商业手续费比例", minWidth: 140 },
  729. { prop: "syNonCopyingRatio", label: "商业非跟单比例", minWidth: 140 },
  730. { prop: "nonCarReceivableRatio", label: "非车应收比例", minWidth: 140 },
  731. { prop: "nonCarPremiumRatio", label: "非车手续费比例", minWidth: 140 },
  732. {
  733. prop: "nonCarNonCopyingRatio",
  734. label: "非车非跟单比例",
  735. minWidth: 140,
  736. },
  737. { prop: "premium", label: "手续费金额", minWidth: 140 },
  738. { prop: "nonCopying", label: "非跟单金额", minWidth: 140 },
  739. { prop: "receivable", label: "应收金额", minWidth: 140 },
  740. {
  741. prop: "maxJqReceivableRatio",
  742. label: "最大交强应付比例",
  743. minWidth: 140,
  744. },
  745. {
  746. prop: "maxSyReceivableRatio",
  747. label: "最大商业应付比例",
  748. minWidth: 140,
  749. },
  750. {
  751. prop: "maxNonCarReceivableRatio",
  752. label: "最大非车应付比例",
  753. minWidth: 140,
  754. },
  755. { prop: "maxReceivable", label: "最大应付金额", minWidth: 140 },
  756. { prop: "subsidyRatio", label: "补贴比例", minWidth: 140 },
  757. { prop: "subsidyAmount", label: "补贴金额", minWidth: 140 },
  758. { prop: "totalReceivableAmount", label: "总应收金额", minWidth: 140 },
  759. {
  760. prop: "clearingState",
  761. label: "结算状态",
  762. minWidth: 140,
  763. },
  764. {
  765. prop: "insuranceClearingState",
  766. label: "保司结算状态",
  767. minWidth: 140,
  768. },
  769. ],
  770. insuranceClearingStatedisableStatus: false,
  771. };
  772. },
  773. created() {
  774. this.companyInt();
  775. },
  776. mounted() {},
  777. methods: {
  778. //新增数据
  779. insertData() {
  780. this.$api.task
  781. .sourceaddReceivable(this.createOrUpdateForm)
  782. .then((res) => {
  783. if (res.code == "200") {
  784. this.$message({
  785. type: "success",
  786. message: res.msg,
  787. });
  788. this.createOrUpdateVisible = false;
  789. this.findPage();
  790. } else {
  791. this.$message({
  792. type: "error",
  793. message: res.msg,
  794. });
  795. }
  796. });
  797. },
  798. conmpanydropdownEvent(val) {
  799. const selectedLabel = this.companyList.find(
  800. (option) => option.id === val
  801. ).name;
  802. this.createOrUpdateForm.insuranceName = selectedLabel;
  803. },
  804. //接口传值处理
  805. clearingTimeChange(e) {
  806. if (e == null) {
  807. this.pageRequest.clearingTime = "";
  808. } else {
  809. this.pageRequest.clearingTime = e.toString();
  810. }
  811. },
  812. signingTimeChange(e) {
  813. if (e == null) {
  814. this.pageRequest.signingTime = "";
  815. } else {
  816. this.pageRequest.signingTime = e.toString();
  817. }
  818. },
  819. //保险公司查询
  820. companyInt() {
  821. this.$api.letter.gainTopList().then((res) => {
  822. this.companyList = res.data;
  823. });
  824. },
  825. //附件上传
  826. writeOffUpload(file) {
  827. var file = file.raw;
  828. const params = new FormData(); // 声明formData数据类型
  829. params.append("multipartFile", file);
  830. params.append("type", "settle");
  831. this.$api.letter.uploadFile(params).then((res) => {
  832. if (res.code == "200") {
  833. let url = process.env.BASE_URL + res.data.url;
  834. this.$api.task.SourceExcel(url).then((res) => {
  835. if (res.code == "200") {
  836. this.$message({
  837. type: "success",
  838. message: res.msg,
  839. });
  840. this.findPage();
  841. } else {
  842. this.$message({
  843. type: "error",
  844. message: res.msg,
  845. });
  846. }
  847. });
  848. }
  849. });
  850. },
  851. handleDelete(ids) {
  852. this.$confirm("此操作将永久删除, 是否继续?", "提示", {
  853. confirmButtonText: "确定",
  854. cancelButtonText: "取消",
  855. type: "warning",
  856. })
  857. .then(() => {
  858. this.$api.task.sourcedeletes(ids).then((res) => {
  859. if (res.code == "200") {
  860. this.$message({
  861. type: "success",
  862. message: "删除成功!",
  863. });
  864. this.findPage();
  865. } else {
  866. this.$message({
  867. type: "error",
  868. message: res.msg,
  869. });
  870. }
  871. });
  872. })
  873. .catch(() => {
  874. this.$message({
  875. type: "info",
  876. message: "已取消删除",
  877. });
  878. });
  879. },
  880. //批量修改
  881. handleTableSettled(ids) {
  882. console.log(ids);
  883. this.UpdateList = ids;
  884. this.dialogUpdateVisible = true;
  885. },
  886. BulkUpdate() {
  887. let params = {
  888. ids: this.UpdateList,
  889. insuranceClearingState: this.insuranceClearingState,
  890. };
  891. this.$api.task.sourceUpdates(params).then((res) => {
  892. if (res.code == "200") {
  893. this.$message({
  894. type: "success",
  895. message: "修改成功!",
  896. });
  897. this.dialogUpdateVisible = false;
  898. this.findPage();
  899. } else {
  900. this.$message({
  901. type: "error",
  902. message: res.msg,
  903. });
  904. }
  905. });
  906. },
  907. Search() {
  908. this.findPage();
  909. },
  910. sourceUpdate({ row, column }) {
  911. if (row.insuranceClearingState == "已结算") {
  912. this.insuranceClearingStatedisableStatus = true;
  913. } else {
  914. this.insuranceClearingStatedisableStatus = false;
  915. }
  916. this.dialogFormVisible = true;
  917. const shallowCopy = Object.assign({}, row);
  918. this.updateform = shallowCopy;
  919. },
  920. sourceDelete({ row, column }) {
  921. this.$confirm("是否确认删除?", "提示", {
  922. confirmButtonText: "确定",
  923. cancelButtonText: "取消",
  924. type: "error",
  925. })
  926. .then(() => {
  927. this.$api.task.sourcedeleteReceivable([row.id]).then((res) => {
  928. if (res.code == "200") {
  929. this.$message({
  930. type: "success",
  931. message: res.msg,
  932. });
  933. this.findPage();
  934. } else {
  935. this.$message({
  936. type: "error",
  937. message: res.msg,
  938. });
  939. }
  940. });
  941. })
  942. .catch(() => {});
  943. },
  944. updateSubmit() {
  945. this.$api.task.SourceUpdate(this.updateform).then((res) => {
  946. if (res.code == "200") {
  947. this.$message({
  948. type: "success",
  949. message: res.msg,
  950. });
  951. this.dialogFormVisible = false;
  952. this.findPage();
  953. } else {
  954. this.$message({
  955. type: "error",
  956. message: res.msg,
  957. });
  958. }
  959. });
  960. },
  961. handlePrint() {
  962. this.$api.task.sourceExport(this.pageRequest).then((res) => {
  963. let url = process.env.BASE_URL + res.msg;
  964. // 4.创建url之后可以模拟对此文件对象的一系列操作,例如:预览、下载
  965. let a = document.createElement("a");
  966. a.href = url;
  967. a.download = "应收来源表.xlsx";
  968. a.click();
  969. // 5.释放这个临时的对象url
  970. window.URL.revokeObjectURL(url);
  971. });
  972. },
  973. //联级选择器触发事件
  974. handleChange(val) {
  975. if (val.length !== 0) {
  976. this.pageRequest.deptId = val.at(-1);
  977. } else {
  978. this.pageRequest.deptId = "";
  979. }
  980. },
  981. //-- formatter begin--
  982. //点击查询按钮
  983. //--数据字典 begin --
  984. getDictItems: function (typeName) {
  985. let that = this;
  986. that.$api.dict
  987. .findByLableName(typeName)
  988. .then(function (res) {
  989. that[typeName + "options"] = res.data; // 把获取到的数据赋给this.data
  990. })
  991. .catch(function (error) {
  992. that[typeName + "options"] = [];
  993. });
  994. },
  995. //--数据字典 end --
  996. // 右侧列表的方法Start
  997. findPage(data) {
  998. // 获取分页数据
  999. let that = this;
  1000. if (data && data.pageRequest) {
  1001. this.pageRequest.pageNum = data.pageRequest.pageNum;
  1002. this.pageRequest.pageSize = data.pageRequest.pageSize;
  1003. }
  1004. that.$api.task
  1005. .SourceExcelPage(that.pageRequest)
  1006. .then((res) => {
  1007. that.pageResult = res.data;
  1008. })
  1009. .then(data != null ? data.callback : "");
  1010. },
  1011. },
  1012. };
  1013. </script>
  1014. <style lang="scss" scoped>
  1015. .widths {
  1016. width: 250px;
  1017. }
  1018. </style>