index.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  1. <template>
  2. <div class="app-container">
  3. <div v-show="jiGang == false">
  4. <el-form
  5. :model="query"
  6. ref="queryForm"
  7. v-show="showSearch"
  8. :inline="true"
  9. label-width="88px"
  10. >
  11. <el-row>
  12. <el-form-item label="参考编号" prop="fMblno">
  13. <el-input
  14. v-model="query.fMblno"
  15. placeholder="请输入参考编号"
  16. clearable
  17. size="small"
  18. />
  19. </el-form-item>
  20. <el-form-item label="客户名称" prop="fCorpid">
  21. <el-select
  22. v-model="query.fCorpid"
  23. filterable
  24. remote
  25. placeholder="客户名称"
  26. >
  27. <el-option
  28. v-for="(dict, index) in KHblnoOptions"
  29. :key="index.fId"
  30. :label="dict.fName"
  31. :value="dict.fId"
  32. ></el-option>
  33. </el-select>
  34. </el-form-item>
  35. <el-form-item>
  36. <el-button
  37. type="cyan"
  38. icon="el-icon-search"
  39. size="mini"
  40. @click="getList"
  41. >搜索
  42. </el-button>
  43. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置
  44. </el-button>
  45. </el-form-item>
  46. </el-row>
  47. </el-form>
  48. <el-row :gutter="10" class="mb8">
  49. <el-col :span="1.5">
  50. <el-button
  51. type="primary"
  52. icon="el-icon-plus"
  53. size="mini"
  54. @click="handleAdd()"
  55. v-hasPermi="['finance:other:add']"
  56. >新增
  57. </el-button>
  58. </el-col>
  59. <el-col :span="1.5">
  60. <el-button
  61. type="success"
  62. icon="el-icon-edit"
  63. size="mini"
  64. :disabled="single"
  65. @click="handleUpdate"
  66. v-hasPermi="['finance:other:edit']"
  67. >修改
  68. </el-button>
  69. </el-col>
  70. <!-- <el-col :span="1.5">-->
  71. <!-- <el-button-->
  72. <!-- type="danger"-->
  73. <!-- icon="el-icon-delete"-->
  74. <!-- size="mini"-->
  75. <!-- :disabled="multiple"-->
  76. <!-- @click="handleDelete"-->
  77. <!-- v-hasPermi="['agreement:agreementTask:remove']"-->
  78. <!-- >删除-->
  79. <!-- </el-button>-->
  80. <!-- </el-col>-->
  81. <!-- <el-col :span="1.5">-->
  82. <!-- <el-button-->
  83. <!-- type="info"-->
  84. <!-- icon="el-icon-download"-->
  85. <!-- size="mini"-->
  86. <!-- :disabled="single"-->
  87. <!-- @click="handleUpdate(null, 2)"-->
  88. <!-- v-hasPermi="['agreement:agreementStorage:export']"-->
  89. <!-- >复制新增-->
  90. <!-- </el-button>-->
  91. <!-- </el-col>-->
  92. <right-toolbar
  93. :showSearch.sync="showSearch"
  94. @queryTable="getList"
  95. ></right-toolbar>
  96. </el-row>
  97. <el-table
  98. v-loading="loading"
  99. :data="agreementList"
  100. @selection-change="handleSelectionChange"
  101. >
  102. <el-table-column type="selection" width="55" align="center"/>
  103. <el-table-column type="index" label="行号" align="center" fixed width="60"/>
  104. <el-table-column
  105. label="参考编号"
  106. sortable
  107. align="center"
  108. prop="fMblno"
  109. fixed
  110. show-overflow-tooltip
  111. />
  112. <el-table-column
  113. label="船名"
  114. sortable
  115. align="center"
  116. prop="shipsName"
  117. fixed
  118. show-overflow-tooltip
  119. />
  120. <el-table-column
  121. label="航次"
  122. sortable
  123. align="center"
  124. prop="voyage"
  125. fixed
  126. show-overflow-tooltip
  127. />
  128. <el-table-column
  129. label="单据类型"
  130. sortable
  131. align="center"
  132. prop="fBilltype"
  133. fixed
  134. show-overflow-tooltip
  135. />
  136. <el-table-column
  137. label="单据编号"
  138. sortable
  139. align="center"
  140. prop="fBillno"
  141. fixed
  142. show-overflow-tooltip
  143. />
  144. <el-table-column
  145. label="单据日期"
  146. sortable
  147. align="center"
  148. prop="fBsdate"
  149. fixed
  150. show-overflow-tooltip
  151. />
  152. <el-table-column
  153. label="制单人"
  154. sortable
  155. align="center"
  156. prop="createBy"
  157. fixed
  158. show-overflow-tooltip
  159. />
  160. <el-table-column
  161. label="备注"
  162. sortable
  163. align="center"
  164. prop="remark"
  165. fixed
  166. show-overflow-tooltip
  167. />
  168. <el-table-column
  169. label="操作"
  170. align="center"
  171. fixed="right"
  172. width="180"
  173. class-name="small-padding fixed-width"
  174. >
  175. <template slot-scope="scope">
  176. <el-button
  177. size="mini"
  178. type="text"
  179. icon="el-icon-view"
  180. @click="handleUpdate(scope.row)"
  181. >查看
  182. </el-button>
  183. <el-button
  184. size="mini"
  185. type="text"
  186. icon="el-icon-edit"
  187. @click="handleUpdate(scope.row)"
  188. v-if="scope.row.fBillstatus === '暂存'"
  189. v-hasPermi="['finance:other:edit']"
  190. >修改
  191. </el-button>
  192. <el-button
  193. size="mini"
  194. type="text"
  195. icon="el-icon-delete"
  196. @click="handleDelete(scope.row)"
  197. v-if="scope.row.fBillstatus === '暂存'"
  198. v-hasPermi="['finance:other:remove']"
  199. >删除
  200. </el-button>
  201. </template>
  202. </el-table-column>
  203. </el-table>
  204. <div style="padding-top: 10px;float: right;padding-bottom: 20px">
  205. <el-pagination
  206. @size-change="handleSizeChange"
  207. @current-change="handleCurrentChange"
  208. :page-sizes="[10, 20, 30, 40]"
  209. background
  210. layout="sizes, prev, pager, next"
  211. :total="total">
  212. </el-pagination>
  213. </div>
  214. </div>
  215. <div v-show="jiGang == true">
  216. <div style="margin-bottom: 20px;">
  217. <el-button round icon="el-icon-arrow-left" @click="open" size="small">返回列表</el-button>
  218. <el-button type="primary" round size="small" @click="submitForm" icon="el-icon-edit">保 存</el-button>
  219. <el-button type="success" round size="small" @click="submit" icon="el-icon-check" :disabled="disabled">提 交</el-button>
  220. <el-button type="danger" round size="small" icon="el-icon-close" @click="cancellation" v-hasPermi="['finance:other:revoke']"
  221. v-if="queryParams.fBillstatus >2">撤销提交
  222. </el-button>
  223. </div>
  224. <el-form
  225. :model="queryParams"
  226. ref="rules"
  227. :rules="rules"
  228. :inline="true"
  229. label-width="88px"
  230. >
  231. <el-row>
  232. <el-form-item label="日期" prop="fBsdate">
  233. <el-date-picker
  234. v-model="queryParams.fBsdate"
  235. type="date"
  236. style="width: 200px;"
  237. value-format="yyyy-MM-dd"
  238. :disabled="disabled"
  239. clearable
  240. size="small"
  241. placeholder="选择日期"
  242. >
  243. </el-date-picker>
  244. </el-form-item>
  245. <el-form-item label="参考编号" prop="fMblno">
  246. <el-input
  247. v-model="queryParams.fMblno"
  248. placeholder="请输入参考编号"
  249. style="width: 200px;"
  250. :disabled="disabled"
  251. clearable
  252. size="small"
  253. />
  254. </el-form-item>
  255. <el-form-item label="单据编号" prop="fBillno">
  256. <el-input
  257. v-model="queryParams.fBillno"
  258. placeholder="请输入单据编号"
  259. style="width: 200px;"
  260. disabled
  261. clearable
  262. size="small"
  263. />
  264. </el-form-item>
  265. <el-form-item label="船名">
  266. <template slot-scope="scope">
  267. <el-select
  268. v-model="queryParams.fVslid"
  269. style="width: 200px;"
  270. size="small"
  271. placeholder="请选择船名"
  272. filterable
  273. >
  274. <el-option
  275. v-for="item in TVesselfs"
  276. :key="item.fId"
  277. :label="item.fName"
  278. :value="item.fId"
  279. />
  280. </el-select>
  281. </template>
  282. </el-form-item>
  283. <el-form-item
  284. prop="fVoyid"
  285. header-align="center"
  286. label="航次"
  287. >
  288. <template slot-scope="scope">
  289. <el-select
  290. v-model="queryParams.fVoyid"
  291. size="small"
  292. style="width: 200px;"
  293. placeholder="请选择航次"
  294. filterable
  295. >
  296. <el-option
  297. v-for="item in TVoyagefs"
  298. :key="item.fId"
  299. :label="item.fNo"
  300. :value="item.fId"
  301. />
  302. </el-select>
  303. </template>
  304. </el-form-item>
  305. <el-form-item label="备注" prop="remark">
  306. <el-input
  307. v-model="queryParams.remark"
  308. placeholder="请输入备注"
  309. :disabled="disabled"
  310. style="width: 796px;"
  311. clearable
  312. size="small"
  313. />
  314. </el-form-item>
  315. </el-row>
  316. </el-form>
  317. <h3><i class="el-icon-circle-plus"></i>收款信息</h3>
  318. <div
  319. class="dialogTableTitle flex a-center jlr"
  320. style="
  321. display: flex;
  322. justify-content: space-between;
  323. align-items: center;
  324. margin: 10px 0;
  325. "
  326. >
  327. <div>
  328. <el-button
  329. size="small"
  330. type="primary"
  331. @click.prevent="addCollection()"
  332. :disabled="disabled"
  333. >新行
  334. </el-button>
  335. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  336. >删除
  337. </el-button> -->
  338. </div>
  339. </div>
  340. <el-table
  341. :data="warehouseDrList"
  342. ref="table"
  343. tooltip-effect="dark"
  344. border
  345. stripe
  346. show-summary
  347. :disabled="disabled"
  348. :summary-method="warehouseDrSummaries"
  349. >
  350. <el-table-column type="selection" width="55" align="center"/>
  351. <el-table-column label="序号" type="index" width="80">
  352. </el-table-column>
  353. <el-table-column
  354. prop="fCorpid"
  355. header-align="center"
  356. align="center"
  357. width="180px"
  358. label="客户名称"
  359. >
  360. <template slot-scope="scope">
  361. <el-select
  362. v-model="scope.row.fCorpid"
  363. filterable
  364. remote
  365. placeholder="客户名称"
  366. :disabled="disabled"
  367. >
  368. <el-option
  369. v-for="(dict, index) in KHblnoOptions"
  370. :key="index.fId"
  371. :label="dict.fName"
  372. :value="dict.fId"
  373. ></el-option>
  374. </el-select>
  375. </template>
  376. </el-table-column>
  377. <!-- <el-table-column-->
  378. <!-- prop="fFeeunitid"-->
  379. <!-- header-align="center"-->
  380. <!-- align="center"-->
  381. <!-- width="180px"-->
  382. <!-- label="码头"-->
  383. <!-- >-->
  384. <!-- <template slot-scope="scope">-->
  385. <!-- <el-select-->
  386. <!-- style="width: 80%"-->
  387. <!-- v-model="scope.row.fFeeunitid"-->
  388. <!-- filterable-->
  389. <!-- :disabled="disabled"-->
  390. <!-- >-->
  391. <!-- <el-option-->
  392. <!-- v-for="(dict, index) in businessTypeOption"-->
  393. <!-- :key="index.dictValue"-->
  394. <!-- :label="dict.dictLabel"-->
  395. <!-- :value="dict.dictValue"-->
  396. <!-- ></el-option>-->
  397. <!-- </el-select>-->
  398. <!-- </template>-->
  399. <!-- </el-table-column>-->
  400. <el-table-column
  401. prop="fFeeid"
  402. header-align="center"
  403. align="center"
  404. width="180px"
  405. label="费用名称"
  406. >
  407. <template slot-scope="scope">
  408. <el-select
  409. style="width: 80%"
  410. v-model="scope.row.fFeeid"
  411. filterable
  412. :disabled="disabled"
  413. >
  414. <el-option
  415. v-for="(dict, index) in fDNameOptions"
  416. :key="index.fId"
  417. :label="dict.fName"
  418. :value="dict.fId"
  419. ></el-option>
  420. </el-select>
  421. </template>
  422. </el-table-column>
  423. <el-table-column
  424. prop="fFeeUnitid"
  425. header-align="center"
  426. align="center"
  427. width="180px"
  428. label="计费单位"
  429. >
  430. <template slot-scope="scope">
  431. <el-select
  432. v-model="scope.row.fFeeunitid"
  433. placeholder="请选择计费单位"
  434. :disabled="disabled"
  435. clearable
  436. >
  437. <el-option
  438. v-for="dict in fFeetUnitOptions"
  439. :key="dict.dictValue"
  440. :label="dict.dictLabel"
  441. :value="dict.dictValue"
  442. />
  443. </el-select>
  444. </template>
  445. </el-table-column>
  446. <!-- <el-table-column-->
  447. <!-- prop="fInventoryDays"-->
  448. <!-- header-align="center"-->
  449. <!-- align="center"-->
  450. <!-- width="180px"-->
  451. <!-- label="箱型"-->
  452. <!-- >-->
  453. <!-- <template slot-scope="scope">-->
  454. <!-- <el-select-->
  455. <!-- v-model="scope.row.fInventoryDays"-->
  456. <!-- placeholder="请选择箱型"-->
  457. <!-- clearable-->
  458. <!-- :disabled="disabled"-->
  459. <!-- >-->
  460. <!-- <el-option-->
  461. <!-- v-for="(dict, index) in jFeetunitOptions"-->
  462. <!-- :key="index.fId"-->
  463. <!-- :label="dict.fNo"-->
  464. <!-- :value="dict.fId"-->
  465. <!-- />-->
  466. <!-- </el-select>-->
  467. <!-- </template>-->
  468. <!-- </el-table-column>-->
  469. <el-table-column
  470. prop="fQty"
  471. header-align="center"
  472. align="center"
  473. width="130px"
  474. label="数量"
  475. >
  476. <template slot-scope="scope">
  477. <el-input
  478. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  479. v-model="scope.row.fQty"
  480. placeholder="数量"
  481. @input="calculation(scope.row)"
  482. show-word-limit
  483. :disabled="disabled"
  484. />
  485. </template>
  486. </el-table-column>
  487. <el-table-column
  488. prop="fUnitprice"
  489. header-align="center"
  490. align="center"
  491. width="130px"
  492. label="单价"
  493. >
  494. <template slot-scope="scope">
  495. <el-input
  496. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  497. v-model="scope.row.fUnitprice"
  498. placeholder="单价"
  499. show-word-limit
  500. @input="calculation(scope.row)"
  501. :disabled="disabled"
  502. />
  503. </template>
  504. </el-table-column>
  505. <el-table-column
  506. prop="fAmt"
  507. header-align="center"
  508. align="center"
  509. width="130px"
  510. label="金额"
  511. >
  512. <template slot-scope="scope">
  513. <el-input
  514. :disabled="disabled"
  515. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  516. v-model="scope.row.fAmt"
  517. placeholder="金额"
  518. show-word-limit
  519. />
  520. </template>
  521. </el-table-column>
  522. <el-table-column
  523. prop="fCurrency"
  524. header-align="center"
  525. align="center"
  526. width="130px"
  527. label="币别"
  528. >
  529. <template slot-scope="scope">
  530. <el-select
  531. v-model="scope.row.fCurrency"
  532. placeholder="请选择币别"
  533. :disabled="disabled"
  534. clearable
  535. >
  536. <el-option
  537. v-for="dict in currencyList"
  538. :key="dict.dictValue"
  539. :label="dict.dictLabel"
  540. :value="dict.dictValue"
  541. />
  542. </el-select>
  543. </template>
  544. </el-table-column>
  545. <el-table-column
  546. prop="fExrate"
  547. header-align="center"
  548. align="center"
  549. width="130px"
  550. label="汇率"
  551. >
  552. <template slot-scope="scope">
  553. <el-input
  554. v-model="scope.row.fExrate"
  555. :disabled="disabled"
  556. placeholder="汇率"
  557. show-word-limit
  558. />
  559. </template>
  560. </el-table-column>
  561. <el-table-column
  562. prop="remark"
  563. header-align="center"
  564. align="center"
  565. width="150px"
  566. label="备注"
  567. >
  568. <template slot-scope="scope">
  569. <el-input
  570. v-model="scope.row.remark"
  571. :disabled="browseStatus || scope.row.fBillstatus == 6"
  572. placeholder="备注"
  573. show-word-limit
  574. />
  575. </template>
  576. </el-table-column>
  577. <el-table-column
  578. header-align="center"
  579. align="center"
  580. label="操作"
  581. >
  582. <template slot-scope="scope">
  583. <el-button
  584. @click.native.prevent="
  585. deleteRow(scope.$index, warehouseDrList)
  586. "
  587. size="small"
  588. :disabled="disabled"
  589. >移除
  590. </el-button
  591. >
  592. </template>
  593. </el-table-column>
  594. </el-table>
  595. <h3><i class="el-icon-remove"></i>付款信息</h3>
  596. <div
  597. class="dialogTableTitle flex a-center jlr"
  598. style="
  599. display: flex;
  600. justify-content: space-between;
  601. align-items: center;
  602. margin: 10px 0;
  603. "
  604. >
  605. <div>
  606. <el-button
  607. type="primary"
  608. @click.prevent="addpayment()"
  609. size="small"
  610. :disabled="disabled"
  611. >新行
  612. </el-button>
  613. </div>
  614. </div>
  615. <el-table
  616. :data="warehouseCrList"
  617. :disabled="disabled"
  618. ref="table"
  619. tooltip-effect="dark"
  620. border
  621. stripe
  622. show-summary
  623. :summary-method="warehouseDrSummaries"
  624. >
  625. <el-table-column type="selection" width="55" align="center"/>
  626. <el-table-column label="序号" type="index" width="80">
  627. </el-table-column>
  628. <el-table-column
  629. prop="fCorpid"
  630. header-align="center"
  631. align="center"
  632. width="180px"
  633. label="客户名称"
  634. >
  635. <template slot-scope="scope">
  636. <el-select
  637. v-model="scope.row.fCorpid"
  638. filterable
  639. remote
  640. placeholder="客户名称"
  641. :disabled="disabled"
  642. >
  643. <el-option
  644. v-for="(dict, index) in KHblnoOptions"
  645. :key="index.fId"
  646. :label="dict.fName"
  647. :value="dict.fId"
  648. ></el-option>
  649. </el-select>
  650. </template>
  651. </el-table-column>
  652. <!-- <el-table-column-->
  653. <!-- prop="fFeeunitid"-->
  654. <!-- header-align="center"-->
  655. <!-- align="center"-->
  656. <!-- width="180px"-->
  657. <!-- label="码头"-->
  658. <!-- >-->
  659. <!-- <template slot-scope="scope">-->
  660. <!-- <el-select-->
  661. <!-- style="width: 80%"-->
  662. <!-- v-model="scope.row.fFeeunitid"-->
  663. <!-- filterable-->
  664. <!-- :disabled="disabled"-->
  665. <!-- >-->
  666. <!-- <el-option-->
  667. <!-- v-for="(dict, index) in businessTypeOption"-->
  668. <!-- :key="index.dictValue"-->
  669. <!-- :label="dict.dictLabel"-->
  670. <!-- :value="dict.dictValue"-->
  671. <!-- ></el-option>-->
  672. <!-- </el-select>-->
  673. <!-- </template>-->
  674. <!-- </el-table-column>-->
  675. <el-table-column
  676. prop="fFeeid"
  677. header-align="center"
  678. align="center"
  679. width="180px"
  680. label="费用名称"
  681. >
  682. <template slot-scope="scope">
  683. <el-select
  684. style="width: 80%"
  685. v-model="scope.row.fFeeid"
  686. filterable
  687. :disabled="disabled"
  688. >
  689. <el-option
  690. v-for="(dict, index) in fCNameOptions"
  691. :key="index.fId"
  692. :label="dict.fName"
  693. :value="dict.fId"
  694. ></el-option>
  695. </el-select>
  696. </template>
  697. </el-table-column>
  698. <el-table-column
  699. prop="fFeeUnitid"
  700. header-align="center"
  701. align="center"
  702. width="180px"
  703. label="计费单位"
  704. >
  705. <template slot-scope="scope">
  706. <el-select
  707. v-model="scope.row.fFeeunitid"
  708. placeholder="请选择计费单位"
  709. :disabled="disabled"
  710. clearable
  711. >
  712. <el-option
  713. v-for="dict in fFeetUnitOptions"
  714. :key="dict.dictValue"
  715. :label="dict.dictLabel"
  716. :value="dict.dictValue"
  717. />
  718. </el-select>
  719. </template>
  720. </el-table-column>
  721. <!-- <el-table-column-->
  722. <!-- prop="fInventoryDays"-->
  723. <!-- header-align="center"-->
  724. <!-- align="center"-->
  725. <!-- width="180px"-->
  726. <!-- label="箱型"-->
  727. <!-- >-->
  728. <!-- <template slot-scope="scope">-->
  729. <!-- <el-select-->
  730. <!-- v-model="scope.row.fInventoryDays"-->
  731. <!-- placeholder="请选择箱型"-->
  732. <!-- clearable-->
  733. <!-- :disabled="disabled"-->
  734. <!-- >-->
  735. <!-- <el-option-->
  736. <!-- v-for="(dict, index) in jFeetunitOptions"-->
  737. <!-- :key="index.fId"-->
  738. <!-- :label="dict.fNo"-->
  739. <!-- :value="dict.fId"-->
  740. <!-- />-->
  741. <!-- </el-select>-->
  742. <!-- </template>-->
  743. <!-- </el-table-column>-->
  744. <el-table-column
  745. prop="fQty"
  746. header-align="center"
  747. align="center"
  748. width="130px"
  749. label="数量"
  750. >
  751. <template slot-scope="scope">
  752. <el-input
  753. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  754. v-model="scope.row.fQty"
  755. placeholder="数量"
  756. @input="calculation(scope.row)"
  757. show-word-limit
  758. :disabled="disabled"
  759. />
  760. </template>
  761. </el-table-column>
  762. <el-table-column
  763. prop="fUnitprice"
  764. header-align="center"
  765. align="center"
  766. width="130px"
  767. label="单价"
  768. >
  769. <template slot-scope="scope">
  770. <el-input
  771. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  772. v-model="scope.row.fUnitprice"
  773. placeholder="单价"
  774. show-word-limit
  775. @input="calculation(scope.row)"
  776. :disabled="disabled"
  777. />
  778. </template>
  779. </el-table-column>
  780. <el-table-column
  781. prop="fAmt"
  782. header-align="center"
  783. align="center"
  784. width="130px"
  785. label="金额"
  786. >
  787. <template slot-scope="scope">
  788. <el-input
  789. :disabled="disabled"
  790. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  791. v-model="scope.row.fAmt"
  792. placeholder="金额"
  793. show-word-limit
  794. />
  795. </template>
  796. </el-table-column>
  797. <el-table-column
  798. prop="fCurrency"
  799. header-align="center"
  800. align="center"
  801. width="130px"
  802. label="币别"
  803. >
  804. <template slot-scope="scope">
  805. <el-select
  806. v-model="scope.row.fCurrency"
  807. placeholder="请选择币别"
  808. :disabled="disabled"
  809. clearable
  810. >
  811. <el-option
  812. v-for="dict in currencyList"
  813. :key="dict.dictValue"
  814. :label="dict.dictLabel"
  815. :value="dict.dictValue"
  816. />
  817. </el-select>
  818. </template>
  819. </el-table-column>
  820. <el-table-column
  821. prop="fExrate"
  822. header-align="center"
  823. align="center"
  824. width="130px"
  825. label="汇率"
  826. >
  827. <template slot-scope="scope">
  828. <el-input
  829. v-model="scope.row.fExrate"
  830. :disabled="disabled"
  831. placeholder="汇率"
  832. show-word-limit
  833. />
  834. </template>
  835. </el-table-column>
  836. <el-table-column
  837. prop="remark"
  838. header-align="center"
  839. align="center"
  840. width="150px"
  841. label="备注"
  842. >
  843. <template slot-scope="scope">
  844. <el-input
  845. v-model="scope.row.remark"
  846. :disabled="browseStatus || scope.row.fBillstatus == 6"
  847. placeholder="备注"
  848. show-word-limit
  849. />
  850. </template>
  851. </el-table-column>
  852. <el-table-column
  853. header-align="center"
  854. align="center"
  855. label="操作"
  856. >
  857. <template slot-scope="scope">
  858. <!-- <el-button size="small">审核费用</el-button> -->
  859. <el-button
  860. @click.native.prevent="
  861. deleteRow(scope.$index, warehouseCrList)
  862. "
  863. size="small"
  864. :disabled="disabled"
  865. >移除
  866. </el-button
  867. >
  868. </template>
  869. </el-table-column>
  870. </el-table>
  871. </div>
  872. </div>
  873. </template>
  874. <script>
  875. import {
  876. listCorps,
  877. preservation,
  878. submit,
  879. allInformation,
  880. single,
  881. singleDeletion,
  882. listCorps_s,
  883. revokeContainerPort
  884. } from '@/api/otherFinancial'
  885. import {listFees} from '@/api/basicdata/fees'
  886. import {selectTVesself, selectTVoyagef} from "@/api/finance/kaihe/payment";
  887. export default {
  888. name: 'jiGang',
  889. data() {
  890. return {
  891. rules:{
  892. fBsdate:[{required: true, message: ' ', trigger: 'blur'}],
  893. fMblno:[{required: true, message: ' ', trigger: 'blur'}]
  894. },
  895. showSearch: true,
  896. jiGang: false,
  897. disabled: false,
  898. agreementList: [],
  899. warehouseCrList: [],
  900. fCNameOptions: [],
  901. fFeeid_s: [],
  902. fStltypeOptions: [],
  903. jFeetunitOptions: [],
  904. KHblnoOptions: [],
  905. browseStatus: false,
  906. fDNameOptions: [],
  907. warehouseDrList: [],
  908. businessTypeOption: [],
  909. loading: true,
  910. blnoOptions: [],
  911. single: true,
  912. total: 0,
  913. query: {
  914. pageNum: 1,
  915. pageSize: 10
  916. },
  917. selection: [],
  918. queryParams: {},
  919. fFeetUnitOptions:[],
  920. currencyList:[],
  921. TVesselfs:[],
  922. TVoyagefs:[]
  923. }
  924. },
  925. created() {
  926. selectTVesself().then((res) => {
  927. this.TVesselfs = res.rows;
  928. });
  929. selectTVoyagef().then((res) => {
  930. this.TVoyagefs = res.rows;
  931. });
  932. this.getDicts("currency_difference").then((response) => {
  933. this.currencyList = response.data;
  934. });
  935. this.corpsRemoteMethod()
  936. //付费
  937. listFees({fDc: "C"}).then((response) => {
  938. this.fCNameOptions = response.rows;
  939. });
  940. //收费
  941. listFees({fDc: "D"}).then((response) => {
  942. this.fDNameOptions = response.rows;
  943. });
  944. this.getDicts("data_unitfees").then((response) => {
  945. this.fFeetUnitOptions = response.data;
  946. });
  947. allInformation().then(res => {
  948. if (res.data.corpList) {
  949. this.KHblnoOptions = res.data.corpList
  950. }
  951. if (res.data.pierList) {
  952. this.businessTypeOption = res.data.pierList
  953. }
  954. if (res.data.cntrList) {
  955. this.jFeetunitOptions = res.data.cntrList
  956. }
  957. if (res.data.fees) {
  958. this.fFeeid_s = res.data.fees
  959. }
  960. })
  961. this.getList()
  962. },
  963. methods: {
  964. handleSizeChange(val) {
  965. console.log(`每页 ${val} 条`);
  966. this.query.pageSize = val
  967. this.getList()
  968. },
  969. handleCurrentChange(val) {
  970. console.log(`当前页: ${val}`);
  971. this.query.pageNum = val
  972. this.getList()
  973. },
  974. getList() {
  975. listCorps_s(this.query).then(res => {
  976. this.total = res.total
  977. this.loading = false
  978. this.agreementList = res.rows
  979. })
  980. },
  981. corpsRemoteMethod(name) {
  982. if (name == null || name === '') {
  983. return false
  984. }
  985. let queryParams = {pageNum: 1, fName: name, fTypeid: 1}
  986. listCorps(queryParams).then((response) => {
  987. console.log(response)
  988. this.fMblnoOptions = response.rows
  989. })
  990. },
  991. corpsRemote(name) {
  992. if (name == null || name === '') {
  993. return false
  994. }
  995. let queryParams = {pageNum: 1, fName: name, fTypeid: 2}
  996. listCorps(queryParams).then((response) => {
  997. console.log(response)
  998. this.blnoOptions = response.rows
  999. })
  1000. },
  1001. changeFeeId(row) {
  1002. for (let li in this.fWbuOptions) {
  1003. if (row.fFeeid === this.fWbuOptions[li].fId) {
  1004. this.$set(row, 'fFeeunitid', this.fWbuOptions[li].fFeeunitid + '')
  1005. this.changeFeeUnit(row)
  1006. break
  1007. }
  1008. }
  1009. },
  1010. resetQuery() {
  1011. this.query = {
  1012. pageNum: 1,
  1013. pageSize: 10
  1014. }
  1015. },
  1016. open() {
  1017. this.$confirm('是否确定返回列表?', '提示', {
  1018. confirmButtonText: '确定',
  1019. cancelButtonText: '取消',
  1020. type: 'warning'
  1021. }).then(() => {
  1022. this.jiGang = false
  1023. }).catch(() => {
  1024. })
  1025. },
  1026. handleSelectionChange(selection) {
  1027. console.log(selection)
  1028. this.selection = selection
  1029. if (selection.length === 1) {
  1030. this.single = false
  1031. } else {
  1032. this.single = true
  1033. }
  1034. },
  1035. handleUpdate(row) {
  1036. let fId
  1037. if (this.selection.length == 1) {
  1038. fId = this.selection[0].fId
  1039. } else {
  1040. fId = row.fId
  1041. }
  1042. single(fId).then(res => {
  1043. if (res.code === 200) {
  1044. this.jiGang = true
  1045. this.queryParams = res.data.warehouseBills
  1046. this.warehouseDrList = res.data.feesDrList
  1047. this.warehouseCrList = res.data.feesCrList
  1048. for (let item in this.warehouseDrList){
  1049. this.warehouseDrList[item].fFeeunitid = this.warehouseDrList[item].fFeeunitid + ''
  1050. }
  1051. for (let item in this.warehouseCrList){
  1052. this.warehouseCrList[item].fFeeunitid = this.warehouseCrList[item].fFeeunitid + ''
  1053. }
  1054. if (this.queryParams.fBillstatus !== 2) {
  1055. this.disabled = true
  1056. } else {
  1057. this.disabled = false
  1058. }
  1059. }
  1060. })
  1061. },
  1062. handleDelete(row) {
  1063. singleDeletion(row.fId).then(res => {
  1064. console.log(res)
  1065. if (res.code === 200){
  1066. this.$message.success(res.msg);
  1067. this.getList()
  1068. }
  1069. })
  1070. },
  1071. handleAdd() {
  1072. this.jiGang = true
  1073. this.disabled = false
  1074. this.queryParams = {}
  1075. this.warehouseDrList = []
  1076. this.warehouseCrList = []
  1077. },
  1078. addpayment() {
  1079. this.warehouseCrList.push({
  1080. fCorpid:'',
  1081. fFeeid:'',
  1082. fFeeUnitid:'',
  1083. fUnitprice:'',
  1084. fAmt:'',
  1085. fExrate:'',
  1086. remark:'',
  1087. fCurrency:'1'
  1088. })
  1089. this.fWbuOptions = []
  1090. let queryParams = {pageNum: 1, fDc: 'C'}
  1091. listFees(queryParams).then((response) => {
  1092. this.fCNameOptions = response.rows
  1093. })
  1094. },
  1095. deleteRow(index, rows) {
  1096. rows.splice(index, 1)
  1097. },
  1098. submitForm() {
  1099. this.$refs["rules"].validate((valid) => {
  1100. if (valid) {
  1101. let formDatae = new window.FormData()
  1102. formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
  1103. formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
  1104. formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
  1105. preservation(formDatae).then(res => {
  1106. console.log(res)
  1107. if (res.code === 200) {
  1108. this.$message.success('保存成功');
  1109. this.getList()
  1110. this.jiGang = false
  1111. }
  1112. })
  1113. }
  1114. });
  1115. },
  1116. submit() {
  1117. this.$refs["rules"].validate((valid) => {
  1118. if (valid) {
  1119. let formDatae = new window.FormData()
  1120. formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
  1121. formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
  1122. formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
  1123. submit(formDatae).then(res => {
  1124. console.log(res)
  1125. if (res.code === 200) {
  1126. this.$message.success('提交成功');
  1127. this.getList()
  1128. this.jiGang = false
  1129. }
  1130. })
  1131. }
  1132. });
  1133. },
  1134. cancellation() {
  1135. // let formDatae = new window.FormData()
  1136. // formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
  1137. // formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
  1138. // formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
  1139. revokeContainerPort(this.queryParams.fId).then(res => {
  1140. console.log(res)
  1141. if (res.code === 200) {
  1142. this.$message.success('撤销成功');
  1143. this.getList()
  1144. this.jiGang = false
  1145. }
  1146. })
  1147. },
  1148. calculation(row) {
  1149. console.log(row)
  1150. if (row.fQty && row.fUnitprice) {
  1151. row.fAmt = Number(row.fQty) * Number(row.fUnitprice)
  1152. }
  1153. },
  1154. addCollection() {
  1155. this.warehouseDrList.push({
  1156. fCorpid:'',
  1157. fFeeid:'',
  1158. fFeeUnitid:'',
  1159. fUnitprice:'',
  1160. fAmt:'',
  1161. fExrate:'',
  1162. remark:'',
  1163. fCurrency:'1'
  1164. })
  1165. this.fWbuOptions = []
  1166. let queryParams = {pageNum: 1, fDc: 'D'}
  1167. listFees(queryParams).then((response) => {
  1168. this.fDNameOptions = response.rows
  1169. })
  1170. },
  1171. // 付款合计
  1172. warehouseDrSummaries(param) {
  1173. const {columns, data} = param
  1174. const sums = []
  1175. columns.forEach((column, index) => {
  1176. if (index === 0) {
  1177. sums[index] = '合计'
  1178. return
  1179. }
  1180. const values = data.map((item) => Number(item[column.property]))
  1181. if (
  1182. column.property === 'fUnitprice' ||
  1183. column.property === 'fAmount' ||
  1184. column.property === 'fQty' ||
  1185. column.property === 'fQty' ||
  1186. column.property === 'fAmt'
  1187. ) {
  1188. sums[index] = values.reduce((prev, curr) => {
  1189. const value = Number(curr)
  1190. if (!isNaN(value)) {
  1191. return prev + curr
  1192. } else {
  1193. return prev
  1194. }
  1195. }, 0)
  1196. sums[index] = sums[index].toFixed(2)
  1197. }
  1198. })
  1199. return sums
  1200. },
  1201. }
  1202. }
  1203. </script>
  1204. <style scoped lang="scss">
  1205. </style>