index.vue 95 KB

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