payMoney.vue 52 KB

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