jigangeject.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. label-width="88px"
  8. >
  9. <el-row>
  10. <el-form-item label="日期" prop="fBsdate">
  11. <el-input
  12. v-model="queryParams.fBsdate"
  13. placeholder="请输入日期"
  14. clearable
  15. size="small"
  16. />
  17. </el-form-item>
  18. <el-form-item label="提单号" prop="fMblno">
  19. <el-input
  20. v-model="queryParams.fMblno"
  21. placeholder="请输入提单号"
  22. clearable
  23. size="small"
  24. />
  25. </el-form-item>
  26. <el-form-item label="制单人" prop="createBy">
  27. <el-input
  28. v-model="queryParams.createBy"
  29. placeholder="请输入制单人"
  30. clearable
  31. size="small"
  32. />
  33. </el-form-item>
  34. </el-row>
  35. </el-form>
  36. <h3><i class="el-icon-circle-plus"></i>收款信息</h3>
  37. <div
  38. class="dialogTableTitle flex a-center jlr"
  39. style="
  40. display: flex;
  41. justify-content: space-between;
  42. align-items: center;
  43. margin: 10px 0;
  44. "
  45. >
  46. <div>
  47. <el-button
  48. size="small"
  49. type="primary"
  50. @click.prevent="addCollection()"
  51. >新行
  52. </el-button>
  53. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  54. >删除
  55. </el-button> -->
  56. <el-button
  57. type="primary"
  58. size="small"
  59. @click="submitForm(2)"
  60. >保 存</el-button
  61. >
  62. </div>
  63. </div>
  64. <el-table
  65. :data="warehouseDrList"
  66. ref="table"
  67. tooltip-effect="dark"
  68. border
  69. stripe
  70. show-summary
  71. @selection-change="Collectionoptions"
  72. :summary-method="warehouseDrSummaries"
  73. >
  74. <el-table-column type="selection" width="55" align="center" />
  75. <el-table-column label="序号" type="index" width="80">
  76. </el-table-column>
  77. <el-table-column
  78. prop="fCorpid"
  79. header-align="center"
  80. align="center"
  81. width="180px"
  82. label="客户名称"
  83. >
  84. <template slot-scope="scope">
  85. <el-select
  86. v-model="scope.row.fCorpid"
  87. filterable
  88. remote
  89. :remote-method="corpsRemoteMethod"
  90. placeholder="客户名称"
  91. >
  92. <el-option
  93. v-for="(dict, index) in KHblnoOptions"
  94. :key="index.fId"
  95. :label="dict.fName"
  96. :value="dict.fId"
  97. ></el-option>
  98. </el-select>
  99. </template>
  100. </el-table-column>
  101. <el-table-column
  102. prop="fFeeid"
  103. header-align="center"
  104. align="center"
  105. width="180px"
  106. label="费用名称"
  107. >
  108. <template slot-scope="scope">
  109. <el-select
  110. v-model="scope.row.fFeeid"
  111. filterable
  112. remote
  113. :remote-method="fWRemoteMethod"
  114. @change="changeFeeId(scope.row)"
  115. placeholder="费用名称"
  116. >
  117. <el-option
  118. v-for="(dict, index) in fDNameOptions"
  119. :key="index.fId"
  120. :label="dict.fName"
  121. :value="dict.fId"
  122. ></el-option>
  123. </el-select>
  124. </template>
  125. </el-table-column>
  126. <el-table-column
  127. prop="fBusinessType"
  128. header-align="center"
  129. align="center"
  130. width="180px"
  131. label="作业类型"
  132. >
  133. <template slot-scope="scope">
  134. <el-select
  135. style="width: 80%"
  136. v-model="scope.row.fBusinessType"
  137. filterable
  138. disabled
  139. >
  140. <el-option
  141. v-for="(dict, index) in businessTypeOption"
  142. :key="index.dictValue"
  143. :label="dict.dictLabel"
  144. :value="dict.dictValue"
  145. ></el-option>
  146. </el-select>
  147. </template>
  148. </el-table-column>
  149. <el-table-column
  150. prop="fFeeUnitid"
  151. header-align="center"
  152. align="center"
  153. width="180px"
  154. label="计价单位"
  155. >
  156. <template slot-scope="scope">
  157. <el-select
  158. v-model="scope.row.fFeeUnitid"
  159. placeholder="请选择计价单位"
  160. @change="changeFeeUnit(scope.row)"
  161. clearable
  162. >
  163. <el-option
  164. v-for="(dict, index) in jFeetunitOptions"
  165. :key="index.dictValue"
  166. :label="dict.dictLabel"
  167. :value="dict.dictValue"
  168. />
  169. </el-select>
  170. </template>
  171. </el-table-column>
  172. <el-table-column
  173. prop="fQty"
  174. header-align="center"
  175. align="center"
  176. width="130px"
  177. label="数量"
  178. >
  179. <template slot-scope="scope">
  180. <el-input
  181. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  182. v-model="scope.row.fQty"
  183. placeholder="数量"
  184. @change="changeContractAmt(scope.row)"
  185. show-word-limit
  186. />
  187. </template>
  188. </el-table-column>
  189. <el-table-column
  190. prop="fUnitprice"
  191. header-align="center"
  192. align="center"
  193. width="130px"
  194. label="单价"
  195. >
  196. <template slot-scope="scope">
  197. <el-input
  198. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  199. v-model="scope.row.fUnitprice"
  200. placeholder="单价"
  201. @change="changeContractAmt(scope.row)"
  202. show-word-limit
  203. />
  204. </template>
  205. </el-table-column>
  206. <el-table-column
  207. prop="fAmount"
  208. header-align="center"
  209. align="center"
  210. width="130px"
  211. label="金额"
  212. >
  213. <template slot-scope="scope">
  214. <el-input
  215. disabled
  216. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  217. v-model="scope.row.fAmount"
  218. placeholder="金额"
  219. show-word-limit
  220. />
  221. </template>
  222. </el-table-column>
  223. <el-table-column
  224. prop="fStltypeid"
  225. header-align="center"
  226. align="center"
  227. width="130px"
  228. label="结算方式"
  229. >
  230. <template slot-scope="scope">
  231. <el-select
  232. v-model="scope.row.fStltypeid"
  233. placeholder="请选择结算表票结、月结"
  234. >
  235. <el-option
  236. v-for="(dict, index) in fStltypeOptions"
  237. :key="index.dictValue"
  238. :label="dict.dictLabel"
  239. :value="parseInt(dict.dictValue)"
  240. ></el-option>
  241. </el-select>
  242. </template>
  243. </el-table-column>
  244. <el-table-column
  245. prop="fCurrency"
  246. header-align="center"
  247. align="center"
  248. width="130px"
  249. label="币别"
  250. >
  251. <template slot-scope="scope">
  252. <el-input
  253. v-model="scope.row.fCurrency"
  254. placeholder="币别"
  255. show-word-limit
  256. />
  257. </template>
  258. </el-table-column>
  259. <el-table-column
  260. prop="fExrate"
  261. header-align="center"
  262. align="center"
  263. width="130px"
  264. label="汇率"
  265. >
  266. <template slot-scope="scope">
  267. <el-input
  268. v-model="scope.row.fExrate"
  269. placeholder="汇率"
  270. show-word-limit
  271. />
  272. </template>
  273. </el-table-column>
  274. <el-table-column
  275. prop="fTaxrate"
  276. header-align="center"
  277. align="center"
  278. width="130px"
  279. label="税率"
  280. >
  281. <template slot-scope="scope">
  282. <el-input
  283. v-model="scope.row.fTaxrate"
  284. :disabled="browseStatus"
  285. placeholder="税率"
  286. show-word-limit
  287. />
  288. </template>
  289. </el-table-column>
  290. <el-table-column
  291. prop="fMblno"
  292. header-align="center"
  293. align="center"
  294. width="130px"
  295. label="提单号"
  296. >
  297. <template slot-scope="scope">
  298. <el-input
  299. v-model="scope.row.fMblno"
  300. :disabled="browseStatus"
  301. placeholder="提单号"
  302. show-word-limit
  303. />
  304. </template>
  305. </el-table-column>
  306. <el-table-column
  307. prop="fProductName"
  308. header-align="center"
  309. align="center"
  310. width="140px"
  311. label="品名"
  312. >
  313. <template slot-scope="scope">
  314. <el-input
  315. v-model="scope.row.fProductName"
  316. :disabled="browseStatus"
  317. placeholder="品名"
  318. show-word-limit
  319. />
  320. </template>
  321. </el-table-column>
  322. <el-table-column
  323. prop="fMarks"
  324. header-align="center"
  325. align="center"
  326. width="130px"
  327. label="品牌"
  328. >
  329. <template slot-scope="scope">
  330. <el-input
  331. v-model="scope.row.fMarks"
  332. :disabled="browseStatus"
  333. placeholder="品牌"
  334. show-word-limit
  335. />
  336. </template>
  337. </el-table-column>
  338. <el-table-column
  339. prop="fSrcTypeId"
  340. header-align="center"
  341. align="center"
  342. width="130px"
  343. label="来源"
  344. >
  345. <template slot-scope="scope">
  346. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  347. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  348. </template>
  349. </el-table-column>
  350. <el-table-column
  351. prop="remarks"
  352. header-align="center"
  353. align="center"
  354. width="150px"
  355. label="备注"
  356. >
  357. <template slot-scope="scope">
  358. <el-input
  359. v-model="scope.row.Remarks"
  360. :disabled="browseStatus"
  361. placeholder="备注"
  362. show-word-limit
  363. />
  364. </template>
  365. </el-table-column>
  366. <el-table-column
  367. header-align="center"
  368. align="center"
  369. label="操作"
  370. width="200px"
  371. >
  372. <template slot-scope="scope">
  373. <el-button
  374. @click.native.prevent="
  375. deleteRow(scope.$index, warehouseDrList)
  376. "
  377. size="small"
  378. :disabled="browseStatus"
  379. >移除</el-button
  380. >
  381. </template>
  382. </el-table-column>
  383. </el-table>
  384. <h3><i class="el-icon-remove"></i>付款信息</h3>
  385. <div
  386. class="dialogTableTitle flex a-center jlr"
  387. style="
  388. display: flex;
  389. justify-content: space-between;
  390. align-items: center;
  391. margin: 10px 0;
  392. "
  393. >
  394. <div>
  395. <el-button
  396. type="primary"
  397. @click.prevent="addpayment()"
  398. size="small"
  399. >新行
  400. </el-button>
  401. <el-button
  402. type="primary"
  403. size="small"
  404. >保 存</el-button
  405. >
  406. </div>
  407. </div>
  408. <el-table
  409. :data="warehouseCrList"
  410. ref="table"
  411. tooltip-effect="dark"
  412. border
  413. stripe
  414. show-summary
  415. :summary-method="warehouseDrSummaries"
  416. >
  417. <el-table-column type="selection" width="55" align="center" />
  418. <el-table-column label="序号" type="index" width="80">
  419. </el-table-column>
  420. <el-table-column
  421. prop="fCorpid"
  422. header-align="center"
  423. align="center"
  424. width="180px"
  425. label="客户名称"
  426. >
  427. <template slot-scope="scope">
  428. <el-select
  429. v-model="scope.row.fCorpid"
  430. filterable
  431. remote
  432. :disabled="browseStatus"
  433. :remote-method="corpsRemoteMethod"
  434. placeholder="客户名称"
  435. >
  436. <el-option
  437. v-for="(dict, index) in KHblnoOptions"
  438. :key="index.fId"
  439. :label="dict.fName"
  440. :value="dict.fId"
  441. ></el-option>
  442. </el-select>
  443. </template>
  444. </el-table-column>
  445. <el-table-column
  446. prop="fFeeid"
  447. header-align="center"
  448. align="center"
  449. width="180px"
  450. label="费用名称"
  451. >
  452. <template slot-scope="scope">
  453. <el-select
  454. v-model="scope.row.fFeeid"
  455. filterable
  456. :disabled="browseStatus"
  457. remote
  458. :remote-method="fWRemoteMethod"
  459. @change="changeFeeId(scope.row)"
  460. placeholder="费用名称"
  461. >
  462. <el-option
  463. v-for="(dict, index) in fCNameOptions"
  464. :key="index.fId"
  465. :label="dict.fName"
  466. :value="dict.fId"
  467. ></el-option>
  468. </el-select>
  469. </template>
  470. </el-table-column>
  471. <el-table-column
  472. prop="fBusinessType"
  473. header-align="center"
  474. align="center"
  475. width="180px"
  476. label="作业类型"
  477. >
  478. <template slot-scope="scope">
  479. <el-select
  480. style="width: 80%"
  481. v-model="scope.row.fBusinessType"
  482. filterable
  483. disabled
  484. >
  485. <el-option
  486. v-for="(dict, index) in businessTypeOption"
  487. :key="index.dictValue"
  488. :label="dict.dictLabel"
  489. :value="dict.dictValue"
  490. ></el-option>
  491. </el-select>
  492. </template>
  493. </el-table-column>
  494. <el-table-column
  495. prop="fFeeUnitid"
  496. header-align="center"
  497. align="center"
  498. width="180px"
  499. label="计价单位"
  500. >
  501. <template slot-scope="scope">
  502. <el-select
  503. v-model="scope.row.fFeeUnitid"
  504. filterable
  505. remote
  506. @change="changeFeeUnit(scope.row)"
  507. :disabled="browseStatus"
  508. :remote-method="corpsRemoteMethod"
  509. placeholder="计价单位"
  510. >
  511. <el-option
  512. v-for="(dict, index) in jFeetunitOptions"
  513. :key="index.dictValue"
  514. :label="dict.dictLabel"
  515. :value="dict.dictValue"
  516. ></el-option>
  517. </el-select>
  518. </template>
  519. </el-table-column>
  520. <el-table-column
  521. prop="fQty"
  522. header-align="center"
  523. align="center"
  524. width="150px"
  525. label="数量"
  526. >
  527. <template slot-scope="scope">
  528. <el-input
  529. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  530. v-model="scope.row.fQty"
  531. :disabled="browseStatus"
  532. @change="changeContractAmt(scope.row)"
  533. placeholder="数量"
  534. show-word-limit
  535. />
  536. </template>
  537. </el-table-column>
  538. <el-table-column
  539. prop="fUnitprice"
  540. header-align="center"
  541. align="center"
  542. width="150px"
  543. label="单价"
  544. >
  545. <template slot-scope="scope">
  546. <el-input
  547. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  548. v-model="scope.row.fUnitprice"
  549. :disabled="browseStatus || scope.row.fSrcTypeId !== 0"
  550. @change="changeContractAmt(scope.row)"
  551. placeholder="单价"
  552. show-word-limit
  553. />
  554. </template>
  555. </el-table-column>
  556. <el-table-column
  557. prop="fAmount"
  558. header-align="center"
  559. align="center"
  560. width="150px"
  561. label="金额"
  562. >
  563. <template slot-scope="scope">
  564. <el-input
  565. disabled
  566. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  567. v-model="scope.row.fAmount"
  568. placeholder="金额"
  569. show-word-limit
  570. />
  571. </template>
  572. </el-table-column>
  573. <el-table-column
  574. prop="fStltypeid"
  575. header-align="center"
  576. align="center"
  577. width="130px"
  578. label="结算方式"
  579. >
  580. <template slot-scope="scope">
  581. <el-select
  582. v-model="scope.row.fStltypeid"
  583. placeholder="请选择结算表票结、月结"
  584. :disabled="browseStatus"
  585. >
  586. <el-option
  587. v-for="(dict, index) in fStltypeOptions"
  588. :key="index.dictValue"
  589. :label="dict.dictLabel"
  590. :value="parseInt(dict.dictValue)"
  591. ></el-option>
  592. </el-select>
  593. </template>
  594. </el-table-column>
  595. <el-table-column
  596. prop="fCurrency"
  597. header-align="center"
  598. align="center"
  599. width="150px"
  600. label="币别"
  601. >
  602. <template slot-scope="scope">
  603. <el-input
  604. v-model="scope.row.fCurrency"
  605. :disabled="browseStatus"
  606. placeholder="币别"
  607. show-word-limit
  608. />
  609. </template>
  610. </el-table-column>
  611. <el-table-column
  612. prop="fExrate"
  613. header-align="center"
  614. align="center"
  615. width="150px"
  616. label="汇率"
  617. >
  618. <template slot-scope="scope">
  619. <el-input
  620. v-model="scope.row.fExrate"
  621. :disabled="browseStatus"
  622. placeholder="汇率"
  623. show-word-limit
  624. />
  625. </template>
  626. </el-table-column>
  627. <el-table-column
  628. prop="fTaxrate"
  629. header-align="center"
  630. align="center"
  631. width="150px"
  632. label="税率"
  633. >
  634. <template slot-scope="scope">
  635. <el-input
  636. v-model="scope.row.fTaxrate"
  637. :disabled="browseStatus"
  638. placeholder="税率"
  639. show-word-limit
  640. />
  641. </template>
  642. </el-table-column>
  643. <el-table-column
  644. prop="fMblno"
  645. header-align="center"
  646. align="center"
  647. width="130px"
  648. label="提单号"
  649. >
  650. <template slot-scope="scope">
  651. <el-input
  652. v-model="scope.row.fMblno"
  653. :disabled="browseStatus"
  654. placeholder="提单号"
  655. show-word-limit
  656. />
  657. </template>
  658. </el-table-column>
  659. <el-table-column
  660. prop="fProductName"
  661. header-align="center"
  662. align="center"
  663. width="140px"
  664. label="品名"
  665. >
  666. <template slot-scope="scope">
  667. <el-input
  668. v-model="scope.row.fProductName"
  669. :disabled="browseStatus"
  670. placeholder="品名"
  671. show-word-limit
  672. />
  673. </template>
  674. </el-table-column>
  675. <el-table-column
  676. prop="fMarks"
  677. header-align="center"
  678. align="center"
  679. width="130px"
  680. label="品牌"
  681. >
  682. <template slot-scope="scope">
  683. <el-input
  684. v-model="scope.row.fMarks"
  685. :disabled="browseStatus"
  686. placeholder="品牌"
  687. show-word-limit
  688. />
  689. </template>
  690. </el-table-column>
  691. <el-table-column
  692. prop="fSrcTypeId"
  693. header-align="center"
  694. align="center"
  695. width="130px"
  696. label="来源"
  697. >
  698. <template slot-scope="scope">
  699. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  700. <span v-if="scope.row.fSrcTypeId !== 0">协议</span>
  701. </template>
  702. </el-table-column>
  703. <el-table-column
  704. prop="remarks"
  705. header-align="center"
  706. align="center"
  707. width="150px"
  708. label="备注"
  709. >
  710. <template slot-scope="scope">
  711. <el-input
  712. v-model="scope.row.remarks"
  713. :disabled="browseStatus"
  714. placeholder="备注"
  715. show-word-limit
  716. />
  717. </template>
  718. </el-table-column>
  719. <el-table-column
  720. header-align="center"
  721. align="center"
  722. width="200px"
  723. label="操作"
  724. >
  725. <template slot-scope="scope">
  726. <!-- <el-button size="small">审核费用</el-button> -->
  727. <el-button
  728. @click.native.prevent="
  729. deleteRoww(scope.$index, warehouseCrList)
  730. "
  731. size="small"
  732. :disabled="browseStatus"
  733. >移除</el-button
  734. >
  735. </template>
  736. </el-table-column>
  737. </el-table>
  738. </div>
  739. </template>
  740. <script>
  741. import { listFees } from '@/api/basicdata/fees'
  742. import { listCorps } from '@/api/basicdata/corps'
  743. export default {
  744. name: 'jigangeject',
  745. data() {
  746. return {
  747. queryParams:[],
  748. warehouseCrList:[],
  749. fCNameOptions:[],
  750. jFeetunitOptions:[],
  751. browseStatus:false,
  752. fDNameOptions:[],
  753. warehouseDrList:[]
  754. }
  755. },
  756. created() {
  757. this.getDicts("data_unitfees").then((response) => {
  758. if (response.data) {
  759. this.jFeetunitOptions = response.data;
  760. }
  761. });
  762. },
  763. methods: {
  764. addpayment() {
  765. this.warehouseCrList.push({
  766. fCorpid: null,
  767. fFeeid: null,
  768. fFeeUnitid: "",
  769. fQty: null,
  770. fUnitprice: null,
  771. fAmount: null,
  772. fCurrency: "RMB",
  773. fExrate: "1",
  774. fTaxrate: '',
  775. fCxrate: null,
  776. fRate: null,
  777. remarks: null,
  778. fMblno: '',
  779. fProductName: '',
  780. fMarks: '',
  781. fBusinessType: '',
  782. fSrcTypeId: 0,
  783. });
  784. this.fWbuOptions = [];
  785. let queryParams = { pageNum: 1, fDc: "C" };
  786. listFees(queryParams).then((response) => {
  787. this.fCNameOptions = response.rows;
  788. });
  789. },
  790. addCollection() {
  791. this.warehouseDrList.push({
  792. fCorpid: null,
  793. fFeeid: null,
  794. fFeeUnitid: "",
  795. fQty: null,
  796. fUnitprice: null,
  797. fAmount: null,
  798. fCurrency: "RMB",
  799. fExrate: "1",
  800. fTaxrate: '',
  801. fCxrate: null,
  802. fRate: null,
  803. remarks: null,
  804. fMblno: '',
  805. fProductName: '',
  806. fMarks: '',
  807. fBusinessType: '',
  808. fSrcTypeId: 0,
  809. });
  810. this.fWbuOptions = [];
  811. let queryParams = { pageNum: 1, fDc: "D" };
  812. listFees(queryParams).then((response) => {
  813. this.fDNameOptions = response.rows;
  814. });
  815. },
  816. // 付款合计
  817. warehouseDrSummaries(param) {
  818. const { columns, data } = param;
  819. const sums = [];
  820. columns.forEach((column, index) => {
  821. if (index === 0) {
  822. sums[index] = "合计";
  823. return;
  824. }
  825. const values = data.map((item) => Number(item[column.property]));
  826. if (
  827. column.property === "fUnitprice" ||
  828. column.property === "fAmount" ||
  829. column.property === "fQty" ||
  830. column.property === "fQty"
  831. ) {
  832. sums[index] = values.reduce((prev, curr) => {
  833. const value = Number(curr);
  834. if (!isNaN(value)) {
  835. return prev + curr;
  836. } else {
  837. return prev;
  838. }
  839. }, 0);
  840. sums[index] = sums[index].toFixed(2);
  841. }
  842. });
  843. return sums;
  844. },
  845. Collectionoptions(selection) {
  846. this.Collectionoptionss = selection;
  847. for (let lest in this.fWbuOptions) {
  848. for (let li in this.Collectionoptionss) {
  849. if (
  850. this.fWbuOptions[lest].fId === this.Collectionoptionss[li].fFeeid
  851. ) {
  852. this.$set(
  853. this.Collectionoptionss[li],
  854. "fFeeids",
  855. this.fWbuOptions[lest].fName
  856. );
  857. }
  858. }
  859. }
  860. },
  861. }
  862. }
  863. </script>
  864. <style scoped>
  865. </style>