incomeMoney.vue 26 KB

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