incomeMoney.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  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="false"
  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(/[^\-?\d.]/g,"").replace(/^(\-)*(\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: 24px;
  672. margin-bottom: 5px;
  673. "
  674. >
  675. {{ company }}
  676. </div>
  677. <div
  678. style="
  679. display: flex;
  680. justify-content: center;
  681. margin-bottom: 5px;
  682. ">
  683. <div style="font-size: 18px">费用确认</div>
  684. </div>
  685. <div style="display: flex;justify-content: space-between;">
  686. <div>
  687. <div>业务编号:</div>
  688. <div>客户名称:{{ form.fCorpidName }}</div>
  689. <div>提单号:{{ form.fBillno }}</div>
  690. </div>
  691. <div>
  692. <div>制单日期:{{ form.createTime | fBsdateFormat }}</div>
  693. <div>仓库名称:{{ form.fWarehouseid | warehouseFormat(warehouseOptions) }}</div>
  694. <div>箱型/箱量:{{ form.fCntval }}</div>
  695. </div>
  696. <div>
  697. <div>制单人:{{ form.createBy }}</div>
  698. <div>打印日期:{{ nowTime | fBsdateFormat }}</div>
  699. </div>
  700. </div>
  701. <div class="print_table" style="display: flex">
  702. <table
  703. border="0"
  704. cellspacing="0"
  705. cellpadding="0"
  706. style="width: 100%; line-height: 30px"
  707. >
  708. <tr>
  709. <td>序号</td>
  710. <td>费用项目</td>
  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. </tr>
  721. <tr v-for="(item, index) in Collectionoptionss" :key="index">
  722. <td>{{ index + 1 }}</td>
  723. <td>{{ item.fFeeid | fFeetFormat(fDNameOptions) }}</td>
  724. <td>{{ item.fFeeUnitid | fFeetUnitFormat(fFeetUnitOptions) }}</td>
  725. <td>{{ item.fQty }}</td>
  726. <td>{{ item.fUnitprice }}</td>
  727. <td>{{ item.fTaxrate != 0? '√': '×' }}</td>
  728. <td>{{ item.fTaxrate }}</td>
  729. <td>{{ item.exclTax }}</td>
  730. <td>{{ item.taxAmount }}</td>
  731. <td>{{ item.fAmount }}</td>
  732. <td>{{ item.remark }}</td>
  733. </tr>
  734. <tr>
  735. <td colspan="7">合计</td>
  736. <td>{{ allExclTax }}</td>
  737. <td>{{ allTaxAmount }}</td>
  738. <td>{{ allDrAmount }}</td>
  739. <td></td>
  740. </tr>
  741. </table>
  742. </div>
  743. <div>人民币汇款路径:</div>
  744. <div>公司名称:{{ company }}</div>
  745. <div>纳税人识别号:</div>
  746. <div>地址:</div>
  747. <div>电话:</div>
  748. <div>开户行:</div>
  749. <div>银行账户:</div>
  750. </div>
  751. <span slot="footer" class="dialog-footer">
  752. <el-button
  753. type="primary"
  754. @click="
  755. addprint('fyqrd');
  756. print_fyqr = false;
  757. "
  758. >打印
  759. </el-button>
  760. <el-button @click="print_fyqr = false">取消 </el-button>
  761. </span>
  762. </el-dialog>
  763. </div>
  764. </template>
  765. <script>
  766. import {operationAgreement} from "@/api/agreement/agreement";
  767. import {feesCheck,revokefeeCheck} from "@/api/warehouseBusiness/warehouseInStock";
  768. import print from "print-js";
  769. import Cookies from "js-cookie";
  770. import {
  771. listWarehouse,
  772. treeselect,
  773. listWarehousesss,
  774. deliveryDetails
  775. } from "@/api/basicdata/warehouse";
  776. export default {
  777. props: {
  778. feeDisplay:false,
  779. browseStatus: {
  780. type: Boolean,
  781. default: false,
  782. },
  783. warehouseDrList: {
  784. type: Array,
  785. default: [],
  786. },
  787. businessTypeOption: {
  788. type: Array,
  789. default: [],
  790. },
  791. fMblnoOptions: {
  792. type: Array,
  793. default: [],
  794. },
  795. fDNameOptions: {
  796. type: Array,
  797. default: [],
  798. },
  799. fFeetUnitOptions: {
  800. type: Array,
  801. default: [],
  802. },
  803. fStltypeOptions: {
  804. type: Array,
  805. default: [],
  806. },
  807. fGrossweight: {
  808. type: Number,
  809. default: null,
  810. },
  811. fQty: {
  812. type: Number,
  813. default: null,
  814. },
  815. fNetweight: {
  816. type: Number,
  817. default: null,
  818. },
  819. fCntqty: {
  820. type: Number,
  821. default: null,
  822. },
  823. form: {
  824. type: Object,
  825. default: null,
  826. },
  827. CntrTable: {
  828. type: Array,
  829. default: [],
  830. },
  831. cntrList: {
  832. type: Array,
  833. default: [],
  834. },
  835. },
  836. data() {
  837. return {
  838. Collectionoptionss: [],
  839. warehousingagreements: false,
  840. whgenlegTotal: 0,
  841. Navigation: false,
  842. tasklegList: [],
  843. dialogWhgenlegList: [],
  844. pageNum: 1,
  845. pageSize: 10,
  846. nowTime: '',
  847. // 税额总数
  848. allTaxAmount: 0,
  849. // 不含税金额总数
  850. allExclTax: 0,
  851. // 收款金额合计
  852. allDrAmount: 0,
  853. print_fyqr: false,
  854. company: '',
  855. warehouseOptions:[],
  856. };
  857. },
  858. created() {
  859. this.company = Cookies.get("companyName")
  860. listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
  861. this.warehouseOptions = response.rows;
  862. });
  863. },
  864. filters: {
  865. fBsdateFormat(row) {
  866. if (row) {
  867. const dateMat = new Date(row);
  868. const year = dateMat.getFullYear();
  869. const month = dateMat.getMonth() + 1;
  870. const day = dateMat.getDate();
  871. const timeFormat = year + "-" + month + "-" + day;
  872. return timeFormat;
  873. }
  874. },
  875. warehouseFormat(row, warehouseOptions) {
  876. let warehouse;
  877. warehouseOptions.map((e) => {
  878. if (row == e.fId) {
  879. warehouse = e.fName;
  880. }
  881. });
  882. return warehouse;
  883. },
  884. fFeetFormat(row, fNameOptions) {
  885. let name;
  886. fNameOptions.map((e) => {
  887. if (row == e.fId) {
  888. name = e.fName;
  889. }
  890. });
  891. return name;
  892. },
  893. fFeetUnitFormat(row, fFeetUnitOptions) {
  894. let name;
  895. fFeetUnitOptions.map((e) => {
  896. if (row == e.dictValue) {
  897. name = e.dictLabel;
  898. }
  899. });
  900. return name;
  901. },
  902. },
  903. methods: {
  904. feeChange() {
  905. this.$emit("feeChangeD", 'D');
  906. },
  907. saveForm() {
  908. this.$emit("chiSave");
  909. },
  910. addCollection() {
  911. this.$emit("chiAdd");
  912. },
  913. // 付款合计
  914. warehouseDrSummaries(param) {
  915. const {columns, data} = param;
  916. const sums = [];
  917. columns.forEach((column, index) => {
  918. if (index === 0) {
  919. sums[index] = "合计";
  920. return;
  921. }
  922. const values = data.map((item) => Number(item[column.property]));
  923. // column.property === "fUnitprice" ||
  924. if (
  925. column.property === "fAmount"
  926. // column.property === "fAmount" ||
  927. // column.property === "fQty"
  928. ) {
  929. sums[index] = values.reduce((prev, curr) => {
  930. const value = Number(curr);
  931. if (!isNaN(value)) {
  932. return prev + curr;
  933. } else {
  934. return prev;
  935. }
  936. }, 0);
  937. sums[index] = sums[index].toFixed(2);
  938. }
  939. });
  940. return sums;
  941. },
  942. // 收款选
  943. Collectionoptions(selection) {
  944. this.Collectionoptionss = selection;
  945. for (let item in this.fWbuOptions) {
  946. for (let li in this.Collectionoptionss) {
  947. if (
  948. this.fWbuOptions[item].fId === this.Collectionoptionss[li].fFeeid
  949. ) {
  950. this.$set(
  951. this.Collectionoptionss[li],
  952. "fFeeids",
  953. this.fWbuOptions[item].fName
  954. );
  955. }
  956. }
  957. }
  958. },
  959. deleteRow(index, rows) {
  960. rows.splice(index, 1);
  961. },
  962. // 变更计价单位
  963. changeFeeUnit(row) {
  964. if (!row.fFeeUnitid) {
  965. return false;
  966. }
  967. if (row.fFeeUnitid === "2") {
  968. this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
  969. } else if (row.fFeeUnitid === "1") {
  970. this.$set(row, "fQty", this.fQty.toFixed(2));
  971. } else if (row.fFeeUnitid === "3") {
  972. this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
  973. } else if (row.fFeeUnitid === "7") {
  974. this.$set(row, "fQty", this.fCntqty);
  975. } else {
  976. this.$set(row, "fQty", 0);
  977. }
  978. if (row.fUnitprice) {
  979. this.$set(
  980. row,
  981. "fAmount",
  982. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  983. );
  984. }
  985. },
  986. // 数量计算
  987. changeContractAmt(row) {
  988. let fQty = 0;
  989. let fUnitprice = 0;
  990. if (row.fUnitprice) {
  991. fUnitprice = row.fUnitprice;
  992. }
  993. if (row.fQty) {
  994. fQty = row.fQty;
  995. }
  996. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  997. },
  998. handleSelect() {
  999. if (!this.form.fCorpid) {
  1000. this.$message({
  1001. message: "请维护客户",
  1002. type: "warning",
  1003. });
  1004. } else if (this.form.fProductName == undefined) {
  1005. this.$message({
  1006. message: "请维护入库明细品名",
  1007. type: "warning",
  1008. });
  1009. } else {
  1010. this.pageNum = 1;
  1011. this.pageSize = 10;
  1012. this.dialogWhgenlegList = [];
  1013. this.whgenlegTotal = 0;
  1014. this.warehousingagreements = true;
  1015. this.getWhgenlegList();
  1016. }
  1017. },
  1018. // 查询作业费信息
  1019. getWhgenlegList() {
  1020. let data = {};
  1021. this.Navigation = false;
  1022. data = {
  1023. pageNum: this.pageNum,
  1024. pageSize: this.pageSize,
  1025. fCorpid: this.form.fCorpid,
  1026. };
  1027. operationAgreement(data).then((response) => {
  1028. response.rows.map((e) => {
  1029. if (e.fFeeUnitid) {
  1030. e.fFeeUnitid = e.fFeeUnitid.toString();
  1031. }
  1032. });
  1033. this.tasklegList = response.rows;
  1034. this.whgenlegTotal = response.total;
  1035. });
  1036. },
  1037. // 库存总账多选框
  1038. whgenlegSelectionChange(selection) {
  1039. this.dialogWhgenlegList = selection;
  1040. },
  1041. //导入收付款信息明细
  1042. zhgenlegData() {
  1043. if (this.dialogWhgenlegList.length === 0) {
  1044. this.$message({
  1045. message: "请选择需要导入的数据",
  1046. type: "warning",
  1047. });
  1048. } else {
  1049. this.dialogWhgenlegList.map((e) => {
  1050. let qty = 1;
  1051. if (e.fFeeUnitid == 1) {
  1052. qty = this.fQty;
  1053. } else if (e.fFeeUnitid == 2) {
  1054. qty = (this.fGrossweight / 1000).toFixed(2);
  1055. } else if (e.fFeeUnitid == 3) {
  1056. qty = (this.fNetweight / 1000).toFixed(2);
  1057. } else if (e.fFeeUnitid == 7) {
  1058. qty = this.fCntqty;
  1059. }
  1060. let fAmount = 0;
  1061. fAmount = e.fPrice * qty;
  1062. this.warehouseDrList.push({
  1063. fQty: qty,
  1064. fCorpid: e.fCorpid,
  1065. fFeeid: e.feeFId,
  1066. fFeeUnitid: e.fFeeUnitid,
  1067. fUnitprice: e.fPrice,
  1068. fCurrency: "RMB",
  1069. fExrate: 1,
  1070. fAmount: fAmount,
  1071. fTaxrate: this.fTaxrate,
  1072. fMblno: this.form.fMblno,
  1073. fProductName: this.form.fProductName,
  1074. fMarks: this.form.fMarks,
  1075. fBusinessType: this.form.fBusinessType,
  1076. fSrcTypeId: 1,
  1077. fStltypeid: '1',
  1078. });
  1079. });
  1080. this.warehousingagreements = false;
  1081. }
  1082. },
  1083. // 费用明细请核
  1084. listCheck(row) {
  1085. feesCheck(row.fId).then(res => {
  1086. this.$message.success('请核成功')
  1087. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1088. if (res.data.fDc == 'D') {
  1089. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1090. this.warehouseDrList.splice(index, 1, res.data)
  1091. } else {
  1092. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1093. this.warehouseCrList.splice(index, 1, res.data)
  1094. }
  1095. })
  1096. },
  1097. // 费用明细撤销请核
  1098. revokeListCheck(row) {
  1099. revokefeeCheck(row.fId).then(res => {
  1100. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1101. this.$message.success('操作成功')
  1102. if (res.data.fDc == 'D') {
  1103. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1104. this.warehouseDrList.splice(index, 1, res.data)
  1105. } else {
  1106. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1107. this.warehouseCrList.splice(index, 1, res.data)
  1108. }
  1109. })
  1110. },
  1111. // 打印费用确认单准备
  1112. feesConfirm() {
  1113. if (this.Collectionoptionss.length > 0) {
  1114. for (let item in this.Collectionoptionss) {
  1115. if (!this.Collectionoptionss[item].fId) {
  1116. return this.$message.error("请先保存!");
  1117. }
  1118. }
  1119. if (this.CntrTable.length > 0) {
  1120. let arr = [];
  1121. this.CntrTable.map((e) => {
  1122. this.cntrList.map((item) => {
  1123. if (item.fId == e.fCntrid) {
  1124. arr.push(item.fName + "X" + e.fCntrcount);
  1125. }
  1126. });
  1127. });
  1128. arr = [...new Set(arr)];
  1129. this.form.fCntval = arr.join(",");
  1130. } else {
  1131. this.form.fCntval = null;
  1132. }
  1133. this.allTaxAmount = 0;
  1134. this.allExclTax = 0;
  1135. this.allDrAmount = 0;
  1136. this.Collectionoptionss.forEach(item => {
  1137. // 税额
  1138. this.$set(item, 'taxAmount', Number(item.fAmount) / (1 + Number(Number(item.fTaxrate) / 100)))
  1139. item.taxAmount = item.taxAmount.toSuperFixed(2)
  1140. // 不含税金额
  1141. this.$set(item, 'exclTax', Number(item.fAmount) - Number(item.taxAmount))
  1142. item.exclTax = item.exclTax.toSuperFixed(2)
  1143. this.allTaxAmount = Number(this.allTaxAmount) + Number(item.taxAmount)
  1144. this.allExclTax = Number(this.allExclTax) + Number(item.exclTax)
  1145. this.allDrAmount = Number(this.allDrAmount) + Number(item.fAmount)
  1146. this.allTaxAmount = this.allTaxAmount.toSuperFixed(2)
  1147. this.allExclTax = this.allExclTax.toSuperFixed(2)
  1148. this.allDrAmount = this.allDrAmount.toSuperFixed(2)
  1149. })
  1150. this.nowTime = new Date().toLocaleDateString()
  1151. for (let corp in this.fMblnoOptions) {
  1152. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  1153. this.$set(
  1154. this.form,
  1155. "fCorpidName",
  1156. this.fMblnoOptions[corp].fName
  1157. );
  1158. }
  1159. }
  1160. this.print_fyqr = true;
  1161. } else {
  1162. this.$message.error("请选择需要打印的明细!");
  1163. }
  1164. },
  1165. // 打印
  1166. addprint(status) {
  1167. const style =
  1168. "@page { } " +
  1169. "@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;}";
  1170. switch (status) {
  1171. case "fyqrd":
  1172. print({
  1173. printable: "print_fyqr",
  1174. type: "html",
  1175. style: style, // 亦可使用引入的外部css;
  1176. scanStyles: false,
  1177. });
  1178. break;
  1179. }
  1180. },
  1181. },
  1182. watch: {
  1183. browseStatus(val) {
  1184. this.browseStatus = val;
  1185. },
  1186. warehouseDrList(val) {
  1187. this.warehouseDrList = val;
  1188. },
  1189. },
  1190. };
  1191. </script>
  1192. <style scoped lang="scss">
  1193. .print_table {
  1194. table {
  1195. border-right: 1px solid #000;
  1196. border-bottom: 1px solid #000;
  1197. font-size: 12px;
  1198. margin-bottom: 5px;
  1199. }
  1200. table td {
  1201. border-left: 1px solid #000;
  1202. border-top: 1px solid #000;
  1203. vertical-align: middle;
  1204. padding: 2px;
  1205. text-align: center;
  1206. }
  1207. }
  1208. .print_form {
  1209. font-size: 12px;
  1210. }
  1211. </style>