index.vue 104 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426
  1. <template>
  2. <div>
  3. <basic-container v-show="isShow">
  4. <avue-crud :option="optionBack" :table-loading="loading" :data="data" :page.sync="page" id="out-table"
  5. :header-cell-class-name="headerClassName" :permission="permissionList" :before-open="beforeOpen"
  6. v-model="form" ref="crud" :search.sync="query" @row-update="rowUpdate" @row-save="rowSave"
  7. @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
  8. @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
  9. @refresh-change="refreshChange" @on-load="onLoad" @expand-change="expandChange" :row-style="rowStyle"
  10. @resetColumn="resetColumnTwo('crud', 309)" @saveColumn="saveColumnTwo('crud', optionBack, 309)">
  11. <template slot-scope="{ disabled, size }" slot="billSortSearch">
  12. <el-radio-group v-model="query.billSort">
  13. <el-radio label="1">ETD</el-radio>
  14. <el-radio label="2">提单号</el-radio>
  15. </el-radio-group>
  16. </template>
  17. <!--#region-->
  18. <!--<template slot="search" slot-scope="{row,size}">-->
  19. <!-- <el-form ref="form" :model="row" label-width="80px" :style="fold?'width: 100%':'width: 70%'">-->
  20. <!-- <el-row>-->
  21. <!-- <el-col :span="fold?6:8" >-->
  22. <!-- <el-form-item label="主单号">-->
  23. <!-- <el-input placeholder="请输入主单号" clearable-->
  24. <!-- size="small" style="width:100%" v-model="query.mblno">-->
  25. <!-- </el-input>-->
  26. <!-- </el-form-item>-->
  27. <!-- </el-col>-->
  28. <!-- <el-col :span="fold?6:8">-->
  29. <!-- <el-form-item label="委托人">-->
  30. <!-- &lt;!&ndash;<el-input placeholder="请输入委托人" clearable&ndash;&gt;-->
  31. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.corpCnName">&ndash;&gt;-->
  32. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  33. <!-- <search-query :datalist="corpData"-->
  34. <!-- :selectValue="query.corpCnName"-->
  35. <!-- :filterable="true"-->
  36. <!-- :clearable="true"-->
  37. <!-- :remote="true"-->
  38. <!-- :buttonIf="false"-->
  39. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  40. <!-- placeholder="请输入委托人"-->
  41. <!-- @remoteMethod="corpBcorpslistByType"-->
  42. <!-- @corpChange="corpChange($event,'corpCnName')"-->
  43. <!-- @corpFocus="corpBcorpslistByType" >-->
  44. <!-- </search-query>-->
  45. <!-- </el-form-item>-->
  46. <!-- </el-col>-->
  47. <!-- <el-col :span="fold?6:8" >-->
  48. <!-- <el-form-item label="业务号">-->
  49. <!-- <el-input placeholder="请输入业务号" clearable-->
  50. <!-- size="small" style="width:100%" v-model="query.billNo">-->
  51. <!-- </el-input>-->
  52. <!-- </el-form-item>-->
  53. <!-- </el-col>-->
  54. <!-- <el-col :span="6" v-show="fold">-->
  55. <!-- <el-form-item label="单据类型">-->
  56. <!-- <search-query-->
  57. <!-- :datalist="billTypeData"-->
  58. <!-- :selectValue="query.billType"-->
  59. <!-- :filterable="true"-->
  60. <!-- :clearable="true"-->
  61. <!-- :remote="true"-->
  62. <!-- :buttonIf="false"-->
  63. <!-- @corpChange="corpChange($event,'billType')">-->
  64. <!-- </search-query>-->
  65. <!-- </el-form-item>-->
  66. <!-- </el-col>-->
  67. <!-- <el-col :span="6" v-show="fold">-->
  68. <!-- <el-form-item label="分单号">-->
  69. <!-- <el-input placeholder="请输入分单号" clearable-->
  70. <!-- size="small" style="width:100%" v-model="query.hblno">-->
  71. <!-- </el-input>-->
  72. <!-- </el-form-item>-->
  73. <!-- </el-col>-->
  74. <!-- <el-col :span="6" v-show="fold">-->
  75. <!-- <el-form-item label="船名">-->
  76. <!-- <search-query :datalist="vesselData"-->
  77. <!-- :selectValue="query.vesselEnName"-->
  78. <!-- :filterable="true"-->
  79. <!-- :clearable="true"-->
  80. <!-- :remote="true"-->
  81. <!-- :buttonIf="false"-->
  82. <!-- :forParameter="{key:'id',label:'enName',value:'enName'}"-->
  83. <!-- placeholder="请输入船名"-->
  84. <!-- @remoteMethod="vesselBvesselsListfun"-->
  85. <!-- @corpChange="corpChange($event,'vesselEnName')"-->
  86. <!-- @corpFocus="vesselBvesselsListfun" >-->
  87. <!-- </search-query>-->
  88. <!-- </el-form-item>-->
  89. <!-- </el-col>-->
  90. <!-- <el-col :span="6" v-show="fold" >-->
  91. <!-- <el-form-item label="航次">-->
  92. <!-- <el-input placeholder="请输入航次" clearable-->
  93. <!-- size="small" style="width:100%" v-model="query.voyageNo">-->
  94. <!-- </el-input>-->
  95. <!-- </el-form-item>-->
  96. <!-- </el-col>-->
  97. <!-- <el-col :span="6" v-show="fold">-->
  98. <!-- <el-form-item label="船公司">-->
  99. <!-- <search-query :datalist="carrierData"-->
  100. <!-- :selectValue="query.carrierCnName"-->
  101. <!-- :filterable="true"-->
  102. <!-- :clearable="true"-->
  103. <!-- :remote="true"-->
  104. <!-- :buttonIf="false"-->
  105. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  106. <!-- placeholder="请输入船公司"-->
  107. <!-- @remoteMethod="carrierBcorpslistByTypefun"-->
  108. <!-- @corpChange="corpChange($event,'carrierCnName')"-->
  109. <!-- @corpFocus="carrierBcorpslistByTypefun" >-->
  110. <!-- </search-query>-->
  111. <!-- </el-form-item>-->
  112. <!-- </el-col>-->
  113. <!-- <el-col :span="6" v-show="fold">-->
  114. <!-- <el-form-item label="目的港">-->
  115. <!-- &lt;!&ndash;<el-input placeholder="请输入目的港" clearable&ndash;&gt;-->
  116. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.podCnName">&ndash;&gt;-->
  117. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  118. <!-- <search-query :datalist="podData"-->
  119. <!-- :selectValue="query.podEnName"-->
  120. <!-- :filterable="true"-->
  121. <!-- :clearable="true"-->
  122. <!-- :remote="true"-->
  123. <!-- :buttonIf="false"-->
  124. <!-- :forParameter="{key:'id',label:'enName',value:'enName'}"-->
  125. <!-- placeholder="请输入目的港"-->
  126. <!-- @remoteMethod="podBportsListfun"-->
  127. <!-- @corpChange="corpChange($event,'podEnName')"-->
  128. <!-- @corpFocus="podBportsListfun" >-->
  129. <!-- </search-query>-->
  130. <!-- </el-form-item>-->
  131. <!-- </el-col>-->
  132. <!-- <el-col :span="6" v-show="fold">-->
  133. <!-- <el-form-item label="航线">-->
  134. <!-- &lt;!&ndash;<el-input placeholder="请输入航线" clearable&ndash;&gt;-->
  135. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.lineCnName">&ndash;&gt;-->
  136. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  137. <!-- <search-query :datalist="lineData"-->
  138. <!-- :selectValue="query.lineCnName"-->
  139. <!-- :filterable="true"-->
  140. <!-- :clearable="true"-->
  141. <!-- :remote="true"-->
  142. <!-- :buttonIf="false"-->
  143. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  144. <!-- placeholder="请输入航线"-->
  145. <!-- @remoteMethod="lineBlinesListfun"-->
  146. <!-- @corpChange="corpChange($event,'lineCnName')"-->
  147. <!-- @corpFocus="lineBlinesListfun" >-->
  148. <!-- </search-query>-->
  149. <!-- </el-form-item>-->
  150. <!-- </el-col>-->
  151. <!-- <el-col :span="6" v-show="fold">-->
  152. <!-- <el-form-item label="场站">-->
  153. <!-- &lt;!&ndash;<el-input placeholder="请输入场站" clearable&ndash;&gt;-->
  154. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.cyCode">&ndash;&gt;-->
  155. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  156. <!-- <search-query :datalist="cyData"-->
  157. <!-- :selectValue="query.cyCnName"-->
  158. <!-- :filterable="true"-->
  159. <!-- :clearable="true"-->
  160. <!-- :remote="true"-->
  161. <!-- :buttonIf="false"-->
  162. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  163. <!-- placeholder="请输入场站"-->
  164. <!-- @remoteMethod="cyBcorpslistByType"-->
  165. <!-- @corpChange="corpChange($event,'cyCnName')"-->
  166. <!-- @corpFocus="cyBcorpslistByType" >-->
  167. <!-- </search-query>-->
  168. <!-- </el-form-item>-->
  169. <!-- </el-col>-->
  170. <!-- <el-col :span="6" v-show="fold">-->
  171. <!-- <el-form-item label="业务来源">-->
  172. <!-- <search-query-->
  173. <!-- :datalist="srcTypeData"-->
  174. <!-- :selectValue="query.srcType"-->
  175. <!-- :filterable="true"-->
  176. <!-- :clearable="true"-->
  177. <!-- :remote="true"-->
  178. <!-- :buttonIf="false"-->
  179. <!-- @corpChange="corpChange($event,'srcType')">-->
  180. <!-- </search-query>-->
  181. <!-- </el-form-item>-->
  182. <!-- </el-col>-->
  183. <!-- <el-col :span="6" v-show="fold">-->
  184. <!-- <el-form-item label="来源详情">-->
  185. <!-- <el-input placeholder="请输入来源详情" clearable-->
  186. <!-- size="small" style="width:100%" v-model="query.srcCnName">-->
  187. <!-- </el-input>-->
  188. <!-- </el-form-item>-->
  189. <!-- </el-col>-->
  190. <!-- <el-col :span="9" v-show="fold">-->
  191. <!-- <el-form-item label="ETD">-->
  192. <!-- <el-checkbox v-model="etdDisabled">-->
  193. <!-- <el-date-picker-->
  194. <!-- v-model="etdList"-->
  195. <!-- style="width: 100%"-->
  196. <!-- :disabled="!etdDisabled"-->
  197. <!-- size="small"-->
  198. <!-- type="datetimerange"-->
  199. <!-- range-separator="至"-->
  200. <!-- start-placeholder="开始日期"-->
  201. <!-- end-placeholder="结束日期"-->
  202. <!-- format="yyyy-MM-dd HH:mm"-->
  203. <!-- value-format="yyyy-MM-dd HH:mm"-->
  204. <!-- clearable>-->
  205. <!-- </el-date-picker>-->
  206. <!-- </el-checkbox>-->
  207. <!-- </el-form-item>-->
  208. <!-- </el-col>-->
  209. <!-- <el-col :span="9" v-show="fold">-->
  210. <!-- <el-form-item label="ETA">-->
  211. <!-- <el-checkbox v-model="etaDisabled">-->
  212. <!-- <el-date-picker-->
  213. <!-- v-model="etaList"-->
  214. <!-- style="width: 100%"-->
  215. <!-- :disabled="!etaDisabled"-->
  216. <!-- size="small"-->
  217. <!-- type="datetimerange"-->
  218. <!-- range-separator="至"-->
  219. <!-- start-placeholder="开始日期"-->
  220. <!-- end-placeholder="结束日期"-->
  221. <!-- format="yyyy-MM-dd HH:mm"-->
  222. <!-- value-format="yyyy-MM-dd HH:mm"-->
  223. <!-- clearable>-->
  224. <!-- </el-date-picker>-->
  225. <!-- </el-checkbox>-->
  226. <!-- </el-form-item>-->
  227. <!-- </el-col>-->
  228. <!-- <el-col :span="6" v-show="fold">-->
  229. <!-- <el-form-item label="创建部门">-->
  230. <!-- &lt;!&ndash;<el-input placeholder="请输入创建部门" clearable&ndash;&gt;-->
  231. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.createDeptName">&ndash;&gt;-->
  232. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  233. <!-- <tree-select v-model="query.createDeptName" filterable-->
  234. <!-- :data="createDeptData"-->
  235. <!-- :props="{label: 'title', children:'children' }"-->
  236. <!-- nodeKey="title"-->
  237. <!-- size="small"-->
  238. <!-- :multiple="false"-->
  239. <!-- placeholder="请选择创建部门"-->
  240. <!-- @focus="createDeptLzylistfun"-->
  241. <!-- @input="corpChange($event,'createDeptName')">-->
  242. <!-- </tree-select>-->
  243. <!-- </el-form-item>-->
  244. <!-- </el-col>-->
  245. <!-- <el-col :span="6" v-show="fold">-->
  246. <!-- <el-form-item label="订舱代理">-->
  247. <!-- &lt;!&ndash;<el-input placeholder="请输入订舱代理" clearable&ndash;&gt;-->
  248. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.bookingAgentCnName">&ndash;&gt;-->
  249. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  250. <!-- <search-query :datalist="bookingAgentData"-->
  251. <!-- :selectValue="query.bookingAgentCnName"-->
  252. <!-- :filterable="true"-->
  253. <!-- :clearable="true"-->
  254. <!-- :remote="true"-->
  255. <!-- :buttonIf="false"-->
  256. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  257. <!-- placeholder="请输入订舱代理"-->
  258. <!-- @remoteMethod="bookingAgentBcorpsListfun"-->
  259. <!-- @corpChange="corpChange($event,'bookingAgentCnName')"-->
  260. <!-- @corpFocus="bookingAgentBcorpsListfun">-->
  261. <!-- </search-query>-->
  262. <!-- </el-form-item>-->
  263. <!-- </el-col>-->
  264. <!-- <el-col :span="6" v-show="fold">-->
  265. <!-- <el-form-item label="签单方式">-->
  266. <!-- <search-query-->
  267. <!-- :datalist="issueTypeData"-->
  268. <!-- :selectValue="query.issueType"-->
  269. <!-- :filterable="true"-->
  270. <!-- :clearable="true"-->
  271. <!-- :remote="true"-->
  272. <!-- :buttonIf="false"-->
  273. <!-- :forParameter="{ key:'dictKey', label:'dictValue', value:'dictValue'}"-->
  274. <!-- @corpChange="corpChange($event,'issueType')" >-->
  275. <!-- </search-query>-->
  276. <!-- </el-form-item>-->
  277. <!-- </el-col>-->
  278. <!-- <el-col :span="6" v-show="fold">-->
  279. <!-- <el-form-item label="收货人">-->
  280. <!-- &lt;!&ndash;<el-input placeholder="请输入收货人" clearable&ndash;&gt;-->
  281. <!-- &lt;!&ndash; size="small" style="width:100%" v-model="query.hConsigneeCnName">&ndash;&gt;-->
  282. <!-- &lt;!&ndash;</el-input>&ndash;&gt;-->
  283. <!-- <search-query :datalist="hConsigneeData"-->
  284. <!-- :selectValue="query.hConsigneeCnName"-->
  285. <!-- :filterable="true"-->
  286. <!-- :clearable="true"-->
  287. <!-- :remote="true"-->
  288. <!-- :buttonIf="false"-->
  289. <!-- :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
  290. <!-- placeholder="请选择收货人"-->
  291. <!-- @remoteMethod="hConsigneeBcorpslistByType"-->
  292. <!-- @corpChange="corpChange($event,'hConsigneeCnName')"-->
  293. <!-- @corpFocus="hConsigneeBcorpslistByType" >-->
  294. <!-- </search-query>-->
  295. <!-- </el-form-item>-->
  296. <!-- </el-col>-->
  297. <!-- </el-row>-->
  298. <!-- </el-form>-->
  299. <!--</template>-->
  300. <!--<template slot="searchMenu" slot-scope="{row,size}">-->
  301. <!-- <el-button type="text" @click="shiftCollapsiable">-->
  302. <!-- <span>-->
  303. <!-- {{ fold ? '收起' : '展开' }}-->
  304. <!-- <i :class="fold ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>-->
  305. <!-- </span>-->
  306. <!-- </el-button>-->
  307. <!--</template>-->
  308. <!--#endregion-->
  309. <template slot="menuLeft">
  310. <el-button type="primary" size="small" @click="addbtnfun('DD')">新建直单
  311. </el-button>
  312. <el-button type="success" size="small" @click="addbtnfun('MM')">新建主单
  313. </el-button>
  314. <el-button type="warning" size="small" @click="addbtnfun('MH')">新建分单
  315. </el-button>
  316. <el-button type="primary" size="small" plain @click="CopyDocumentsfun">复制单据
  317. </el-button>
  318. <el-button type="success" size="small" plain @click="increaseMawb">分单->主单
  319. </el-button>
  320. <el-button type="warning" size="small" plain v-if="query.billStatus == 0" @click="Disembarkingfun">退
  321. </el-button>
  322. <el-button type="primary" size="small" plain v-if="query.billStatus == 1"
  323. @click="revokeWithdrawalfun">撤销退舱
  324. </el-button>
  325. <el-button type="danger" size="small" plain v-if="query.billStatus != 3" @click="handleDelete">删 除
  326. </el-button>
  327. <el-button type="warning" size="small" @click="outExport">导 出
  328. </el-button>
  329. <el-dropdown style="line-height: 0">
  330. <el-button size="small" type="success" style="margin-right: 8px"
  331. :disabled="selectionList.length == 0">
  332. 发送 SO EDI<i class="el-icon-arrow-down el-icon--right"></i>
  333. </el-button>
  334. <el-dropdown-menu slot="dropdown">
  335. <el-dropdown-item v-for="item in ediData_SO" :key="item.id"
  336. @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
  337. </el-dropdown-item>
  338. </el-dropdown-menu>
  339. </el-dropdown>
  340. <el-dropdown style="line-height: 0">
  341. <el-button size="small" type="success" style="margin-right: 8px"
  342. :disabled="selectionList.length == 0">
  343. 发送 SI EDI<i class="el-icon-arrow-down el-icon--right"></i>
  344. </el-button>
  345. <el-dropdown-menu slot="dropdown">
  346. <el-dropdown-item v-for="item in ediData_SI" :key="item.id"
  347. @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
  348. </el-dropdown-item>
  349. </el-dropdown-menu>
  350. </el-dropdown>
  351. <div style="margin-top: 10px">
  352. <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
  353. <el-tab-pane label="接单" name="0">
  354. <span slot="label">接单</span>
  355. </el-tab-pane>
  356. <el-tab-pane label="出号" name="4">
  357. <span slot="label">出号</span>
  358. </el-tab-pane>
  359. <el-tab-pane label="开船" name="5">
  360. <span slot="label">开船</span>
  361. </el-tab-pane>
  362. <el-tab-pane label="到港" name="6">
  363. <span slot="label">到港</span>
  364. </el-tab-pane>
  365. <el-tab-pane label="退舱" name="1">
  366. <span slot="label" style="color: #d86363">
  367. 退舱
  368. </span>
  369. </el-tab-pane>
  370. <el-tab-pane label="完成" name="3"></el-tab-pane>
  371. <el-tab-pane label="全部" name="7"></el-tab-pane>
  372. </el-tabs>
  373. <!-- <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
  374. <el-tab-pane label="接单" name="0">
  375. <span slot="label">接单</span>
  376. </el-tab-pane>
  377. <el-tab-pane label="退舱" name="1">
  378. <span slot="label" style="color: #d86363">退舱</span>
  379. </el-tab-pane>
  380. <el-tab-pane label="完成" name="3"></el-tab-pane>
  381. <el-tab-pane label="全部" name="4"></el-tab-pane>
  382. </el-tabs> -->
  383. </div>
  384. </template>
  385. <template slot-scope="scope" slot="menu">
  386. <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != scope.row.createUser:false"-->
  387. <el-button :type="scope.type" :size="scope.size" icon="el-icon-edit"
  388. @click.stop="rowCellfun(scope.row.id, scope.row)">编辑
  389. </el-button>
  390. </template>
  391. <template slot="expand" slot-scope="{ row }">
  392. <SplitList :typeMenu="true" :data="row.billsListAllData" :loading="SplitLoading"
  393. @corpfun="rowCellfun">
  394. </SplitList>
  395. </template>
  396. <temolate slot="billStatus" slot-scope="{ row }">
  397. <div>
  398. <span v-if="row.billStatus == item.dictKey" v-for="(item, index) in billStatusData" :key="index"
  399. :style="{ 'background-color': item.colour }"
  400. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
  401. {{ item.dictValue }}
  402. </span>
  403. </div>
  404. </temolate>
  405. <template slot="accountStatus" slot-scope="{ row }">
  406. <div>
  407. <span v-if="row.accountStatus == item.dictKey" v-for="(item, index) in accountStatusData"
  408. :key="index" :style="{ 'background-color': item.colour }"
  409. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
  410. {{ item.dictValue }}
  411. </span>
  412. </div>
  413. </template>
  414. <!-- <template slot="status" slot-scope="{ row }">
  415. <div>
  416. <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
  417. :style="{ 'background-color': item.colour }"
  418. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
  419. {{ item.dictValue }}
  420. </span>
  421. </div>
  422. </template> -->
  423. <template slot="corpCnName" slot-scope="scope">
  424. <span
  425. style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
  426. @click.stop="rowCellfun(scope.row.id, scope.row)">
  427. {{ scope.row.shortName }}
  428. </span>
  429. </template>
  430. <template slot="billNo" slot-scope="scope">
  431. <span
  432. style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
  433. @click.stop="rowCellfun(scope.row.id, scope.row)">
  434. {{ scope.row.billNo }}
  435. </span>
  436. </template>
  437. <template slot="eta" slot-scope="scope">
  438. <span>{{
  439. scope.row.eta ? scope.row.eta.slice(0, 10) : ""
  440. }}</span>
  441. </template>
  442. <template slot="updateTime" slot-scope="scope">
  443. <span>{{
  444. scope.row.updateTime
  445. ? scope.row.updateTime.slice(0, 10)
  446. : ""
  447. }}</span>
  448. </template>
  449. <template slot="checkDrStatusDescr" slot-scope="{ row }">
  450. <div>
  451. <span v-if="row.checkDrStatusDescr == '未对账'"
  452. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
  453. 未对账
  454. </span>
  455. <span v-if="row.checkDrStatusDescr == '已对账'"
  456. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
  457. 已对账
  458. </span>
  459. <span v-if="row.checkDrStatusDescr == '部分对账'"
  460. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
  461. 部分对账
  462. </span>
  463. </div>
  464. </template>
  465. <template slot="stlDrStatusDescr" slot-scope="{ row }">
  466. <div>
  467. <span v-if="row.stlDrStatusDescr == '未结'"
  468. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
  469. 未结
  470. </span>
  471. <span v-if="row.stlDrStatusDescr == '已结'"
  472. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
  473. 已结
  474. </span>
  475. <span v-if="row.stlDrStatusDescr == '部分结'"
  476. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
  477. 部分结
  478. </span>
  479. </div>
  480. </template>
  481. <template slot="stlCrStatusDescr" slot-scope="{ row }">
  482. <div>
  483. <span v-if="row.stlCrStatusDescr == '未结'"
  484. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
  485. 未结
  486. </span>
  487. <span v-if="row.stlCrStatusDescr == '结清'"
  488. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
  489. 结清
  490. </span>
  491. <span v-if="row.stlCrStatusDescr == '部分'"
  492. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
  493. 部分
  494. </span>
  495. </div>
  496. </template>
  497. <template slot="stlCrStatusDescr" slot-scope="{ row }">
  498. <div>
  499. <span v-if="row.stlCrStatusDescr == '未结'"
  500. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
  501. 未结
  502. </span>
  503. <span v-if="row.stlCrStatusDescr == '结清'"
  504. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
  505. 结清
  506. </span>
  507. <span v-if="row.stlCrStatusDescr == '部分'"
  508. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
  509. 部分
  510. </span>
  511. </div>
  512. </template>
  513. <template slot="invoiceDrStatusDescr" slot-scope="{ row }">
  514. <div>
  515. <span v-if="row.invoiceDrStatusDescr == '未开'"
  516. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
  517. 未开
  518. </span>
  519. <span v-if="row.invoiceDrStatusDescr == '部分'"
  520. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
  521. 部分
  522. </span>
  523. <span v-if="row.invoiceDrStatusDescr == '全开'"
  524. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
  525. 全开
  526. </span>
  527. </div>
  528. </template>
  529. <template slot="checkCrStatusDescr" slot-scope="{ row }">
  530. <div>
  531. <span v-if="row.checkCrStatusDescr == '未申请'"
  532. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
  533. 未申请
  534. </span>
  535. <span v-if="row.checkCrStatusDescr == '部分申请'"
  536. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
  537. 部分申请
  538. </span>
  539. <span v-if="row.checkCrStatusDescr == '已申请'"
  540. style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
  541. 已申请
  542. </span>
  543. </div>
  544. </template>
  545. </avue-crud>
  546. </basic-container>
  547. <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack"
  548. @toAddEdit="toAddEdit" :key="datekey"></bills-details>
  549. <el-dialog title="主单列表" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose">
  550. <avue-crud :option="mawbOptionBack" :table-loading="mawbloading" :data="mawbData" :page.sync="mawbPage"
  551. :search="mawbQuery" ref="mawbOptionCrud" id="out-table" :header-cell-class-name="headerClassName"
  552. @search-change="mawbSearch" @size-change="mawbSizeChange" @current-change="mawbCurrentChange"
  553. @resetColumn="resetColumnTwo('mawbOptionCrud', 309.7)" @saveColumn="
  554. saveColumnTwo('mawbOptionCrud', mawbOptionBack, 309.7)
  555. ">
  556. <template slot="radio" slot-scope="{ row }">
  557. <el-radio v-model="dialogRadio" :label="row.id" @input="radioInput(row)"></el-radio>
  558. </template>
  559. </avue-crud>
  560. <span slot="footer" class="dialog-footer">
  561. <el-button @click="
  562. dialogVisible = false;
  563. dialogRadio = null;
  564. ">取 消</el-button>
  565. <el-button type="primary" @click="AddToMainOrder">确 定</el-button>
  566. </span>
  567. </el-dialog>
  568. </div>
  569. </template>
  570. <script>
  571. import {
  572. billsList,
  573. billsDetail,
  574. billsSubmit,
  575. billsRemove,
  576. billsIncreaseReinsurancePolicy,
  577. billsListAll,
  578. billsDisembarking,
  579. editypesSendingEdi,
  580. billsRevokeDisembarking
  581. } from "@/api/iosBasicData/bills";
  582. import { mapGetters } from "vuex";
  583. import billsDetails from "@/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue";
  584. import feesTemplateItems from "@/views/iosBasicData/losbfeestemplate/feesTemplateItems.vue";
  585. import SplitList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/SplitList.vue";
  586. import { getWorkDicts } from "@/api/system/dictbiz";
  587. import { dateFormat, defaultDate } from "@/util/date";
  588. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  589. import { editypesList } from "@/api/iosBasicData/editypes";
  590. import { getBvesselsList } from "@/api/iosBasicData/bvessels";
  591. import {
  592. getBcorpslistByType,
  593. getBcorpsDetail
  594. } from "@/api/iosBasicData/bcorps";
  595. import { bportsList } from "@/api/iosBasicData/bports";
  596. import { blinesList } from "@/api/iosBasicData/blines";
  597. import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
  598. import { getDeptTree } from "@/api/system/dept";
  599. import { getToken } from "@/util/auth";
  600. export default {
  601. components: {
  602. TreeSelect,
  603. SearchQuery,
  604. feesTemplateItems,
  605. billsDetails,
  606. SplitList
  607. },
  608. data() {
  609. return {
  610. datekey: Date.now(),
  611. ediData: [], // 获取的 edi 数据
  612. ediData_SO: [], // 获取的 SO edi 数据
  613. ediData_SI: [], // 获取的 SI edi 数据
  614. // 展开和收回
  615. fold: false,
  616. maxShow: 3,
  617. corpData: [], //委托人
  618. hConsigneeData: [], // 收货人
  619. // 船名
  620. vesselData: [],
  621. // 船公司
  622. carrierData: [],
  623. // 目的港(卸货港)
  624. podData: [],
  625. // 航线
  626. lineData: [],
  627. // 场站
  628. cyData: [],
  629. // 订舱代理
  630. bookingAgentData: [],
  631. createDeptData: [], // 部门数据
  632. auditStatusList: [],
  633. // 单据类型
  634. billTypeData: [
  635. {
  636. label: "直单",
  637. value: "DD"
  638. },
  639. {
  640. label: "主单",
  641. value: "MM"
  642. },
  643. {
  644. label: "分单",
  645. value: "MH"
  646. }
  647. ],
  648. // 业务来源
  649. srcTypeData: [
  650. {
  651. label: "公司",
  652. value: "OWN"
  653. },
  654. {
  655. label: "代理",
  656. value: "AGENT"
  657. },
  658. {
  659. label: "业务员",
  660. value: "SALES"
  661. }
  662. ],
  663. // 签单方式
  664. issueTypeData: [],
  665. isShow: true,
  666. detailData: {},
  667. dialogVisible: false, // 弹窗开启V
  668. // ETD是否可以检索
  669. etdDisabled: false,
  670. // ETA是否可以检索
  671. etaDisabled: false,
  672. form: {},
  673. // 开船日期和到港日期
  674. etdList: [
  675. defaultDate(1)[0] + " 00:00",
  676. defaultDate(1)[1] + " 23:59"
  677. ],
  678. etaList: [
  679. defaultDate(1)[0] + " 00:00",
  680. defaultDate(1)[1] + " 23:59"
  681. ],
  682. // 表格的检索条件
  683. query: {
  684. billStatus: "0",
  685. billSort: "1"
  686. },
  687. // 弹窗的搜索项
  688. mawbQuery: {
  689. billType: "MM"
  690. },
  691. loading: true,
  692. // 弹窗加载
  693. mawbloading: false,
  694. // 下拉的加载
  695. SplitLoading: false,
  696. page: {
  697. pageSize: 10,
  698. currentPage: 1,
  699. total: 0
  700. },
  701. // 弹窗分页
  702. mawbPage: {
  703. pageSize: 10,
  704. currentPage: 1,
  705. total: 0
  706. },
  707. selectionList: [],
  708. // 弹窗的选择数据
  709. dialogRadio: null,
  710. option: {},
  711. optionBack: {
  712. // selectable:(row,index)=>{
  713. // // 禁用主单
  714. // return row.billType != 'MM'
  715. // },
  716. expand: true,
  717. expandRowKeys: [],
  718. rowKey: "id",
  719. height: 500,
  720. calcHeight: 30,
  721. tip: false,
  722. searchShow: true,
  723. searchMenuSpan: 12,
  724. searchLabelWidth: "100",
  725. border: true,
  726. index: true,
  727. selection: true, // 是否有选择框
  728. dialogClickModal: false,
  729. highlightCurrentRow: true, // 单选
  730. searchIcon: true,
  731. searchIndex: 3,
  732. // stripe: true,
  733. addBtn: false,
  734. viewBtn: false,
  735. delBtn: false,
  736. editBtn: false,
  737. menuWidth: "auto",
  738. align: "center",
  739. column: [
  740. // {
  741. // label: "所属团队",
  742. // prop: "teamName",
  743. // overHidden:true,
  744. // },
  745. {
  746. label: "客户简称",
  747. prop: "corpCnName",
  748. width: "160",
  749. overHidden: true,
  750. search: true,
  751. type: "select",
  752. filterable: true,
  753. remote: true,
  754. dicUrl:
  755. "/api/blade-los/bcorps/listByType?shortName={{key}}",
  756. props: {
  757. label: "cnName",
  758. value: "cnName",
  759. res: "data.records"
  760. },
  761. span: 6,
  762. searchOrder: 1
  763. },
  764. {
  765. label: "客户英文",
  766. prop: "corpEnName",
  767. width: "160",
  768. overHidden: true
  769. },
  770. {
  771. label: "MB/L NO",
  772. prop: "mblno",
  773. width: "80",
  774. overHidden: true,
  775. search: true,
  776. span: 6,
  777. searchOrder: 2
  778. },
  779. {
  780. label: "M/PayMode",
  781. prop: "mpaymode",
  782. width: "100",
  783. overHidden: true
  784. },
  785. {
  786. label: "HB/L NO",
  787. prop: "hblno",
  788. width: "80",
  789. overHidden: true,
  790. search: true,
  791. span: 6,
  792. searchOrder: 3
  793. },
  794. {
  795. label: "H/PayMode",
  796. prop: "hpaymode",
  797. width: "100",
  798. overHidden: true
  799. },
  800. {
  801. label: "单据类型",
  802. prop: "billType",
  803. type: "select",
  804. search: true,
  805. span: 6,
  806. searchOrder: 3.1,
  807. dicData: [
  808. {
  809. label: "直单",
  810. value: "DD"
  811. },
  812. {
  813. label: "主单",
  814. value: "MM"
  815. },
  816. {
  817. label: "分单",
  818. value: "MH"
  819. }
  820. ],
  821. overHidden: true
  822. },
  823. {
  824. label: "单据编号",
  825. prop: "billNo",
  826. width: "160",
  827. overHidden: true,
  828. search: true,
  829. span: 6,
  830. searchOrder: 4
  831. },
  832. {
  833. label: "船名",
  834. prop: "vesselCnName",
  835. overHidden: true,
  836. type: "select",
  837. filterable: true,
  838. remote: true,
  839. dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
  840. props: {
  841. label: "cnName",
  842. value: "cnName",
  843. res: "data.records"
  844. },
  845. search: true,
  846. span: 6,
  847. searchOrder: 5,
  848. hide: true,
  849. showColumn: false
  850. },
  851. {
  852. label: "船名",
  853. prop: "vesselEnName",
  854. overHidden: true
  855. },
  856. {
  857. label: "航次",
  858. prop: "voyageNo",
  859. width: "80",
  860. overHidden: true,
  861. search: true,
  862. span: 6,
  863. searchOrder: 6
  864. },
  865. {
  866. label: "booking NO",
  867. prop: "bookingNo",
  868. width: "120",
  869. overHidden: true,
  870. search: true,
  871. span: 6,
  872. searchOrder: 7
  873. },
  874. {
  875. label: "开船日期",
  876. prop: "etd",
  877. searchProp: "etdList",
  878. type: "date",
  879. unlinkPanels: true,
  880. searchRange: true,
  881. overHidden: true,
  882. format: "yyyy-MM-dd",
  883. valueFormat: "yyyy-MM-dd HH:mm:ss",
  884. searchDefaultTime: ["00:00:00", "23:59:59"],
  885. search: true,
  886. span: 6,
  887. searchOrder: 8
  888. },
  889. {
  890. label: "到港日期",
  891. prop: "eta",
  892. width: "80",
  893. overHidden: true,
  894. searchProp: "etaList",
  895. type: "date",
  896. unlinkPanels: true,
  897. searchRange: true,
  898. format: "yyyy-MM-dd",
  899. valueFormat: "yyyy-MM-dd HH:mm:ss",
  900. searchDefaultTime: ["00:00:00", "23:59:59"],
  901. search: true,
  902. span: 6,
  903. searchOrder: 9
  904. },
  905. {
  906. label: "船公司",
  907. prop: "carrierCnName",
  908. overHidden: true,
  909. type: "select",
  910. filterable: true,
  911. remote: true,
  912. dicUrl:
  913. "/api/blade-los/bcorps/listByType?cnName={{key}}",
  914. props: {
  915. label: "cnName",
  916. value: "cnName",
  917. res: "data.records"
  918. },
  919. search: true,
  920. span: 6,
  921. searchOrder: 10,
  922. hide: true,
  923. showColumn: false
  924. },
  925. {
  926. label: "船公司",
  927. prop: "carrierShortName",
  928. overHidden: true
  929. },
  930. {
  931. label: "装货港",
  932. prop: "polEnName",
  933. width: "120",
  934. overHidden: true
  935. },
  936. {
  937. label: "卸货港",
  938. prop: "podEnName",
  939. width: "120",
  940. overHidden: true
  941. },
  942. {
  943. label: "目的港",
  944. prop: "destinationName",
  945. width: "120",
  946. overHidden: true,
  947. type: "select",
  948. filterable: true,
  949. remote: true,
  950. dicUrl: "/api/blade-los/bports/list?enName={{key}}",
  951. props: {
  952. label: "enName",
  953. value: "enName",
  954. res: "data.records"
  955. },
  956. search: true,
  957. span: 6,
  958. searchOrder: 11
  959. },
  960. // {
  961. // label: "交货地",
  962. // prop: "placeDeliveryName",
  963. // width: "120",
  964. // overHidden: true,
  965. // },
  966. {
  967. label: "航线",
  968. prop: "lineCnName",
  969. width: "120",
  970. overHidden: true,
  971. type: "select",
  972. filterable: true,
  973. remote: true,
  974. dicUrl: "/api/blade-los/blines/list?cnName={{key}}",
  975. props: {
  976. label: "cnName",
  977. value: "cnName",
  978. res: "data.records"
  979. },
  980. search: true,
  981. span: 6,
  982. searchOrder: 12
  983. },
  984. {
  985. label: "场站",
  986. prop: "cyCnName",
  987. width: "120",
  988. overHidden: true,
  989. type: "select",
  990. filterable: true,
  991. remote: true,
  992. dicUrl:
  993. "/api/blade-los/bcorps/listByType?cnName={{key}}",
  994. props: {
  995. label: "cnName",
  996. value: "cnName",
  997. res: "data.records"
  998. },
  999. search: true,
  1000. span: 6,
  1001. searchOrder: 13,
  1002. hide: true,
  1003. showColumn: false
  1004. },
  1005. {
  1006. label: "场站",
  1007. prop: "cyShortName",
  1008. overHidden: true
  1009. },
  1010. {
  1011. label: "箱型/箱量",
  1012. prop: "quantityCntrDescr",
  1013. width: "120",
  1014. overHidden: true
  1015. },
  1016. // {
  1017. // label: "箱量",
  1018. // prop: "CntrDescr",
  1019. // width:"120",
  1020. // overHidden:true,
  1021. // },
  1022. {
  1023. label: "业务来源",
  1024. prop: "srcType",
  1025. type: "select",
  1026. dicData: [
  1027. {
  1028. label: "公司",
  1029. value: "OWN"
  1030. },
  1031. {
  1032. label: "代理",
  1033. value: "AGENT"
  1034. },
  1035. {
  1036. label: "业务员",
  1037. value: "SALES"
  1038. }
  1039. ],
  1040. overHidden: true,
  1041. search: true,
  1042. span: 6,
  1043. searchOrder: 14
  1044. },
  1045. {
  1046. label: "来源详情",
  1047. prop: "srcCnName",
  1048. width: "80",
  1049. overHidden: true,
  1050. search: true,
  1051. span: 6,
  1052. searchOrder: 15
  1053. },
  1054. {
  1055. label: "装箱方式",
  1056. prop: "loadType",
  1057. type: "select",
  1058. dicData: [
  1059. {
  1060. label: "整箱",
  1061. value: "FCL"
  1062. },
  1063. {
  1064. label: "拼箱",
  1065. value: "LCL"
  1066. }
  1067. ],
  1068. overHidden: true
  1069. },
  1070. {
  1071. label: "货物类别",
  1072. prop: "cargoType",
  1073. type: "select",
  1074. dicData: [
  1075. {
  1076. label: "普货",
  1077. value: "dry"
  1078. },
  1079. {
  1080. label: "危险品",
  1081. value: "danger"
  1082. },
  1083. {
  1084. label: "冻柜",
  1085. value: "reefer"
  1086. }
  1087. ],
  1088. overHidden: true
  1089. },
  1090. {
  1091. label: "创建部门",
  1092. prop: "createDeptName",
  1093. width: "120",
  1094. overHidden: true,
  1095. type: "tree",
  1096. dicUrl: "/api/blade-system/dept/tree",
  1097. props: {
  1098. label: "title",
  1099. value: "title",
  1100. children: "children"
  1101. },
  1102. search: true,
  1103. span: 6,
  1104. searchOrder: 16
  1105. },
  1106. {
  1107. label: "订舱代理",
  1108. prop: "bookingAgentCnName",
  1109. width: "120",
  1110. overHidden: true,
  1111. type: "select",
  1112. filterable: true,
  1113. remote: true,
  1114. dicUrl:
  1115. "/api/blade-los/bcorps/listByType?cnName={{key}}",
  1116. props: {
  1117. label: "cnName",
  1118. value: "cnName",
  1119. res: "data.records"
  1120. },
  1121. search: true,
  1122. span: 6,
  1123. searchOrder: 17
  1124. },
  1125. {
  1126. label: "收货人",
  1127. prop: "hconsigneeCnName",
  1128. width: "120",
  1129. overHidden: true,
  1130. type: "select",
  1131. filterable: true,
  1132. remote: true,
  1133. dicUrl:
  1134. "/api/blade-los/bcorps/listByType?cnName={{key}}",
  1135. props: {
  1136. label: "cnName",
  1137. value: "cnName",
  1138. res: "data.records"
  1139. },
  1140. search: true,
  1141. span: 6,
  1142. searchOrder: 18
  1143. },
  1144. {
  1145. label: "签单方式",
  1146. prop: "issueType",
  1147. width: "120",
  1148. overHidden: true,
  1149. type: "select",
  1150. // audit_status_los
  1151. dicUrl:
  1152. "/api/blade-system/dict-biz/dictionary?code=issue_type_F",
  1153. props: {
  1154. label: "dictValue",
  1155. value: "dictKey"
  1156. },
  1157. search: true,
  1158. span: 6,
  1159. searchOrder: 19
  1160. },
  1161. {
  1162. label: "唛头",
  1163. prop: "marks",
  1164. width: "80",
  1165. overHidden: true
  1166. },
  1167. {
  1168. label: "件数",
  1169. prop: "quantity",
  1170. overHidden: true
  1171. },
  1172. {
  1173. label: "毛重 (KGM)",
  1174. prop: "grossWeight",
  1175. width: "120",
  1176. overHidden: true
  1177. },
  1178. {
  1179. label: "净重 (KGM)",
  1180. prop: "netWeight",
  1181. width: "120",
  1182. overHidden: true
  1183. },
  1184. {
  1185. label: "体积 (CBM)",
  1186. prop: "measurement",
  1187. width: "120",
  1188. overHidden: true
  1189. },
  1190. {
  1191. label: "TEU箱数",
  1192. prop: "teu",
  1193. width: "100",
  1194. overHidden: true
  1195. },
  1196. {
  1197. label: "V20",
  1198. prop: "quantityV20",
  1199. width: "100",
  1200. overHidden: true
  1201. },
  1202. {
  1203. label: "V40",
  1204. prop: "quantityV40",
  1205. width: "100",
  1206. overHidden: true
  1207. },
  1208. {
  1209. label: "40HC",
  1210. prop: "quantityV40hc",
  1211. width: "100",
  1212. overHidden: true
  1213. },
  1214. {
  1215. label: "V45",
  1216. prop: "quantityV45",
  1217. width: "100",
  1218. overHidden: true
  1219. },
  1220. {
  1221. label: "V48",
  1222. prop: "quantityV48",
  1223. width: "100",
  1224. overHidden: true
  1225. },
  1226. // {
  1227. // label: "需陆运",
  1228. // prop: "isNeedLand",
  1229. // type: 'select',
  1230. // dicData: [{
  1231. // label: '否',
  1232. // value: 0
  1233. // }, {
  1234. // label: '是',
  1235. // value: 1
  1236. // }],
  1237. // overHidden:true,
  1238. // },
  1239. // {
  1240. // label: "需报关",
  1241. // prop: "isNeedDeclare",
  1242. // type: 'select',
  1243. // dicData: [{
  1244. // label: '否',
  1245. // value: 0
  1246. // }, {
  1247. // label: '是',
  1248. // value: 1
  1249. // }],
  1250. // overHidden:true,
  1251. // },
  1252. // {
  1253. // label: "需三检",
  1254. // prop: "isNeedIq",
  1255. // type: 'select',
  1256. // dicData: [{
  1257. // label: '否',
  1258. // value: 0
  1259. // }, {
  1260. // label: '是',
  1261. // value: 1
  1262. // }],
  1263. // overHidden:true,
  1264. // },
  1265. // {
  1266. // label: "应收(CNY)",
  1267. // prop: "amountDr",
  1268. // width: "160",
  1269. // overHidden:true,
  1270. // },
  1271. // {
  1272. // label: "应付(CNY)",
  1273. // prop: "amountCr",
  1274. // width: "160",
  1275. // overHidden:true,
  1276. // },
  1277. // {
  1278. // label: "利润(CNY)",
  1279. // prop: "amountProfit",
  1280. // width: "160",
  1281. // overHidden:true,
  1282. // },
  1283. // {
  1284. // // label: "综合 USD 应付(USD) - 非 USD 外币转换为 USD",
  1285. // label: "综合应付(USD)",
  1286. // prop: "amountCrUsd",
  1287. // width: "120",
  1288. // overHidden:true,
  1289. // },
  1290. // {
  1291. // label: "综合利润(USD)",
  1292. // prop: "amountProfitUsd",
  1293. // width: "120",
  1294. // overHidden:true,
  1295. // },
  1296. {
  1297. label: "合计应收(CNY )",
  1298. prop: "amountDrLoc",
  1299. width: "160",
  1300. overHidden: true
  1301. },
  1302. {
  1303. label: "合计应付(CNY)",
  1304. prop: "amountCrLoc",
  1305. width: "160",
  1306. overHidden: true
  1307. },
  1308. {
  1309. label: "合计利润(CNY)",
  1310. prop: "amountProfitLoc",
  1311. width: "160",
  1312. overHidden: true
  1313. },
  1314. {
  1315. label: "付费申请状态",
  1316. prop: "checkCrStatusDescr",
  1317. width: "160",
  1318. overHidden: true
  1319. },
  1320. {
  1321. label: "应收对账状态",
  1322. prop: "checkDrStatusDescr",
  1323. width: "160",
  1324. overHidden: true
  1325. },
  1326. // {
  1327. // label: "应付对账状态",
  1328. // prop: "checkCrStatusDescr",
  1329. // width:"160",
  1330. // overHidden:true,
  1331. // },
  1332. {
  1333. label: "应收结算状态",
  1334. prop: "stlDrStatusDescr",
  1335. type: "select",
  1336. search: true,
  1337. dicData: [
  1338. {
  1339. label: "未结",
  1340. value: "未结"
  1341. },
  1342. {
  1343. label: "部分",
  1344. value: "部分"
  1345. },
  1346. {
  1347. label: "结清",
  1348. value: "结清"
  1349. }
  1350. ],
  1351. width: "100",
  1352. searchLabelWidth: "100",
  1353. overHidden: true
  1354. },
  1355. {
  1356. label: "应付结算状态",
  1357. prop: "stlCrStatusDescr",
  1358. type: "select",
  1359. search: true,
  1360. dicData: [
  1361. {
  1362. label: "未结",
  1363. value: "未结"
  1364. },
  1365. {
  1366. label: "部分",
  1367. value: "部分"
  1368. },
  1369. {
  1370. label: "结清",
  1371. value: "结清"
  1372. }
  1373. ],
  1374. width: "100",
  1375. searchLabelWidth: "100",
  1376. overHidden: true
  1377. },
  1378. {
  1379. label: "销项发票状态",
  1380. prop: "invoiceDrStatusDescr",
  1381. width: "160",
  1382. overHidden: true
  1383. },
  1384. {
  1385. label: "客户来源",
  1386. prop: "corpSource",
  1387. width: 140,
  1388. overHidden: true,
  1389. search: true,
  1390. type: "select",
  1391. dicUrl:
  1392. "/api/blade-system/dict-biz/dictionary?code=corp_Source",
  1393. props: {
  1394. label: "dictValue",
  1395. value: "dictKey"
  1396. }
  1397. },
  1398. {
  1399. label: "客户OP",
  1400. prop: "operatorName",
  1401. width: 140,
  1402. overHidden: true,
  1403. search: true,
  1404. type: "select",
  1405. filterable: true,
  1406. remote: true,
  1407. dicUrl: "/api/blade-los/bcorpsattn/list?cname={{key}}",
  1408. props: {
  1409. label: "cname",
  1410. value: "cname",
  1411. res: "data.records"
  1412. }
  1413. },
  1414. // {
  1415. // label: "进项发票状态",
  1416. // prop: "invoiceCrStatusDescr",
  1417. // width:"160",
  1418. // overHidden:true,
  1419. // },
  1420. {
  1421. label: "创建人",
  1422. prop: "createUserName",
  1423. search: true,
  1424. rules: [
  1425. {
  1426. required: true,
  1427. message: "请输入创建人",
  1428. trigger: "blur"
  1429. }
  1430. ],
  1431. overHidden: true
  1432. },
  1433. {
  1434. label: "创建时间",
  1435. prop: "createTime",
  1436. width: "160",
  1437. overHidden: true
  1438. },
  1439. {
  1440. label: "排序方式",
  1441. prop: "billSort",
  1442. hide: true,
  1443. showColumn: false,
  1444. search: true,
  1445. searchValue: "1",
  1446. overHidden: true
  1447. },
  1448. // {
  1449. // label: "更新人",
  1450. // prop: "updateUserName",
  1451. // overHidden:true,
  1452. // },
  1453. // {
  1454. // label: "更新时间",
  1455. // prop: "updateTime",
  1456. // width:"160",
  1457. // overHidden:true,
  1458. // },
  1459. {
  1460. label: "edi发送状态",
  1461. prop: "ediStatus",
  1462. type: "select",
  1463. dicData: [
  1464. {
  1465. label: "未发送",
  1466. value: "0"
  1467. },
  1468. {
  1469. label: "已发送",
  1470. value: "1"
  1471. }
  1472. ],
  1473. width: "100",
  1474. overHidden: true
  1475. },
  1476. {
  1477. label: "业务状态",
  1478. prop: "billStatus",
  1479. type: "select",
  1480. dicUrl:
  1481. "/api/blade-system/dict-biz/dictionary?code=bill_status",
  1482. props: {
  1483. label: "dictValue",
  1484. value: "dictKey"
  1485. },
  1486. width: "120",
  1487. overHidden: true
  1488. },
  1489. {
  1490. label: "财务状态",
  1491. prop: "accountStatus",
  1492. type: "select",
  1493. dicUrl:
  1494. "/api/blade-system/dict-biz/dictionary?code=account_status",
  1495. props: {
  1496. label: "dictValue",
  1497. value: "dictKey"
  1498. },
  1499. width: "120",
  1500. overHidden: true
  1501. },
  1502. {
  1503. label: "审核状态",
  1504. prop: "status",
  1505. type: "select",
  1506. dicUrl:
  1507. "/api/blade-system/dict-biz/dictionary?code=audit_status_los",
  1508. width: "120",
  1509. props: {
  1510. label: "dictValue",
  1511. value: "dictKey"
  1512. },
  1513. overHidden: true
  1514. },
  1515. {
  1516. label: "备注",
  1517. prop: "remarks",
  1518. overHidden: true
  1519. }
  1520. ]
  1521. },
  1522. // 弹窗的配置
  1523. mawbOption: {},
  1524. mawbOptionBack: {
  1525. height: "450",
  1526. calcHeight: 30,
  1527. tip: false,
  1528. searchShow: true,
  1529. searchMenuSpan: 6,
  1530. border: true,
  1531. selection: false, // 多选
  1532. dialogClickModal: false,
  1533. stripe: true,
  1534. addBtn: false,
  1535. viewBtn: false,
  1536. delBtn: false,
  1537. editBtn: false,
  1538. menu: false,
  1539. menuWidth: "auto",
  1540. column: [
  1541. {
  1542. label: "",
  1543. prop: "radio",
  1544. width: 35,
  1545. hide: false
  1546. },
  1547. {
  1548. label: "船名",
  1549. prop: "vesselCnName",
  1550. overHidden: true
  1551. },
  1552. {
  1553. label: "航次",
  1554. prop: "voyageNo",
  1555. overHidden: true
  1556. },
  1557. {
  1558. label: "MB/L NO",
  1559. prop: "mblno",
  1560. search: true,
  1561. overHidden: true
  1562. },
  1563. {
  1564. label: "HB/L NO",
  1565. prop: "hblno",
  1566. search: true,
  1567. overHidden: true
  1568. },
  1569. {
  1570. label: "开船日期",
  1571. prop: "etd",
  1572. overHidden: true
  1573. },
  1574. {
  1575. label: "到港日期",
  1576. prop: "eta",
  1577. overHidden: true
  1578. },
  1579. {
  1580. label: "装货港",
  1581. prop: "polCnName",
  1582. overHidden: true
  1583. },
  1584. {
  1585. label: "卸货港",
  1586. prop: "podCnName",
  1587. width: "120",
  1588. overHidden: true
  1589. },
  1590. {
  1591. label: "单据编号",
  1592. prop: "billNo",
  1593. width: "160",
  1594. overHidden: true
  1595. },
  1596. {
  1597. label: "客户名",
  1598. prop: "corpCnName",
  1599. overHidden: true
  1600. },
  1601. {
  1602. label: "客户英文",
  1603. prop: "corpEnName",
  1604. overHidden: true
  1605. },
  1606. {
  1607. label: "件数",
  1608. prop: "quantity",
  1609. overHidden: true
  1610. },
  1611. {
  1612. label: "包装单位",
  1613. prop: "packingUnit",
  1614. overHidden: true
  1615. },
  1616. {
  1617. label: "毛重",
  1618. prop: "grossWeight",
  1619. overHidden: true
  1620. },
  1621. {
  1622. label: "净重",
  1623. prop: "netWeight",
  1624. overHidden: true
  1625. },
  1626. {
  1627. label: "体积",
  1628. prop: "measurement",
  1629. overHidden: true
  1630. },
  1631. {
  1632. label: "单据日期",
  1633. prop: "billDate",
  1634. width: "150",
  1635. overHidden: true
  1636. }
  1637. ]
  1638. },
  1639. data: [],
  1640. // 弹窗数据
  1641. mawbData: [],
  1642. // 业务状态数据
  1643. billStatusData: [],
  1644. // 财务状态
  1645. accountStatusData: [],
  1646. saberUserInfo: {} // 当前登录人个人信息
  1647. };
  1648. },
  1649. computed: {
  1650. ...mapGetters(["permission"]),
  1651. permissionList() {
  1652. return {
  1653. addBtn: this.vaildData(this.permission.bills_add, false),
  1654. viewBtn: this.vaildData(this.permission.bills_view, false),
  1655. delBtn: this.vaildData(this.permission.bills_delete, false),
  1656. editBtn: this.vaildData(this.permission.bills_edit, false)
  1657. };
  1658. },
  1659. ids() {
  1660. let ids = [];
  1661. this.selectionList.forEach(ele => {
  1662. ids.push(ele.id);
  1663. });
  1664. return ids.join(",");
  1665. }
  1666. },
  1667. created() {
  1668. // 获取当前登录人个人信息
  1669. this.saberUserInfo = JSON.parse(
  1670. localStorage.getItem("saber-userInfo")
  1671. ).content;
  1672. // 首页快捷跳转进来的
  1673. if (this.$route.query.home) {
  1674. this.addbtnfun();
  1675. }
  1676. // if (this.$route.query.id) {
  1677. // this.rowCellfun(this.$route.query.id)
  1678. // }
  1679. // this.option = await this.getColumnData(this.getColumnName(309), this.optionBack);
  1680. // this.mawbOption = await this.getColumnData(this.getColumnName(309.7), this.mawbOptionBack); // 主单列表
  1681. if (localStorage.getItem(this.getColumnName(309))) {
  1682. this.optionBack = JSON.parse(
  1683. localStorage.getItem(this.getColumnName(309))
  1684. );
  1685. }
  1686. this.billStatusWorkDictsfun(); // 获取业务状态字典数据
  1687. this.accountStatusWorkDictsfun(); // 获取财务状态字典数据
  1688. this.statusWorkDictsfun(); // 业务审核类型
  1689. this.editypesListfun(); // edi 数据获取
  1690. },
  1691. mounted() { },
  1692. activated() {
  1693. if (this.$route.query.id) {
  1694. if (!this.$store.getters.seaFEStatus) {
  1695. setTimeout(() => {
  1696. this.rowCellfun(this.$route.query.id);
  1697. }, 200);
  1698. }
  1699. }
  1700. },
  1701. methods: {
  1702. rowStyle({ row, column, rowIndex, columnIndex }) {
  1703. if (row.status == 2) {
  1704. return {
  1705. // color: '#fff',
  1706. backgroundColor: "#fbd26a"
  1707. };
  1708. }
  1709. if (row.status == 3) {
  1710. return {
  1711. // color: '#fff',
  1712. backgroundColor: "#ced094"
  1713. };
  1714. }
  1715. if (row.status == 4) {
  1716. return {
  1717. // color: '#fff',
  1718. backgroundColor: "#fbc4c4"
  1719. };
  1720. }
  1721. },
  1722. //导出
  1723. outExport() {
  1724. this.$confirm("是否导出当前所有数据?", "提示", {
  1725. confirmButtonText: "确定",
  1726. cancelButtonText: "取消",
  1727. type: "warning"
  1728. }).then(() => {
  1729. let queryParams = {};
  1730. queryParams = {
  1731. businessType: "SE",
  1732. seaType: "E",
  1733. ...this.query
  1734. };
  1735. delete queryParams.billStatus;
  1736. const routeData = this.$router.resolve({
  1737. path: "/api/blade-los/bills/exportBills", //跳转目标窗口的地址
  1738. query: {
  1739. "Blade-Auth": getToken(),
  1740. ...queryParams //括号内是要传递给新窗口的参数
  1741. }
  1742. });
  1743. window.open(routeData.href.slice(1, routeData.href.length));
  1744. });
  1745. },
  1746. // 发送EDI
  1747. editypesSendingEdifun(row) {
  1748. row.billId = this.ids;
  1749. editypesSendingEdi(row).then(res => {
  1750. this.$message.success("发送EDI成功");
  1751. this.onLoad(this.page);
  1752. });
  1753. },
  1754. // 获取EDI列表数据
  1755. editypesListfun() {
  1756. editypesList(1, 1000, { type: "HYCK" }).then(res => {
  1757. console.log("EDI", res.data.data.records);
  1758. this.ediData = res.data.data.records;
  1759. this.ediData_SO = res.data.data.records.filter(
  1760. r => r.groupName == "SO"
  1761. );
  1762. this.ediData_SI = res.data.data.records.filter(
  1763. r => r.groupName == "SI"
  1764. );
  1765. console.log(this.ediData_SO, this.ediData_SI);
  1766. });
  1767. },
  1768. // 展开和收起
  1769. shiftCollapsiable() {
  1770. this.fold = !this.fold;
  1771. if (this.fold) {
  1772. this.option.searchMenuSpan = 24;
  1773. } else {
  1774. this.option.searchMenuSpan = 6;
  1775. }
  1776. },
  1777. // 下拉的回调
  1778. corpChange(value, name) {
  1779. this.query[name] = value;
  1780. },
  1781. // 获取签单方式字典数据
  1782. getWorkDictsfun() {
  1783. getWorkDicts("issue_type_F").then(res => {
  1784. this.issueTypeData = res.data.data;
  1785. this.findObject(this.option.column, "issueType").dicData =
  1786. res.data.data;
  1787. });
  1788. },
  1789. // tabs切换筛选
  1790. handleClick(tab, event) {
  1791. // if (this.query.billStatus == 4) {
  1792. // this.query.billStatus = null;
  1793. // }
  1794. this.onLoad(this.page, this.query);
  1795. },
  1796. // 获取委托人数据
  1797. // corpBcorpslistByType(cnName) {
  1798. // getBcorpslistByType(1, 10, { cnName, status: 0 }).then(res => {
  1799. // this.corpData = res.data.data.records
  1800. // this.findObject(this.option.column, "corpCnName").dicData = res.data.data.records
  1801. // })
  1802. // },
  1803. // 获取收货人数据
  1804. hConsigneeBcorpslistByType(cnName) {
  1805. getBcorpslistByType(1, 10, { cnName, status: 0 }).then(res => {
  1806. this.hConsigneeData = res.data.data.records;
  1807. this.findObject(
  1808. this.option.column,
  1809. "hConsigneeCnName"
  1810. ).dicData = res.data.data.records;
  1811. });
  1812. },
  1813. // 获取船名
  1814. vesselBvesselsListfun(enName) {
  1815. getBvesselsList(1, 10, { enName, status: 0 }).then(res => {
  1816. this.vesselData = res.data.data.records;
  1817. this.findObject(this.option.column, "vesselEnName").dicData =
  1818. res.data.data.records;
  1819. });
  1820. },
  1821. // 获取船公司数据
  1822. carrierBcorpslistByTypefun(enName) {
  1823. let corpTypeName = "船公司";
  1824. getBcorpslistByType(1, 10, {
  1825. enName,
  1826. status: 0,
  1827. corpTypeName
  1828. }).then(res => {
  1829. this.carrierData = res.data.data.records;
  1830. this.findObject(this.option.column, "carrierEnName").dicData =
  1831. res.data.data.records;
  1832. });
  1833. },
  1834. // 卸货港数据
  1835. podBportsListfun(enName) {
  1836. bportsList(1, 10, { enName, status: 0 }).then(res => {
  1837. this.podData = res.data.data.records;
  1838. this.findObject(this.option.column, "podEnName").dicData =
  1839. res.data.data.records;
  1840. });
  1841. },
  1842. // 航线数据
  1843. lineBlinesListfun(cnName) {
  1844. blinesList(1, 10, { cnName, status: 0 }).then(res => {
  1845. this.lineData = res.data.data.records;
  1846. this.findObject(this.option.column, "lineCnName").dicData =
  1847. res.data.data.records;
  1848. });
  1849. },
  1850. // 获取场站数据
  1851. cyBcorpslistByType(cnName) {
  1852. let corpTypeName = "场站";
  1853. getBcorpslistByType(1, 10, {
  1854. cnName,
  1855. status: 0,
  1856. corpTypeName
  1857. }).then(res => {
  1858. this.cyData = res.data.data.records;
  1859. this.findObject(this.option.column, "cyCnName").dicData =
  1860. res.data.data.records;
  1861. });
  1862. },
  1863. // 订舱代理
  1864. bookingAgentBcorpsListfun(cnName) {
  1865. let corpTypeName =
  1866. "国内直接客户,国内同行及代理,国外直接客户,国外同行及代理";
  1867. getBcorpslistByType(1, 10, {
  1868. cnName,
  1869. status: 0,
  1870. corpTypeName
  1871. }).then(res => {
  1872. this.bookingAgentData = res.data.data.records;
  1873. this.findObject(
  1874. this.option.column,
  1875. "bookingAgentCnName"
  1876. ).dicData = res.data.data.records;
  1877. });
  1878. },
  1879. // 获取核算部分数据 // 机构管理接口
  1880. createDeptLzylistfun() {
  1881. getDeptTree().then(res => {
  1882. this.createDeptData = res.data.data;
  1883. this.findObject(this.option.column, "createDeptName").dicData =
  1884. res.data.data;
  1885. });
  1886. },
  1887. // 获取业务状态字典数据
  1888. billStatusWorkDictsfun() {
  1889. getWorkDicts("bill_status").then(res => {
  1890. this.billStatusData = res.data.data;
  1891. });
  1892. },
  1893. // 获取财务状态字典数据
  1894. accountStatusWorkDictsfun() {
  1895. getWorkDicts("account_status").then(res => {
  1896. this.accountStatusData = res.data.data;
  1897. });
  1898. },
  1899. // 获取业务审核状态
  1900. statusWorkDictsfun() {
  1901. getWorkDicts("audit_status_los").then(res => {
  1902. this.auditStatusList = res.data.data;
  1903. });
  1904. },
  1905. // 添加到主单
  1906. increaseMawb() {
  1907. if (this.selectionList.length === 0) {
  1908. this.$message.warning("请选择至少一条数据");
  1909. return;
  1910. }
  1911. // 判断是否可以编辑别人业务 true 就没有权限
  1912. if (this.ModifyOthersfun()) return;
  1913. const obj = this.selectionList[0];
  1914. for (let item of this.selectionList) {
  1915. if (item.billType != "MH") {
  1916. this.$message.warning("请选择分单");
  1917. return;
  1918. }
  1919. if (obj.placeReceiptId != item.placeReceiptId) {
  1920. // 收货地
  1921. this.$message.warning("请选择收货地相同的");
  1922. return;
  1923. }
  1924. if (obj.polId != item.polId) {
  1925. // 装货港一样
  1926. this.$message.warning("请选择装货港相同的");
  1927. return;
  1928. }
  1929. }
  1930. this.mawbQuery.placeReceiptName = obj.placeReceiptName;
  1931. this.mawbQuery.polCnName = obj.polCnName;
  1932. this.$nextTick(() => {
  1933. this.dialogVisible = true;
  1934. this.mawbOnLoad(this.mawbPage);
  1935. });
  1936. },
  1937. // 判断是否可以编辑别人业务
  1938. ModifyOthersfun() {
  1939. let sumArr = [];
  1940. const h = this.$createElement;
  1941. // 判断是否有权限
  1942. if (
  1943. this.saberUserInfo.role_name.indexOf("admin") != -1
  1944. ? this.saberUserInfo.role_name.indexOf(
  1945. "允许修改他人业务"
  1946. ) != -1
  1947. : false
  1948. )
  1949. return false;
  1950. // 当前登录人和选择的创建人对比是不是一个人
  1951. for (let item of this.selectionList) {
  1952. if (this.saberUserInfo.user_id != item.createUser) {
  1953. sumArr.push(
  1954. h("p", `你没有"允许修改他人业务"权限,请重新选择数据`)
  1955. );
  1956. }
  1957. }
  1958. if (sumArr.length != 0) {
  1959. this.$confirm("提示", {
  1960. message: h("div", sumArr),
  1961. confirmButtonText: "确定",
  1962. cancelButtonText: "取消",
  1963. type: "warning"
  1964. }).catch(err => { });
  1965. return true;
  1966. }
  1967. },
  1968. // 退舱
  1969. Disembarkingfun() {
  1970. if (this.selectionList.length === 0) {
  1971. this.$message.warning("请选择至少一条数据");
  1972. return;
  1973. }
  1974. // 判断是否可以编辑别人业务 true 就没有权限
  1975. if (this.ModifyOthersfun()) return;
  1976. this.billsDisembarkingfun(this.ids);
  1977. },
  1978. // 退舱接口
  1979. billsDisembarkingfun(ids) {
  1980. billsDisembarking(ids).then(res => {
  1981. this.$message({
  1982. type: "success",
  1983. message: "操作成功!"
  1984. });
  1985. this.onLoad(this.page);
  1986. });
  1987. },
  1988. // 撤销退仓
  1989. revokeWithdrawalfun() {
  1990. if (this.selectionList.length === 0) {
  1991. this.$message.warning("请选择至少一条数据");
  1992. return;
  1993. }
  1994. this.billsRevokeDisembarkingfun(this.ids);
  1995. },
  1996. // 撤销退舱接口
  1997. billsRevokeDisembarkingfun(ids) {
  1998. billsRevokeDisembarking(ids).then(res => {
  1999. this.$message({
  2000. type: "success",
  2001. message: "操作成功!"
  2002. });
  2003. this.onLoad(this.page);
  2004. });
  2005. },
  2006. // 下拉显示数据
  2007. async expandChange(row) {
  2008. if (row.billType == "MM") {
  2009. this.SplitLoading = true;
  2010. const res = await billsListAll({ masterId: row.id });
  2011. this.$set(row, "billsListAllData", res.data.data);
  2012. this.SplitLoading = false;
  2013. } else {
  2014. this.$refs.crud.toggleRowExpansion(row, false);
  2015. }
  2016. },
  2017. // 弹窗单选
  2018. radioInput(row) {
  2019. console.log(row, 2134);
  2020. console.log(this.dialogRadio, 2083);
  2021. },
  2022. // 弹窗确认
  2023. AddToMainOrder() {
  2024. if (!this.dialogRadio) {
  2025. this.$message.warning("请选择一条数据");
  2026. return;
  2027. }
  2028. this.billsIncreaseReinsurancePolicyfun(this.ids, this.dialogRadio);
  2029. },
  2030. // 添加到主单接口
  2031. billsIncreaseReinsurancePolicyfun(ids, id) {
  2032. billsIncreaseReinsurancePolicy(ids, id).then(res => {
  2033. this.dialogRadio = null;
  2034. this.$message({
  2035. type: "success",
  2036. message: "操作成功!"
  2037. });
  2038. this.dialogVisible = false;
  2039. this.onLoad(this.page);
  2040. });
  2041. },
  2042. // 弹窗关闭
  2043. handleClose(done) {
  2044. done();
  2045. },
  2046. toAddEdit() {
  2047. this.datekey = Date.now();
  2048. },
  2049. // 详情的返回列表
  2050. goBack() {
  2051. // 初始化数据
  2052. // this.detailData = this.$options.data().detailData;
  2053. if (JSON.stringify(this.$route.query) != "{}") {
  2054. this.$router.$avueRouter.closeTag();
  2055. this.$router.push({
  2056. path: "/iosBasicData/SeafreightExportF/bills/index"
  2057. });
  2058. }
  2059. this.isShow = true;
  2060. this.onLoad(this.page, this.search);
  2061. this.$store.commit("OUT_SEAFE_DETAIL");
  2062. },
  2063. // 新增弹窗开启
  2064. addbtnfun(type) {
  2065. this.detailData.seeDisabled = false;
  2066. this.detailData.billType = type;
  2067. this.isShow = false;
  2068. this.$store.commit("IN_SEAFE_DETAIL");
  2069. },
  2070. // 复制单据
  2071. CopyDocumentsfun() {
  2072. if (this.selectionList.length !== 1) {
  2073. this.$message.warning("请选择一条数据");
  2074. return;
  2075. }
  2076. this.$DialogForm.show({
  2077. title: "复制单据",
  2078. width: "300px",
  2079. menuPosition: "right",
  2080. data: { checkbox: "复制费用,复制箱型箱量" },
  2081. option: {
  2082. submitText: "确认",
  2083. emptyText: "取消",
  2084. span: 24,
  2085. column: [
  2086. {
  2087. label: "复制类型",
  2088. prop: "checkbox",
  2089. type: "checkbox",
  2090. dicData: [
  2091. {
  2092. label: "复制费用",
  2093. value: "复制费用"
  2094. },
  2095. {
  2096. label: "复制箱型箱量",
  2097. value: "复制箱型箱量"
  2098. }
  2099. ],
  2100. dataType: "string",
  2101. span: 24
  2102. }
  2103. ]
  2104. },
  2105. beforeClose: done => {
  2106. done();
  2107. },
  2108. callback: res => {
  2109. res.done();
  2110. this.detailData.seeDisabled = false;
  2111. this.detailData.id = this.selectionList[0].id;
  2112. this.isShow = false;
  2113. this.$nextTick(() => {
  2114. this.$refs.billsDetails.pageLoading = true;
  2115. this.$refs.billsDetails.billsCopyBillsfun(
  2116. this.selectionList[0].id,
  2117. res.data.checkbox
  2118. );
  2119. });
  2120. this.$store.commit("IN_SEAFE_DETAIL");
  2121. res.close();
  2122. }
  2123. });
  2124. },
  2125. // 编辑详情打开
  2126. rowCellfun(id, row) {
  2127. this.detailData = {
  2128. id: id
  2129. };
  2130. if (row) {
  2131. if (
  2132. this.saberUserInfo.role_name.indexOf("admin") == -1
  2133. ? this.saberUserInfo.role_name.indexOf(
  2134. "允许修改他人业务"
  2135. ) == -1
  2136. ? this.saberUserInfo.user_id == row.createUser
  2137. : true
  2138. : true
  2139. ) {
  2140. this.detailData.seeDisabled = false;
  2141. } else {
  2142. this.detailData.seeDisabled = true;
  2143. }
  2144. } else {
  2145. this.detailData.seeDisabled = false;
  2146. }
  2147. this.isShow = false;
  2148. this.$nextTick(() => {
  2149. this.$refs.billsDetails.pageLoading = true;
  2150. this.$refs.billsDetails.billsDetailfun(id);
  2151. });
  2152. this.$store.commit("IN_SEAFE_DETAIL");
  2153. },
  2154. rowSave(row, done, loading) {
  2155. billsSubmit(row).then(
  2156. () => {
  2157. this.onLoad(this.page);
  2158. this.$message({
  2159. type: "success",
  2160. message: "操作成功!"
  2161. });
  2162. done();
  2163. },
  2164. error => {
  2165. loading();
  2166. window.console.log(error);
  2167. }
  2168. );
  2169. },
  2170. rowUpdate(row, index, done, loading) {
  2171. billsSubmit(row).then(
  2172. () => {
  2173. this.onLoad(this.page);
  2174. this.$message({
  2175. type: "success",
  2176. message: "操作成功!"
  2177. });
  2178. done();
  2179. },
  2180. error => {
  2181. loading();
  2182. console.log(error);
  2183. }
  2184. );
  2185. },
  2186. rowDel(row) {
  2187. this.$confirm("确定将选择数据删除?", {
  2188. confirmButtonText: "确定",
  2189. cancelButtonText: "取消",
  2190. type: "warning"
  2191. })
  2192. .then(() => {
  2193. return billsRemove(row.id);
  2194. })
  2195. .then(() => {
  2196. this.onLoad(this.page);
  2197. this.$message({
  2198. type: "success",
  2199. message: "操作成功!"
  2200. });
  2201. });
  2202. },
  2203. // 批量删除
  2204. handleDelete() {
  2205. if (this.selectionList.length === 0) {
  2206. this.$message.warning("请选择至少一条数据");
  2207. return;
  2208. }
  2209. // 判断是否可以编辑别人业务 true 就没有权限
  2210. if (this.ModifyOthersfun()) return;
  2211. // 已经提交请核的提示不让删除
  2212. let sumArr = [];
  2213. const h = this.$createElement;
  2214. for (let item of this.selectionList) {
  2215. if (item.status == 1) {
  2216. sumArr.push(
  2217. h(
  2218. "p",
  2219. `序号${item.$index + 1}的数据已经提交请核请勿删除`
  2220. )
  2221. );
  2222. }
  2223. }
  2224. if (sumArr.length != 0) {
  2225. this.$confirm("提示", {
  2226. message: h("div", sumArr),
  2227. confirmButtonText: "确定",
  2228. cancelButtonText: "取消",
  2229. type: "warning"
  2230. });
  2231. return;
  2232. }
  2233. this.$confirm("确定将选择数据删除?", {
  2234. confirmButtonText: "确定",
  2235. cancelButtonText: "取消",
  2236. type: "warning"
  2237. })
  2238. .then(() => {
  2239. return billsRemove(this.ids);
  2240. })
  2241. .then(() => {
  2242. this.onLoad(this.page);
  2243. this.$message({
  2244. type: "success",
  2245. message: "操作成功!"
  2246. });
  2247. this.$refs.crud.toggleSelection();
  2248. });
  2249. },
  2250. beforeOpen(done, type) {
  2251. if (["edit", "view"].includes(type)) {
  2252. billsDetail(this.form.id).then(res => {
  2253. this.form = res.data.data;
  2254. });
  2255. }
  2256. done();
  2257. },
  2258. searchReset() {
  2259. this.query = {};
  2260. this.query.billSort = this.query.billSort
  2261. ? this.query.billSort
  2262. : "1";
  2263. this.onLoad(this.page);
  2264. },
  2265. // 搜索
  2266. searchChange(params, done) {
  2267. this.query = params;
  2268. this.page.currentPage = 1;
  2269. // // 判断检索条件是否可以使用
  2270. // if(this.etdDisabled) {
  2271. // this.query.etdList = this.etdList
  2272. // }else {
  2273. // delete params.etdList
  2274. // }
  2275. // if(this.etaDisabled) {
  2276. // this.query.etaList = this.etaList
  2277. // }else {
  2278. // delete params.etaList
  2279. // }
  2280. this.onLoad(this.page, params);
  2281. done();
  2282. },
  2283. selectionChange(list) {
  2284. this.selectionList = list;
  2285. },
  2286. selectionClear() {
  2287. this.selectionList = [];
  2288. this.$refs.crud.toggleSelection();
  2289. },
  2290. currentChange(currentPage) {
  2291. this.page.currentPage = currentPage;
  2292. },
  2293. sizeChange(pageSize) {
  2294. this.page.pageSize = pageSize;
  2295. },
  2296. refreshChange() {
  2297. this.onLoad(this.page, this.query);
  2298. },
  2299. // 列表获取数据
  2300. onLoad(page, params = {}) {
  2301. this.loading = true;
  2302. billsList(page.currentPage, page.pageSize, {
  2303. ...Object.assign(params, this.query),
  2304. businessType: "SE",
  2305. seaType: "E",
  2306. status: this.query.billStatus == 3 ? 3 : undefined
  2307. }).then(res => {
  2308. const data = res.data.data;
  2309. this.page.total = data.total;
  2310. this.data = data.records.map(item => {
  2311. item.billsListAllData = [];
  2312. item.billStatus = item.billStatus + "";
  2313. item.accountStatus = item.accountStatus + "";
  2314. item.status = item.status + "";
  2315. return item;
  2316. });
  2317. this.$nextTick(() => {
  2318. this.$refs.crud.doLayout();
  2319. this.$refs.crud.dicInit();
  2320. });
  2321. this.loading = false;
  2322. this.selectionClear();
  2323. });
  2324. },
  2325. // 弹窗表格获取数据
  2326. mawbOnLoad(page, params = {}) {
  2327. this.mawbloading = true;
  2328. billsList(page.currentPage, page.pageSize, {
  2329. ...Object.assign(params, this.mawbQuery),
  2330. businessType: "SE"
  2331. }).then(res => {
  2332. const data = res.data.data;
  2333. this.mawbPage.total = data.total;
  2334. this.mawbData = data.records;
  2335. this.mawbloading = false;
  2336. });
  2337. },
  2338. // 弹窗列表的分页
  2339. mawbSizeChange(val) {
  2340. this.mawbPage.pageSize = val;
  2341. this.mawbOnLoad(this.mawbPage, this.mawbQuery);
  2342. },
  2343. // 弹窗列表的分页
  2344. mawbCurrentChange(val) {
  2345. this.mawbPage.currentPage = val;
  2346. this.mawbOnLoad(this.mawbPage, this.mawbQuery);
  2347. },
  2348. // 弹窗的搜索
  2349. mawbSearch(params, done) {
  2350. this.mawbQuery = params;
  2351. this.mawbPage.currentPage = 1;
  2352. this.mawbOnLoad(this.mawbPage, params);
  2353. done();
  2354. },
  2355. //自定义列保存
  2356. saveColumnTwo(ref, option, code) {
  2357. /**
  2358. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  2359. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  2360. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  2361. */
  2362. console.log(ref, option, code);
  2363. localStorage.setItem(
  2364. this.getColumnName(code),
  2365. JSON.stringify(option)
  2366. );
  2367. this.$message.success("保存成功");
  2368. //关闭窗口
  2369. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  2370. },
  2371. //自定义列重置
  2372. resetColumnTwo(ref, code) {
  2373. this.optionBack = this.$options.data().optionBack;
  2374. localStorage.removeItem(this.getColumnName(code));
  2375. this.$message.success("重置成功");
  2376. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  2377. },
  2378. // 更改表格颜色
  2379. headerClassName(tab) {
  2380. // //颜色间隔
  2381. let back = "";
  2382. if (tab.columnIndex >= 0 && tab.column.level === 1) {
  2383. if (tab.columnIndex % 2 === 0) {
  2384. back = "back-one";
  2385. } else if (tab.columnIndex % 2 === 1) {
  2386. back = "back-two";
  2387. }
  2388. }
  2389. return back;
  2390. }
  2391. }
  2392. };
  2393. </script>
  2394. <style scoped>
  2395. ::v-deep#out-table .back-one {
  2396. background: #ecf5ff !important;
  2397. text-align: center;
  2398. }
  2399. ::v-deep#out-table .back-two {
  2400. background: #ecf5ff !important;
  2401. text-align: center;
  2402. }
  2403. /deep/ .el-col-md-8 {
  2404. width: 24.33333%;
  2405. }
  2406. ::v-deep.el-form-item {
  2407. margin-bottom: 0;
  2408. }
  2409. </style>