detailPage.vue 100 KB

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