detailPage.vue 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back" v-if="!home">
  5. <el-button
  6. type="danger"
  7. style="border: none;background: none;color: red"
  8. icon="el-icon-arrow-left"
  9. @click="backToList(0)"
  10. >返回列表
  11. </el-button>
  12. </div>
  13. <div class="customer-back" v-else>
  14. <el-button
  15. type="danger"
  16. style="border: none;background: none;color: red"
  17. icon="el-icon-arrow-left"
  18. @click="backToList(1)"
  19. >返回列表
  20. </el-button>
  21. <el-button
  22. type="danger"
  23. style="border: none;background: none;color: red"
  24. icon="el-icon-arrow-left"
  25. @click="backToList(2)"
  26. >返回台账
  27. </el-button>
  28. </div>
  29. </div>
  30. <containerTitle title="委托信息" style="margin-top: 50px"></containerTitle>
  31. <basic-container>
  32. <avue-form :option="goodsOptionForm" v-model="goodsForm">
  33. <template slot-scope="scope" slot="corpId">
  34. <crop-select
  35. v-model="goodsForm.corpId"
  36. disabled
  37. ></crop-select>
  38. </template>
  39. <template slot-scope="scope" slot="station">
  40. <port-info
  41. v-model="goodsForm.station"
  42. :disabled="goodsForm.status >= 1"
  43. />
  44. </template>
  45. <template slot-scope="scope" slot="agentId">
  46. <crop-select
  47. :disabled="goodsForm.status >= 1"
  48. v-model="goodsForm.agentId"
  49. ></crop-select>
  50. </template>
  51. <template slot-scope="scope" slot="polId">
  52. <port-info
  53. v-model="goodsForm.polId"
  54. :disabled="goodsForm.status >= 1"
  55. />
  56. </template>
  57. <template slot-scope="scope" slot="podId">
  58. <port-info
  59. v-model="goodsForm.podId"
  60. :disabled="goodsForm.status >= 1"
  61. />
  62. </template>
  63. </avue-form>
  64. </basic-container>
  65. <containerTitle title="其他信息"></containerTitle>
  66. <basic-container :showBtn="true" ref="other">
  67. <avue-form :option="goodsOptionFormTwo" v-model="goodsForm">
  68. <template slot-scope="scope" slot="corpId">
  69. <crop-select
  70. v-model="goodsForm.corpId"
  71. disabled
  72. ></crop-select>
  73. </template>
  74. <template slot-scope="scope" slot="station">
  75. <port-info
  76. v-model="goodsForm.station"
  77. :disabled="goodsForm.status >= 1"
  78. />
  79. </template>
  80. <template slot-scope="scope" slot="agentId">
  81. <crop-select
  82. :disabled="goodsForm.status >= 1"
  83. v-model="goodsForm.agentId"
  84. ></crop-select>
  85. </template>
  86. <template slot-scope="scope" slot="polId">
  87. <port-info
  88. v-model="goodsForm.polId"
  89. type="id"
  90. :disabled="goodsForm.status >= 1"
  91. />
  92. </template>
  93. <template slot-scope="scope" slot="podId">
  94. <port-info
  95. v-model="goodsForm.podId"
  96. type="id"
  97. :disabled="goodsForm.status >= 1"
  98. />
  99. </template>
  100. </avue-form>
  101. </basic-container>
  102. <containerTitle
  103. title="起止地信息"></containerTitle>
  104. <basic-container>
  105. <el-table
  106. ref="singleTable"
  107. :data="tableData"
  108. size="mini"
  109. :header-cell-style="{color:'#000',background:'#fafafa'}"
  110. style="width: 100%">
  111. <el-table-column
  112. property="date"
  113. align="center"
  114. width="40">
  115. <template slot-scope="scope">
  116. <span v-if="scope.$index == 0">
  117. <el-button type="primary" size="mini" circle>起</el-button>
  118. </span>
  119. <span v-else-if="scope.$index === tableData.length-1">
  120. <el-button type="success" size="mini" circle>止</el-button>
  121. </span>
  122. <span v-else>
  123. <el-button type="warning" size="mini" circle>途</el-button>
  124. <!-- <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>-->
  125. <!-- <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">-->
  126. <!-- <el-button type="danger" icon="el-icon-delete" size="mini" circle-->
  127. <!-- @click="deleteAddress(scope)"></el-button>-->
  128. <!-- </el-tooltip>-->
  129. </span>
  130. </template>
  131. </el-table-column>
  132. <el-table-column
  133. type="index"
  134. label="序号"
  135. align="center"
  136. width="60">
  137. </el-table-column>
  138. <el-table-column
  139. property="corpName"
  140. label="货运地点"
  141. align="center"
  142. show-overflow-tooltip
  143. width="200">
  144. </el-table-column>
  145. <!-- <el-table-column-->
  146. <!-- property="province"-->
  147. <!-- label="省市区"-->
  148. <!-- align="center"-->
  149. <!-- width="280">-->
  150. <!-- <template slot-scope="scope">-->
  151. <!-- <el-cascader-->
  152. <!-- size="small"-->
  153. <!-- style="width: 100%;"-->
  154. <!-- v-model="scope.row.region"-->
  155. <!-- disabled-->
  156. <!-- :props="treeOption"></el-cascader>-->
  157. <!-- </template>-->
  158. <!-- </el-table-column>-->
  159. <el-table-column
  160. property="contacts"
  161. align="center"
  162. width="150"
  163. show-overflow-tooltip
  164. label="联系人">
  165. </el-table-column>
  166. <el-table-column
  167. property="tel"
  168. align="center"
  169. width="180"
  170. show-overflow-tooltip
  171. label="电话">
  172. </el-table-column>
  173. <el-table-column
  174. property="address"
  175. align="center"
  176. show-overflow-tooltip
  177. label="详细地址">
  178. </el-table-column>
  179. <el-table-column
  180. property="remarks"
  181. align="center"
  182. show-overflow-tooltip
  183. label="备注">
  184. </el-table-column>
  185. </el-table>
  186. </basic-container>
  187. <containerTitle title="车辆信息"></containerTitle>
  188. <basic-container>
  189. <avue-crud
  190. :data="entrustList"
  191. @selection-change="selectionChange"
  192. :option="entrustOptionTwoT"
  193. ref="crudBoxTwo"
  194. v-if="KeyBoxTwo>0"
  195. @resetColumn="resetColumnBoxTwo"
  196. @saveColumn="saveColumnBoxTwo"
  197. @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
  198. @row-update="rowSaveWell">
  199. <template slot="menuLeft" slot-scope="{size}">
  200. <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
  201. :disabled="batchDuling" v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
  202. </el-button>
  203. </template>
  204. <template slot="plateNo" slot-scope="{row}" v-if="!row.$cellEdit">
  205. <span class="el-button--text" style="cursor: pointer" @click="openTrack(row)">{{ row.plateNo }}</span>
  206. </template>
  207. <!-- <template slot-scope="{row}" slot="fleetId">-->
  208. <!-- <crop-select-->
  209. <!-- v-if="row.$cellEdit"-->
  210. <!-- v-model="row.fleetId"-->
  211. <!-- @getCorpData="(data)=>{getfleetIdT(data,row)}"-->
  212. <!-- corpType="CD"-->
  213. <!-- ></crop-select>-->
  214. <!-- <span v-else>{{ row.fleetName }}</span>-->
  215. <!-- </template>-->
  216. <template slot-scope="{row,index}" slot="menu">
  217. <el-button
  218. type="text"
  219. size="small"
  220. v-if="row.status===0"
  221. @click="rowSaveT(row,index)"
  222. >{{ row.$cellEdit ? '保 存' : '修 改' }}
  223. </el-button>
  224. <el-button
  225. type="text"
  226. size="small"
  227. v-if="row.status===0"
  228. @click="rowSaveThree(row,index)"
  229. >{{ row.$cellEdit ? '确认调度派车' : '调度派车' }}
  230. </el-button>
  231. <el-button
  232. size="small"
  233. type="text"
  234. @click="designate(row, index)"
  235. v-if="row.status === 0"
  236. >调 度
  237. </el-button>
  238. <el-button
  239. size="small"
  240. type="text"
  241. @click="cancelDesignate(row, index)"
  242. v-if="row.status===1"
  243. >取消调度
  244. </el-button>
  245. <el-button
  246. size="small"
  247. type="text"
  248. @click="changeFleetT(row, index)"
  249. v-if="row.status !== 0 || row.status !==1 || row.status !==4"
  250. >变 更
  251. </el-button>
  252. <el-button
  253. size="small"
  254. type="text"
  255. @click="recordsOfChanges(row, index)"
  256. v-if="row.status > 1"
  257. >变更记录
  258. </el-button>
  259. <el-button
  260. size="small"
  261. type="text"
  262. @click="annexOpen(row, index)"
  263. >附 件
  264. </el-button>
  265. </template>
  266. </avue-crud>
  267. </basic-container>
  268. <span>
  269. <!-- <containerTitle title="费用明细"></containerTitle>-->
  270. <!-- <basic-container>-->
  271. <!-- <el-tabs v-model="activeIndex" @tab-click="handleSelect">-->
  272. <!-- <el-tab-pane label="应收" name="1"></el-tab-pane>-->
  273. <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
  274. <!-- </el-tabs>-->
  275. <!-- <avue-crud-->
  276. <!-- v-if="activeIndex === '1'"-->
  277. <!-- :data="collectionList"-->
  278. <!-- :option="collectionOption"-->
  279. <!-- ref="collection"-->
  280. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  281. <!-- @row-update="rowSave"-->
  282. <!-- @row-del="makeDel">-->
  283. <!-- <template slot-scope="{row}" slot="corpId">-->
  284. <!-- <crop-select-->
  285. <!-- v-if="row.$cellEdit"-->
  286. <!-- v-model="row.corpId"-->
  287. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  288. <!-- ></crop-select>-->
  289. <!-- <span v-else>{{row.corpName}}</span>-->
  290. <!-- </template>-->
  291. <!-- <template slot-scope="{row}" slot="feeId">-->
  292. <!-- <breakdown-select-->
  293. <!-- v-if="row.$cellEdit"-->
  294. <!-- v-model="row.feeId"-->
  295. <!-- @selectValue="(value) => selectValue(value,row)"-->
  296. <!-- :configuration="breakConfiguration"-->
  297. <!-- >-->
  298. <!-- </breakdown-select>-->
  299. <!-- <span v-else>{{ row.feeName }}</span>-->
  300. <!-- </template>-->
  301. <!-- <template slot-scope="{row,index}" slot="menu">-->
  302. <!-- <el-button-->
  303. <!-- type="text"-->
  304. <!-- size="small"-->
  305. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  306. <!-- @click="rowCell(row,index)"-->
  307. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  308. <!-- <el-button type="text"-->
  309. <!-- icon="el-icon-delete"-->
  310. <!-- size="small"-->
  311. <!-- @click="$refs.collection.rowDel(row,index)"-->
  312. <!-- >删除</el-button>-->
  313. <!-- </template>-->
  314. <!-- <template slot="menuLeft">-->
  315. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>-->
  316. <!-- </template>-->
  317. <!-- </avue-crud>-->
  318. <!-- <avue-crud-->
  319. <!-- v-if="activeIndex === '2'"-->
  320. <!-- :data="paymentList"-->
  321. <!-- :option="paymentOption"-->
  322. <!-- ref="payment"-->
  323. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  324. <!-- @row-update="rowSave"-->
  325. <!-- @row-del="feeDel"-->
  326. <!-- >-->
  327. <!-- <template slot-scope="{row}" slot="corpId">-->
  328. <!-- <crop-select-->
  329. <!-- v-if="row.$cellEdit"-->
  330. <!-- v-model="row.corpId"-->
  331. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  332. <!-- ></crop-select>-->
  333. <!-- <span v-else>{{row.corpName}}</span>-->
  334. <!-- </template>-->
  335. <!-- <template slot-scope="{row}" slot="feeId">-->
  336. <!-- <breakdown-select-->
  337. <!-- v-if="row.$cellEdit"-->
  338. <!-- v-model="row.feeId"-->
  339. <!-- @selectValue="(value) => selectValue(value,row)"-->
  340. <!-- :configuration="breakConfiguration"-->
  341. <!-- >-->
  342. <!-- </breakdown-select>-->
  343. <!-- <span v-else>{{ row.feeName }}</span>-->
  344. <!-- </template>-->
  345. <!-- <template slot-scope="{row,index}" slot="menu">-->
  346. <!-- <el-button-->
  347. <!-- type="text"-->
  348. <!-- size="small"-->
  349. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  350. <!-- @click="paymentRowCell(row,index)"-->
  351. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  352. <!-- <el-button type="text"-->
  353. <!-- icon="el-icon-delete"-->
  354. <!-- size="small"-->
  355. <!-- @click="$refs.payment.rowDel(row,index)"-->
  356. <!-- >删除</el-button>-->
  357. <!-- </template>-->
  358. <!-- <template slot="menuLeft">-->
  359. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>-->
  360. <!-- </template>-->
  361. <!-- </avue-crud>-->
  362. <!-- </basic-container>-->
  363. </span>
  364. <containerTitle title="杂费明细"></containerTitle>
  365. <basic-container>
  366. <el-tabs v-model="activeIndex" @tab-click="handleSelect">
  367. <el-tab-pane label="应收" name="1"></el-tab-pane>
  368. <el-tab-pane label="应付" name="2"></el-tab-pane>
  369. </el-tabs>
  370. <avue-crud
  371. v-if="activeIndex === '1'"
  372. :data="collectionList"
  373. :key="key"
  374. :option="collectionOption"
  375. ref="collection"
  376. @resetColumn="resetColumnCollection"
  377. @saveColumn="saveColumnCollection"
  378. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  379. @row-update="rowSave"
  380. @row-del="makeDel">
  381. <template slot-scope="{row}" slot="corpId">
  382. <crop-select
  383. v-if="row.$cellEdit"
  384. v-model="row.corpId"
  385. @getCorpData="(data)=>{getfleetId(data,row)}"
  386. ></crop-select>
  387. <span v-else>{{ row.corpName }}</span>
  388. </template>
  389. <template slot="plateNoHeader" slot-scope="{column}">
  390. {{ column.label }}<span style="color:#F56C6C">*</span>
  391. </template>
  392. <template slot="feeIdHeader" slot-scope="{column}">
  393. {{ column.label }}<span style="color:#F56C6C">*</span>
  394. </template>
  395. <template slot-scope="{row}" slot="feeId">
  396. <breakdown-select
  397. v-if="row.$cellEdit"
  398. v-model="row.feeId"
  399. @selectValue="(value) => selectValue(value,row)"
  400. :configuration="breakConfiguration"
  401. >
  402. </breakdown-select>
  403. <span v-else>{{ row.feeName }}</span>
  404. </template>
  405. <template slot-scope="{row,index}" slot="menu">
  406. <el-button
  407. type="text"
  408. size="small"
  409. :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
  410. @click="rowCell(row,index)"
  411. >{{ row.$cellEdit ? '保存' : '编辑' }}
  412. </el-button>
  413. <el-button type="text"
  414. icon="el-icon-delete"
  415. size="small"
  416. @click="$refs.collection.rowDel(row,index)"
  417. >删除
  418. </el-button>
  419. <el-button
  420. size="small"
  421. type="text"
  422. icon="el-icon-s-order"
  423. @click="annexOpen(row, index)"
  424. >附 件
  425. </el-button>
  426. </template>
  427. <template slot="menuLeft">
  428. <el-button
  429. v-if="roleNameTwo.indexOf('总调度') === -1"
  430. type="primary" icon="el-icon-plus" @click="addRowCollection"
  431. size="small">录入明细
  432. </el-button>
  433. </template>
  434. </avue-crud>
  435. <avue-crud
  436. v-if="activeIndex === '2'"
  437. :data="paymentList"
  438. :option="paymentOption"
  439. ref="payment"
  440. @resetColumn="resetColumnPayment"
  441. @saveColumn="saveColumnPayment"
  442. @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"
  443. @row-update="rowSave"
  444. @row-del="feeDel"
  445. >
  446. <template slot-scope="{row}" slot="corpId">
  447. <crop-select
  448. v-if="row.$cellEdit"
  449. v-model="row.corpId"
  450. @getCorpData="(data)=>{getfleetId(data,row)}"
  451. ></crop-select>
  452. <span v-else>{{ row.corpName }}</span>
  453. </template>
  454. <template slot="plateNoHeader" slot-scope="{column}">
  455. {{ column.label }}<span style="color:#F56C6C">*</span>
  456. </template>
  457. <template slot="feeIdHeader" slot-scope="{column}">
  458. {{ column.label }}<span style="color:#F56C6C">*</span>
  459. </template>
  460. <template slot-scope="{row}" slot="feeId">
  461. <breakdown-select
  462. v-if="row.$cellEdit"
  463. v-model="row.feeId"
  464. @selectValue="(value) => selectValue(value,row)"
  465. :configuration="breakConfiguration"
  466. >
  467. </breakdown-select>
  468. <span v-else>{{ row.feeName }}</span>
  469. </template>
  470. <template slot-scope="{row,index}" slot="menu">
  471. <el-button
  472. type="text"
  473. size="small"
  474. :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"
  475. @click="paymentRowCell(row,index)"
  476. >{{ row.$cellEdit ? '保存' : '编辑' }}
  477. </el-button>
  478. <el-button type="text"
  479. icon="el-icon-delete"
  480. size="small"
  481. :disabled="goodsForm.status === 1"
  482. @click="$refs.payment.rowDel(row,index)"
  483. >删除
  484. </el-button>
  485. <el-button
  486. size="small"
  487. type="text"
  488. icon="el-icon-s-order"
  489. @click="annexOpen(row, index)"
  490. >附 件
  491. </el-button>
  492. </template>
  493. <template slot="menuLeft">
  494. <el-button
  495. v-if="roleNameTwo.indexOf('总调度') === -1"
  496. type="primary" icon="el-icon-plus" @click="addRowPayment"
  497. size="small">录入明细
  498. </el-button>
  499. </template>
  500. </avue-crud>
  501. </basic-container>
  502. <containerTitle title="上传附件"></containerTitle>
  503. <c-upload
  504. typeUpload="CD"
  505. :data="orderFilesList"
  506. display
  507. deleteUrl="/api/blade-client/common-file/remove"
  508. :enumerationValue="86.2"
  509. >
  510. <template slot="c_button">
  511. <el-button
  512. type="primary"
  513. size="small"
  514. :loading="c_button"
  515. @click="schedulingFileSaving"
  516. >保存附件
  517. </el-button>
  518. </template>
  519. </c-upload>
  520. <el-dialog
  521. title="批量调度"
  522. :visible.sync="dialogVisible"
  523. append-to-body
  524. width="70%">
  525. <avue-form :option="option" v-model="form" ref="form">
  526. <template slot="fleetId">
  527. <crop-select
  528. v-model="form.fleetId"
  529. corpType="CD"
  530. ></crop-select>
  531. </template>
  532. </avue-form>
  533. <span slot="footer" class="dialog-footer">
  534. <el-button @click="dialogVisible = false" size="small">取 消</el-button>
  535. <el-button type="primary" @click="saveScheduling" size="small">调 度</el-button>
  536. </span>
  537. </el-dialog>
  538. <el-dialog
  539. title="变更"
  540. :visible.sync="dialogChange"
  541. append-to-body
  542. width="70%">
  543. <avue-form :option="optionData" v-model="formData" ref="saveForm">
  544. <template slot="fleetId">
  545. <crop-select
  546. v-model="formData.fleetId"
  547. corpType="CD"
  548. :disabled="formData === 4"
  549. @getCorpData="getCorpData"
  550. ></crop-select>
  551. </template>
  552. </avue-form>
  553. <span slot="footer" class="dialog-footer">
  554. <el-button @click="dialogChange = false" size="small">关 闭</el-button>
  555. <el-button type="primary" @click="confirmChange" size="small">确 定</el-button>
  556. </span>
  557. </el-dialog>
  558. <el-dialog
  559. title="变更记录"
  560. :visible.sync="dialogRecord"
  561. append-to-body
  562. width="70%">
  563. <avue-crud :data="dataRecord" :option="optionRecord" style="margin-top: -43px"></avue-crud>
  564. <span slot="footer" class="dialog-footer">
  565. <el-button @click="dialogRecord = false" size="small">关 闭</el-button>
  566. </span>
  567. </el-dialog>
  568. <el-dialog
  569. title="附件"
  570. :visible.sync="enclosure"
  571. append-to-body
  572. width="70%">
  573. <c-upload
  574. typeUpload="GZ"
  575. :basic="true"
  576. deleteUrl="/api/blade-client/common-file/remove"
  577. :data="orderList"
  578. :enumerationValue="76"
  579. ></c-upload>
  580. <span slot="footer" class="dialog-footer">
  581. <el-button @click="enclosure = false" size="small">取 消</el-button>
  582. <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
  583. </span>
  584. </el-dialog>
  585. <track-playback :dialogVisible="dialogVisibleTwo" :lineArr="lineArr" ref="playback"></track-playback>
  586. </div>
  587. </template>
  588. <script>
  589. import {getLazyTree} from "@/api/base/region";
  590. import {
  591. saveDelegationList,
  592. detailDelegationList,
  593. removeCollection,
  594. dispatchCollection,
  595. queryVehicle,
  596. cancelDispatchCollection,
  597. dispatchBatch,
  598. fleetDriverSave,
  599. recordingDetails,
  600. changeFleet,
  601. incidentalSubmit, saveFile, getFee, fleetList, conserveDispatch,
  602. checkAttachment, sendACarCollection
  603. } from "@/api/landTransportation";
  604. import website from "@/config/website";
  605. import {getDeptTree} from "@/api/system/dept";
  606. import {customerList} from "@/api/basicData/basicFeesDesc";
  607. import {gaude, location} from "@/api/gaude";
  608. export default {
  609. props: {
  610. id: {
  611. type: String
  612. },
  613. home: {
  614. type: Boolean
  615. }
  616. },
  617. data() {
  618. return {
  619. formData: {},
  620. enclosure: false,
  621. dialogVisibleTwo: false,
  622. lineArr: [],
  623. formAnnex: {},
  624. key: 0,
  625. formDataList: {},
  626. orderList: [],
  627. dialogChange: false,
  628. optionData: {
  629. span: 12,
  630. menuBtn: false,
  631. column: [{
  632. label: "车队",
  633. prop: "fleetId",
  634. }, {
  635. label: "应付陆运费",
  636. prop: "landAmountC",
  637. precision: 2,
  638. controls: false,
  639. type: 'number',
  640. }]
  641. },
  642. form: {},
  643. dataRecord: [],
  644. dialogRecord: false,
  645. optionRecord: {
  646. stripe: true,
  647. refreshBtn: false,
  648. columnBtn: false,
  649. menu: false,
  650. addBtn: false,
  651. align: 'center',
  652. column: [
  653. {
  654. label: '变更内容',
  655. prop: 'content'
  656. }, {
  657. label: '变更人',
  658. prop: 'changeUserName'
  659. }, {
  660. label: '变更时间',
  661. prop: 'changeTime'
  662. }
  663. ]
  664. },
  665. option: {
  666. span: 12,
  667. menuBtn: false,
  668. column: [{
  669. label: "车队",
  670. prop: "fleetId",
  671. rules: [{
  672. required: true,
  673. message: " ",
  674. trigger: "blur"
  675. }]
  676. }, {
  677. label: "应付陆运费",
  678. prop: "landAmountC",
  679. precision: 2,
  680. controls: false,
  681. type: 'number',
  682. }]
  683. },
  684. activeIndex: '1',
  685. dialogVisible: false,
  686. c_button: false,
  687. goodsForm: {},
  688. orderFilesList: [],
  689. selectionList: [],
  690. roleName: localStorage.getItem("roleName").split(',')[0],
  691. roleNameTwo: localStorage.getItem("roleName").split(','),
  692. batchDuling:true,
  693. breakConfiguration: {
  694. multipleChoices: false,
  695. multiple: false,
  696. disabled: false,
  697. searchShow: true,
  698. collapseTags: false,
  699. clearable: true,
  700. placeholder: '请点击右边按钮选择',
  701. dicData: []
  702. },
  703. advantageProjectData: [],
  704. treeOption: {
  705. label: 'title',
  706. value: 'id',
  707. lazy: true,
  708. lazyLoad(node, resolve) {
  709. const parentId = node.level === 0 ? '00' : node.data.id;
  710. getLazyTree(parentId).then(res => {
  711. resolve(
  712. res.data.data.map(item => {
  713. return {
  714. ...item,
  715. leaf: !item.hasChildren
  716. };
  717. })
  718. );
  719. });
  720. }
  721. },
  722. tableData: [],
  723. entrustListT: [],
  724. KeyBoxTwo: 0,
  725. entrustOptionTwoTBackup: {
  726. selectable: (row, index) => {
  727. return row.status === 0
  728. },
  729. align: 'center',
  730. menuAlign: 'center',
  731. index: true,
  732. cellBtn: false,
  733. refreshBtn: false,
  734. selection: true,
  735. selectionWidth: 55,
  736. menu: true,
  737. tip: false,
  738. addBtn: false,
  739. cancelBtn: false,
  740. editBtn: false,
  741. addRowBtn: false,
  742. delBtn: false,
  743. showSummary: true,
  744. // editBtn:false,
  745. summaryText: "合计",
  746. sumColumnList: [
  747. {
  748. name: 'landWeight',
  749. type: 'sum',
  750. decimals: 2
  751. }, {
  752. name: 'landAmountC',
  753. type: 'sum',
  754. decimals: 2
  755. }, {
  756. name: 'landAmountD',
  757. type: 'sum',
  758. decimals: 2
  759. }, {
  760. name: 'oneFeeD',
  761. type: 'sum',
  762. decimals: 2
  763. }, {
  764. name: 'twoFeeD',
  765. type: 'sum',
  766. decimals: 2
  767. }, {
  768. name: 'threeFeeD',
  769. type: 'sum',
  770. decimals: 2
  771. }, {
  772. name: 'fourFeeD',
  773. type: 'sum',
  774. decimals: 2
  775. }, {
  776. name: 'fiveFeeD',
  777. type: 'sum',
  778. decimals: 2
  779. }, {
  780. name: 'oneFeeC',
  781. type: 'sum',
  782. decimals: 2
  783. }, {
  784. name: 'twoFeeC',
  785. type: 'sum',
  786. decimals: 2
  787. }, {
  788. name: 'threeFeeC',
  789. type: 'sum',
  790. decimals: 2
  791. }, {
  792. name: 'fourFeeC',
  793. type: 'sum',
  794. decimals: 2
  795. }, {
  796. name: 'fiveFeeC',
  797. type: 'sum',
  798. decimals: 2
  799. }, {
  800. name: 'landAmountD',
  801. type: 'sum',
  802. decimals: 2
  803. }, {
  804. name: 'ctnQuantity',
  805. type: 'sum',
  806. decimals: 0
  807. }],
  808. column: [{
  809. label: '货运日期',
  810. type: "datetime",
  811. cell: true,
  812. format: 'yyyy-MM-dd HH:mm',
  813. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  814. width: 200,
  815. index: 1,
  816. prop: 'arrivalTime'
  817. }, {
  818. label: '实际到厂时间',
  819. prop: 'realArrivalTime',
  820. overHidden: true,
  821. type: "date",
  822. searchRange: true,
  823. defaultTime: ['00:00:00', '23:59:59'],
  824. format: "yyyy-MM-dd HH:mm",
  825. valueFormat: "yyyy-MM-dd HH:mm:ss",
  826. index: 2,
  827. width: 140,
  828. }, {
  829. label: '尺寸箱型',
  830. width: 100,
  831. slot: true,
  832. index: 3,
  833. prop: 'ctnType'
  834. }, {
  835. label: '箱量',
  836. width: 50,
  837. index: 4,
  838. prop: 'ctnQuantity'
  839. }, {
  840. label: '车队',
  841. width: 200,
  842. index: 5,
  843. type: 'select',
  844. cascader: ['plateNo'],
  845. overHidden: true,
  846. cell: true,
  847. prop: 'fleetId',
  848. dicUrl: "/api/blade-client/corpsdesc/list?size=1000&current=1&&corpType=CD",
  849. props: {
  850. label: "cname",
  851. value: "id",
  852. res: "data.records"
  853. }
  854. }, {
  855. label: '车号',
  856. width: 150,
  857. index: 6,
  858. cell: false,
  859. prop: 'plateNo',
  860. type: "select",
  861. dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
  862. props: {
  863. label: "plateNo",
  864. value: "plateNo"
  865. },
  866. }, {
  867. label: '司机',
  868. width: 115,
  869. index: 7,
  870. prop: 'driverName'
  871. }, {
  872. label: '电话',
  873. width: 160,
  874. index: 8,
  875. prop: 'tel'
  876. }, {
  877. label: '完工日期',
  878. prop: 'finishedTime',
  879. overHidden: true,
  880. type: "date",
  881. searchRange: true,
  882. defaultTime: ['00:00:00', '23:59:59'],
  883. format: "yyyy-MM-dd HH:mm",
  884. valueFormat: "yyyy-MM-dd HH:mm:ss",
  885. index: 9,
  886. width: 140,
  887. }, {
  888. label: '货物名称',
  889. overHidden: true,
  890. width: 160,
  891. index: 10,
  892. prop: 'goods'
  893. }, {
  894. label: '件数',
  895. width: 100,
  896. overHidden: true,
  897. controls: false,
  898. cell: true,
  899. index: 11,
  900. prop: 'quantity',
  901. type: 'number',
  902. precision: 0
  903. }
  904. // , {
  905. // label: '包装',
  906. // width: 100,
  907. // overHidden: true,
  908. // cell: true,
  909. // prop: 'packing',
  910. // type: 'select',
  911. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=packaging",
  912. // props: {
  913. // label: "dictValue",
  914. // value: "dictValue"
  915. // },
  916. // }
  917. , {
  918. label: '重量',
  919. width: 160,
  920. prop: 'landWeight',
  921. controls: false,
  922. precision: 2,
  923. index: 12,
  924. type: 'number'
  925. }, {
  926. label: '尺码',
  927. width: 100,
  928. overHidden: true,
  929. cell: true,
  930. index: 13,
  931. prop: 'size',
  932. }, {
  933. label: '单柜运费',
  934. index: 14,
  935. prop: 'landAmountD'
  936. },
  937. {
  938. label: '状态',
  939. width: 100,
  940. index: 15,
  941. type: 'select',
  942. dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
  943. props: {
  944. label: "dictValue",
  945. value: "dictKey"
  946. },
  947. dataType: "string",
  948. prop: 'status'
  949. }, {
  950. label: '应付陆运费',
  951. cell: true,
  952. index: 16,
  953. prop: 'landAmountC'
  954. }, {
  955. label: '委托备注',
  956. width: 245,
  957. index: 17,
  958. prop: 'remarks'
  959. }, {
  960. label: '车队备注',
  961. width: 245,
  962. index: 18,
  963. prop: 'fleetRemarks'
  964. }, {
  965. label: '司机备注',
  966. width: 245,
  967. index: 19,
  968. prop: 'driverRemarks'
  969. },
  970. // {
  971. // label: '应收场站费',
  972. // width: 100,
  973. // precision: 2,
  974. // index: 20,
  975. // controls: false,
  976. // cell: true,
  977. // type: 'number',
  978. // prop: 'oneFeeD'
  979. // }, {
  980. // label: '应收港杂费',
  981. // width: 100,
  982. // precision: 2,
  983. // cell: true,
  984. // index: 21,
  985. // controls: false,
  986. // type: 'number',
  987. // prop: 'twoFeeD'
  988. // }, {
  989. // label: '应收扣款',
  990. // width: 100,
  991. // index: 22,
  992. // precision: 2,
  993. // cell: true,
  994. // controls: false,
  995. // type: 'number',
  996. // prop: 'threeFeeD'
  997. // }, {
  998. // label: '应收待时费',
  999. // width: 100,
  1000. // precision: 2,
  1001. // index: 23,
  1002. // cell: true,
  1003. // controls: false,
  1004. // type: 'number',
  1005. // prop: 'fourFeeD'
  1006. // }, {
  1007. // label: '应收其他',
  1008. // width: 100,
  1009. // index: 24,
  1010. // precision: 2,
  1011. // cell: true,
  1012. // type: 'number',
  1013. // controls: false,
  1014. // prop: 'fiveFeeD'
  1015. // }, {
  1016. // label: '应收费用备注',
  1017. // width: 245,
  1018. // index: 25,
  1019. // cell: true,
  1020. // prop: 'feeRemarksD'
  1021. // }, {
  1022. // label: '应付场站费',
  1023. // width: 100,
  1024. // index: 26,
  1025. // precision: 2,
  1026. // cell: true,
  1027. // controls: false,
  1028. // type: 'number',
  1029. // prop: 'oneFeeC'
  1030. // }, {
  1031. // label: '应付港杂费',
  1032. // width: 100,
  1033. // precision: 2,
  1034. // index: 27,
  1035. // cell: true,
  1036. // controls: false,
  1037. // type: 'number',
  1038. // prop: 'twoFeeC'
  1039. // }, {
  1040. // label: '应付扣款',
  1041. // width: 100,
  1042. // index: 28,
  1043. // precision: 2,
  1044. // controls: false,
  1045. // type: 'number',
  1046. // cell: true,
  1047. // prop: 'threeFeeC'
  1048. // }, {
  1049. // label: '应付待时费',
  1050. // width: 100,
  1051. // precision: 2,
  1052. // index: 29,
  1053. // controls: false,
  1054. // cell: true,
  1055. // type: 'number',
  1056. // prop: 'fourFeeC'
  1057. // }, {
  1058. // label: '应付其他',
  1059. // width: 100,
  1060. // precision: 2,
  1061. // index: 30,
  1062. // type: 'number',
  1063. // cell: true,
  1064. // controls: false,
  1065. // prop: 'fiveFeeC'
  1066. // }, {
  1067. // label: '应付费用备注',
  1068. // width: 245,
  1069. // index: 31,
  1070. // cell: true,
  1071. // prop: 'feeRemarksC'
  1072. // }
  1073. ]
  1074. },
  1075. entrustOptionTwoT: {},
  1076. entrustList: [],
  1077. goodsOptionForm: {
  1078. menuBtn: false,
  1079. disabled: true,
  1080. span: 8,
  1081. column: [{
  1082. label: '公司名称',
  1083. formslot: true,
  1084. prop: 'corpId',
  1085. rules: [{
  1086. required: true,
  1087. message: " ",
  1088. trigger: "change"
  1089. }],
  1090. }, {
  1091. label: '所属部门',
  1092. prop: 'salesmanDept',
  1093. type: "tree",
  1094. filter: false,
  1095. dicData: [],
  1096. props: {
  1097. label: "title"
  1098. }
  1099. }, {
  1100. label: '业务员',
  1101. prop: 'salesman',
  1102. type: "select",
  1103. dicUrl: "/api/blade-user/userList",
  1104. props: {
  1105. label: "realName",
  1106. value: "id"
  1107. },
  1108. rules: [{
  1109. required: true,
  1110. message: " ",
  1111. trigger: "blur"
  1112. }]
  1113. }, {
  1114. label: '物流运输',
  1115. prop: 'dispatchDept',
  1116. cascader: ['dispatcher'],
  1117. dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
  1118. type: "select",
  1119. props: {
  1120. label: "deptName",
  1121. value: "id"
  1122. },
  1123. rules: [{
  1124. required: true,
  1125. message: " ",
  1126. trigger: "blur"
  1127. }]
  1128. }, {
  1129. label: '运输调度',
  1130. prop: 'dispatcher',
  1131. type: "select",
  1132. dicUrl: "/api/blade-user/userList?deptPid={{key}}",
  1133. props: {
  1134. label: "realName",
  1135. value: "id"
  1136. }
  1137. }, {
  1138. label: '委托日期',
  1139. prop: 'bsDate',
  1140. type: "datetime",
  1141. format: 'yyyy-MM-dd HH:mm',
  1142. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  1143. }, {
  1144. label: '票据号',
  1145. prop: 'receiptNo'
  1146. }, {
  1147. label: '联系电话',
  1148. prop: 'tel'
  1149. }, {
  1150. label: '提单号',
  1151. prop: 'billNo',
  1152. rules: [{
  1153. required: true,
  1154. message: " ",
  1155. trigger: "blur"
  1156. }],
  1157. }, {
  1158. label: '场站',
  1159. prop: 'station',
  1160. rules: [{
  1161. required: true,
  1162. message: " ",
  1163. trigger: "blur"
  1164. }],
  1165. },
  1166. // {
  1167. // label: '货运日期',
  1168. // type: "datetime",
  1169. // format: 'yyyy-MM-dd HH:mm:ss',
  1170. // valueFormat: 'yyyy-MM-dd HH:mm:ss',
  1171. // prop: 'arrivalTime',
  1172. // rules: [{
  1173. // required: true,
  1174. // message: " ",
  1175. // trigger: "blur"
  1176. // }],
  1177. // },
  1178. {
  1179. label: '备注',
  1180. span: 24,
  1181. minRows: 2,
  1182. prop: 'remarks',
  1183. type: 'textarea'
  1184. }]
  1185. },
  1186. goodsOptionFormTwo: {
  1187. menuBtn: false,
  1188. disabled: true,
  1189. span: 8,
  1190. column: [
  1191. // {
  1192. // label: '所属公司',
  1193. // formslot: true,
  1194. // prop: 'belongCompany',
  1195. // rules: [{
  1196. // required: false,
  1197. // message: " ",
  1198. // trigger: "blur"
  1199. // }],
  1200. // },
  1201. {
  1202. label: '船名航次',
  1203. prop: 'factory',
  1204. rules: [{
  1205. required: false,
  1206. message: " ",
  1207. trigger: "blur"
  1208. }],
  1209. }
  1210. // , {
  1211. // label: '货物名称',
  1212. // prop: 'goods',
  1213. // rules: [{
  1214. // required: false,
  1215. // message: " ",
  1216. // trigger: "blur"
  1217. // }],
  1218. // }
  1219. , {
  1220. label: '开船日期',
  1221. prop: 'etd',
  1222. type: 'date'
  1223. }, {
  1224. label: '预配箱量',
  1225. prop: 'expectCtnQty',
  1226. }, {
  1227. label: '起运港',
  1228. prop: 'polId'
  1229. }, {
  1230. label: '目的港',
  1231. prop: 'podId'
  1232. }, {
  1233. label: '截港日期',
  1234. prop: 'etc',
  1235. type: 'date'
  1236. }, {
  1237. label: '截单日期',
  1238. prop: 'siCutoffDate',
  1239. type: 'date'
  1240. }, {
  1241. label: '订舱代理',
  1242. prop: 'agentId'
  1243. }]
  1244. },
  1245. entrustOptionTwo: {
  1246. align: 'center',
  1247. menuAlign: 'center',
  1248. addBtnText: '录入箱信息',
  1249. index: true,
  1250. cellBtn: true,
  1251. addBtn: false,
  1252. addRowBtn: true,
  1253. showSummary: true,
  1254. summaryText: "合计",
  1255. sumColumnList: [
  1256. {
  1257. name: 'landWeight',
  1258. type: 'sum',
  1259. decimals: 2
  1260. }, {
  1261. name: 'landAmountD',
  1262. type: 'sum',
  1263. decimals: 2
  1264. }, {
  1265. name: 'ctnQuantity',
  1266. type: 'sum',
  1267. decimals: 7
  1268. }],
  1269. column: [{
  1270. label: '尺寸箱型',
  1271. cell: true,
  1272. prop: 'ctnType',
  1273. type: 'select',
  1274. width: 100,
  1275. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  1276. props: {
  1277. label: "dictValue",
  1278. value: "dictKey"
  1279. }
  1280. }, {
  1281. label: '箱量',
  1282. cell: true,
  1283. prop: 'ctnQuantity',
  1284. controls: false,
  1285. precision: 0,
  1286. width: 100,
  1287. type: 'number'
  1288. }, {
  1289. label: '总重量(吨)',
  1290. cell: true,
  1291. prop: 'landWeight',
  1292. controls: false,
  1293. width: 200,
  1294. precision: 2,
  1295. type: 'number'
  1296. }, {
  1297. label: '单柜运费',
  1298. cell: true,
  1299. prop: 'landAmountD',
  1300. controls: false,
  1301. width: 200,
  1302. precision: 2,
  1303. type: 'number'
  1304. }, {
  1305. label: '备注',
  1306. cell: true,
  1307. width: 200,
  1308. prop: 'remarks'
  1309. }
  1310. ]
  1311. },
  1312. collectionList: [],
  1313. collectionOption: {},
  1314. collectionOptionBackup: {
  1315. align: 'center',
  1316. menuAlign: 'center',
  1317. index: true,
  1318. cancelBtn: false,
  1319. editBtn: false,
  1320. delBtn: false,
  1321. cellBtn: false,
  1322. addBtn: false,
  1323. addRowBtn: false,
  1324. showSummary: true,
  1325. addBtnText: '录入明细',
  1326. summaryText: "合计",
  1327. sumColumnList: [{
  1328. name: 'price',
  1329. type: 'sum',
  1330. decimals: 2
  1331. }, {
  1332. name: 'amount',
  1333. type: 'sum',
  1334. decimals: 2
  1335. }, {
  1336. name: 'quantity',
  1337. type: 'sum',
  1338. decimals: 1
  1339. }],
  1340. column: [{
  1341. label: '客户名称',
  1342. slot: true,
  1343. width: 300,
  1344. prop: 'corpId'
  1345. }, {
  1346. label: '车号',
  1347. cell: true,
  1348. prop: 'plateNo',
  1349. type: "select",
  1350. props: {
  1351. label: "label",
  1352. value: "label"
  1353. },
  1354. }, {
  1355. label: '费用名称',
  1356. slot: true,
  1357. width: 200,
  1358. prop: 'feeId'
  1359. }, {
  1360. label: '计价单位',
  1361. cell: true,
  1362. prop: 'unit',
  1363. type: "select",
  1364. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1365. props: {
  1366. label: "dictValue",
  1367. value: "dictKey"
  1368. }
  1369. }, {
  1370. label: '单价',
  1371. cell: true,
  1372. type: 'number',
  1373. controls: false,
  1374. prop: 'price'
  1375. }, {
  1376. label: '数量',
  1377. cell: true,
  1378. controls: false,
  1379. type: 'number',
  1380. prop: 'quantity'
  1381. }, {
  1382. label: '金额',
  1383. cell: true,
  1384. type: 'number',
  1385. controls: false,
  1386. prop: 'amount'
  1387. }, {
  1388. label: '税率',
  1389. cell: true,
  1390. prop: 'taxRate'
  1391. }, {
  1392. label: '币别',
  1393. cell: true,
  1394. prop: 'currency',
  1395. type: "select",
  1396. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1397. props: {
  1398. label: "dictValue",
  1399. value: "dictKey"
  1400. },
  1401. }
  1402. ]
  1403. },
  1404. paymentList: [],
  1405. paymentOption: {},
  1406. paymentOptionBackup: {
  1407. align: 'center',
  1408. menuAlign: 'center',
  1409. index: true,
  1410. cancelBtn: false,
  1411. editBtn: false,
  1412. delBtn: false,
  1413. cellBtn: false,
  1414. addBtn: false,
  1415. addRowBtn: false,
  1416. showSummary: true,
  1417. addBtnText: '录入明细',
  1418. summaryText: "合计",
  1419. sumColumnList: [{
  1420. name: 'price',
  1421. type: 'sum',
  1422. decimals: 2
  1423. }, {
  1424. name: 'amount',
  1425. type: 'sum',
  1426. decimals: 2
  1427. }, {
  1428. name: 'quantity',
  1429. type: 'sum',
  1430. decimals: 1
  1431. }],
  1432. column: [{
  1433. label: '客户名称',
  1434. cell: true,
  1435. width: 300,
  1436. prop: 'fleetId',
  1437. type: "select",
  1438. cascader: ['plateNo'],
  1439. props: {
  1440. label: "fleetName",
  1441. value: "fleetId"
  1442. },
  1443. change: (data) => {
  1444. data.row.plateNo = ''
  1445. }
  1446. },
  1447. // {
  1448. // label: '客户名称',
  1449. // slot: true,
  1450. // width: 300,
  1451. // prop: 'corpId'
  1452. // },
  1453. {
  1454. label: '车号',
  1455. cell: true,
  1456. prop: 'plateNo',
  1457. type: "select",
  1458. props: {
  1459. label: "label",
  1460. value: "label"
  1461. }
  1462. }, {
  1463. label: '费用名称',
  1464. slot: true,
  1465. width: 200,
  1466. prop: 'feeId'
  1467. }, {
  1468. label: '计价单位',
  1469. cell: true,
  1470. prop: 'unit',
  1471. type: "select",
  1472. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1473. props: {
  1474. label: "dictValue",
  1475. value: "dictKey"
  1476. }
  1477. }, {
  1478. label: '单价',
  1479. cell: true,
  1480. controls: false,
  1481. type: 'number',
  1482. prop: 'price',
  1483. }, {
  1484. label: '数量',
  1485. cell: true,
  1486. controls: false,
  1487. type: 'number',
  1488. prop: 'quantity'
  1489. }, {
  1490. label: '金额',
  1491. cell: true,
  1492. controls: false,
  1493. type: 'number',
  1494. prop: 'amount'
  1495. }, {
  1496. label: '税率',
  1497. cell: true,
  1498. prop: 'taxRate'
  1499. }, {
  1500. label: '币别',
  1501. cell: true,
  1502. prop: 'currency',
  1503. type: "select",
  1504. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1505. props: {
  1506. label: "dictValue",
  1507. value: "dictKey"
  1508. },
  1509. },
  1510. ]
  1511. }
  1512. };
  1513. },
  1514. async created() {
  1515. this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1516. this.collectionOption = await this.getColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
  1517. this.paymentOption = await this.getColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1518. this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
  1519. this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
  1520. this.findObject(this.paymentOption.column, "plateNo").dicFormatter = (data) => {
  1521. let list = []
  1522. data.data.forEach(ele => {
  1523. list.push({label: ele})
  1524. })
  1525. return list
  1526. }
  1527. this.findObject(this.collectionOption.column, "price").change = (data) => {
  1528. if (data.row.price && data.row.quantity) {
  1529. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1530. }
  1531. }
  1532. this.findObject(this.collectionOption.column, "quantity").change = (data) => {
  1533. if (data.row.price && data.row.quantity) {
  1534. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1535. }
  1536. }
  1537. this.findObject(this.paymentOption.column, "price").change = (data) => {
  1538. if (data.row.price && data.row.quantity) {
  1539. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1540. }
  1541. }
  1542. this.findObject(this.paymentOption.column, "quantity").change = (data) => {
  1543. if (data.row.price && data.row.quantity) {
  1544. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1545. }
  1546. }
  1547. this.KeyBoxTwo++
  1548. if (this.id) {
  1549. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  1550. this.goodsForm = res.data.data
  1551. this.tableData = res.data.data.orderAddressList
  1552. this.entrustList = res.data.data.orderItemList
  1553. this.goodsList = res.data.data.orderItemList
  1554. this.orderFilesList = res.data.data.fileList
  1555. if (res.data.data.orderFeeList.length > 0) {
  1556. res.data.data.orderFeeList.forEach(item => {
  1557. if (item.type == 1) {
  1558. this.collectionList.push(item)
  1559. } else {
  1560. this.paymentList.push(item)
  1561. }
  1562. })
  1563. }
  1564. delete this.goodsForm.orderAddressList
  1565. delete this.goodsForm.orderItemList
  1566. delete this.goodsForm.orderFeeList
  1567. // this.tableData.forEach(item => {
  1568. // if (item.region) item.region = item.region.split(',')
  1569. // })
  1570. if (this.roleNameTwo.indexOf('总调度') !== -1) {
  1571. this.entrustOptionTwoT.menu = false
  1572. this.collectionOption.menu = false
  1573. this.paymentOption.menu = false
  1574. }
  1575. })
  1576. }
  1577. this.findObject(this.entrustOptionTwoT.column, "plateNo").change = (data) => {
  1578. fleetList({fleetId:data.row.fleetId}).then(res => {
  1579. for (let item in res.data.data) {
  1580. if (data.value === res.data.data[item].plateNo) {
  1581. this.entrustList[data.index].driverId = res.data.data[item].driverId
  1582. this.entrustList[data.index].driverName = res.data.data[item].driverName
  1583. this.entrustList[data.index].tel = res.data.data[item].tel
  1584. }
  1585. }
  1586. })
  1587. }
  1588. queryVehicle({orderId: this.id}).then(res => {
  1589. const column = this.findObject(this.collectionOption.column, "plateNo");
  1590. column.dicData = []
  1591. res.data.data.forEach(item => {
  1592. column.dicData.push({label: item})
  1593. })
  1594. this.key++
  1595. });
  1596. // this.findObject(this.paymentOption.column, "plateNo").change = (data) => {
  1597. // const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
  1598. // columnTwo.dicData = []
  1599. // queryVehicle({orderId: this.id,fleetId:data.row.fleetId}).then(res => {
  1600. // res.data.data.forEach(item => {
  1601. // columnTwo.dicData.push({label: item})
  1602. // })
  1603. // });
  1604. // this.key++
  1605. // }
  1606. this.$refs.other.show = false
  1607. // 非租户模式默认加载管理组数据
  1608. if (!website.tenantMode) {
  1609. this.initData(website.tenantId);
  1610. } else {
  1611. this.initData();
  1612. }
  1613. },
  1614. methods: {
  1615. schedulingFileSaving() {
  1616. this.c_button = true
  1617. conserveDispatch({
  1618. fileList: this.orderFilesList,
  1619. id: this.goodsForm.id
  1620. }).then(res => {
  1621. checkAttachment({id: this.goodsForm.id}).then(res => {
  1622. this.orderFilesList = res.data.data
  1623. this.c_button = false
  1624. })
  1625. })
  1626. },
  1627. openTrack(row) {
  1628. gaude({itemId: row.id, plateNo: row.plateNo, tenantId: '234557', color: '2'}).then(res => {
  1629. this.lineArr = res.data.data.trackArray
  1630. this.dialogVisibleTwo = true
  1631. let this_ = this
  1632. setTimeout(function () {
  1633. this_.$refs.playback.initMap();
  1634. }, 100)
  1635. })
  1636. // location({itemId: row.id,plateNo:'陕YH0008'}).then(res => {
  1637. // // console.log(res.data.data)
  1638. // // console.log(this.lineArr[this.lineArr.length - 1])
  1639. // })
  1640. },
  1641. //自定义列保存
  1642. async saveColumnBoxTwo() {
  1643. /**
  1644. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1645. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1646. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1647. */
  1648. const inSave = await this.saveColumnData(this.getColumnName(86.1), this.entrustOptionTwoT);
  1649. if (inSave) {
  1650. this.$message.success("保存成功");
  1651. //关闭窗口
  1652. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1653. }
  1654. },
  1655. //自定义列重置
  1656. async resetColumnBoxTwo() {
  1657. this.entrustOptionTwoT = this.entrustOptionTwoTBackup;
  1658. const inSave = await this.delColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1659. if (inSave) {
  1660. this.$message.success("重置成功");
  1661. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1662. }
  1663. if (this.roleNameTwo.indexOf('总调度') !== -1) {
  1664. this.entrustOptionTwoT.menu = false
  1665. this.collectionOption.menu = false
  1666. this.paymentOption.menu = false
  1667. }
  1668. },
  1669. //自定义列保存
  1670. async saveColumnCollection() {
  1671. /**
  1672. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1673. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1674. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1675. */
  1676. const inSave = await this.saveColumnData(this.getColumnName(86.4), this.collectionOption);
  1677. if (inSave) {
  1678. this.$message.success("保存成功");
  1679. //关闭窗口
  1680. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1681. }
  1682. },
  1683. //自定义列重置
  1684. async resetColumnCollection() {
  1685. this.collectionOption = this.collectionOptionBackup;
  1686. const inSave = await this.delColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
  1687. if (inSave) {
  1688. this.$message.success("重置成功");
  1689. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1690. }
  1691. },
  1692. //自定义列保存
  1693. async saveColumnPayment() {
  1694. /**
  1695. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1696. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1697. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1698. */
  1699. const inSave = await this.saveColumnData(this.getColumnName(86.5), this.paymentOption);
  1700. if (inSave) {
  1701. this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
  1702. this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
  1703. this.$message.success("保存成功");
  1704. //关闭窗口
  1705. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1706. }
  1707. },
  1708. //自定义列重置
  1709. async resetColumnPayment() {
  1710. this.paymentOption = this.paymentOptionBackup;
  1711. const inSave = await this.delColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1712. if (inSave) {
  1713. this.$message.success("重置成功");
  1714. this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
  1715. this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
  1716. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1717. }
  1718. },
  1719. //打开附件
  1720. annexOpen(row, index) {
  1721. if(row.id){
  1722. this.enclosure = true
  1723. this.formAnnex = row
  1724. getFee({id: row.id}).then(res => {
  1725. this.orderList = res.data.data
  1726. })
  1727. }else {
  1728. this.$message.error('请保存后再上传附件');
  1729. }
  1730. },
  1731. //保存
  1732. saveAnnex() {
  1733. saveFile({
  1734. id: this.formAnnex.id,
  1735. fileList: this.orderList
  1736. }).then(res => {
  1737. this.$message.success("保存成功");
  1738. this.annexOpen(this.formAnnex)
  1739. })
  1740. },
  1741. getCorpData(val) {
  1742. this.formData.fleetName = val.cname
  1743. },
  1744. confirmChange() {
  1745. changeFleet({
  1746. ...this.formData,
  1747. id: this.formDataList.id,
  1748. orderId: this.goodsForm.id,
  1749. originalFleetName: this.formDataList.fleetName
  1750. }).then(res => {
  1751. this.$refs.saveForm.resetForm()
  1752. this.entrustList = res.data.data
  1753. this.dialogChange = false
  1754. this.$message.success("变更成功");
  1755. })
  1756. },
  1757. //查询业务部门
  1758. initData(tenantId) {
  1759. getDeptTree(tenantId).then(res => {
  1760. const column = this.findObject(this.goodsOptionForm.column, "salesmanDept");
  1761. column.dicData = res.data.data;
  1762. });
  1763. },
  1764. //多选触发
  1765. selectionChange(list) {
  1766. this.selectionList = list
  1767. if(this.selectionList.length === 0){
  1768. return this.batchDuling = true
  1769. }else {
  1770. for(let item in this.selectionList){
  1771. if(this.selectionList[item].status > 0){
  1772. return this.batchDuling = true
  1773. }
  1774. }
  1775. return this.batchDuling = false
  1776. }
  1777. },
  1778. //批量调度
  1779. batchScheduling() {
  1780. this.form = {}
  1781. this.dialogVisible = true
  1782. },
  1783. //提交调度
  1784. saveScheduling() {
  1785. this.$refs['form'].validate((valid, done) => {
  1786. done()
  1787. if (valid) {
  1788. let data = []
  1789. this.$confirm('是否确认调度?', '提示', {
  1790. confirmButtonText: '确定',
  1791. cancelButtonText: '取消',
  1792. type: 'warning'
  1793. }).then(() => {
  1794. this.selectionList.forEach(item => data.push(item.id))
  1795. dispatchBatch({
  1796. ...this.form,
  1797. idList: data,
  1798. orderId: this.goodsForm.id
  1799. }).then(res => {
  1800. this.entrustList = res.data.data
  1801. this.dialogVisible = false
  1802. })
  1803. }).catch(() => {
  1804. this.$message({
  1805. type: 'info',
  1806. message: '已取消'
  1807. });
  1808. });
  1809. } else {
  1810. return false
  1811. }
  1812. })
  1813. },
  1814. //刷新数据
  1815. refreshData() {
  1816. detailDelegationList({id: this.id, kind: '2'}).then(res => {
  1817. this.goodsForm = res.data.data
  1818. this.tableData = res.data.data.orderAddressList
  1819. this.entrustList = res.data.data.orderItemList
  1820. this.goodsList = res.data.data.orderItemList
  1821. this.orderFilesList = res.data.data.fileList
  1822. if (res.data.data.orderFeeList.length > 0) {
  1823. res.data.data.orderFeeList.forEach(item => {
  1824. if (item.type == 1) {
  1825. this.collectionList.push(item)
  1826. } else {
  1827. this.paymentList.push(item)
  1828. }
  1829. })
  1830. }
  1831. delete this.goodsForm.orderAddressList
  1832. delete this.goodsForm.orderItemList
  1833. delete this.goodsForm.orderFeeList
  1834. // this.tableData.forEach(item => {
  1835. // if (item.region) item.region = item.region.split(',')
  1836. // })
  1837. })
  1838. },
  1839. //切换收付费
  1840. handleSelect(tab, event) {
  1841. this.activeIndex = tab.name
  1842. },
  1843. //箱信息保存
  1844. rowSaveT(row, index, done, loading) {
  1845. if (row.$cellEdit) {
  1846. fleetDriverSave(row).then(res => {
  1847. this.$message.success("保存成功");
  1848. })
  1849. }
  1850. this.$refs.crudBoxTwo.rowCell(row, index)
  1851. },
  1852. //调度并且派车
  1853. rowSaveThree(row, index, done, loading) {
  1854. if (row.$cellEdit) {
  1855. if (!row.plateNo) {
  1856. return this.$message.warning('未选择车号,请选择');
  1857. }
  1858. if (!row.fleetId) {
  1859. return this.$message.warning('请选择车队');
  1860. }
  1861. this.$confirm('是否确定调度派车', '提示', {
  1862. confirmButtonText: '确定',
  1863. cancelButtonText: '取消',
  1864. type: 'warning'
  1865. }).then(() => {
  1866. sendACarCollection(row).then(res => {
  1867. this.$message.success('操作成功');
  1868. this.$refs.crudBoxTwo.rowCell(row, index)
  1869. this.refreshData()
  1870. })
  1871. }).catch(() => {
  1872. this.$message({
  1873. type: 'info',
  1874. message: '已取消'
  1875. });
  1876. this.$refs.crudBoxTwo.rowCell(row, index)
  1877. });
  1878. } else {
  1879. this.entrustOptionTwoT.column.forEach(item => {
  1880. if (item.prop === 'plateNo') {
  1881. item.cell = true
  1882. }
  1883. if (item.prop === 'driverName') {
  1884. item.cell = true
  1885. }
  1886. if (item.prop === 'tel') {
  1887. item.cell = true
  1888. }
  1889. })
  1890. this.$refs.crudBoxTwo.rowCell(row, index)
  1891. }
  1892. },
  1893. rowSaveWell(row, index, done, loading) {
  1894. done()
  1895. },
  1896. //箱信息调度
  1897. designate(row, index) {
  1898. if (row.fleetId) {
  1899. this.$confirm('是否确定调度', '提示', {
  1900. confirmButtonText: '确定',
  1901. cancelButtonText: '取消',
  1902. type: 'warning'
  1903. }).then(() => {
  1904. dispatchCollection(row).then(res => {
  1905. this.$message.success('操作成功');
  1906. this.entrustList[index].status = res.data.data.status
  1907. })
  1908. }).catch(() => {
  1909. this.$message({
  1910. type: 'info',
  1911. message: '已取消'
  1912. });
  1913. });
  1914. } else {
  1915. this.$message.warning('请选择车队');
  1916. }
  1917. },
  1918. //变更车队
  1919. changeFleetT(row, index) {
  1920. this.formDataList = row
  1921. this.dialogChange = true
  1922. this.formData = row
  1923. },
  1924. //打开变更记录
  1925. recordsOfChanges(row, index) {
  1926. this.dialogRecord = true
  1927. recordingDetails({itemId: row.id, kind: 2}).then(res => {
  1928. this.dataRecord = res.data.data
  1929. })
  1930. },
  1931. //取消调度
  1932. cancelDesignate(row, index) {
  1933. this.$confirm('是否确定取消调度', '提示', {
  1934. confirmButtonText: '确定',
  1935. cancelButtonText: '取消',
  1936. type: 'warning'
  1937. }).then(() => {
  1938. cancelDispatchCollection({id: row.id}).then(res => {
  1939. this.$message.success('操作成功');
  1940. this.entrustList[index].status = res.data.data.status
  1941. })
  1942. }).catch(() => {
  1943. this.$message({
  1944. type: 'info',
  1945. message: '已取消'
  1946. });
  1947. });
  1948. },
  1949. //箱信息选择车队
  1950. getfleetIdT(data, row) {
  1951. this.$set(row, 'fleetName', data.cname)
  1952. console.log(this.$refs.crudBoxTwo)
  1953. // this.$refs.crudBoxTwo.handleChange({
  1954. // label: '车队',
  1955. // width: 200,
  1956. // index: 5,
  1957. // prop: 'fleetId',
  1958. // cascader: ['plateNo'],
  1959. // },row)
  1960. },
  1961. //地址新增
  1962. addAddress() {
  1963. this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
  1964. },
  1965. //返回主列表
  1966. backToList(value) {
  1967. if (value === 0) {
  1968. this.$emit('backToList')
  1969. } else if (value === 1) {
  1970. this.$emit('backToList', true)
  1971. } else if (value === 2) {
  1972. this.$router.push({
  1973. path: '/landTransportation/reportAnalysis/index'
  1974. });
  1975. }
  1976. },
  1977. //删除途径地址
  1978. deleteAddress(scope) {
  1979. this.tableData.splice(scope.$index, 1);
  1980. },
  1981. //箱信息保存
  1982. rowSave(row, index, done, loading) {
  1983. row.$cellEdit = false
  1984. done()
  1985. },
  1986. rowCell(row, index) {
  1987. if (row.$cellEdit) {
  1988. if (row.plateNo) {
  1989. if (row.feeId) {
  1990. incidentalSubmit(row).then(res => {
  1991. this.$refs.collection.rowCell(row, index)
  1992. row = res.data.data
  1993. this.$message.success("保存成功");
  1994. })
  1995. } else {
  1996. this.$message.error("请选择费用名称");
  1997. }
  1998. } else {
  1999. this.$message.error("请选择车号");
  2000. }
  2001. } else {
  2002. this.$refs.collection.rowCell(row, index)
  2003. }
  2004. },
  2005. paymentRowCell(row, index) {
  2006. if (row.$cellEdit) {
  2007. if (row.plateNo) {
  2008. if (row.feeId) {
  2009. incidentalSubmit(row).then(res => {
  2010. row = {
  2011. ...res.data.data,
  2012. $cellEdit:true
  2013. }
  2014. this.$message.success("保存成功");
  2015. this.$refs.payment.rowCell(row, index)
  2016. })
  2017. } else {
  2018. this.$message.error("请选择费用名称");
  2019. }
  2020. } else {
  2021. this.$message.error("请选择车号");
  2022. }
  2023. } else {
  2024. this.$refs.payment.rowCell(row, index)
  2025. }
  2026. },
  2027. //箱信息移除
  2028. rowDel(row, index) {
  2029. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  2030. confirmButtonText: '确定',
  2031. cancelButtonText: '取消',
  2032. type: 'warning'
  2033. }).then(() => {
  2034. this.entrustList.splice(index, 1);
  2035. }).catch(() => {
  2036. this.$message({
  2037. type: 'info',
  2038. message: '已取消删除'
  2039. });
  2040. });
  2041. },
  2042. //保存
  2043. editCustomer() {
  2044. let data = JSON.parse(JSON.stringify(this.tableData))
  2045. // data.forEach(item => {
  2046. // if (item.region.length !== 0) item.region = item.region.join(',')
  2047. // })
  2048. saveDelegationList({
  2049. ...this.goodsForm,
  2050. kind: '2',
  2051. orderAddressList: data,
  2052. orderItemList: this.entrustList,
  2053. orderFeeList: this.collectionList.concat(this.paymentList)
  2054. }).then(res => {
  2055. this.$message.success('保存成功');
  2056. })
  2057. },
  2058. //收费新增
  2059. addRowCollection() {
  2060. if (this.selectionList.length == 1) {
  2061. customerList({size: 10, current: 1}).then(res => {
  2062. this.$refs.collection.rowCellAdd({
  2063. currency: '1',
  2064. type: '1',
  2065. itemId: this.selectionList[0].id,
  2066. // feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
  2067. // unit: '件数',
  2068. // corpId: this.goodsForm.corpId,
  2069. // corpName: this.goodsForm.corpName,
  2070. // quantity: 1,
  2071. orderId: this.id,
  2072. $cellEdit: true
  2073. });
  2074. })
  2075. } else if (this.selectionList.length == 0) {
  2076. this.$message.warning('请选择一条车辆信息')
  2077. } else if (this.selectionList.length > 0) {
  2078. this.$message.warning('请选择一条车辆信息')
  2079. }
  2080. },
  2081. //付费新增
  2082. addRowPayment() {
  2083. if (this.selectionList.length == 1) {
  2084. customerList({size: 10, current: 1}).then(res => {
  2085. this.$refs.payment.rowCellAdd({
  2086. currency: '1',
  2087. type: '2',
  2088. itemId: this.selectionList[0].id,
  2089. // feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
  2090. // unit: '件数',
  2091. // quantity: 1,
  2092. // corpId: '1526835847238901762',
  2093. orderId: this.id,
  2094. $cellEdit: true
  2095. });
  2096. })
  2097. } else if (this.selectionList.length == 0) {
  2098. this.$message.warning('请选择一条车辆信息')
  2099. } else if (this.selectionList.length > 0) {
  2100. this.$message.warning('请选择一条车辆信息')
  2101. }
  2102. },
  2103. //选择费用
  2104. selectValue(value, row) {
  2105. this.$set(row, 'feeName', value.cname)
  2106. },
  2107. //选择客户信息触发
  2108. getfleetId(data, row) {
  2109. this.$set(row, 'corpName', data.cname)
  2110. },
  2111. //收款信息移除
  2112. makeDel(row, index) {
  2113. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  2114. confirmButtonText: '确定',
  2115. cancelButtonText: '取消',
  2116. type: 'warning'
  2117. }).then(() => {
  2118. if (row.id) removeCollection(row.id)
  2119. this.collectionList.splice(index, 1);
  2120. }).catch(() => {
  2121. this.$message({
  2122. type: 'info',
  2123. message: '已取消删除'
  2124. });
  2125. });
  2126. },
  2127. //付款信息移除
  2128. feeDel(row, index) {
  2129. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  2130. confirmButtonText: '确定',
  2131. cancelButtonText: '取消',
  2132. type: 'warning'
  2133. }).then(() => {
  2134. if (row.id) removeCollection(row.id)
  2135. this.paymentList.splice(index, 1);
  2136. }).catch(() => {
  2137. this.$message({
  2138. type: 'info',
  2139. message: '已取消删除'
  2140. });
  2141. });
  2142. },
  2143. //自定义表头
  2144. renderHeader(h) {
  2145. return (
  2146. <div>
  2147. <el-tooltip className="item" effect="dark" content="增加途径地址" placement="top">
  2148. <el-button type="primary" icon="el-icon-plus" size="mini" circle onClick={() => this.addAddress()}
  2149. style="margin-right: 1.25rem;"></el-button>
  2150. </el-tooltip>
  2151. </div>
  2152. )
  2153. }
  2154. }
  2155. }
  2156. </script>
  2157. <style scoped lang="scss">
  2158. ::v-deep .el-form-item {
  2159. margin-bottom: 8px;
  2160. }
  2161. ::v-deep .el-form-item__content {
  2162. line-height: 32px;
  2163. }
  2164. ::v-deep .el-card__body {
  2165. padding: 10px 15px;
  2166. font-size: 14px;
  2167. }
  2168. </style>