index.vue 33 KB

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