detailPage.vue 113 KB

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