incomeMoney.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258
  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. type="danger"
  32. >作业费协议
  33. </el-button>
  34. <el-button
  35. v-if="feeDisplay"
  36. size="small"
  37. :disabled="browseStatus"
  38. type="warning"
  39. >计算仓储费
  40. </el-button>
  41. <el-button
  42. size="small"
  43. type="primary"
  44. @click="feesConfirm"
  45. v-if="isShowFeesConfirm == 0"
  46. >费用确认单</el-button>
  47. <el-button
  48. type="primary"
  49. size="small"
  50. v-if="browseStatus"
  51. @click="feeChange"
  52. >费用变更</el-button>
  53. </div>
  54. </div>
  55. <el-table
  56. :data="warehouseDrList"
  57. ref="table"
  58. tooltip-effect="dark"
  59. border
  60. stripe
  61. show-summary
  62. @selection-change="Collectionoptions"
  63. :summary-method="warehouseDrSummaries"
  64. >
  65. <el-table-column type="selection" width="55" align="center"/>
  66. <el-table-column label="序号" type="index" width="80"></el-table-column>
  67. <el-table-column
  68. prop="fCorpid"
  69. header-align="center"
  70. align="center"
  71. width="300px"
  72. label="客户名称"
  73. >
  74. <template slot-scope="scope">
  75. <el-select
  76. v-model="scope.row.fCorpid"
  77. filterable
  78. clearable
  79. placeholder="客户名称"
  80. :disabled="browseStatus || scope.row.fBillstatus == 6"
  81. >
  82. <el-option
  83. v-for="(item, index) in fMblnoOptions"
  84. :key="index.fId"
  85. :label="item.fName"
  86. :value="item.fId"
  87. ></el-option>
  88. </el-select>
  89. </template>
  90. </el-table-column>
  91. <el-table-column
  92. prop="fFeeid"
  93. header-align="center"
  94. align="center"
  95. width="240px"
  96. label="费用名称"
  97. >
  98. <template slot-scope="scope">
  99. <el-select
  100. v-model="scope.row.fFeeid"
  101. clearable
  102. filterable
  103. placeholder="费用名称"
  104. :disabled="browseStatus || scope.row.fBillstatus == 6"
  105. >
  106. <el-option
  107. v-for="(item, index) in fDNameOptions"
  108. :key="index.fId"
  109. :label="item.fName"
  110. :value="item.fId"
  111. ></el-option>
  112. </el-select>
  113. </template>
  114. </el-table-column>
  115. <el-table-column
  116. prop="fBusinessType"
  117. header-align="center"
  118. align="center"
  119. width="180px"
  120. label="作业类型"
  121. >
  122. <template slot-scope="scope">
  123. <el-select
  124. style="width: 80%"
  125. v-model="scope.row.fBusinessType"
  126. filterable
  127. disabled
  128. >
  129. <el-option
  130. v-for="(item, index) in businessTypeOption"
  131. :key="index.dictValue"
  132. :label="item.dictLabel"
  133. :value="item.dictValue"
  134. ></el-option>
  135. </el-select>
  136. </template>
  137. </el-table-column>
  138. <el-table-column
  139. prop="fFeeUnitid"
  140. header-align="center"
  141. align="center"
  142. width="180px"
  143. label="计价单位"
  144. >
  145. <template slot-scope="scope">
  146. <el-select
  147. v-model="scope.row.fFeeUnitid"
  148. placeholder="请选择计价单位"
  149. clearable
  150. :disabled="browseStatus || scope.row.fBillstatus == 6"
  151. @change="changeFeeUnit(scope.row)"
  152. >
  153. <el-option
  154. v-for="(item, index) in fFeetUnitOptions"
  155. :key="index.dictValue"
  156. :label="item.dictLabel"
  157. :value="item.dictValue"
  158. />
  159. </el-select>
  160. </template>
  161. </el-table-column>
  162. <el-table-column
  163. prop="fQty"
  164. header-align="center"
  165. align="center"
  166. width="130px"
  167. label="数量"
  168. >
  169. <template slot-scope="scope">
  170. <el-input
  171. oninput='this.value=this.value.replace(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
  172. v-model="scope.row.fQty"
  173. placeholder="数量"
  174. :disabled="browseStatus || scope.row.fBillstatus == 6"
  175. @change="changeContractAmt(scope.row)"
  176. show-word-limit
  177. />
  178. </template>
  179. </el-table-column>
  180. <el-table-column
  181. prop="fUnitprice"
  182. header-align="center"
  183. align="center"
  184. width="130px"
  185. label="单价"
  186. >
  187. <template slot-scope="scope">
  188. <el-input
  189. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  190. v-model="scope.row.fUnitprice"
  191. placeholder="单价"
  192. :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus == 6"
  193. @change="changeContractAmt(scope.row)"
  194. show-word-limit
  195. />
  196. </template>
  197. </el-table-column>
  198. <el-table-column
  199. prop="fAmount"
  200. header-align="center"
  201. align="center"
  202. width="130px"
  203. label="金额"
  204. >
  205. <template slot-scope="scope">
  206. <el-input
  207. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  208. v-model="scope.row.fAmount"
  209. :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus == 6"
  210. placeholder="金额"
  211. show-word-limit
  212. />
  213. </template>
  214. </el-table-column>
  215. <el-table-column
  216. prop="fStltypeid"
  217. header-align="center"
  218. align="center"
  219. width="130px"
  220. label="结算方式"
  221. >
  222. <template slot-scope="scope">
  223. <el-select
  224. v-model="scope.row.fStltypeid"
  225. placeholder="请选择结算表票结、月结"
  226. :disabled="browseStatus || scope.row.fBillstatus == 6"
  227. >
  228. <el-option
  229. v-for="(item, index) in fStltypeOptions"
  230. :key="index.dictValue"
  231. :label="item.dictLabel"
  232. :value="item.dictValue"
  233. ></el-option>
  234. </el-select>
  235. </template>
  236. </el-table-column>
  237. <el-table-column
  238. prop="fCurrency"
  239. header-align="center"
  240. align="center"
  241. width="130px"
  242. label="币别"
  243. >
  244. <template slot-scope="scope">
  245. <el-input
  246. v-model="scope.row.fCurrency"
  247. :disabled="browseStatus || scope.row.fBillstatus == 6"
  248. placeholder="币别"
  249. show-word-limit
  250. />
  251. </template>
  252. </el-table-column>
  253. <el-table-column
  254. prop="fExrate"
  255. header-align="center"
  256. align="center"
  257. width="130px"
  258. label="汇率"
  259. >
  260. <template slot-scope="scope">
  261. <el-input
  262. v-model="scope.row.fExrate"
  263. :disabled="browseStatus || scope.row.fBillstatus == 6"
  264. placeholder="汇率"
  265. show-word-limit
  266. />
  267. </template>
  268. </el-table-column>
  269. <el-table-column
  270. prop="fTaxrate"
  271. header-align="center"
  272. align="center"
  273. width="130px"
  274. label="税率"
  275. >
  276. <template slot-scope="scope">
  277. <el-input
  278. v-model="scope.row.fTaxrate"
  279. :disabled="browseStatus || scope.row.fBillstatus == 6"
  280. placeholder="税率"
  281. show-word-limit
  282. />
  283. </template>
  284. </el-table-column>
  285. <el-table-column
  286. prop="fMblno"
  287. header-align="center"
  288. align="center"
  289. width="130px"
  290. label="提单号"
  291. >
  292. <template slot-scope="scope">
  293. <el-input
  294. v-model="scope.row.fMblno"
  295. :disabled="browseStatus || scope.row.fBillstatus == 6"
  296. placeholder="提单号"
  297. show-word-limit
  298. />
  299. </template>
  300. </el-table-column>
  301. <el-table-column
  302. prop="fProductName"
  303. header-align="center"
  304. align="center"
  305. width="140px"
  306. label="品名"
  307. >
  308. <template slot-scope="scope">
  309. <el-input
  310. v-model="scope.row.fProductName"
  311. :disabled="browseStatus || scope.row.fBillstatus == 6"
  312. placeholder="品名"
  313. show-word-limit
  314. />
  315. </template>
  316. </el-table-column>
  317. <el-table-column
  318. prop="fMarks"
  319. header-align="center"
  320. align="center"
  321. width="130px"
  322. label="品牌"
  323. >
  324. <template slot-scope="scope">
  325. <el-input
  326. v-model="scope.row.fMarks"
  327. :disabled="browseStatus || scope.row.fBillstatus == 6"
  328. placeholder="品牌"
  329. show-word-limit
  330. />
  331. </template>
  332. </el-table-column>
  333. <el-table-column
  334. prop="fSrcTypeId"
  335. header-align="center"
  336. align="center"
  337. width="130px"
  338. label="来源"
  339. >
  340. <template slot-scope="scope">
  341. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  342. <span v-if="scope.row.fSrcTypeId == 1">协议</span>
  343. <span v-if="scope.row.fSrcTypeId == 10">变更</span>
  344. </template>
  345. </el-table-column>
  346. <span v-if="feeDisplay">
  347. <el-table-column
  348. prop="fBilltype"
  349. header-align="center"
  350. align="center"
  351. width="140px"
  352. label="业务来源"
  353. >
  354. <template slot-scope="scope">
  355. <span v-if="scope.row.fBilltype === 'SJRK'">入库</span>
  356. <span v-if="scope.row.fBilltype === 'SJCK'">出库</span>
  357. <span v-if="scope.row.fBilltype === 'KCZZ'">库存总账</span>
  358. </template>
  359. </el-table-column>
  360. <el-table-column
  361. prop="fMblno"
  362. header-align="center"
  363. align="center"
  364. width="140px"
  365. label="业务单号"
  366. >
  367. </el-table-column>
  368. <el-table-column
  369. prop="fProductName"
  370. header-align="center"
  371. align="center"
  372. width="140px"
  373. label="货物名称"
  374. >
  375. </el-table-column>
  376. <el-table-column
  377. prop="fMarks"
  378. header-align="center"
  379. align="center"
  380. width="140px"
  381. label="唛头"
  382. />
  383. <el-table-column
  384. prop="fBsdate"
  385. header-align="center"
  386. align="center"
  387. width="140px"
  388. label="业务日期"
  389. >
  390. <template slot-scope="scope">
  391. <el-date-picker
  392. v-model="scope.row.fBsdate"
  393. size="large"
  394. type="date"
  395. disabled
  396. value-format="timestamp"
  397. placeholder="业务日期"
  398. >
  399. </el-date-picker>
  400. </template>
  401. </el-table-column>
  402. <el-table-column
  403. prop="fBillingway"
  404. header-align="center"
  405. align="center"
  406. width="180px"
  407. label="计费单位"
  408. >
  409. <template slot-scope="scope">
  410. <el-select
  411. v-model="scope.row.fBillingway"
  412. placeholder="请选择计费单位"
  413. disabled
  414. clearable
  415. >
  416. <el-option
  417. v-for="dict in fFeetunitOptions"
  418. :key="dict.dictValue"
  419. :label="dict.dictLabel"
  420. :value="dict.dictValue"
  421. />
  422. </el-select>
  423. </template>
  424. </el-table-column>
  425. <el-table-column
  426. prop="fBillingQty"
  427. header-align="center"
  428. align="center"
  429. width="140px"
  430. label="计费数量"
  431. >
  432. </el-table-column>
  433. <el-table-column
  434. prop="fChargedate"
  435. header-align="center"
  436. align="center"
  437. width="140px"
  438. label="计费起始日期"
  439. >
  440. <template slot-scope="scope">
  441. <el-date-picker
  442. v-model="scope.row.fChargedate"
  443. size="large"
  444. type="date"
  445. disabled
  446. value-format="timestamp"
  447. placeholder="计费起始日期"
  448. >
  449. </el-date-picker>
  450. </template>
  451. </el-table-column>
  452. <el-table-column
  453. prop="fBillingDeadline"
  454. header-align="center"
  455. align="center"
  456. width="140px"
  457. label="计费截止日期"
  458. >
  459. <template slot-scope="scope">
  460. <el-date-picker
  461. v-model="scope.row.fBillingDeadline"
  462. size="large"
  463. type="date"
  464. disabled
  465. value-format="timestamp"
  466. placeholder="计费截止日期"
  467. >
  468. </el-date-picker>
  469. </template>
  470. </el-table-column>
  471. <el-table-column
  472. prop="fBillingDays"
  473. header-align="center"
  474. align="center"
  475. width="140px"
  476. label="计费天数"
  477. >
  478. </el-table-column>
  479. <el-table-column
  480. prop="fInventoryDays"
  481. header-align="center"
  482. align="center"
  483. width="140px"
  484. label="库存天数"
  485. >
  486. </el-table-column>
  487. <el-table-column
  488. prop="fAmt"
  489. header-align="center"
  490. align="center"
  491. width="140px"
  492. label="计费金额"
  493. >
  494. </el-table-column>
  495. </span>
  496. <el-table-column
  497. prop="remark"
  498. header-align="center"
  499. align="center"
  500. width="150px"
  501. label="备注"
  502. >
  503. <template slot-scope="scope">
  504. <el-input
  505. v-model="scope.row.remark"
  506. :disabled="browseStatus || scope.row.fBillstatus == 6"
  507. placeholder="备注"
  508. show-word-limit
  509. />
  510. </template>
  511. </el-table-column>
  512. <el-table-column
  513. header-align="center"
  514. align="center"
  515. label="操作"
  516. width="200px"
  517. fixed="right"
  518. >
  519. <template slot-scope="scope">
  520. <el-button
  521. @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
  522. size="small"
  523. :disabled="scope.row.fBillstatus == 6 || browseStatus"
  524. >移除
  525. </el-button>
  526. <el-button
  527. size="small"
  528. @click="listCheck(scope.row)"
  529. v-if="scope.row.fBillstatus < 6"
  530. :disabled="browseStatus"
  531. >请核</el-button>
  532. <el-button
  533. size="small"
  534. @click="revokeListCheck(scope.row)"
  535. :disabled="browseStatus"
  536. v-if="scope.row.fBillstatus == 6"
  537. >撤销请核</el-button>
  538. </template>
  539. </el-table-column>
  540. </el-table>
  541. <!-- 选择作业费协议数据 -->
  542. <el-dialog
  543. v-dialogDrag
  544. title="作业费协议"
  545. :close-on-click-modal="false"
  546. :modal="false"
  547. style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
  548. :visible.sync="warehousingagreements"
  549. width="70%"
  550. >
  551. <template slot="作业费协议">
  552. <div class="avue-crud__dialog__header">
  553. <span class="el-dialog__title">
  554. <span
  555. style="
  556. display: inline-block;
  557. width: 3px;
  558. height: 20px;
  559. margin-right: 5px;
  560. float: left;
  561. margin-top: 2px;
  562. "
  563. ></span>
  564. </span>
  565. </div>
  566. </template>
  567. <el-menu
  568. :default-active="activeIndex"
  569. v-if="Navigation === true"
  570. class="el-menu-demo"
  571. mode="horizontal"
  572. @select="handleSelect"
  573. >
  574. <el-menu-item index="1">车队作业费</el-menu-item>
  575. <el-menu-item index="2">劳务作业费</el-menu-item>
  576. </el-menu>
  577. <el-table
  578. :data="tasklegList"
  579. ref="table"
  580. tooltip-effect="dark"
  581. width="100%"
  582. border
  583. stripe
  584. @selection-change="whgenlegSelectionChange"
  585. >
  586. <el-table-column type="selection" width="55"></el-table-column>
  587. <el-table-column label="行号" type="index" width="80">
  588. </el-table-column>
  589. <el-table-column
  590. prop="fCorpname"
  591. header-align="center"
  592. align="center"
  593. label="客户名称"
  594. />
  595. <el-table-column
  596. prop="fName"
  597. header-align="center"
  598. align="center"
  599. label="费用名称"
  600. />
  601. <el-table-column
  602. prop="fFeeUnitid"
  603. header-align="center"
  604. align="center"
  605. width="180px"
  606. label="计价单位"
  607. >
  608. <template slot-scope="scope">
  609. <el-select
  610. v-model="scope.row.fFeeUnitid"
  611. placeholder="请选择计价单位"
  612. @change="changeFeeUnit(scope.row)"
  613. disabled
  614. clearable
  615. >
  616. <el-option
  617. v-for="(dict, index) in fFeetUnitOptions"
  618. :key="index.dictValue"
  619. :label="dict.dictLabel"
  620. :value="dict.dictValue"
  621. />
  622. </el-select>
  623. </template>
  624. </el-table-column>
  625. <el-table-column
  626. prop="fPrice"
  627. header-align="center"
  628. align="center"
  629. label="单价"
  630. width="100px"
  631. />
  632. <el-table-column
  633. prop="remark"
  634. header-align="center"
  635. align="center"
  636. label="备注"
  637. />
  638. </el-table>
  639. <pagination
  640. v-show="whgenlegTotal > 0"
  641. :total="whgenlegTotal"
  642. :page.sync="pageNum"
  643. :limit.sync="pageSize"
  644. @pagination="getWhgenlegList"
  645. />
  646. <div slot="footer" class="dialog-footer">
  647. <el-button type="primary" @click="zhgenlegData" :disabled="browseStatus">导 入</el-button>
  648. <el-button
  649. @click="
  650. warehousingagreements = false;
  651. Navigation = false;
  652. "
  653. >取 消
  654. </el-button
  655. >
  656. </div>
  657. </el-dialog>
  658. <!-- 费用确认单-->
  659. <el-dialog
  660. :visible.sync="print_fyqr"
  661. width="70%"
  662. :close-on-click-modal="false"
  663. :modal="false"
  664. >
  665. <div id="print_fyqr" class="print-div">
  666. <div
  667. class="print-title"
  668. style="
  669. display: flex;
  670. justify-content: center;
  671. font-size: 28px;
  672. margin-bottom: 5px;
  673. "
  674. >
  675. {{ fCompanyName? fCompanyName: company }}
  676. </div>
  677. <div
  678. style="
  679. display: flex;
  680. justify-content: center;
  681. margin-bottom: 5px;
  682. ">
  683. <div style="font-size: 24px;">费用确认</div>
  684. </div>
  685. <div style="display: flex;justify-content: space-between;">
  686. <div>
  687. <div>业务编号:{{ form.fBillno }}</div>
  688. <div>客户名称:{{ form.fCorpidName }}</div>
  689. <div>提单号:{{ form.fMblno }}</div>
  690. <div>结算单位: {{ form.chargeUnit }}</div>
  691. </div>
  692. <div>
  693. <div>制单日期:{{ form.createTime | fBsdateFormat }}</div>
  694. <div>仓库名称:{{ form.fWarehouseid | warehouseFormat(warehouseOptions) }}</div>
  695. <div>箱型/箱量:{{ form.fCntval }}</div>
  696. </div>
  697. <div>
  698. <div>制单人:{{ form.createBy }}</div>
  699. <div>打印日期:{{ nowTime | fBsdateFormat }}</div>
  700. <div>品名:{{ form.fGoodsid | goodsFormat(goodsOptions) }}</div>
  701. </div>
  702. </div>
  703. <div class="print_table" style="display: flex">
  704. <table
  705. border="0"
  706. cellspacing="0"
  707. cellpadding="0"
  708. style="width: 100%; line-height: 30px"
  709. >
  710. <tr>
  711. <td>序号</td>
  712. <td>费用项目</td>
  713. <td>计价单位</td>
  714. <td>数量</td>
  715. <td>单价</td>
  716. <td>是否含税</td>
  717. <td>税率</td>
  718. <td>不含税金额</td>
  719. <td>税额</td>
  720. <td>应收金额</td>
  721. <td>备注</td>
  722. </tr>
  723. <tr v-for="(item, index) in Collectionoptionss" :key="index">
  724. <td>{{ index + 1 }}</td>
  725. <td>{{ item.fFeeid | fFeetFormat(fDNameOptions) }}</td>
  726. <td>{{ item.fFeeUnitid | fFeetUnitFormat(fFeetUnitOptions) }}</td>
  727. <td>{{ item.fQty }}</td>
  728. <td>{{ item.fUnitprice }}</td>
  729. <td>{{ item.fTaxrate != 0? '√': '×' }}</td>
  730. <td>{{ item.fTaxrate }}</td>
  731. <td>{{ item.taxAmount }}</td>
  732. <td>{{ item.exclTax }}</td>
  733. <td>{{ item.fAmount }}</td>
  734. <td>{{ item.remark }}</td>
  735. </tr>
  736. <tr>
  737. <td colspan="7">合计</td>
  738. <td>{{ allTaxAmount }}</td>
  739. <td>{{ allExclTax }}</td>
  740. <td>{{ allDrAmount }}</td>
  741. <td></td>
  742. </tr>
  743. </table>
  744. </div>
  745. <div>人民币汇款路径:</div>
  746. <div>公司名称:{{ fCompanyName? fCompanyName: company }}</div>
  747. <div>纳税人识别号:{{ printFeeConfirm.fTax }}</div>
  748. <div>地址:{{ printFeeConfirm.fAddr }}</div>
  749. <div>电话:{{ printFeeConfirm.fTel }}</div>
  750. <div>开户行:{{ printFeeConfirm.fBankname }}</div>
  751. <div>银行账户:{{ printFeeConfirm.fBankno }}</div>
  752. </div>
  753. <span slot="footer" class="dialog-footer">
  754. <el-button
  755. type="primary"
  756. @click="
  757. addprint('fyqrd');
  758. print_fyqr = false;
  759. "
  760. >打印
  761. </el-button>
  762. <el-button @click="print_fyqr = false">取消 </el-button>
  763. </span>
  764. </el-dialog>
  765. </div>
  766. </template>
  767. <script>
  768. import {operationAgreement} from "@/api/agreement/agreement";
  769. import {feesCheck,revokefeeCheck} from "@/api/warehouseBusiness/warehouseInStock";
  770. import print from "print-js";
  771. import Cookies from "js-cookie";
  772. import {
  773. listWarehouse,
  774. treeselect,
  775. listWarehousesss,
  776. deliveryDetails
  777. } from "@/api/basicdata/warehouse";
  778. export default {
  779. props: {
  780. feeDisplay:false,
  781. browseStatus: {
  782. type: Boolean,
  783. default: false,
  784. },
  785. warehouseDrList: {
  786. type: Array,
  787. default: [],
  788. },
  789. businessTypeOption: {
  790. type: Array,
  791. default: [],
  792. },
  793. fMblnoOptions: {
  794. type: Array,
  795. default: [],
  796. },
  797. fDNameOptions: {
  798. type: Array,
  799. default: [],
  800. },
  801. fFeetUnitOptions: {
  802. type: Array,
  803. default: [],
  804. },
  805. fStltypeOptions: {
  806. type: Array,
  807. default: [],
  808. },
  809. fGrossweight: {
  810. type: Number,
  811. default: null,
  812. },
  813. fQty: {
  814. type: Number,
  815. default: null,
  816. },
  817. fNetweight: {
  818. type: Number,
  819. default: null,
  820. },
  821. fCntqty: {
  822. type: Number,
  823. default: null,
  824. },
  825. form: {
  826. type: Object,
  827. default: null,
  828. },
  829. CntrTable: {
  830. type: Array,
  831. default: [],
  832. },
  833. cntrList: {
  834. type: Array,
  835. default: [],
  836. },
  837. goodsOptions: {
  838. type: Array,
  839. default: [],
  840. },
  841. fCompanyName: {
  842. type: String
  843. },
  844. printFeeConfirm: {
  845. type: Object,
  846. },
  847. },
  848. data() {
  849. return {
  850. Collectionoptionss: [],
  851. warehousingagreements: false,
  852. whgenlegTotal: 0,
  853. Navigation: false,
  854. tasklegList: [],
  855. dialogWhgenlegList: [],
  856. pageNum: 1,
  857. pageSize: 10,
  858. nowTime: '',
  859. // 税额总数
  860. allTaxAmount: 0,
  861. // 不含税金额总数
  862. allExclTax: 0,
  863. // 收款金额合计
  864. allDrAmount: 0,
  865. print_fyqr: false,
  866. company: '',
  867. warehouseOptions:[],
  868. // 是否启用请款单
  869. isShowInvoice: null,
  870. // 是否启用费用确认单
  871. isShowFeesConfirm: null,
  872. };
  873. },
  874. created() {
  875. this.getConfigKey("warehouse.show.invoice").then((response) => {
  876. this.isShowInvoice = response.msg;
  877. });
  878. this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
  879. this.isShowFeesConfirm = response.msg;
  880. });
  881. this.company = Cookies.get("companyName")
  882. listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
  883. this.warehouseOptions = response.rows;
  884. });
  885. },
  886. filters: {
  887. fBsdateFormat(row) {
  888. if (row) {
  889. const dateMat = new Date(row);
  890. const year = dateMat.getFullYear();
  891. const month = dateMat.getMonth() + 1;
  892. const day = dateMat.getDate();
  893. const timeFormat = year + "-" + month + "-" + day;
  894. return timeFormat;
  895. }
  896. },
  897. warehouseFormat(row, warehouseOptions) {
  898. let warehouse;
  899. warehouseOptions.map((e) => {
  900. if (row == e.fId) {
  901. warehouse = e.fName;
  902. }
  903. });
  904. return warehouse;
  905. },
  906. fFeetFormat(row, fNameOptions) {
  907. let name;
  908. fNameOptions.map((e) => {
  909. if (row == e.fId) {
  910. name = e.fName;
  911. }
  912. });
  913. return name;
  914. },
  915. fFeetUnitFormat(row, fFeetUnitOptions) {
  916. let name;
  917. fFeetUnitOptions.map((e) => {
  918. if (row == e.dictValue) {
  919. name = e.dictLabel;
  920. }
  921. });
  922. return name;
  923. },
  924. goodsFormat(row, goodsOptions) {
  925. let goods;
  926. goodsOptions.map((e) => {
  927. if (row == e.fId) {
  928. goods = e.fName;
  929. }
  930. });
  931. return goods;
  932. },
  933. },
  934. methods: {
  935. feeChange() {
  936. this.$emit("feeChangeD", 'D');
  937. },
  938. saveForm() {
  939. this.$emit("chiSave");
  940. },
  941. addCollection() {
  942. this.$emit("chiAdd");
  943. },
  944. // 付款合计
  945. warehouseDrSummaries(param) {
  946. const {columns, data} = param;
  947. const sums = [];
  948. columns.forEach((column, index) => {
  949. if (index === 0) {
  950. sums[index] = "合计";
  951. return;
  952. }
  953. const values = data.map((item) => Number(item[column.property]));
  954. // column.property === "fUnitprice" ||
  955. if (
  956. column.property === "fAmount"
  957. // column.property === "fAmount" ||
  958. // column.property === "fQty"
  959. ) {
  960. sums[index] = values.reduce((prev, curr) => {
  961. const value = Number(curr);
  962. if (!isNaN(value)) {
  963. return prev + curr;
  964. } else {
  965. return prev;
  966. }
  967. }, 0);
  968. sums[index] = sums[index].toFixed(2);
  969. }
  970. });
  971. return sums;
  972. },
  973. // 收款选
  974. Collectionoptions(selection) {
  975. this.Collectionoptionss = selection;
  976. for (let item in this.fWbuOptions) {
  977. for (let li in this.Collectionoptionss) {
  978. if (
  979. this.fWbuOptions[item].fId === this.Collectionoptionss[li].fFeeid
  980. ) {
  981. this.$set(
  982. this.Collectionoptionss[li],
  983. "fFeeids",
  984. this.fWbuOptions[item].fName
  985. );
  986. }
  987. }
  988. }
  989. },
  990. deleteRow(index, rows) {
  991. rows.splice(index, 1);
  992. },
  993. // 变更计价单位
  994. changeFeeUnit(row) {
  995. if (!row.fFeeUnitid) {
  996. return false;
  997. }
  998. if (row.fFeeUnitid === "2") {
  999. this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
  1000. } else if (row.fFeeUnitid === "1") {
  1001. this.$set(row, "fQty", this.fQty.toFixed(2));
  1002. } else if (row.fFeeUnitid === "3") {
  1003. this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
  1004. } else if (row.fFeeUnitid === "7") {
  1005. this.$set(row, "fQty", this.fCntqty);
  1006. } else {
  1007. this.$set(row, "fQty", 0);
  1008. }
  1009. if (row.fUnitprice) {
  1010. this.$set(
  1011. row,
  1012. "fAmount",
  1013. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  1014. );
  1015. }
  1016. },
  1017. // 数量计算
  1018. changeContractAmt(row) {
  1019. let fQty = 0;
  1020. let fUnitprice = 0;
  1021. if (row.fUnitprice) {
  1022. fUnitprice = row.fUnitprice;
  1023. }
  1024. if (row.fQty) {
  1025. fQty = row.fQty;
  1026. }
  1027. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  1028. },
  1029. handleSelect() {
  1030. if (!this.form.fCorpid) {
  1031. this.$message({
  1032. message: "请维护客户",
  1033. type: "warning",
  1034. });
  1035. } else if (this.form.fProductName == undefined) {
  1036. this.$message({
  1037. message: "请维护入库明细品名",
  1038. type: "warning",
  1039. });
  1040. } else {
  1041. this.pageNum = 1;
  1042. this.pageSize = 10;
  1043. this.dialogWhgenlegList = [];
  1044. this.whgenlegTotal = 0;
  1045. this.warehousingagreements = true;
  1046. this.getWhgenlegList();
  1047. }
  1048. },
  1049. // 查询作业费信息
  1050. getWhgenlegList() {
  1051. let data = {};
  1052. this.Navigation = false;
  1053. data = {
  1054. pageNum: this.pageNum,
  1055. pageSize: this.pageSize,
  1056. fCorpid: this.form.fCorpid,
  1057. };
  1058. operationAgreement(data).then((response) => {
  1059. response.rows.map((e) => {
  1060. if (e.fFeeUnitid) {
  1061. e.fFeeUnitid = e.fFeeUnitid.toString();
  1062. }
  1063. });
  1064. this.tasklegList = response.rows;
  1065. this.whgenlegTotal = response.total;
  1066. });
  1067. },
  1068. // 库存总账多选框
  1069. whgenlegSelectionChange(selection) {
  1070. this.dialogWhgenlegList = selection;
  1071. },
  1072. //导入收付款信息明细
  1073. zhgenlegData() {
  1074. if (this.dialogWhgenlegList.length === 0) {
  1075. this.$message({
  1076. message: "请选择需要导入的数据",
  1077. type: "warning",
  1078. });
  1079. } else {
  1080. this.dialogWhgenlegList.map((e) => {
  1081. let qty = 1;
  1082. if (e.fFeeUnitid == 1) {
  1083. qty = this.fQty;
  1084. } else if (e.fFeeUnitid == 2) {
  1085. qty = (this.fGrossweight / 1000).toFixed(2);
  1086. } else if (e.fFeeUnitid == 3) {
  1087. qty = (this.fNetweight / 1000).toFixed(2);
  1088. } else if (e.fFeeUnitid == 7) {
  1089. qty = this.fCntqty;
  1090. }
  1091. let fAmount = 0;
  1092. fAmount = e.fPrice * qty;
  1093. this.warehouseDrList.push({
  1094. fQty: qty,
  1095. fCorpid: e.fCorpid,
  1096. fFeeid: e.feeFId,
  1097. fFeeUnitid: e.fFeeUnitid,
  1098. fUnitprice: e.fPrice,
  1099. fCurrency: "RMB",
  1100. fExrate: 1,
  1101. fAmount: fAmount,
  1102. fTaxrate: '0',
  1103. fMblno: this.form.fMblno,
  1104. fProductName: this.form.fProductName,
  1105. fMarks: this.form.fMarks,
  1106. fBusinessType: this.form.fBusinessType,
  1107. fSrcTypeId: 1,
  1108. fStltypeid: '1',
  1109. });
  1110. });
  1111. this.warehousingagreements = false;
  1112. }
  1113. },
  1114. // 费用明细请核
  1115. listCheck(row) {
  1116. feesCheck(row.fId).then(res => {
  1117. this.$message.success('请核成功')
  1118. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1119. if (res.data.fDc == 'D') {
  1120. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1121. this.warehouseDrList.splice(index, 1, res.data)
  1122. } else {
  1123. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1124. this.warehouseCrList.splice(index, 1, res.data)
  1125. }
  1126. })
  1127. },
  1128. // 费用明细撤销请核
  1129. revokeListCheck(row) {
  1130. revokefeeCheck(row.fId).then(res => {
  1131. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1132. this.$message.success('操作成功')
  1133. if (res.data.fDc == 'D') {
  1134. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1135. this.warehouseDrList.splice(index, 1, res.data)
  1136. } else {
  1137. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1138. this.warehouseCrList.splice(index, 1, res.data)
  1139. }
  1140. })
  1141. },
  1142. // 打印费用确认单准备
  1143. feesConfirm() {
  1144. if (this.Collectionoptionss.length > 0) {
  1145. for (let item in this.Collectionoptionss) {
  1146. if (!this.Collectionoptionss[item].fId) {
  1147. return this.$message.error("请先保存!");
  1148. }
  1149. }
  1150. if (this.CntrTable.length > 0) {
  1151. let arr = [];
  1152. this.CntrTable.map((e) => {
  1153. this.cntrList.map((item) => {
  1154. if (item.fId == e.fCntrid) {
  1155. arr.push(item.fName + "X" + e.fCntrcount);
  1156. }
  1157. });
  1158. });
  1159. arr = [...new Set(arr)];
  1160. this.form.fCntval = arr.join(",");
  1161. } else {
  1162. this.form.fCntval = null;
  1163. }
  1164. this.allTaxAmount = 0;
  1165. this.allExclTax = 0;
  1166. this.allDrAmount = 0;
  1167. this.Collectionoptionss.forEach(item => {
  1168. // 税额
  1169. this.$set(item, 'taxAmount', Number(item.fAmount) / (1 + Number(Number(item.fTaxrate) / 100)))
  1170. item.taxAmount = item.taxAmount.toSuperFixed(2)
  1171. // 不含税金额
  1172. this.$set(item, 'exclTax', Number(item.fAmount) - Number(item.taxAmount))
  1173. item.exclTax = item.exclTax.toSuperFixed(2)
  1174. this.allTaxAmount = Number(this.allTaxAmount) + Number(item.taxAmount)
  1175. this.allExclTax = Number(this.allExclTax) + Number(item.exclTax)
  1176. this.allDrAmount = Number(this.allDrAmount) + Number(item.fAmount)
  1177. this.allTaxAmount = this.allTaxAmount.toSuperFixed(2)
  1178. this.allExclTax = this.allExclTax.toSuperFixed(2)
  1179. this.allDrAmount = this.allDrAmount.toSuperFixed(2)
  1180. })
  1181. this.nowTime = new Date().toLocaleDateString()
  1182. for (let corp in this.fMblnoOptions) {
  1183. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  1184. this.$set(
  1185. this.form,
  1186. "fCorpidName",
  1187. this.fMblnoOptions[corp].fName
  1188. );
  1189. }
  1190. if (this.Collectionoptionss[0].fCorpid === this.fMblnoOptions[corp].fId) {
  1191. this.$set(
  1192. this.form,
  1193. "chargeUnit",
  1194. this.fMblnoOptions[corp].fName
  1195. );
  1196. }
  1197. }
  1198. this.print_fyqr = true;
  1199. } else {
  1200. this.$message.error("请选择需要打印的明细!");
  1201. }
  1202. },
  1203. // 打印
  1204. addprint(status) {
  1205. const style =
  1206. "@page { } " +
  1207. "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_form{font-size:12px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;font-size:12px} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
  1208. switch (status) {
  1209. case "fyqrd":
  1210. print({
  1211. printable: "print_fyqr",
  1212. type: "html",
  1213. style: style, // 亦可使用引入的外部css;
  1214. scanStyles: false,
  1215. });
  1216. break;
  1217. }
  1218. },
  1219. },
  1220. watch: {
  1221. browseStatus(val) {
  1222. this.browseStatus = val;
  1223. },
  1224. warehouseDrList(val) {
  1225. this.warehouseDrList = val;
  1226. },
  1227. },
  1228. };
  1229. </script>
  1230. <style scoped lang="scss">
  1231. .print_table {
  1232. table {
  1233. border-right: 1px solid #000;
  1234. border-bottom: 1px solid #000;
  1235. font-size: 12px;
  1236. margin-bottom: 5px;
  1237. }
  1238. table td {
  1239. border-left: 1px solid #000;
  1240. border-top: 1px solid #000;
  1241. vertical-align: middle;
  1242. padding: 2px;
  1243. text-align: center;
  1244. }
  1245. }
  1246. .print_form {
  1247. font-size: 12px;
  1248. }
  1249. </style>