payMoney.vue 36 KB

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