index.vue 110 KB

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