AddOrUpdate.vue 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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"
  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. v-hasPermi="['fleet:vehicleStatus:edit']"
  656. >添加费用</el-button
  657. >
  658. <el-button
  659. type="primary"
  660. icon="el-icon-plus"
  661. size="mini"
  662. @click="addRelevt2"
  663. v-hasPermi="['fleet:vehicleStatus:edit']"
  664. >导入费用</el-button
  665. >
  666. </div>
  667. </div>
  668. </div>
  669. <el-table :data="chiFeesList" style="width: 100%">
  670. <el-table-column
  671. prop="fCorpid"
  672. label="结算单位"
  673. align="center"
  674. width="180"
  675. >
  676. <template slot-scope="scope">
  677. <el-select
  678. v-model="scope.row.fCorpid"
  679. placeholder="请输入客户名称"
  680. :clearable="true"
  681. filterable
  682. size="mini"
  683. style="width: 160px"
  684. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  685. >
  686. <el-option
  687. v-for="(dict, index) in allfMblnoOptions"
  688. :key="index.fId"
  689. :label="dict.fName"
  690. :value="dict.fId"
  691. />
  692. </el-select>
  693. </template>
  694. </el-table-column>
  695. <el-table-column
  696. prop="fFeeid"
  697. label="费用名称"
  698. align="center"
  699. width="120"
  700. >
  701. <template slot-scope="scope">
  702. <el-select
  703. v-model="scope.row.fFeeid"
  704. filterable
  705. remote
  706. placeholder="费用名称"
  707. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  708. >
  709. <el-option
  710. v-for="(dict, index) in fWbuOptions"
  711. :key="index.fId"
  712. :label="dict.fName"
  713. :value="dict.fId"
  714. ></el-option>
  715. </el-select>
  716. </template>
  717. </el-table-column>
  718. <el-table-column prop="fDc" label="收付" align="center" width="100">
  719. <template slot-scope="scope">
  720. <el-select
  721. v-model="scope.row.fDc"
  722. placeholder="请选择"
  723. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  724. >
  725. <el-option label="收" value="D"></el-option>
  726. <el-option label="付" value="C"></el-option>
  727. </el-select>
  728. </template>
  729. </el-table-column>
  730. <el-table-column
  731. prop="fFeeunitid"
  732. label="计费单位"
  733. align="center"
  734. width="100"
  735. >
  736. <template slot-scope="scope">
  737. <el-select
  738. v-model="scope.row.fFeeunitid"
  739. placeholder="请选择计费单位"
  740. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  741. clearable
  742. >
  743. <el-option
  744. v-for="dict in jFeetunitOptions"
  745. :key="dict.dictValue"
  746. :label="dict.dictLabel"
  747. :value="dict.dictValue"
  748. />
  749. </el-select>
  750. </template>
  751. </el-table-column>
  752. <el-table-column
  753. prop="fBillingQty"
  754. label="计费数量"
  755. align="center"
  756. width="100"
  757. >
  758. <template slot-scope="scope">
  759. <el-input
  760. v-model="scope.row.fBillingQty"
  761. placeholder="请输入内容"
  762. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  763. @input="total(scope.row)"
  764. v-input-limit="2"
  765. ></el-input>
  766. </template>
  767. </el-table-column>
  768. <el-table-column
  769. prop="fUnitprice"
  770. label="单价"
  771. align="center"
  772. width="100"
  773. >
  774. <template slot-scope="scope">
  775. <el-input
  776. v-model="scope.row.fUnitprice"
  777. placeholder="请输入内容"
  778. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  779. @input="total(scope.row)"
  780. v-input-limit="2"
  781. ></el-input>
  782. </template>
  783. </el-table-column>
  784. <el-table-column
  785. prop="fCurrency"
  786. label="币种"
  787. align="center"
  788. width="100"
  789. >
  790. <template slot-scope="scope">
  791. <el-input
  792. v-model="scope.row.fCurrency"
  793. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  794. placeholder="请输入内容"
  795. ></el-input>
  796. </template>
  797. </el-table-column>
  798. <el-table-column
  799. prop="fExrate"
  800. label="汇率"
  801. align="center"
  802. width="100"
  803. >
  804. <template slot-scope="scope">
  805. <el-input
  806. v-model="scope.row.fExrate"
  807. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  808. placeholder="请输入内容"
  809. ></el-input>
  810. </template>
  811. </el-table-column>
  812. <el-table-column
  813. prop="fAmount"
  814. label="金额"
  815. align="center"
  816. width="100"
  817. >
  818. <template slot-scope="scope">
  819. <el-input
  820. v-model="scope.row.fAmount"
  821. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  822. placeholder="请输入内容"
  823. ></el-input>
  824. </template>
  825. </el-table-column>
  826. <el-table-column
  827. prop="fTaxrate"
  828. label="税率"
  829. align="center"
  830. width="100"
  831. >
  832. <template slot-scope="scope">
  833. <el-input
  834. v-model="scope.row.fTaxrate"
  835. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  836. placeholder="请输入内容"
  837. ></el-input>
  838. </template>
  839. </el-table-column>
  840. <el-table-column
  841. prop="remarks"
  842. label="备注"
  843. align="center"
  844. width="180"
  845. >
  846. <template slot-scope="scope">
  847. <el-input
  848. v-model="scope.row.remarks"
  849. placeholder="请输入内容"
  850. :disabled="scope.row.fBillstatus > 2 || scope.row.fBillstatus <=6"
  851. ></el-input>
  852. </template>
  853. </el-table-column>
  854. <el-table-column prop="remarks" label="费用来源" align="center">
  855. <template slot-scope="scope">
  856. <span v-if="scope.row.actId == 1080">费用确认</span>
  857. <span v-if="scope.row.actId == 1090">追加费用</span>
  858. </template>
  859. </el-table-column>
  860. <el-table-column
  861. label="操作"
  862. align="center"
  863. class-name="small-padding fixed-width"
  864. fixed="right"
  865. width="240px"
  866. >
  867. <template slot-scope="scope">
  868. <el-button
  869. size="mini"
  870. type="text"
  871. icon="el-icon-document-checked"
  872. :disabled="
  873. scope.row.fBillstatus == 6 || scope.row.fBillstatus == 3
  874. "
  875. @click.native.prevent="addFees(scope.row)"
  876. >提交</el-button
  877. >
  878. <el-button
  879. size="mini"
  880. type="text"
  881. icon="el-icon-refresh"
  882. :disabled="scope.row.fBillstatus == 3"
  883. @click.native.prevent="fixFees(scope.row)"
  884. >变更</el-button
  885. >
  886. <el-button
  887. size="mini"
  888. type="text"
  889. icon="el-icon-document-delete"
  890. :disabled="scope.row.fBillstatus < 6"
  891. @click.native.prevent="revokeFees(scope.row)"
  892. >撤销</el-button
  893. >
  894. <el-button
  895. size="mini"
  896. type="text"
  897. icon="el-icon-delete"
  898. :disabled="scope.row.fBillstatus == 6"
  899. @click.native.prevent="
  900. delFees(scope.$index, chiFeesList, scope.row)
  901. "
  902. >删除</el-button
  903. >
  904. </template>
  905. </el-table-column>
  906. </el-table>
  907. </el-collapse-item>
  908. <el-collapse-item>
  909. <template slot="title">
  910. <i class="header-icon el-icon-circle-plus" style="font-size: 16px"
  911. ><span
  912. style="font-size: 16px; font-weight: bolder; margin-left: 5px"
  913. >附件上传</span
  914. >
  915. </i>
  916. </template>
  917. <div>
  918. <div
  919. style="
  920. display: flex;
  921. justify-content: space-between;
  922. margin: 10px 0;
  923. "
  924. >
  925. <div>
  926. <el-button
  927. type="primary"
  928. icon="el-icon-plus"
  929. size="mini"
  930. @click="addRelevt"
  931. :disabled="disabled"
  932. >添加</el-button
  933. >
  934. </div>
  935. </div>
  936. <el-table
  937. :data="relevantAttachments"
  938. tooltip-effect="dark"
  939. border
  940. stripe
  941. style="width: 100%"
  942. height="150"
  943. >
  944. <el-table-column label="序号" type="index" width="80">
  945. </el-table-column>
  946. <el-table-column
  947. prop="attachName"
  948. header-align="center"
  949. align="center"
  950. label="附件名称"
  951. >
  952. <template slot-scope="scope">
  953. <el-input
  954. v-model="scope.row.attachName"
  955. placeholder="附件名称"
  956. show-word-limit
  957. :disabled="disabled"
  958. />
  959. </template>
  960. </el-table-column>
  961. <el-table-column
  962. prop="createBy "
  963. header-align="center"
  964. align="center"
  965. label="上传人"
  966. >
  967. <template slot-scope="scope">
  968. <el-input
  969. v-model="scope.row.createBy"
  970. placeholder="上传人"
  971. show-word-limit
  972. :disabled="disabled"
  973. />
  974. </template>
  975. </el-table-column>
  976. <el-table-column
  977. prop="createTime"
  978. header-align="center"
  979. align="center"
  980. label="上传时间"
  981. >
  982. <template slot-scope="scope">
  983. <el-date-picker
  984. v-model="scope.row.createTime"
  985. type="date"
  986. disabled
  987. placeholder="上传时间"
  988. ></el-date-picker>
  989. </template>
  990. </el-table-column>
  991. <el-table-column
  992. prop="attachUrl"
  993. header-align="center"
  994. align="center"
  995. label="上传附件"
  996. >
  997. <template slot-scope="scope">
  998. <div style="display: flex; justify-content: center">
  999. <el-upload
  1000. class="upload-demo"
  1001. :action="uploadImgUrl"
  1002. :on-success="
  1003. (res, file) => {
  1004. handleSucces(scope, res, file);
  1005. }
  1006. "
  1007. :headers="headers"
  1008. :disabled="disabled"
  1009. :show-file-list="false"
  1010. :limit="1"
  1011. >
  1012. <el-button size="small" type="text" :disabled="disabled"
  1013. >点击上传</el-button
  1014. >
  1015. </el-upload>
  1016. <el-button
  1017. size="small"
  1018. type="text"
  1019. @click="checkFile(scope)"
  1020. :disabled="disabled"
  1021. style="margin-left: 10px"
  1022. >查看</el-button
  1023. >
  1024. <el-button
  1025. size="small"
  1026. type="text"
  1027. :disabled="disabled"
  1028. @click="deleteFile(scope)"
  1029. >删除</el-button
  1030. >
  1031. </div>
  1032. </template>
  1033. </el-table-column>
  1034. <el-table-column
  1035. header-align="center"
  1036. align="center"
  1037. label="操作"
  1038. width="130PX"
  1039. >
  1040. <template slot-scope="scope">
  1041. <el-button
  1042. size="mini"
  1043. type="text"
  1044. icon="el-icon-delete"
  1045. @click.native.prevent="
  1046. deleteRow(scope.$index, relevantAttachments)
  1047. "
  1048. :disabled="disabled"
  1049. >删除</el-button
  1050. >
  1051. </template>
  1052. </el-table-column>
  1053. </el-table>
  1054. </div>
  1055. </el-collapse-item>
  1056. </el-collapse>
  1057. </span>
  1058. <span slot="footer" class="dialog-footer">
  1059. <el-button type="primary" @click="submitForm('acceptDate')"
  1060. >接 单</el-button
  1061. >
  1062. <el-button type="primary" @click="submitForm('loadDate')"
  1063. >提 箱</el-button
  1064. >
  1065. <el-button type="primary" @click="submitForm('mdLoadDate')"
  1066. >装卸货</el-button
  1067. >
  1068. <el-button type="primary" @click="submitForm('unLoadDate')"
  1069. >还卸柜</el-button
  1070. >
  1071. <el-button type="primary" @click="submitForm('waybillDate')"
  1072. >回 单</el-button
  1073. >
  1074. <el-button type="primary" @click="driversubmitForm"
  1075. >提 交</el-button
  1076. >
  1077. <el-button type="success" @click="submitAllowChanges">修 改</el-button>
  1078. <el-button type="info" @click="submitSave">保 存</el-button>
  1079. <!-- <el-button type="warning" @click="submitRetreat">撤 回</el-button> -->
  1080. <el-button @click="showDialog = false">取 消</el-button>
  1081. </span>
  1082. </el-dialog>
  1083. </template>
  1084. <script>
  1085. import {
  1086. removeFtmsorderbillscars,
  1087. driverSaveFtmsorderbillscars,
  1088. insertDriverFtmsorderbillscars,
  1089. } from "@/api/fleet/ftmsorderbillscars";
  1090. import { getBasicInformation } from "@/api/kaihe/basicdata/container";
  1091. import { listGoods } from "@/api/basicdata/goods";
  1092. import { listCorps } from "@/api/basicdata/corps";
  1093. import { listFees } from "@/api/basicdata/fees";
  1094. import UploadFile from "@/components/Uploadfile";
  1095. import { submit, changeFees ,revokeFees,deleteFees,driverSubmit} from "@/api/track/singleCost";
  1096. import Cookies from "js-cookie";
  1097. import { getToken } from "@/utils/auth";
  1098. export default {
  1099. name: "plans",
  1100. props: {
  1101. addOrUpdateVisible: {
  1102. type: Boolean,
  1103. default: false,
  1104. },
  1105. title: {
  1106. type: String,
  1107. required: "",
  1108. },
  1109. form: Object,
  1110. DList: {
  1111. type: Array,
  1112. default: [],
  1113. },
  1114. CList: {
  1115. type: Array,
  1116. default: [],
  1117. },
  1118. disabled: Boolean,
  1119. relevantAttachments: {
  1120. type: Array,
  1121. default: [],
  1122. },
  1123. feesList: {
  1124. type: Array,
  1125. default:() => [],
  1126. },
  1127. allfMblnoOptions: {
  1128. type: Array,
  1129. default: [],
  1130. },
  1131. },
  1132. components: {
  1133. UploadFile,
  1134. },
  1135. data() {
  1136. return {
  1137. chiFeesList: [],
  1138. // 控制弹出框显示隐藏
  1139. showDialog: false,
  1140. billTypeList: [],
  1141. transTypeList: [],
  1142. transPropList: [],
  1143. goodsLossTypeList: [],
  1144. cntrIdList: [],
  1145. priceTypeList: [],
  1146. userType: null,
  1147. username: null,
  1148. collapses: [],
  1149. fMblnoOptions: [],
  1150. fMblnoOptions2: [],
  1151. cntrId2List: [],
  1152. goodsOptions: [],
  1153. fWbuOptions: [],
  1154. ffeeunitidList: [],
  1155. polList: [],
  1156. podList: [],
  1157. uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
  1158. headers: {
  1159. Authorization: "Bearer " + getToken(),
  1160. },
  1161. jFeetunitOptions: [],
  1162. };
  1163. },
  1164. created() {
  1165. this.getDicts("data_unitfees").then((response) => {
  1166. if (response.data) {
  1167. this.jFeetunitOptions = response.data;
  1168. }
  1169. });
  1170. this.getDicts("data_billType").then((response) => {
  1171. this.billTypeList = response.data;
  1172. });
  1173. this.getDicts("data_transType").then((response) => {
  1174. this.transTypeList = response.data;
  1175. });
  1176. this.getDicts("data_transProp").then((response) => {
  1177. this.transPropList = response.data;
  1178. });
  1179. this.getDicts("data_goodsLossType").then((response) => {
  1180. this.goodsLossTypeList = response.data;
  1181. });
  1182. this.getDicts("data_cntrId").then((response) => {
  1183. response.data.map((e) => (e.noOption = false));
  1184. this.cntrIdList = response.data;
  1185. });
  1186. this.getDicts("data_priceType").then((response) => {
  1187. this.priceTypeList = response.data;
  1188. });
  1189. this.getDicts("data_ffeeunitid").then((response) => {
  1190. this.ffeeunitidList = response.data;
  1191. });
  1192. getBasicInformation({
  1193. fTypes: 1,
  1194. fStatus: "T",
  1195. }).then((response) => {
  1196. this.polList = response;
  1197. this.podList = response;
  1198. });
  1199. listCorps().then((response) => {
  1200. this.fMblnoOptions = response.rows;
  1201. });
  1202. listGoods().then((response) => {
  1203. this.goodsOptions = response.rows;
  1204. });
  1205. listFees().then((response) => {
  1206. this.fWbuOptions = response.rows;
  1207. });
  1208. this.userType = Cookies.get("userType");
  1209. this.username = Cookies.get("userName");
  1210. },
  1211. methods: {
  1212. // 新增附件上传
  1213. addRelevt4() {
  1214. this.chiFeesList.push({
  1215. actId: "1090",
  1216. fCorpid: this.form.fCorpId,
  1217. fFeeid: "",
  1218. fDc: "",
  1219. fFeeunitid: "1",
  1220. fBillingQty: 0,
  1221. fUnitprice: 0,
  1222. fCurrency: "RMB",
  1223. fTaxrate: null,
  1224. fAmount: 0,
  1225. fExrate: 1,
  1226. remarks: "",
  1227. });
  1228. },
  1229. // 新增附件上传
  1230. addRelevt() {
  1231. this.relevantAttachments.push({
  1232. attachUrl: null,
  1233. attachName: null,
  1234. createBy: this.username,
  1235. createTime: Date.parse(new Date()),
  1236. });
  1237. },
  1238. //附件删除
  1239. deleteFile(scope) {
  1240. this.relevantAttachments[scope.$index].attachName = "";
  1241. this.relevantAttachments[scope.$index].attachUrl = "";
  1242. if (this.relevantAttachments[scope.$index].attachUrl === "") {
  1243. this.$message.success("删除成功");
  1244. } else {
  1245. this.$message.error("未知错误,删除失败");
  1246. }
  1247. },
  1248. //附件查看
  1249. checkFile(scope) {
  1250. if (this.relevantAttachments[scope.$index].attachUrl) {
  1251. window.open(this.relevantAttachments[scope.$index].attachUrl);
  1252. } else {
  1253. this.$message.error("请上传附件");
  1254. }
  1255. },
  1256. //附件上传
  1257. handleSucces(scope, res, file) {
  1258. this.relevantAttachments[scope.$index].attachName = res.fileName;
  1259. this.relevantAttachments[scope.$index].attachUrl = res.url;
  1260. if (this.relevantAttachments[scope.$index].attachUrl === "") {
  1261. this.$message.error("上传失败");
  1262. } else {
  1263. this.$message.success("上传成功");
  1264. }
  1265. },
  1266. // 添加行
  1267. addRow(tableData, event) {
  1268. var obj = {};
  1269. tableData.push(obj);
  1270. },
  1271. addDListRow(tableData, event) {
  1272. var obj = {
  1273. fcorpid: this.form.fCorpId,
  1274. fcurrency: "RMB",
  1275. fPid: this.form.id,
  1276. fExrate: "1",
  1277. };
  1278. tableData.push(obj);
  1279. },
  1280. //删除行
  1281. deleteRow(index, rows) {
  1282. rows.splice(index, 1);
  1283. },
  1284. // 上传成功返回数据
  1285. showFile(row) {
  1286. for (let list in this.relevantAttachments) {
  1287. this.$set(this.relevantAttachments[list], "attachUrl", row.url);
  1288. this.$set(this.relevantAttachments[list], "attachName", row.fileName);
  1289. }
  1290. },
  1291. addRelevt2() {
  1292. let arr = this.chiFeesList;
  1293. arr.filter((e) => e.actId == "1080");
  1294. if (arr.length > 0) {
  1295. this.$confirm("已生成费用信息, 是否重新生成?", "提示", {
  1296. confirmButtonText: "确定",
  1297. cancelButtonText: "取消",
  1298. type: "warning",
  1299. })
  1300. .then(() => {
  1301. this.chiFeesList = this.chiFeesList.filter(
  1302. (e) => e.actId != "1080"
  1303. );
  1304. this.addRelevt3();
  1305. })
  1306. .catch(() => {
  1307. this.$message({
  1308. type: "info",
  1309. message: "已取消",
  1310. });
  1311. });
  1312. } else {
  1313. this.addRelevt3();
  1314. }
  1315. },
  1316. addRelevt3() {
  1317. if (this.form.oilAmt > 0) {
  1318. this.chiFeesList.push({
  1319. actId: "1080",
  1320. fCorpid: this.form.driverUserId,
  1321. fFeeid: 52,
  1322. fDc: "C",
  1323. fFeeunitid: "6",
  1324. fBillingQty: 1,
  1325. fUnitprice: this.form.oilAmt,
  1326. fCurrency: "RMB",
  1327. fTaxrate: 3,
  1328. fAmount: this.form.oilAmt,
  1329. fExrate: 1,
  1330. remarks: this.form.costRemarks,
  1331. });
  1332. }
  1333. if (this.form.driverbonus > 0) {
  1334. this.chiFeesList.push({
  1335. actId: "1080",
  1336. fCorpid: this.form.driverUserId,
  1337. fFeeid: 53,
  1338. fDc: "C",
  1339. fFeeunitid: "6",
  1340. fBillingQty: 1,
  1341. fUnitprice: this.form.driverbonus,
  1342. fCurrency: "RMB",
  1343. fTaxrate: 3,
  1344. fAmount: this.form.driverbonus,
  1345. fExrate: 1,
  1346. remarks: this.form.costRemarks,
  1347. });
  1348. }
  1349. if (this.form.costOth > 0) {
  1350. this.chiFeesList.push({
  1351. actId: "1080",
  1352. fCorpid: this.form.driverUserId,
  1353. fFeeid: 54,
  1354. fDc: "C",
  1355. fFeeunitid: "6",
  1356. fBillingQty: 1,
  1357. fUnitprice: this.form.costOth,
  1358. fCurrency: "RMB",
  1359. fTaxrate: 3,
  1360. fAmount: this.form.costOth,
  1361. fExrate: 1,
  1362. remarks: this.form.costRemarks,
  1363. });
  1364. }
  1365. if (this.form.costomAmt03 > 0) {
  1366. this.chiFeesList.push(
  1367. {
  1368. actId: "1080",
  1369. fCorpid: this.form.fCorpId,
  1370. fFeeid: 55,
  1371. fDc: "D",
  1372. fFeeunitid: "6",
  1373. fBillingQty: 1,
  1374. fUnitprice: this.form.costomAmt03,
  1375. fCurrency: "RMB",
  1376. fTaxrate: 3,
  1377. fAmount: this.form.costomAmt03,
  1378. fExrate: 1,
  1379. remarks: this.form.costomStr02,
  1380. },
  1381. {
  1382. actId: "1080",
  1383. fCorpid: this.form.driverUserId,
  1384. fFeeid: 55,
  1385. fDc: "C",
  1386. fFeeunitid: "6",
  1387. fBillingQty: 1,
  1388. fUnitprice: this.form.costomAmt03,
  1389. fCurrency: "RMB",
  1390. fTaxrate: 3,
  1391. fAmount: this.form.costomAmt03,
  1392. fExrate: 1,
  1393. remarks: this.form.costomStr02,
  1394. }
  1395. );
  1396. }
  1397. if (this.form.costomAmt04 > 0) {
  1398. this.chiFeesList.push(
  1399. {
  1400. actId: "1080",
  1401. fCorpid: this.form.fCorpId,
  1402. fFeeid: 56,
  1403. fDc: "D",
  1404. fFeeunitid: "6",
  1405. fBillingQty: 1,
  1406. fUnitprice: this.form.costomAmt04,
  1407. fCurrency: "RMB",
  1408. fTaxrate: 3,
  1409. fAmount: this.form.costomAmt04,
  1410. fExrate: 1,
  1411. remarks: this.form.costomStr02,
  1412. },
  1413. {
  1414. actId: "1080",
  1415. fCorpid: this.form.driverUserId,
  1416. fFeeid: 56,
  1417. fDc: "C",
  1418. fFeeunitid: "6",
  1419. fBillingQty: 1,
  1420. fUnitprice: this.form.costomAmt04,
  1421. fCurrency: "RMB",
  1422. fTaxrate: 3,
  1423. fAmount: this.form.costomAmt04,
  1424. fExrate: 1,
  1425. remarks: this.form.costomStr02,
  1426. }
  1427. );
  1428. }
  1429. if (this.form.costomAmt02 > 0) {
  1430. this.chiFeesList.push(
  1431. {
  1432. actId: "1080",
  1433. fCorpid: this.form.fCorpId,
  1434. fFeeid: 57,
  1435. fDc: "D",
  1436. fFeeunitid: "6",
  1437. fBillingQty: 1,
  1438. fUnitprice: this.form.costomAmt02,
  1439. fCurrency: "RMB",
  1440. fTaxrate: 3,
  1441. fAmount: this.form.costomAmt02,
  1442. fExrate: 1,
  1443. remarks: this.form.costomStr02,
  1444. },
  1445. {
  1446. actId: "1080",
  1447. fCorpid: this.form.driverUserId,
  1448. fFeeid: 57,
  1449. fDc: "C",
  1450. fFeeunitid: "6",
  1451. fBillingQty: 1,
  1452. fUnitprice: this.form.costomAmt02,
  1453. fCurrency: "RMB",
  1454. fTaxrate: 3,
  1455. fAmount: this.form.costomAmt02,
  1456. fExrate: 1,
  1457. remarks: this.form.costomStr02,
  1458. }
  1459. );
  1460. }
  1461. if (this.form.costomAmt05 > 0) {
  1462. this.chiFeesList.push(
  1463. {
  1464. actId: "1080",
  1465. fCorpid: this.form.fCorpId,
  1466. fFeeid: 58,
  1467. fDc: "D",
  1468. fFeeunitid: "6",
  1469. fBillingQty: 1,
  1470. fUnitprice: this.form.costomAmt05,
  1471. fCurrency: "RMB",
  1472. fTaxrate: 3,
  1473. fAmount: this.form.costomAmt05,
  1474. fExrate: 1,
  1475. remarks: this.form.costomStr01,
  1476. },
  1477. {
  1478. actId: "1080",
  1479. fCorpid: this.form.driverUserId,
  1480. fFeeid: 58,
  1481. fDc: "C",
  1482. fFeeunitid: "6",
  1483. fBillingQty: 1,
  1484. fUnitprice: this.form.costomAmt05,
  1485. fCurrency: "RMB",
  1486. fTaxrate: 3,
  1487. fAmount: this.form.costomAmt05,
  1488. fExrate: 1,
  1489. remarks: this.form.costomStr01,
  1490. }
  1491. );
  1492. }
  1493. if (this.form.costomAmt06 > 0) {
  1494. this.chiFeesList.push(
  1495. {
  1496. actId: "1080",
  1497. fCorpid: this.form.fCorpId,
  1498. fFeeid: 59,
  1499. fDc: "D",
  1500. fFeeunitid: "6",
  1501. fBillingQty: 1,
  1502. fUnitprice: this.form.costomAmt06,
  1503. fCurrency: "RMB",
  1504. fTaxrate: 3,
  1505. fAmount: this.form.costomAmt06,
  1506. fExrate: 1,
  1507. remarks: this.form.costomStr01,
  1508. },
  1509. {
  1510. actId: "1080",
  1511. fCorpid: this.form.driverUserId,
  1512. fFeeid: 59,
  1513. fDc: "C",
  1514. fFeeunitid: "6",
  1515. fBillingQty: 1,
  1516. fUnitprice: this.form.costomAmt06,
  1517. fCurrency: "RMB",
  1518. fTaxrate: 3,
  1519. fAmount: this.form.costomAmt06,
  1520. fExrate: 1,
  1521. remarks: this.form.costomStr01,
  1522. }
  1523. );
  1524. }
  1525. if (this.form.costomAmt01 > 0) {
  1526. this.chiFeesList.push(
  1527. {
  1528. actId: "1080",
  1529. fCorpid: this.form.fCorpId,
  1530. fFeeid: 60,
  1531. fDc: "D",
  1532. fFeeunitid: "6",
  1533. fBillingQty: 1,
  1534. fUnitprice: this.form.costomAmt01,
  1535. fCurrency: "RMB",
  1536. fTaxrate: 3,
  1537. fAmount: this.form.costomAmt01,
  1538. fExrate: 1,
  1539. remarks: this.form.costomStr01,
  1540. },
  1541. {
  1542. actId: "1080",
  1543. fCorpid: this.form.driverUserId,
  1544. fFeeid: 60,
  1545. fDc: "C",
  1546. fFeeunitid: "6",
  1547. fBillingQty: 1,
  1548. fUnitprice: this.form.costomAmt01,
  1549. fCurrency: "RMB",
  1550. fTaxrate: 3,
  1551. fAmount: this.form.costomAmt01,
  1552. fExrate: 1,
  1553. remarks: this.form.costomStr01,
  1554. }
  1555. );
  1556. }
  1557. },
  1558. // 弹出框关闭后触发
  1559. handleClose() {
  1560. // 子组件调用父组件方法,并传递参数
  1561. this.$emit("changeShow", "false");
  1562. this.cntrIdList.forEach((item) => (item.noOption = false));
  1563. this.collapses = [];
  1564. },
  1565. /** 提交按钮 */
  1566. submitForm(butType) {
  1567. this.$refs["form"].validate((valid) => {
  1568. if (valid) {
  1569. if (this.form.costOth > 0 && !this.form.costRemarks) {
  1570. return this.$message.error("请输入花销备注");
  1571. }
  1572. if (this.form.costomAmt02 > 0 && !this.form.costomStr02) {
  1573. return this.$message.error("请输入费用备注");
  1574. }
  1575. if (this.form.costomAmt01 > 0 && !this.form.costomStr01) {
  1576. return this.$message.error("请输入费用备注");
  1577. }
  1578. this.DList.map((e) => {
  1579. return (e.fDc = "D");
  1580. });
  1581. this.CList.map((e) => {
  1582. return (e.fDc = "C");
  1583. });
  1584. let formData = new window.FormData();
  1585. formData.append("cars", JSON.stringify(this.form));
  1586. formData.append("attachs", JSON.stringify(this.relevantAttachments));
  1587. formData.append("operationType", butType);
  1588. insertDriverFtmsorderbillscars(formData).then((response) => {
  1589. if (response.code == 200) {
  1590. this.msgSuccess("提交成功");
  1591. this.$parent.getList();
  1592. }
  1593. });
  1594. }
  1595. });
  1596. },
  1597. //修改
  1598. submitFix() {
  1599. this.$refs["form"].validate((valid) => {
  1600. if (valid) {
  1601. }
  1602. });
  1603. },
  1604. //保存
  1605. submitSave() {
  1606. let formData = new window.FormData();
  1607. formData.append("cars", JSON.stringify(this.form));
  1608. formData.append("attachs", JSON.stringify(this.relevantAttachments));
  1609. formData.append("fees", JSON.stringify(this.chiFeesList));
  1610. formData.append("operationType", "unLoadDate");
  1611. driverSaveFtmsorderbillscars(formData).then((response) => {
  1612. if (response.code == 200) {
  1613. this.msgSuccess("保存成功");
  1614. this.$parent.getList();
  1615. // this.$parent.getSave(response);
  1616. }
  1617. });
  1618. },
  1619. //撤回
  1620. submitRetreat() {},
  1621. //修改
  1622. submitAllowChanges() {
  1623. if (this.form.orderStatus <= 60) {
  1624. this.$emit("fixDisabled", "false");
  1625. this.msgSuccess("允许修改");
  1626. } else {
  1627. this.msgSuccess("不允许修改");
  1628. }
  1629. },
  1630. driversubmitForm(){
  1631. if(this.chiFeesList.length==0){
  1632. return this.$message.error("确认费用不能为空");
  1633. }
  1634. let formData = new window.FormData();
  1635. formData.append("cars", JSON.stringify(this.form));
  1636. formData.append("attachs", JSON.stringify(this.relevantAttachments));
  1637. formData.append("fees", JSON.stringify(this.chiFeesList));
  1638. driverSubmit(formData).then((response) => {
  1639. if (response.code == 200) {
  1640. this.msgSuccess("提交成功");
  1641. this.showDialog=false;
  1642. this.$parent.getList();
  1643. }
  1644. });
  1645. },
  1646. addFees(row) {
  1647. if (row.fBillstatus == 1) {
  1648. row.fBillstatus = 6;
  1649. }
  1650. if (row.fBillstatus == 6) {
  1651. return this.$message.error("已提交,请勿重复提交");
  1652. }
  1653. let formDatae = new window.FormData();
  1654. formDatae.append("status", 6);
  1655. formDatae.append("cars", JSON.stringify(this.form));
  1656. formDatae.append("ftmsorderbillsfees", JSON.stringify(row));
  1657. submit(formDatae).then((response) => {
  1658. if (response.code == 200) {
  1659. this.$message.success("提交成功");
  1660. this.$set(row, "fId", response.data.ftmsorderbillsfeesList.fId);
  1661. this.$set(
  1662. row,
  1663. "fBillstatus",
  1664. response.data.ftmsorderbillsfeesList.fBillstatus
  1665. );
  1666. }
  1667. });
  1668. },
  1669. fixFees(row) {
  1670. if (row.fBillstatus == 0) {
  1671. return this.$message.error("已进行变更,请勿重复点击");
  1672. }
  1673. if (row.fId) {
  1674. changeFees(row.fId).then((response) => {
  1675. if (response.code == 200) {
  1676. this.$message.success("允许修改");
  1677. this.$set(row, "fBillstatus", 1);
  1678. }
  1679. });
  1680. }
  1681. },
  1682. delFees(index, rows, row) {
  1683. if (row.fBillstatus == 2 || row.fBillstatus == 3) {
  1684. deleteFees(row.fId).then((response) => {
  1685. if (response.code == 200) {
  1686. rows.splice(index, 1);
  1687. this.$message.success("删除成功");
  1688. }
  1689. });
  1690. } else if (!row.fBillstatus){
  1691. rows.splice(index, 1);
  1692. this.$message.success("删除成功");
  1693. }else{
  1694. this.$message.error("不允许删除");
  1695. }
  1696. },
  1697. revokeFees(row){
  1698. revokeFees(row.fId).then((response) => {
  1699. if (response.code == 200) {
  1700. this.$message.success("撤销成功");
  1701. this.$set(row, "fBillstatus", 3);
  1702. }
  1703. });
  1704. },
  1705. //单条订单调度提交
  1706. addscarsRow(row) {},
  1707. delscarsRow(index, rows, row) {
  1708. if (row.billStatus != 6 && row.id != null) {
  1709. removeFtmsorderbillscars(row).then((response) => {
  1710. if (response.code == 200) {
  1711. rows.splice(index, 1);
  1712. this.msgSuccess("成功删除");
  1713. }
  1714. });
  1715. } else {
  1716. rows.splice(index, 1);
  1717. }
  1718. },
  1719. revokescarsRow(index, rows, row) {},
  1720. changescarsRow(row) {},
  1721. total(row) {
  1722. console.log(row);
  1723. if (row.fQty && row.fUnitprice) {
  1724. this.$set(row, "fAmount", (row.fQty * row.fUnitprice).toFixed(2));
  1725. } else {
  1726. this.$set(row, "fAmount", 0);
  1727. }
  1728. },
  1729. },
  1730. watch: {
  1731. // 监听 addOrUpdateVisible 改变
  1732. addOrUpdateVisible(oldVal, newVal) {
  1733. this.showDialog = this.addOrUpdateVisible;
  1734. },
  1735. feesList(newVal, oldVal) {
  1736. this.chiFeesList = newVal;
  1737. },
  1738. },
  1739. };
  1740. </script>