payMoney.vue 40 KB

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