detailPage.vue 61 KB

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