index.vue 36 KB

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