detailPage.vue 65 KB

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