AddOrUpdate.vue 60 KB

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