detailPage.vue 69 KB

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