AddOrUpdate.vue 50 KB

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