index.vue 104 KB

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