incomeMoney.vue 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277
  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(/[^\-?\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: 28px;
  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: 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.fBillno }}</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.exclTax }}</td>
  732. <td>{{ item.taxAmount }}</td>
  733. <td>{{ item.fAmount }}</td>
  734. <td>{{ item.remark }}</td>
  735. </tr>
  736. <tr>
  737. <td colspan="7">合计</td>
  738. <td>{{ allExclTax }}</td>
  739. <td>{{ allTaxAmount }}</td>
  740. <td>{{ allDrAmount }}</td>
  741. <td></td>
  742. </tr>
  743. </table>
  744. </div>
  745. <div>人民币汇款路径:</div>
  746. <div>公司名称:{{ company }}</div>
  747. <div>纳税人识别号:{{ Identifier }}</div>
  748. <div>地址:{{ address }}</div>
  749. <div>电话:{{ phone }}</div>
  750. <div>开户行:{{ bank }}</div>
  751. <div>银行账户:{{ bankAccount }}</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. },
  842. data() {
  843. return {
  844. Collectionoptionss: [],
  845. warehousingagreements: false,
  846. whgenlegTotal: 0,
  847. Navigation: false,
  848. tasklegList: [],
  849. dialogWhgenlegList: [],
  850. pageNum: 1,
  851. pageSize: 10,
  852. nowTime: '',
  853. // 税额总数
  854. allTaxAmount: 0,
  855. // 不含税金额总数
  856. allExclTax: 0,
  857. // 收款金额合计
  858. allDrAmount: 0,
  859. print_fyqr: false,
  860. company: '',
  861. warehouseOptions:[],
  862. // 识别号
  863. Identifier: '',
  864. // 地址
  865. address: '',
  866. // 电话
  867. phone: '',
  868. // 开户行
  869. bank: '',
  870. // 银行账户
  871. bankAccount: '',
  872. // 是否启用请款单
  873. isShowInvoice: null,
  874. // 是否启用费用确认单
  875. isShowFeesConfirm: null,
  876. };
  877. },
  878. created() {
  879. this.getConfigKey("taxpayer.identification.number").then((response) => {
  880. this.Identifier = response.msg;
  881. });
  882. this.getConfigKey("print.address").then((response) => {
  883. this.address = response.msg;
  884. });
  885. this.getConfigKey("print.phone").then((response) => {
  886. this.phone = response.msg;
  887. });
  888. this.getConfigKey("print.bank").then((response) => {
  889. this.bank = response.msg;
  890. });
  891. this.getConfigKey("print.bank.account").then((response) => {
  892. this.bankAccount = response.msg;
  893. });
  894. this.getConfigKey("warehouse.show.invoice").then((response) => {
  895. this.isShowInvoice = response.msg;
  896. });
  897. this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
  898. this.isShowFeesConfirm = response.msg;
  899. });
  900. this.company = Cookies.get("companyName")
  901. listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
  902. this.warehouseOptions = response.rows;
  903. });
  904. },
  905. filters: {
  906. fBsdateFormat(row) {
  907. if (row) {
  908. const dateMat = new Date(row);
  909. const year = dateMat.getFullYear();
  910. const month = dateMat.getMonth() + 1;
  911. const day = dateMat.getDate();
  912. const timeFormat = year + "-" + month + "-" + day;
  913. return timeFormat;
  914. }
  915. },
  916. warehouseFormat(row, warehouseOptions) {
  917. let warehouse;
  918. warehouseOptions.map((e) => {
  919. if (row == e.fId) {
  920. warehouse = e.fName;
  921. }
  922. });
  923. return warehouse;
  924. },
  925. fFeetFormat(row, fNameOptions) {
  926. let name;
  927. fNameOptions.map((e) => {
  928. if (row == e.fId) {
  929. name = e.fName;
  930. }
  931. });
  932. return name;
  933. },
  934. fFeetUnitFormat(row, fFeetUnitOptions) {
  935. let name;
  936. fFeetUnitOptions.map((e) => {
  937. if (row == e.dictValue) {
  938. name = e.dictLabel;
  939. }
  940. });
  941. return name;
  942. },
  943. goodsFormat(row, goodsOptions) {
  944. let goods;
  945. goodsOptions.map((e) => {
  946. if (row == e.fId) {
  947. goods = e.fName;
  948. }
  949. });
  950. return goods;
  951. },
  952. },
  953. methods: {
  954. feeChange() {
  955. this.$emit("feeChangeD", 'D');
  956. },
  957. saveForm() {
  958. this.$emit("chiSave");
  959. },
  960. addCollection() {
  961. this.$emit("chiAdd");
  962. },
  963. // 付款合计
  964. warehouseDrSummaries(param) {
  965. const {columns, data} = param;
  966. const sums = [];
  967. columns.forEach((column, index) => {
  968. if (index === 0) {
  969. sums[index] = "合计";
  970. return;
  971. }
  972. const values = data.map((item) => Number(item[column.property]));
  973. // column.property === "fUnitprice" ||
  974. if (
  975. column.property === "fAmount"
  976. // column.property === "fAmount" ||
  977. // column.property === "fQty"
  978. ) {
  979. sums[index] = values.reduce((prev, curr) => {
  980. const value = Number(curr);
  981. if (!isNaN(value)) {
  982. return prev + curr;
  983. } else {
  984. return prev;
  985. }
  986. }, 0);
  987. sums[index] = sums[index].toFixed(2);
  988. }
  989. });
  990. return sums;
  991. },
  992. // 收款选
  993. Collectionoptions(selection) {
  994. this.Collectionoptionss = selection;
  995. for (let item in this.fWbuOptions) {
  996. for (let li in this.Collectionoptionss) {
  997. if (
  998. this.fWbuOptions[item].fId === this.Collectionoptionss[li].fFeeid
  999. ) {
  1000. this.$set(
  1001. this.Collectionoptionss[li],
  1002. "fFeeids",
  1003. this.fWbuOptions[item].fName
  1004. );
  1005. }
  1006. }
  1007. }
  1008. },
  1009. deleteRow(index, rows) {
  1010. rows.splice(index, 1);
  1011. },
  1012. // 变更计价单位
  1013. changeFeeUnit(row) {
  1014. if (!row.fFeeUnitid) {
  1015. return false;
  1016. }
  1017. if (row.fFeeUnitid === "2") {
  1018. this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
  1019. } else if (row.fFeeUnitid === "1") {
  1020. this.$set(row, "fQty", this.fQty.toFixed(2));
  1021. } else if (row.fFeeUnitid === "3") {
  1022. this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
  1023. } else if (row.fFeeUnitid === "7") {
  1024. this.$set(row, "fQty", this.fCntqty);
  1025. } else {
  1026. this.$set(row, "fQty", 0);
  1027. }
  1028. if (row.fUnitprice) {
  1029. this.$set(
  1030. row,
  1031. "fAmount",
  1032. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  1033. );
  1034. }
  1035. },
  1036. // 数量计算
  1037. changeContractAmt(row) {
  1038. let fQty = 0;
  1039. let fUnitprice = 0;
  1040. if (row.fUnitprice) {
  1041. fUnitprice = row.fUnitprice;
  1042. }
  1043. if (row.fQty) {
  1044. fQty = row.fQty;
  1045. }
  1046. this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
  1047. },
  1048. handleSelect() {
  1049. if (!this.form.fCorpid) {
  1050. this.$message({
  1051. message: "请维护客户",
  1052. type: "warning",
  1053. });
  1054. } else if (this.form.fProductName == undefined) {
  1055. this.$message({
  1056. message: "请维护入库明细品名",
  1057. type: "warning",
  1058. });
  1059. } else {
  1060. this.pageNum = 1;
  1061. this.pageSize = 10;
  1062. this.dialogWhgenlegList = [];
  1063. this.whgenlegTotal = 0;
  1064. this.warehousingagreements = true;
  1065. this.getWhgenlegList();
  1066. }
  1067. },
  1068. // 查询作业费信息
  1069. getWhgenlegList() {
  1070. let data = {};
  1071. this.Navigation = false;
  1072. data = {
  1073. pageNum: this.pageNum,
  1074. pageSize: this.pageSize,
  1075. fCorpid: this.form.fCorpid,
  1076. };
  1077. operationAgreement(data).then((response) => {
  1078. response.rows.map((e) => {
  1079. if (e.fFeeUnitid) {
  1080. e.fFeeUnitid = e.fFeeUnitid.toString();
  1081. }
  1082. });
  1083. this.tasklegList = response.rows;
  1084. this.whgenlegTotal = response.total;
  1085. });
  1086. },
  1087. // 库存总账多选框
  1088. whgenlegSelectionChange(selection) {
  1089. this.dialogWhgenlegList = selection;
  1090. },
  1091. //导入收付款信息明细
  1092. zhgenlegData() {
  1093. if (this.dialogWhgenlegList.length === 0) {
  1094. this.$message({
  1095. message: "请选择需要导入的数据",
  1096. type: "warning",
  1097. });
  1098. } else {
  1099. this.dialogWhgenlegList.map((e) => {
  1100. let qty = 1;
  1101. if (e.fFeeUnitid == 1) {
  1102. qty = this.fQty;
  1103. } else if (e.fFeeUnitid == 2) {
  1104. qty = (this.fGrossweight / 1000).toFixed(2);
  1105. } else if (e.fFeeUnitid == 3) {
  1106. qty = (this.fNetweight / 1000).toFixed(2);
  1107. } else if (e.fFeeUnitid == 7) {
  1108. qty = this.fCntqty;
  1109. }
  1110. let fAmount = 0;
  1111. fAmount = e.fPrice * qty;
  1112. this.warehouseDrList.push({
  1113. fQty: qty,
  1114. fCorpid: e.fCorpid,
  1115. fFeeid: e.feeFId,
  1116. fFeeUnitid: e.fFeeUnitid,
  1117. fUnitprice: e.fPrice,
  1118. fCurrency: "RMB",
  1119. fExrate: 1,
  1120. fAmount: fAmount,
  1121. fTaxrate: this.fTaxrate,
  1122. fMblno: this.form.fMblno,
  1123. fProductName: this.form.fProductName,
  1124. fMarks: this.form.fMarks,
  1125. fBusinessType: this.form.fBusinessType,
  1126. fSrcTypeId: 1,
  1127. fStltypeid: '1',
  1128. });
  1129. });
  1130. this.warehousingagreements = false;
  1131. }
  1132. },
  1133. // 费用明细请核
  1134. listCheck(row) {
  1135. feesCheck(row.fId).then(res => {
  1136. this.$message.success('请核成功')
  1137. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1138. if (res.data.fDc == 'D') {
  1139. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1140. this.warehouseDrList.splice(index, 1, res.data)
  1141. } else {
  1142. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1143. this.warehouseCrList.splice(index, 1, res.data)
  1144. }
  1145. })
  1146. },
  1147. // 费用明细撤销请核
  1148. revokeListCheck(row) {
  1149. revokefeeCheck(row.fId).then(res => {
  1150. res.data.fFeeUnitid = res.data.fFeeunitid.toString();
  1151. this.$message.success('操作成功')
  1152. if (res.data.fDc == 'D') {
  1153. let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
  1154. this.warehouseDrList.splice(index, 1, res.data)
  1155. } else {
  1156. let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
  1157. this.warehouseCrList.splice(index, 1, res.data)
  1158. }
  1159. })
  1160. },
  1161. // 打印费用确认单准备
  1162. feesConfirm() {
  1163. if (this.Collectionoptionss.length > 0) {
  1164. for (let item in this.Collectionoptionss) {
  1165. if (!this.Collectionoptionss[item].fId) {
  1166. return this.$message.error("请先保存!");
  1167. }
  1168. }
  1169. if (this.CntrTable.length > 0) {
  1170. let arr = [];
  1171. this.CntrTable.map((e) => {
  1172. this.cntrList.map((item) => {
  1173. if (item.fId == e.fCntrid) {
  1174. arr.push(item.fName + "X" + e.fCntrcount);
  1175. }
  1176. });
  1177. });
  1178. arr = [...new Set(arr)];
  1179. this.form.fCntval = arr.join(",");
  1180. } else {
  1181. this.form.fCntval = null;
  1182. }
  1183. this.allTaxAmount = 0;
  1184. this.allExclTax = 0;
  1185. this.allDrAmount = 0;
  1186. this.Collectionoptionss.forEach(item => {
  1187. // 税额
  1188. this.$set(item, 'taxAmount', Number(item.fAmount) / (1 + Number(Number(item.fTaxrate) / 100)))
  1189. item.taxAmount = item.taxAmount.toSuperFixed(2)
  1190. // 不含税金额
  1191. this.$set(item, 'exclTax', Number(item.fAmount) - Number(item.taxAmount))
  1192. item.exclTax = item.exclTax.toSuperFixed(2)
  1193. this.allTaxAmount = Number(this.allTaxAmount) + Number(item.taxAmount)
  1194. this.allExclTax = Number(this.allExclTax) + Number(item.exclTax)
  1195. this.allDrAmount = Number(this.allDrAmount) + Number(item.fAmount)
  1196. this.allTaxAmount = this.allTaxAmount.toSuperFixed(2)
  1197. this.allExclTax = this.allExclTax.toSuperFixed(2)
  1198. this.allDrAmount = this.allDrAmount.toSuperFixed(2)
  1199. })
  1200. this.nowTime = new Date().toLocaleDateString()
  1201. for (let corp in this.fMblnoOptions) {
  1202. if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
  1203. this.$set(
  1204. this.form,
  1205. "fCorpidName",
  1206. this.fMblnoOptions[corp].fName
  1207. );
  1208. }
  1209. if (this.Collectionoptionss[0].fCorpid === this.fMblnoOptions[corp].fId) {
  1210. this.$set(
  1211. this.form,
  1212. "chargeUnit",
  1213. this.fMblnoOptions[corp].fName
  1214. );
  1215. }
  1216. }
  1217. this.print_fyqr = true;
  1218. } else {
  1219. this.$message.error("请选择需要打印的明细!");
  1220. }
  1221. },
  1222. // 打印
  1223. addprint(status) {
  1224. const style =
  1225. "@page { } " +
  1226. "@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;}";
  1227. switch (status) {
  1228. case "fyqrd":
  1229. print({
  1230. printable: "print_fyqr",
  1231. type: "html",
  1232. style: style, // 亦可使用引入的外部css;
  1233. scanStyles: false,
  1234. });
  1235. break;
  1236. }
  1237. },
  1238. },
  1239. watch: {
  1240. browseStatus(val) {
  1241. this.browseStatus = val;
  1242. },
  1243. warehouseDrList(val) {
  1244. this.warehouseDrList = val;
  1245. },
  1246. },
  1247. };
  1248. </script>
  1249. <style scoped lang="scss">
  1250. .print_table {
  1251. table {
  1252. border-right: 1px solid #000;
  1253. border-bottom: 1px solid #000;
  1254. font-size: 12px;
  1255. margin-bottom: 5px;
  1256. }
  1257. table td {
  1258. border-left: 1px solid #000;
  1259. border-top: 1px solid #000;
  1260. vertical-align: middle;
  1261. padding: 2px;
  1262. text-align: center;
  1263. }
  1264. }
  1265. .print_form {
  1266. font-size: 12px;
  1267. }
  1268. </style>