index.vue 97 KB

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