payMoney.vue 36 KB

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