AddOrUpdate.vue 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928
  1. <template>
  2. <el-dialog
  3. :title="title"
  4. :visible.sync="showDialog"
  5. width="80%"
  6. @close="handleClose"
  7. :close-on-click-modal="false"
  8. >
  9. <span>
  10. <el-form ref="form" :model="form" label-width="90px">
  11. <el-row>
  12. <el-col :span="6">
  13. <el-form-item label="客户名称" prop="fCorpId">
  14. <el-select
  15. v-model="form.fCorpId"
  16. placeholder="请输入客户名称"
  17. :clearable="true"
  18. filterable
  19. size="mini"
  20. style="width: 180px"
  21. :disabled="true"
  22. >
  23. <el-option
  24. v-for="(dict, index) in fMblnoOptions"
  25. :key="index.fId"
  26. :label="dict.fName"
  27. :value="dict.fId"
  28. />
  29. </el-select>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="6">
  33. <el-form-item label="业务类型" prop="billType">
  34. <el-select
  35. v-model="form.billType"
  36. placeholder="请选择业务类型"
  37. :disabled="true"
  38. size="mini"
  39. style="width: 180px"
  40. >
  41. <el-option
  42. v-for="(dict, index) in billTypeList"
  43. :key="index.dictValue"
  44. :label="dict.dictLabel"
  45. :value="dict.dictValue"
  46. />
  47. </el-select>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="6">
  51. <el-form-item label="运输方式" prop="transType">
  52. <el-select
  53. v-model="form.transType"
  54. placeholder="请选择运输方式"
  55. :disabled="true"
  56. size="mini"
  57. style="width: 180px"
  58. >
  59. <el-option
  60. v-for="(dict, index) in transTypeList"
  61. :key="index.dictValue"
  62. :label="dict.dictLabel"
  63. :value="dict.dictValue"
  64. />
  65. </el-select>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="6">
  69. <el-form-item label="运输性质" prop="transProp">
  70. <el-select
  71. v-model="form.transProp"
  72. placeholder="请选择运输方式"
  73. :disabled="true"
  74. size="mini"
  75. style="width: 180px"
  76. >
  77. <el-option
  78. v-for="(dict, index) in transPropList"
  79. :key="index.dictValue"
  80. :label="dict.dictLabel"
  81. :value="dict.dictValue"
  82. />
  83. </el-select>
  84. </el-form-item>
  85. </el-col>
  86. </el-row>
  87. <el-row>
  88. <el-col :span="6">
  89. <el-form-item label="装车地点" prop="tLoadAddr">
  90. <el-input
  91. v-model="form.tLoadAddr"
  92. placeholder="请输入装车地点"
  93. :disabled="true"
  94. size="mini"
  95. style="width: 180px"
  96. />
  97. </el-form-item>
  98. </el-col>
  99. <el-col :span="6">
  100. <el-form-item label="计划时间" prop="tLoadDate">
  101. <el-date-picker
  102. clearable
  103. size="mini"
  104. style="width: 180px"
  105. v-model="form.tLoadDate"
  106. type="date"
  107. placeholder="选择计划装车时间"
  108. :disabled="true"
  109. >
  110. </el-date-picker>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="6">
  114. <el-form-item label="联系人" prop="loadAttn">
  115. <el-input
  116. v-model="form.tLoadAttn"
  117. placeholder="请输入装车联系人"
  118. :disabled="true"
  119. size="mini"
  120. style="width: 180px"
  121. />
  122. </el-form-item>
  123. </el-col>
  124. <el-col :span="6">
  125. <el-form-item label="联系电话" prop="loadAttntel">
  126. <el-input
  127. v-model="form.tLoadAttntel"
  128. placeholder="请输入装车联系电话"
  129. :disabled="true"
  130. v-input-limit="0"
  131. size="mini"
  132. style="width: 180px"
  133. />
  134. </el-form-item>
  135. </el-col>
  136. </el-row>
  137. <el-row>
  138. <el-col :span="6">
  139. <el-form-item label="卸车地点" prop="unLoadAddr">
  140. <el-input
  141. v-model="form.tUnLoadAddr"
  142. placeholder="请输入卸车地点"
  143. :disabled="true"
  144. size="mini"
  145. style="width: 180px"
  146. />
  147. </el-form-item>
  148. </el-col>
  149. <el-col :span="6">
  150. <el-form-item label="计划时间" prop="tUnLoadDate">
  151. <el-date-picker
  152. clearable
  153. size="mini"
  154. style="width: 180px"
  155. v-model="form.tUnLoadDate"
  156. type="date"
  157. placeholder="选择计划卸车时间"
  158. :disabled="true"
  159. >
  160. </el-date-picker>
  161. </el-form-item>
  162. </el-col>
  163. <el-col :span="6">
  164. <el-form-item label="联系人" prop="unLoadAttn">
  165. <el-input
  166. v-model="form.tUnLoadAttn"
  167. placeholder="请输入卸车联系人"
  168. :disabled="true"
  169. size="mini"
  170. style="width: 180px"
  171. />
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="6">
  175. <el-form-item label="联系电话" prop="unLoadAttnTel">
  176. <el-input
  177. v-model="form.tUnLoadAttnTel"
  178. placeholder="请输入卸车联系电话"
  179. :disabled="true"
  180. v-input-limit="0"
  181. size="mini"
  182. style="width: 180px"
  183. />
  184. </el-form-item>
  185. </el-col>
  186. </el-row>
  187. <el-row>
  188. <el-col :span="6">
  189. <el-form-item label="提单号" prop="mblno">
  190. <el-input
  191. v-model="form.mblno"
  192. placeholder="请输入提单号"
  193. :disabled="true"
  194. size="mini"
  195. style="width: 180px"
  196. />
  197. </el-form-item>
  198. </el-col>
  199. <el-col :span="6">
  200. <el-form-item label="货品名称" prop="goodsId">
  201. <el-select
  202. v-model="form.goodsId"
  203. placeholder="请输入货品名称"
  204. :disabled="true"
  205. clearable
  206. filterable
  207. size="mini"
  208. style="width: 180px"
  209. >
  210. <el-option
  211. v-for="(dict, index) in goodsOptions"
  212. :key="index.fId"
  213. :label="dict.fName"
  214. :value="dict.fId"
  215. />
  216. </el-select>
  217. </el-form-item>
  218. </el-col>
  219. <el-col :span="6">
  220. <el-form-item label="计划件数" prop="qtyPlan">
  221. <el-input
  222. v-model="form.qtyPlan"
  223. placeholder="请输入计划件数"
  224. :disabled="true"
  225. v-input-limit="2"
  226. size="mini"
  227. style="width: 180px"
  228. />
  229. </el-form-item>
  230. </el-col>
  231. <el-col :span="6">
  232. <el-form-item label="重量(吨)" prop="weightPlan">
  233. <el-input
  234. v-model="form.weightPlan"
  235. placeholder="请输入计划重量"
  236. :disabled="true"
  237. v-input-limit="2"
  238. size="mini"
  239. style="width: 180px"
  240. />
  241. </el-form-item>
  242. </el-col>
  243. </el-row>
  244. <el-row>
  245. <el-col :span="6">
  246. <el-form-item label="船名" prop="ysl">
  247. <el-input
  248. v-model="form.ysl"
  249. placeholder="请输入船名"
  250. :disabled="true"
  251. size="mini"
  252. style="width: 180px"
  253. />
  254. </el-form-item>
  255. </el-col>
  256. <el-col :span="6">
  257. <el-form-item label="航次" prop="voy">
  258. <el-input
  259. v-model="form.voy"
  260. placeholder="请输入航次"
  261. :disabled="true"
  262. size="mini"
  263. style="width: 180px"
  264. />
  265. </el-form-item>
  266. </el-col>
  267. <el-col :span="6">
  268. <el-form-item label="起运港" prop="polId">
  269. <el-select
  270. v-model="form.polId"
  271. placeholder="请输入起运港"
  272. :clearable="true"
  273. filterable
  274. :disabled="true"
  275. size="mini"
  276. style="width: 180px"
  277. >
  278. <el-option
  279. v-for="(dict, index) in polList"
  280. :key="index.fId"
  281. :label="dict.fName"
  282. :value="dict.fId"
  283. />
  284. </el-select>
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="6">
  288. <el-form-item label="目的港" prop="podId">
  289. <el-select
  290. v-model="form.podId"
  291. placeholder="请输入目的港"
  292. :clearable="true"
  293. filterable
  294. :disabled="true"
  295. size="mini"
  296. style="width: 180px"
  297. >
  298. <el-option
  299. v-for="(dict, index) in podList"
  300. :key="index.fId"
  301. :label="dict.fName"
  302. :value="dict.fId"
  303. />
  304. </el-select>
  305. </el-form-item>
  306. </el-col>
  307. </el-row>
  308. <el-row>
  309. <el-col :span="6">
  310. <el-form-item label="车号" prop="carregNo">
  311. <el-input
  312. v-model="form.carregNo"
  313. placeholder="请输入车号"
  314. :disabled="true"
  315. size="mini"
  316. style="width: 180px"
  317. />
  318. </el-form-item>
  319. </el-col>
  320. <el-col :span="6">
  321. <el-form-item label="司机" prop="driverName">
  322. <el-input
  323. v-model="form.driverName"
  324. placeholder="请输入司机"
  325. :disabled="true"
  326. size="mini"
  327. style="width: 180px"
  328. />
  329. </el-form-item>
  330. </el-col>
  331. <el-col :span="6">
  332. <el-form-item label="司机电话" prop="driverTel">
  333. <el-input
  334. v-model="form.driverTel"
  335. placeholder="请输入司机电话"
  336. :disabled="true"
  337. size="mini"
  338. style="width: 180px"
  339. />
  340. </el-form-item>
  341. </el-col>
  342. <el-col :span="6">
  343. <el-form-item label="箱号" prop="cntrName">
  344. <el-input
  345. v-model="form.cntrName"
  346. placeholder="请输入箱号"
  347. :disabled="true"
  348. size="mini"
  349. style="width: 180px"
  350. />
  351. </el-form-item>
  352. </el-col>
  353. </el-row>
  354. <el-row>
  355. <el-col :span="6">
  356. <el-form-item label="运单号" prop="orderNo">
  357. <el-input
  358. v-model="form.orderNo"
  359. placeholder="请输入运单号"
  360. size="mini"
  361. style="width: 180px"
  362. v-input-limit="2"
  363. disabled
  364. />
  365. </el-form-item>
  366. </el-col>
  367. <el-col :span="6">
  368. <el-form-item label="起始里程" prop="odometerFrom">
  369. <el-input
  370. v-model="form.odometerFrom"
  371. placeholder="请输入起始里程表读数"
  372. size="mini"
  373. style="width: 180px"
  374. v-input-limit="2"
  375. :disabled="disabled||form.billStatus == 7"
  376. />
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="6">
  380. <el-form-item label="结束里程" prop="odometerEnd">
  381. <el-input
  382. v-model="form.odometerEnd"
  383. placeholder="请输入结束里程表读数"
  384. size="mini"
  385. style="width: 180px"
  386. v-input-limit="2"
  387. :disabled="disabled||form.billStatus == 7"
  388. />
  389. </el-form-item>
  390. </el-col>
  391. <el-col :span="6">
  392. <el-form-item label="接单时间" prop="acceptDate">
  393. <el-date-picker
  394. clearable
  395. size="mini"
  396. style="width: 180px"
  397. v-model="form.acceptDate"
  398. type="date"
  399. value-format="yyyy-MM-dd"
  400. placeholder="选择接单时间"
  401. :disabled="disabled||form.billStatus == 7"
  402. >
  403. </el-date-picker>
  404. </el-form-item>
  405. </el-col>
  406. </el-row>
  407. <el-row>
  408. <el-col :span="6">
  409. <el-form-item label="提箱时间" prop="loadDate">
  410. <el-date-picker
  411. clearable
  412. size="mini"
  413. style="width: 180px"
  414. v-model="form.loadDate"
  415. type="date"
  416. value-format="yyyy-MM-dd"
  417. placeholder="选择提箱时间"
  418. :disabled="disabled||form.billStatus == 7"
  419. >
  420. </el-date-picker>
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="6">
  424. <el-form-item label="装卸货时间" prop="mdLoadDate">
  425. <el-date-picker
  426. clearable
  427. size="mini"
  428. style="width: 180px"
  429. v-model="form.mdLoadDate"
  430. type="date"
  431. value-format="yyyy-MM-dd"
  432. placeholder="选择装卸货时间"
  433. :disabled="disabled||form.billStatus == 7"
  434. >
  435. </el-date-picker>
  436. </el-form-item>
  437. </el-col>
  438. <el-col :span="6">
  439. <el-form-item label="还卸柜时间" prop="unLoadDate">
  440. <el-date-picker
  441. clearable
  442. size="mini"
  443. style="width: 180px"
  444. v-model="form.unLoadDate"
  445. type="date"
  446. value-format="yyyy-MM-dd"
  447. placeholder="选择还卸柜时间"
  448. :disabled="disabled||form.billStatus == 7"
  449. >
  450. </el-date-picker>
  451. </el-form-item>
  452. </el-col>
  453. <el-col :span="6">
  454. <el-form-item label="回单时间" prop="waybillDate">
  455. <el-date-picker
  456. clearable
  457. size="mini"
  458. style="width: 180px"
  459. v-model="form.waybillDate"
  460. type="date"
  461. value-format="yyyy-MM-dd"
  462. placeholder="选择回单时间"
  463. :disabled="disabled||form.billStatus == 7"
  464. >
  465. </el-date-picker>
  466. </el-form-item>
  467. </el-col>
  468. </el-row>
  469. <el-row>
  470. <el-col :span="6">
  471. <el-form-item label="油气费" prop="oilAmt">
  472. <el-input
  473. v-model="form.oilAmt"
  474. placeholder="请输入油气费"
  475. size="mini"
  476. style="width: 180px"
  477. v-input-limit="2"
  478. :disabled="disabled||form.billStatus == 7 || form.billKind == 'MH'"
  479. />
  480. </el-form-item>
  481. </el-col>
  482. <el-col :span="6">
  483. <el-form-item label="单趟提成" prop="driverbonus">
  484. <el-input
  485. v-model="form.driverbonus"
  486. placeholder="请输入单趟提成"
  487. size="mini"
  488. style="width: 180px"
  489. v-input-limit="2"
  490. :disabled="disabled||form.billStatus == 7 || form.billKind == 'MH'"
  491. />
  492. </el-form-item>
  493. </el-col>
  494. <el-col :span="6">
  495. <el-form-item label="其他费用" prop="costOth">
  496. <el-input
  497. v-model="form.costOth"
  498. placeholder="请输入其他费用"
  499. size="mini"
  500. style="width: 180px"
  501. v-input-limit="2"
  502. :disabled="disabled||form.billStatus == 7"
  503. />
  504. </el-form-item>
  505. </el-col>
  506. <el-col :span="6">
  507. <el-form-item label="花销备注" prop="costRemarks">
  508. <el-input
  509. v-model="form.costRemarks"
  510. placeholder="请输入备注"
  511. size="mini"
  512. style="width: 180px"
  513. :disabled="disabled||form.billStatus == 7"
  514. />
  515. </el-form-item>
  516. </el-col>
  517. </el-row>
  518. <el-row v-if="form.billType == 1">
  519. <el-col :span="6">
  520. <el-form-item label="修洗费" prop="costomAmt03">
  521. <el-input
  522. v-model="form.costomAmt03"
  523. placeholder="请输入修洗费"
  524. size="mini"
  525. style="width: 180px"
  526. v-input-limit="2"
  527. :disabled="disabled||form.billStatus == 7"
  528. />
  529. </el-form-item>
  530. </el-col>
  531. <el-col :span="6">
  532. <el-form-item label="吊装费" prop="costomAmt04">
  533. <el-input
  534. v-model="form.costomAmt04"
  535. placeholder="请输入吊装费"
  536. size="mini"
  537. style="width: 180px"
  538. v-input-limit="2"
  539. :disabled="disabled||form.billStatus == 7"
  540. />
  541. </el-form-item>
  542. </el-col>
  543. <el-col :span="6">
  544. <el-form-item label="其他费用" prop="costomAmt02">
  545. <el-input
  546. v-model="form.costomAmt02"
  547. placeholder="请输入其他费用"
  548. size="mini"
  549. style="width: 180px"
  550. v-input-limit="2"
  551. :disabled="disabled||form.billStatus == 7"
  552. />
  553. </el-form-item>
  554. </el-col>
  555. <el-col :span="6">
  556. <el-form-item label="费用备注" prop="costomStr02">
  557. <el-input
  558. v-model="form.costomStr02"
  559. placeholder="请输入备注"
  560. size="mini"
  561. style="width: 180px"
  562. :disabled="disabled||form.billStatus == 7"
  563. />
  564. </el-form-item>
  565. </el-col>
  566. </el-row>
  567. <el-row v-if="form.billType == 2">
  568. <el-col :span="6">
  569. <el-form-item label="港杂费" prop="costomAmt05">
  570. <el-input
  571. v-model="form.costomAmt05"
  572. placeholder="请输入港杂费"
  573. size="mini"
  574. style="width: 180px"
  575. v-input-limit="2"
  576. :disabled="disabled||form.billStatus == 7"
  577. />
  578. </el-form-item>
  579. </el-col>
  580. <el-col :span="6">
  581. <el-form-item label="提箱费" prop="costomAmt06">
  582. <el-input
  583. v-model="form.costomAmt06"
  584. placeholder="请输入提箱费"
  585. size="mini"
  586. style="width: 180px"
  587. v-input-limit="2"
  588. :disabled="disabled||form.billStatus == 7"
  589. />
  590. </el-form-item>
  591. </el-col>
  592. <el-col :span="6">
  593. <el-form-item label="其他费用" prop="costomAmt01">
  594. <el-input
  595. v-model="form.costomAmt01"
  596. placeholder="请输入其他费用"
  597. size="mini"
  598. style="width: 180px"
  599. v-input-limit="2"
  600. :disabled="disabled||form.billStatus == 7"
  601. />
  602. </el-form-item>
  603. </el-col>
  604. <el-col :span="6">
  605. <el-form-item label="费用备注" prop="costomStr01">
  606. <el-input
  607. v-model="form.costomStr01"
  608. placeholder="请输入备注"
  609. size="mini"
  610. style="width: 180px"
  611. :disabled="disabled||form.billStatus == 7"
  612. />
  613. </el-form-item>
  614. </el-col>
  615. </el-row>
  616. <el-row>
  617. <el-col>
  618. <el-form-item label="备注" prop="acceptRemarks">
  619. <el-input
  620. v-model="form.acceptRemarks"
  621. placeholder="请输入备注"
  622. size="mini"
  623. :disabled="disabled||form.billStatus == 7"
  624. type="textarea"
  625. :rows="2"
  626. />
  627. </el-form-item>
  628. </el-col>
  629. </el-row>
  630. </el-form>
  631. <el-collapse v-model="collapses">
  632. <el-collapse-item>
  633. <template slot="title">
  634. <i class="header-icon el-icon-circle-plus" style="font-size: 16px"
  635. ><span
  636. style="font-size: 16px; font-weight: bolder; margin-left: 5px"
  637. >确认费用</span
  638. >
  639. </i>
  640. </template>
  641. <div>
  642. <div
  643. style="
  644. display: flex;
  645. justify-content: space-between;
  646. margin: 10px 0;
  647. "
  648. >
  649. <div>
  650. <el-button
  651. type="primary"
  652. icon="el-icon-plus"
  653. size="mini"
  654. @click="addRelevt4"
  655. :disabled="form.billStatus == 7"
  656. v-hasPermi="['fleet:vehicleStatus:edit']"
  657. >添加费用</el-button
  658. >
  659. <el-button
  660. type="primary"
  661. icon="el-icon-plus"
  662. size="mini"
  663. @click="addRelevt2"
  664. :disabled="form.billStatus == 7"
  665. v-hasPermi="['fleet:vehicleStatus:edit']"
  666. >导入费用</el-button
  667. >
  668. </div>
  669. </div>
  670. </div>
  671. <el-table :data="chiFeesList" style="width: 100%">
  672. <el-table-column
  673. prop="fCorpid"
  674. label="结算单位"
  675. align="center"
  676. width="180"
  677. >
  678. <template slot-scope="scope">
  679. <el-select
  680. v-model="scope.row.fCorpid"
  681. placeholder="请输入客户名称"
  682. :clearable="true"
  683. filterable
  684. size="mini"
  685. style="width: 160px"
  686. :disabled="
  687. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  688. "
  689. >
  690. <el-option
  691. v-for="(dict, index) in allfMblnoOptions"
  692. :key="index.fId"
  693. :label="dict.fName"
  694. :value="dict.fId"
  695. />
  696. </el-select>
  697. </template>
  698. </el-table-column>
  699. <el-table-column
  700. prop="fFeeid"
  701. label="费用名称"
  702. align="center"
  703. width="120"
  704. >
  705. <template slot-scope="scope">
  706. <el-select
  707. v-model="scope.row.fFeeid"
  708. filterable
  709. remote
  710. placeholder="费用名称"
  711. :disabled="
  712. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  713. "
  714. >
  715. <el-option
  716. v-for="(dict, index) in fWbuOptions"
  717. :key="index.fId"
  718. :label="dict.fName"
  719. :value="dict.fId"
  720. ></el-option>
  721. </el-select>
  722. </template>
  723. </el-table-column>
  724. <el-table-column prop="fDc" label="收付" align="center" width="100">
  725. <template slot-scope="scope">
  726. <el-select
  727. v-model="scope.row.fDc"
  728. placeholder="请选择"
  729. :disabled="
  730. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  731. "
  732. >
  733. <el-option label="收" value="D"></el-option>
  734. <el-option label="付" value="C"></el-option>
  735. </el-select>
  736. </template>
  737. </el-table-column>
  738. <el-table-column
  739. prop="fFeeunitid"
  740. label="计费单位"
  741. align="center"
  742. width="100"
  743. >
  744. <template slot-scope="scope">
  745. <el-select
  746. v-model="scope.row.fFeeunitid"
  747. placeholder="请选择计费单位"
  748. :disabled="
  749. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  750. "
  751. clearable
  752. >
  753. <el-option
  754. v-for="dict in jFeetunitOptions"
  755. :key="dict.dictValue"
  756. :label="dict.dictLabel"
  757. :value="dict.dictValue"
  758. />
  759. </el-select>
  760. </template>
  761. </el-table-column>
  762. <el-table-column
  763. prop="fBillingQty"
  764. label="计费数量"
  765. align="center"
  766. width="100"
  767. >
  768. <template slot-scope="scope">
  769. <el-input
  770. v-model="scope.row.fBillingQty"
  771. placeholder="请输入内容"
  772. :disabled="
  773. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  774. "
  775. @input="total(scope.row)"
  776. v-input-limit="2"
  777. ></el-input>
  778. </template>
  779. </el-table-column>
  780. <el-table-column
  781. prop="fUnitprice"
  782. label="单价"
  783. align="center"
  784. width="100"
  785. >
  786. <template slot-scope="scope">
  787. <el-input
  788. v-model="scope.row.fUnitprice"
  789. placeholder="请输入内容"
  790. :disabled="
  791. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  792. "
  793. @input="total(scope.row)"
  794. v-input-limit="2"
  795. ></el-input>
  796. </template>
  797. </el-table-column>
  798. <el-table-column
  799. prop="fCurrency"
  800. label="币种"
  801. align="center"
  802. width="100"
  803. >
  804. <template slot-scope="scope">
  805. <el-input
  806. v-model="scope.row.fCurrency"
  807. :disabled="
  808. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  809. "
  810. placeholder="请输入内容"
  811. ></el-input>
  812. </template>
  813. </el-table-column>
  814. <el-table-column
  815. prop="fExrate"
  816. label="汇率"
  817. align="center"
  818. width="100"
  819. >
  820. <template slot-scope="scope">
  821. <el-input
  822. v-model="scope.row.fExrate"
  823. :disabled="
  824. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  825. "
  826. placeholder="请输入内容"
  827. ></el-input>
  828. </template>
  829. </el-table-column>
  830. <el-table-column
  831. prop="fAmount"
  832. label="金额"
  833. align="center"
  834. width="100"
  835. >
  836. <template slot-scope="scope">
  837. <el-input
  838. v-model="scope.row.fAmount"
  839. :disabled="
  840. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  841. "
  842. placeholder="请输入内容"
  843. ></el-input>
  844. </template>
  845. </el-table-column>
  846. <el-table-column
  847. prop="fTaxrate"
  848. label="税率"
  849. align="center"
  850. width="100"
  851. >
  852. <template slot-scope="scope">
  853. <el-input
  854. v-model="scope.row.fTaxrate"
  855. :disabled="
  856. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  857. "
  858. placeholder="请输入内容"
  859. ></el-input>
  860. </template>
  861. </el-table-column>
  862. <el-table-column
  863. prop="remarks"
  864. label="备注"
  865. align="center"
  866. width="180"
  867. >
  868. <template slot-scope="scope">
  869. <el-input
  870. v-model="scope.row.remarks"
  871. placeholder="请输入内容"
  872. :disabled="
  873. scope.row.fBillstatus > 2 && scope.row.fBillstatus <= 6||scope.row.fFeeid==61&&scope.row.actId == 1080
  874. "
  875. ></el-input>
  876. </template>
  877. </el-table-column>
  878. <el-table-column prop="remarks" label="费用来源" align="center">
  879. <template slot-scope="scope">
  880. <span v-if="scope.row.actId == 1080">费用确认</span>
  881. <span v-if="scope.row.actId == 1090">追加费用</span>
  882. </template>
  883. </el-table-column>
  884. <el-table-column
  885. label="操作"
  886. align="center"
  887. class-name="small-padding fixed-width"
  888. fixed="right"
  889. width="240px"
  890. >
  891. <template slot-scope="scope">
  892. <el-button
  893. size="mini"
  894. type="text"
  895. icon="el-icon-document-checked"
  896. :disabled="
  897. scope.row.fBillstatus == 6 || scope.row.fBillstatus == 3||form.billStatus == 7
  898. "
  899. @click.native.prevent="addFees(scope.row)"
  900. >提交</el-button
  901. >
  902. <el-button
  903. size="mini"
  904. type="text"
  905. icon="el-icon-refresh"
  906. :disabled="scope.row.fBillstatus == 3||form.billStatus == 7"
  907. @click.native.prevent="fixFees(scope.row)"
  908. >变更</el-button
  909. >
  910. <el-button
  911. size="mini"
  912. type="text"
  913. icon="el-icon-document-delete"
  914. :disabled="scope.row.fBillstatus < 6||form.billStatus == 7"
  915. @click.native.prevent="revokeFees(scope.row)"
  916. >撤销</el-button
  917. >
  918. <el-button
  919. size="mini"
  920. type="text"
  921. icon="el-icon-delete"
  922. :disabled="scope.row.fBillstatus == 6||form.billStatus == 7"
  923. @click.native.prevent="
  924. delFees(scope.$index, chiFeesList, scope.row)
  925. "
  926. >删除</el-button
  927. >
  928. </template>
  929. </el-table-column>
  930. </el-table>
  931. </el-collapse-item>
  932. <el-collapse-item>
  933. <template slot="title">
  934. <i class="header-icon el-icon-circle-plus" style="font-size: 16px"
  935. ><span
  936. style="font-size: 16px; font-weight: bolder; margin-left: 5px"
  937. >附件上传</span
  938. >
  939. </i>
  940. </template>
  941. <div>
  942. <div
  943. style="
  944. display: flex;
  945. justify-content: space-between;
  946. margin: 10px 0;
  947. "
  948. >
  949. <div>
  950. <el-button
  951. type="primary"
  952. icon="el-icon-plus"
  953. size="mini"
  954. @click="addRelevt"
  955. :disabled="disabled||form.billStatus == 7"
  956. >添加</el-button
  957. >
  958. </div>
  959. </div>
  960. <el-table
  961. :data="relevantAttachments"
  962. tooltip-effect="dark"
  963. border
  964. stripe
  965. style="width: 100%"
  966. height="150"
  967. >
  968. <el-table-column label="序号" type="index" width="80">
  969. </el-table-column>
  970. <el-table-column
  971. prop="attachName"
  972. header-align="center"
  973. align="center"
  974. label="附件名称"
  975. >
  976. <template slot-scope="scope">
  977. <el-input
  978. v-model="scope.row.attachName"
  979. placeholder="附件名称"
  980. show-word-limit
  981. :disabled="disabled||form.billStatus == 7"
  982. />
  983. </template>
  984. </el-table-column>
  985. <el-table-column
  986. prop="createBy "
  987. header-align="center"
  988. align="center"
  989. label="上传人"
  990. >
  991. <template slot-scope="scope">
  992. <el-input
  993. v-model="scope.row.createBy"
  994. placeholder="上传人"
  995. show-word-limit
  996. :disabled="disabled||form.billStatus == 7"
  997. />
  998. </template>
  999. </el-table-column>
  1000. <el-table-column
  1001. prop="createTime"
  1002. header-align="center"
  1003. align="center"
  1004. label="上传时间"
  1005. >
  1006. <template slot-scope="scope">
  1007. <el-date-picker
  1008. v-model="scope.row.createTime"
  1009. type="date"
  1010. disabled
  1011. placeholder="上传时间"
  1012. ></el-date-picker>
  1013. </template>
  1014. </el-table-column>
  1015. <el-table-column
  1016. prop="attachUrl"
  1017. header-align="center"
  1018. align="center"
  1019. label="上传附件"
  1020. >
  1021. <template slot-scope="scope">
  1022. <div style="display: flex; justify-content: center">
  1023. <el-upload
  1024. class="upload-demo"
  1025. :action="uploadImgUrl"
  1026. :on-success="
  1027. (res, file) => {
  1028. handleSucces(scope, res, file);
  1029. }
  1030. "
  1031. :headers="headers"
  1032. :disabled="disabled||form.billStatus == 7"
  1033. :show-file-list="false"
  1034. :limit="1"
  1035. >
  1036. <el-button size="small" type="text" :disabled="disabled||form.billStatus == 7"
  1037. >点击上传</el-button
  1038. >
  1039. </el-upload>
  1040. <el-button
  1041. size="small"
  1042. type="text"
  1043. @click="checkFile(scope)"
  1044. :disabled="disabled||form.billStatus == 7"
  1045. style="margin-left: 10px"
  1046. >查看</el-button
  1047. >
  1048. <el-button
  1049. size="small"
  1050. type="text"
  1051. :disabled="disabled||form.billStatus == 7"
  1052. @click="deleteFile(scope)"
  1053. >删除</el-button
  1054. >
  1055. </div>
  1056. </template>
  1057. </el-table-column>
  1058. <el-table-column
  1059. header-align="center"
  1060. align="center"
  1061. label="操作"
  1062. width="130PX"
  1063. >
  1064. <template slot-scope="scope">
  1065. <el-button
  1066. size="mini"
  1067. type="text"
  1068. icon="el-icon-delete"
  1069. @click.native.prevent="
  1070. deleteRow(scope.$index, relevantAttachments)
  1071. "
  1072. :disabled="disabled||form.billStatus == 7"
  1073. >删除</el-button
  1074. >
  1075. </template>
  1076. </el-table-column>
  1077. </el-table>
  1078. </div>
  1079. </el-collapse-item>
  1080. </el-collapse>
  1081. </span>
  1082. <span slot="footer" class="dialog-footer">
  1083. <el-button
  1084. type="primary"
  1085. @click="submitForm('acceptDate')"
  1086. v-hasPermi="['fleet:vehicleStatus:edit']"
  1087. :disabled="form.billStatus == 7"
  1088. >接 单</el-button
  1089. >
  1090. <el-button
  1091. type="primary"
  1092. @click="submitForm('loadDate')"
  1093. v-hasPermi="['fleet:vehicleStatus:edit']"
  1094. :disabled="form.billStatus == 7"
  1095. >提 箱</el-button
  1096. >
  1097. <el-button
  1098. type="primary"
  1099. @click="submitForm('mdLoadDate')"
  1100. v-hasPermi="['fleet:vehicleStatus:edit']"
  1101. :disabled="form.billStatus == 7"
  1102. >装卸货</el-button
  1103. >
  1104. <el-button
  1105. type="primary"
  1106. @click="submitForm('unLoadDate')"
  1107. v-hasPermi="['fleet:vehicleStatus:edit']"
  1108. :disabled="form.billStatus == 7"
  1109. >还卸柜</el-button
  1110. >
  1111. <el-button
  1112. type="primary"
  1113. @click="submitForm('waybillDate')"
  1114. v-hasPermi="['fleet:vehicleStatus:edit']"
  1115. :disabled="form.billStatus == 7"
  1116. >回 单</el-button
  1117. >
  1118. <el-button
  1119. type="primary"
  1120. @click="driversubmitForm"
  1121. v-hasPermi="['fleet:vehicleStatus:edit']"
  1122. :disabled="form.billStatus == 7"
  1123. >提 交</el-button
  1124. >
  1125. <el-button
  1126. type="success"
  1127. @click="submitAllowChanges"
  1128. v-hasPermi="['fleet:vehicleStatus:edit']"
  1129. :disabled="form.billStatus == 7"
  1130. >修 改</el-button
  1131. >
  1132. <el-button
  1133. type="info"
  1134. @click="submitSave"
  1135. v-hasPermi="['fleet:vehicleStatus:edit']"
  1136. :disabled="form.billStatus == 7"
  1137. >保 存</el-button
  1138. >
  1139. <!-- <el-button type="warning" @click="submitRetreat">撤 回</el-button> -->
  1140. <el-button @click="showDialog = false">取 消</el-button>
  1141. </span>
  1142. </el-dialog>
  1143. </template>
  1144. <script>
  1145. import {
  1146. removeFtmsorderbillscars,
  1147. driverSaveFtmsorderbillscars,
  1148. insertDriverFtmsorderbillscars,
  1149. } from "@/api/fleet/ftmsorderbillscars";
  1150. import { getBasicInformation } from "@/api/kaihe/basicdata/container";
  1151. import { listGoods } from "@/api/basicdata/goods";
  1152. import { listCorps } from "@/api/basicdata/corps";
  1153. import { listFees } from "@/api/basicdata/fees";
  1154. import UploadFile from "@/components/Uploadfile";
  1155. import {
  1156. submit,
  1157. changeFees,
  1158. revokeFees,
  1159. deleteFees,
  1160. driverSubmit,
  1161. } from "@/api/track/singleCost";
  1162. import Cookies from "js-cookie";
  1163. import { getToken } from "@/utils/auth";
  1164. export default {
  1165. name: "plans",
  1166. props: {
  1167. addOrUpdateVisible: {
  1168. type: Boolean,
  1169. default: false,
  1170. },
  1171. title: {
  1172. type: String,
  1173. required: "",
  1174. },
  1175. form: Object,
  1176. DList: {
  1177. type: Array,
  1178. default: [],
  1179. },
  1180. CList: {
  1181. type: Array,
  1182. default: [],
  1183. },
  1184. disabled: Boolean,
  1185. relevantAttachments: {
  1186. type: Array,
  1187. default: [],
  1188. },
  1189. feesList: {
  1190. type: Array,
  1191. default: () => [],
  1192. },
  1193. allfMblnoOptions: {
  1194. type: Array,
  1195. default: [],
  1196. },
  1197. },
  1198. components: {
  1199. UploadFile,
  1200. },
  1201. data() {
  1202. return {
  1203. chiFeesList: [],
  1204. // 控制弹出框显示隐藏
  1205. showDialog: false,
  1206. billTypeList: [],
  1207. transTypeList: [],
  1208. transPropList: [],
  1209. goodsLossTypeList: [],
  1210. cntrIdList: [],
  1211. priceTypeList: [],
  1212. userType: null,
  1213. username: null,
  1214. collapses: [],
  1215. fMblnoOptions: [],
  1216. fMblnoOptions2: [],
  1217. cntrId2List: [],
  1218. goodsOptions: [],
  1219. fWbuOptions: [],
  1220. ffeeunitidList: [],
  1221. polList: [],
  1222. podList: [],
  1223. uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
  1224. headers: {
  1225. Authorization: "Bearer " + getToken(),
  1226. },
  1227. jFeetunitOptions: [],
  1228. };
  1229. },
  1230. created() {
  1231. this.getDicts("data_unitfees").then((response) => {
  1232. if (response.data) {
  1233. this.jFeetunitOptions = response.data;
  1234. }
  1235. });
  1236. this.getDicts("data_billType").then((response) => {
  1237. this.billTypeList = response.data;
  1238. });
  1239. this.getDicts("data_transType").then((response) => {
  1240. this.transTypeList = response.data;
  1241. });
  1242. this.getDicts("data_transProp").then((response) => {
  1243. this.transPropList = response.data;
  1244. });
  1245. this.getDicts("data_goodsLossType").then((response) => {
  1246. this.goodsLossTypeList = response.data;
  1247. });
  1248. this.getDicts("data_cntrId").then((response) => {
  1249. response.data.map((e) => (e.noOption = false));
  1250. this.cntrIdList = response.data;
  1251. });
  1252. this.getDicts("data_priceType").then((response) => {
  1253. this.priceTypeList = response.data;
  1254. });
  1255. this.getDicts("data_ffeeunitid").then((response) => {
  1256. this.ffeeunitidList = response.data;
  1257. });
  1258. getBasicInformation({
  1259. fTypes: 1,
  1260. fStatus: "T",
  1261. }).then((response) => {
  1262. this.polList = response;
  1263. this.podList = response;
  1264. });
  1265. listCorps().then((response) => {
  1266. this.fMblnoOptions = response.rows;
  1267. });
  1268. listGoods().then((response) => {
  1269. this.goodsOptions = response.rows;
  1270. });
  1271. listFees().then((response) => {
  1272. this.fWbuOptions = response.rows;
  1273. });
  1274. this.userType = Cookies.get("userType");
  1275. this.username = Cookies.get("userName");
  1276. },
  1277. methods: {
  1278. // 新增附件上传
  1279. addRelevt4() {
  1280. this.chiFeesList.push({
  1281. actId: "1090",
  1282. fCorpid: this.form.fCorpId,
  1283. fFeeid: "",
  1284. fDc: "",
  1285. fFeeunitid: "1",
  1286. fBillingQty: 0,
  1287. fUnitprice: 0,
  1288. fCurrency: "RMB",
  1289. fTaxrate: null,
  1290. fAmount: 0,
  1291. fExrate: 1,
  1292. remarks: "",
  1293. });
  1294. },
  1295. // 新增附件上传
  1296. addRelevt() {
  1297. this.relevantAttachments.push({
  1298. attachUrl: null,
  1299. attachName: null,
  1300. createBy: this.username,
  1301. createTime: Date.parse(new Date()),
  1302. });
  1303. },
  1304. //附件删除
  1305. deleteFile(scope) {
  1306. this.relevantAttachments[scope.$index].attachName = "";
  1307. this.relevantAttachments[scope.$index].attachUrl = "";
  1308. if (this.relevantAttachments[scope.$index].attachUrl === "") {
  1309. this.$message.success("删除成功");
  1310. } else {
  1311. this.$message.error("未知错误,删除失败");
  1312. }
  1313. },
  1314. //附件查看
  1315. checkFile(scope) {
  1316. if (this.relevantAttachments[scope.$index].attachUrl) {
  1317. window.open(this.relevantAttachments[scope.$index].attachUrl);
  1318. } else {
  1319. this.$message.error("请上传附件");
  1320. }
  1321. },
  1322. //附件上传
  1323. handleSucces(scope, res, file) {
  1324. this.relevantAttachments[scope.$index].attachName = res.fileName;
  1325. this.relevantAttachments[scope.$index].attachUrl = res.url;
  1326. if (this.relevantAttachments[scope.$index].attachUrl === "") {
  1327. this.$message.error("上传失败");
  1328. } else {
  1329. this.$message.success("上传成功");
  1330. }
  1331. },
  1332. // 添加行
  1333. addRow(tableData, event) {
  1334. var obj = {};
  1335. tableData.push(obj);
  1336. },
  1337. addDListRow(tableData, event) {
  1338. var obj = {
  1339. fcorpid: this.form.fCorpId,
  1340. fcurrency: "RMB",
  1341. fPid: this.form.id,
  1342. fExrate: "1",
  1343. };
  1344. tableData.push(obj);
  1345. },
  1346. //删除行
  1347. deleteRow(index, rows) {
  1348. rows.splice(index, 1);
  1349. },
  1350. // 上传成功返回数据
  1351. showFile(row) {
  1352. for (let list in this.relevantAttachments) {
  1353. this.$set(this.relevantAttachments[list], "attachUrl", row.url);
  1354. this.$set(this.relevantAttachments[list], "attachName", row.fileName);
  1355. }
  1356. },
  1357. addRelevt2() {
  1358. let arr = this.chiFeesList;
  1359. arr.filter((e) => e.actId == "1080");
  1360. if (arr.length > 0) {
  1361. this.$confirm("已生成费用信息, 是否重新生成?", "提示", {
  1362. confirmButtonText: "确定",
  1363. cancelButtonText: "取消",
  1364. type: "warning",
  1365. })
  1366. .then(() => {
  1367. this.chiFeesList = this.chiFeesList.filter(
  1368. (e) => e.fBillstatus == 6 || e.actId != "1080"
  1369. );
  1370. console.log(this.chiFeesList);
  1371. this.addRelevt3();
  1372. })
  1373. .catch(() => {
  1374. this.$message({
  1375. type: "info",
  1376. message: "已取消",
  1377. });
  1378. });
  1379. } else {
  1380. this.addRelevt3();
  1381. }
  1382. },
  1383. addRelevt3() {
  1384. if (this.form.oilAmt > 0) {
  1385. this.fFeeid52 = true;
  1386. this.chiFeesList.map((e) => {
  1387. if (e.fFeeid == 52 && e.actId == 1080) {
  1388. this.fFeeid52 = false;
  1389. }
  1390. });
  1391. if (this.fFeeid52) {
  1392. this.chiFeesList.push({
  1393. actId: "1080",
  1394. fCorpid: this.form.driverUserId,
  1395. fFeeid: 52,
  1396. fDc: "C",
  1397. fFeeunitid: "6",
  1398. fBillingQty: 1,
  1399. fUnitprice: this.form.oilAmt,
  1400. fCurrency: "RMB",
  1401. fTaxrate: 3,
  1402. fAmount: this.form.oilAmt,
  1403. fExrate: 1,
  1404. remarks: null,
  1405. });
  1406. }
  1407. }
  1408. if (this.form.driverbonus > 0) {
  1409. this.fFeeid53 = true;
  1410. this.chiFeesList.map((e) => {
  1411. if (e.fFeeid == 53 && e.actId == 1080) {
  1412. this.fFeeid53 = false;
  1413. }
  1414. });
  1415. if (this.fFeeid53) {
  1416. this.chiFeesList.push({
  1417. actId: "1080",
  1418. fCorpid: this.form.driverUserId,
  1419. fFeeid: 53,
  1420. fDc: "C",
  1421. fFeeunitid: "6",
  1422. fBillingQty: 1,
  1423. fUnitprice: this.form.driverbonus,
  1424. fCurrency: "RMB",
  1425. fTaxrate: 3,
  1426. fAmount: this.form.driverbonus,
  1427. fExrate: 1,
  1428. remarks: null,
  1429. });
  1430. }
  1431. }
  1432. if (this.form.costOth > 0) {
  1433. this.fFeeid54 = true;
  1434. this.chiFeesList.map((e) => {
  1435. if (e.fFeeid == 54 && e.actId == 1080) {
  1436. this.fFeeid54 = false;
  1437. }
  1438. });
  1439. if (this.fFeeid54) {
  1440. this.chiFeesList.push({
  1441. actId: "1080",
  1442. fCorpid: this.form.driverUserId,
  1443. fFeeid: 54,
  1444. fDc: "C",
  1445. fFeeunitid: "6",
  1446. fBillingQty: 1,
  1447. fUnitprice: this.form.costOth,
  1448. fCurrency: "RMB",
  1449. fTaxrate: 3,
  1450. fAmount: this.form.costOth,
  1451. fExrate: 1,
  1452. remarks: null,
  1453. });
  1454. }
  1455. }
  1456. if (this.form.costomAmt03 > 0) {
  1457. this.fFeeid55 = true;
  1458. this.chiFeesList.map((e) => {
  1459. if (e.fFeeid == 55 && e.actId == 1080) {
  1460. this.fFeeid55 = false;
  1461. }
  1462. });
  1463. if (this.fFeeid55) {
  1464. this.chiFeesList.push(
  1465. {
  1466. actId: "1080",
  1467. fCorpid: this.form.fCorpId,
  1468. fFeeid: 55,
  1469. fDc: "D",
  1470. fFeeunitid: "6",
  1471. fBillingQty: 1,
  1472. fUnitprice: this.form.costomAmt03,
  1473. fCurrency: "RMB",
  1474. fTaxrate: 3,
  1475. fAmount: this.form.costomAmt03,
  1476. fExrate: 1,
  1477. remarks: null,
  1478. },
  1479. {
  1480. actId: "1080",
  1481. fCorpid: this.form.driverUserId,
  1482. fFeeid: 55,
  1483. fDc: "C",
  1484. fFeeunitid: "6",
  1485. fBillingQty: 1,
  1486. fUnitprice: this.form.costomAmt03,
  1487. fCurrency: "RMB",
  1488. fTaxrate: 3,
  1489. fAmount: this.form.costomAmt03,
  1490. fExrate: 1,
  1491. remarks: null,
  1492. }
  1493. );
  1494. }
  1495. }
  1496. if (this.form.costomAmt04 > 0) {
  1497. this.fFeeid56 = true;
  1498. this.chiFeesList.map((e) => {
  1499. if (e.fFeeid == 56 && e.actId == 1080) {
  1500. this.fFeeid56 = false;
  1501. }
  1502. });
  1503. if (this.fFeeid56) {
  1504. this.chiFeesList.push(
  1505. {
  1506. actId: "1080",
  1507. fCorpid: this.form.fCorpId,
  1508. fFeeid: 56,
  1509. fDc: "D",
  1510. fFeeunitid: "6",
  1511. fBillingQty: 1,
  1512. fUnitprice: this.form.costomAmt04,
  1513. fCurrency: "RMB",
  1514. fTaxrate: 3,
  1515. fAmount: this.form.costomAmt04,
  1516. fExrate: 1,
  1517. remarks: null,
  1518. },
  1519. {
  1520. actId: "1080",
  1521. fCorpid: this.form.driverUserId,
  1522. fFeeid: 56,
  1523. fDc: "C",
  1524. fFeeunitid: "6",
  1525. fBillingQty: 1,
  1526. fUnitprice: this.form.costomAmt04,
  1527. fCurrency: "RMB",
  1528. fTaxrate: 3,
  1529. fAmount: this.form.costomAmt04,
  1530. fExrate: 1,
  1531. remarks: null,
  1532. }
  1533. );
  1534. }
  1535. }
  1536. if (this.form.costomAmt02 > 0) {
  1537. this.chiFeesList.map((e) => {
  1538. this.fFeeid57 = true;
  1539. if (e.fFeeid == 57 && e.actId == 1080) {
  1540. this.fFeeid57 = false;
  1541. }
  1542. });
  1543. if (this.fFeeid57) {
  1544. this.chiFeesList.push(
  1545. {
  1546. actId: "1080",
  1547. fCorpid: this.form.fCorpId,
  1548. fFeeid: 57,
  1549. fDc: "D",
  1550. fFeeunitid: "6",
  1551. fBillingQty: 1,
  1552. fUnitprice: this.form.costomAmt02,
  1553. fCurrency: "RMB",
  1554. fTaxrate: 3,
  1555. fAmount: this.form.costomAmt02,
  1556. fExrate: 1,
  1557. remarks: null,
  1558. },
  1559. {
  1560. actId: "1080",
  1561. fCorpid: this.form.driverUserId,
  1562. fFeeid: 57,
  1563. fDc: "C",
  1564. fFeeunitid: "6",
  1565. fBillingQty: 1,
  1566. fUnitprice: this.form.costomAmt02,
  1567. fCurrency: "RMB",
  1568. fTaxrate: 3,
  1569. fAmount: this.form.costomAmt02,
  1570. fExrate: 1,
  1571. remarks: null,
  1572. }
  1573. );
  1574. }
  1575. }
  1576. if (this.form.costomAmt05 > 0) {
  1577. this.fFeeid58 = true;
  1578. this.chiFeesList.map((e) => {
  1579. if (e.fFeeid == 58 && e.actId == 1080) {
  1580. this.fFeeid58 = false;
  1581. }
  1582. });
  1583. if (this.fFeeid58) {
  1584. this.chiFeesList.push(
  1585. {
  1586. actId: "1080",
  1587. fCorpid: this.form.fCorpId,
  1588. fFeeid: 58,
  1589. fDc: "D",
  1590. fFeeunitid: "6",
  1591. fBillingQty: 1,
  1592. fUnitprice: this.form.costomAmt05,
  1593. fCurrency: "RMB",
  1594. fTaxrate: 3,
  1595. fAmount: this.form.costomAmt05,
  1596. fExrate: 1,
  1597. remarks: null,
  1598. },
  1599. {
  1600. actId: "1080",
  1601. fCorpid: this.form.driverUserId,
  1602. fFeeid: 58,
  1603. fDc: "C",
  1604. fFeeunitid: "6",
  1605. fBillingQty: 1,
  1606. fUnitprice: this.form.costomAmt05,
  1607. fCurrency: "RMB",
  1608. fTaxrate: 3,
  1609. fAmount: this.form.costomAmt05,
  1610. fExrate: 1,
  1611. remarks: null,
  1612. }
  1613. );
  1614. }
  1615. }
  1616. if (this.form.costomAmt06 > 0) {
  1617. this.fFeeid59 = true;
  1618. this.chiFeesList.map((e) => {
  1619. if (e.fFeeid == 59 && e.actId == 1080) {
  1620. this.fFeeid59 = false;
  1621. }
  1622. });
  1623. if (this.fFeeid59) {
  1624. this.chiFeesList.push(
  1625. {
  1626. actId: "1080",
  1627. fCorpid: this.form.fCorpId,
  1628. fFeeid: 59,
  1629. fDc: "D",
  1630. fFeeunitid: "6",
  1631. fBillingQty: 1,
  1632. fUnitprice: this.form.costomAmt06,
  1633. fCurrency: "RMB",
  1634. fTaxrate: 3,
  1635. fAmount: this.form.costomAmt06,
  1636. fExrate: 1,
  1637. remarks: null,
  1638. },
  1639. {
  1640. actId: "1080",
  1641. fCorpid: this.form.driverUserId,
  1642. fFeeid: 59,
  1643. fDc: "C",
  1644. fFeeunitid: "6",
  1645. fBillingQty: 1,
  1646. fUnitprice: this.form.costomAmt06,
  1647. fCurrency: "RMB",
  1648. fTaxrate: 3,
  1649. fAmount: this.form.costomAmt06,
  1650. fExrate: 1,
  1651. remarks: null,
  1652. }
  1653. );
  1654. }
  1655. }
  1656. if (this.form.costomAmt01 > 0) {
  1657. this.fFeeid60 = true;
  1658. this.chiFeesList.map((e) => {
  1659. if (e.fFeeid == 60 && e.actId == 1080) {
  1660. this.fFeeid60 = false;
  1661. }
  1662. });
  1663. if (this.fFeeid60) {
  1664. this.chiFeesList.push(
  1665. {
  1666. actId: "1080",
  1667. fCorpid: this.form.fCorpId,
  1668. fFeeid: 60,
  1669. fDc: "D",
  1670. fFeeunitid: "6",
  1671. fBillingQty: 1,
  1672. fUnitprice: this.form.costomAmt01,
  1673. fCurrency: "RMB",
  1674. fTaxrate: 3,
  1675. fAmount: this.form.costomAmt01,
  1676. fExrate: 1,
  1677. remarks: null,
  1678. },
  1679. {
  1680. actId: "1080",
  1681. fCorpid: this.form.driverUserId,
  1682. fFeeid: 60,
  1683. fDc: "C",
  1684. fFeeunitid: "6",
  1685. fBillingQty: 1,
  1686. fUnitprice: this.form.costomAmt01,
  1687. fCurrency: "RMB",
  1688. fTaxrate: 3,
  1689. fAmount: this.form.costomAmt01,
  1690. fExrate: 1,
  1691. remarks: null,
  1692. }
  1693. );
  1694. }
  1695. }
  1696. if (this.form.freightPriceCr > 0||this.form.freightPriceDr > 0) {
  1697. this.fFeeid61 = true;
  1698. this.chiFeesList.map((e) => {
  1699. if (e.fFeeid == 61 && e.actId == 1080) {
  1700. this.fFeeid61 = false;
  1701. }
  1702. });
  1703. if (this.fFeeid61&& this.form.freightPriceDr> 0) {
  1704. this.chiFeesList.push({
  1705. actId: "1080",
  1706. fCorpid: this.form.fCorpId,
  1707. fFeeid: 61,
  1708. fDc: "D",
  1709. fFeeunitid: "6",
  1710. fBillingQty: 1,
  1711. fUnitprice: this.form.freightPriceDr,
  1712. fCurrency: "RMB",
  1713. fTaxrate: 3,
  1714. fAmount: this.form.freightPriceDr,
  1715. fExrate: 1,
  1716. remarks: null,
  1717. });
  1718. }
  1719. if (this.fFeeid61 && this.form.freightPriceCr > 0) {
  1720. this.chiFeesList.push({
  1721. actId: "1080",
  1722. fCorpid: this.form.carcorPid,
  1723. fFeeid: 61,
  1724. fDc: "C",
  1725. fFeeunitid: "6",
  1726. fBillingQty: 1,
  1727. fUnitprice: this.form.freightPriceCr,
  1728. fCurrency: "RMB",
  1729. fTaxrate: 3,
  1730. fAmount: this.form.freightPriceCr,
  1731. fExrate: 1,
  1732. remarks: null,
  1733. });
  1734. }
  1735. } else {
  1736. this.$message.error("未找到运输费用,请确认是否已添加");
  1737. }
  1738. },
  1739. // 弹出框关闭后触发
  1740. handleClose() {
  1741. // 子组件调用父组件方法,并传递参数
  1742. this.$emit("changeShow", "false");
  1743. this.cntrIdList.forEach((item) => (item.noOption = false));
  1744. this.collapses = [];
  1745. },
  1746. /** 提交按钮 */
  1747. submitForm(butType) {
  1748. this.$refs["form"].validate((valid) => {
  1749. if (valid) {
  1750. if (this.form.costOth > 0 && !this.form.costRemarks) {
  1751. return this.$message.error("请输入花销备注");
  1752. }
  1753. if (this.form.costomAmt02 > 0 && !this.form.costomStr02) {
  1754. return this.$message.error("请输入费用备注");
  1755. }
  1756. if (this.form.costomAmt01 > 0 && !this.form.costomStr01) {
  1757. return this.$message.error("请输入费用备注");
  1758. }
  1759. this.DList.map((e) => {
  1760. return (e.fDc = "D");
  1761. });
  1762. this.CList.map((e) => {
  1763. return (e.fDc = "C");
  1764. });
  1765. let formData = new window.FormData();
  1766. formData.append("cars", JSON.stringify(this.form));
  1767. formData.append("attachs", JSON.stringify(this.relevantAttachments));
  1768. formData.append("operationType", butType);
  1769. insertDriverFtmsorderbillscars(formData).then((response) => {
  1770. if (response.code == 200) {
  1771. this.$set(this.form, "orderStatus", response.data.orderStatus);
  1772. this.msgSuccess("提交成功");
  1773. this.$parent.getList();
  1774. }
  1775. });
  1776. }
  1777. });
  1778. },
  1779. //修改
  1780. submitFix() {
  1781. this.$refs["form"].validate((valid) => {
  1782. if (valid) {
  1783. }
  1784. });
  1785. },
  1786. //保存
  1787. submitSave() {
  1788. let formData = new window.FormData();
  1789. formData.append("cars", JSON.stringify(this.form));
  1790. formData.append("attachs", JSON.stringify(this.relevantAttachments));
  1791. formData.append("fees", JSON.stringify(this.chiFeesList));
  1792. formData.append("operationType", "unLoadDate");
  1793. driverSaveFtmsorderbillscars(formData).then((response) => {
  1794. if (response.code == 200) {
  1795. this.msgSuccess("保存成功");
  1796. this.$parent.getList();
  1797. // this.$parent.getSave(response);
  1798. }
  1799. });
  1800. },
  1801. //撤回
  1802. submitRetreat() {},
  1803. //修改
  1804. submitAllowChanges() {
  1805. if (this.form.orderStatus <= 60) {
  1806. this.$emit("fixDisabled", "false");
  1807. this.msgSuccess("允许修改");
  1808. } else {
  1809. this.msgSuccess("不允许修改");
  1810. }
  1811. },
  1812. driversubmitForm() {
  1813. if (this.chiFeesList.length == 0) {
  1814. return this.$message.error("确认费用不能为空");
  1815. }
  1816. if(this.form.orderStatus<60){
  1817. return this.$message.error("该运单未回单,请先回单");
  1818. }
  1819. let formData = new window.FormData();
  1820. formData.append("cars", JSON.stringify(this.form));
  1821. formData.append("attachs", JSON.stringify(this.relevantAttachments));
  1822. formData.append("fees", JSON.stringify(this.chiFeesList));
  1823. driverSubmit(formData).then((response) => {
  1824. if (response.code == 200) {
  1825. this.msgSuccess("提交成功");
  1826. this.showDialog = false;
  1827. this.$parent.getList();
  1828. }
  1829. });
  1830. },
  1831. addFees(row) {
  1832. if (row.fBillstatus == 1) {
  1833. row.fBillstatus = 6;
  1834. }
  1835. if (row.fBillstatus == 6) {
  1836. return this.$message.error("已提交,请勿重复提交");
  1837. }
  1838. let formDatae = new window.FormData();
  1839. formDatae.append("status", 6);
  1840. formDatae.append("cars", JSON.stringify(this.form));
  1841. formDatae.append("ftmsorderbillsfees", JSON.stringify(row));
  1842. submit(formDatae).then((response) => {
  1843. if (response.code == 200) {
  1844. this.$message.success("提交成功");
  1845. this.$set(row, "fId", response.data.ftmsorderbillsfeesList.fId);
  1846. this.$set(
  1847. row,
  1848. "fBillstatus",
  1849. response.data.ftmsorderbillsfeesList.fBillstatus
  1850. );
  1851. }
  1852. });
  1853. },
  1854. fixFees(row) {
  1855. if (row.fBillstatus == 0) {
  1856. return this.$message.error("已进行变更,请勿重复点击");
  1857. }
  1858. if (row.fId) {
  1859. changeFees(row.fId).then((response) => {
  1860. if (response.code == 200) {
  1861. this.$message.success("允许修改");
  1862. this.$set(row, "fBillstatus", 1);
  1863. }
  1864. });
  1865. }
  1866. },
  1867. delFees(index, rows, row) {
  1868. if (row.fBillstatus == 2 || row.fBillstatus == 3) {
  1869. deleteFees(row.fId).then((response) => {
  1870. if (response.code == 200) {
  1871. rows.splice(index, 1);
  1872. this.$message.success("删除成功");
  1873. }
  1874. });
  1875. } else if (!row.fBillstatus) {
  1876. rows.splice(index, 1);
  1877. this.$message.success("删除成功");
  1878. } else {
  1879. this.$message.error("不允许删除");
  1880. }
  1881. },
  1882. revokeFees(row) {
  1883. revokeFees(row.fId).then((response) => {
  1884. if (response.code == 200) {
  1885. this.$message.success("撤销成功");
  1886. this.$set(row, "fBillstatus", 3);
  1887. }
  1888. });
  1889. },
  1890. //单条订单调度提交
  1891. addscarsRow(row) {},
  1892. delscarsRow(index, rows, row) {
  1893. if (row.billStatus != 6 && row.id != null) {
  1894. removeFtmsorderbillscars(row).then((response) => {
  1895. if (response.code == 200) {
  1896. rows.splice(index, 1);
  1897. this.msgSuccess("成功删除");
  1898. }
  1899. });
  1900. } else {
  1901. rows.splice(index, 1);
  1902. }
  1903. },
  1904. revokescarsRow(index, rows, row) {},
  1905. changescarsRow(row) {},
  1906. total(row) {
  1907. console.log(row);
  1908. if (row.fQty && row.fUnitprice) {
  1909. this.$set(row, "fAmount", (row.fQty * row.fUnitprice).toFixed(2));
  1910. } else {
  1911. this.$set(row, "fAmount", 0);
  1912. }
  1913. },
  1914. },
  1915. watch: {
  1916. // 监听 addOrUpdateVisible 改变
  1917. addOrUpdateVisible(oldVal, newVal) {
  1918. this.showDialog = this.addOrUpdateVisible;
  1919. },
  1920. feesList(newVal, oldVal) {
  1921. this.chiFeesList = newVal;
  1922. },
  1923. },
  1924. };
  1925. </script>