| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622 |
- <template>
- <div>
- <basic-container v-show="isShow">
- <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" id="out-table"
- :header-cell-class-name="headerClassName" :permission="permissionList" :before-open="beforeOpen"
- v-model="form" ref="crud" :search.sync="query" @row-update="rowUpdate" @row-save="rowSave"
- @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
- @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
- @refresh-change="refreshChange" @on-load="onLoad" :row-style="rowStyle" :summary-method="summaryMethod"
- @resetColumn="resetColumn('crud', 'option', 'optionBack', 309)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 309)">
- <template slot-scope="{ disabled, size }" slot="billSortSearch">
- <el-radio-group v-model="query.billSort">
- <el-radio label="1">ETD</el-radio>
- <el-radio label="2">提单号</el-radio>
- <el-radio label="3">分单号</el-radio>
- </el-radio-group>
- </template>
- <template slot="menuLeft">
- <el-button type="primary" size="small" @click="addbtnfun('DD')">
- {{ $t("seSeaibllsList.buttonBillTypeDD") }}
- </el-button>
- <el-button type="success" size="small" @click="addbtnfun('MM')">
- {{ $t("seSeaibllsList.buttonBillTypeMM") }}
- </el-button>
- <el-button type="warning" size="small" @click="addbtnfun('MH')">
- {{ $t("seSeaibllsList.buttonBillTypeMH") }}
- </el-button>
- <el-button type="primary" size="small" plain @click="CopyDocumentsfun">复制
- </el-button>
- <el-button type="primary" size="small" @click="allClick('修改单据类型')">修改单据类型
- </el-button>
- <el-button type="success" size="small" plain @click="increaseMawb">分单->主单
- </el-button>
- <el-button type="warning" size="small" plain v-if="query.billStatus != 1" @click="Disembarkingfun">退
- 舱
- </el-button>
- <el-button type="primary" size="small" plain v-if="query.billStatus == 1"
- @click="revokeWithdrawalfun">撤销退舱
- </el-button>
- <el-button type="danger" size="small" plain v-if="query.billStatus != 3" @click="handleDelete">删 除
- </el-button>
- <el-button type="warning" size="small" @click="outExport">导 出
- </el-button>
- <el-button
- v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('应收修改') >= 0 || roleName.indexOf('应收查看') >= 0"
- type="primary" size="small" @click="templateImport('D')" :disabled="!selectionList.length">模板(收)
- </el-button>
- <el-button
- v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('应付修改') >= 0 || roleName.indexOf('应付查看') >= 0"
- type="warning" size="small" @click="templateImport('C')" :disabled="!selectionList.length">模板(付)
- </el-button>
- <el-button
- v-if="isHq == 1 && (roleName.indexOf('admin') >= 0 || roleName.indexOf('应付修改') >= 0 || roleName.indexOf('应付查看') >= 0)"
- type="primary" plain size="small" @click="checkSubmit"
- :disabled="!selectionList.length">提取成本</el-button>
- <!-- <el-button type="success" plain size="small" @click="freightRateSubmit"
- :disabled="!selectionList.length">提取运价</el-button>-->
- <el-button
- v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('应收修改') >= 0 || roleName.indexOf('应收查看') >= 0"
- type="primary" size="small" @click="pleaseVerify('D')" :disabled="!selectionList.length">提交收
- </el-button>
- <el-button
- v-if="roleName.indexOf('admin') >= 0 || roleName.indexOf('应付修改') >= 0 || roleName.indexOf('应付查看') >= 0"
- type="warning" size="small" @click="pleaseVerify('C')" :disabled="!selectionList.length">提交付
- </el-button>
- <el-button type="success" size="small" @click="checkBills" :disabled="!selectionList.length">请核
- </el-button>
- <!-- <el-dropdown style="line-height: 0">
- <el-button size="small" type="success" style="margin-right: 8px"
- :disabled="selectionList.length == 0">
- 发送 SO EDI<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item v-for="item in ediData_SO" :key="item.id"
- @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- <!-- <el-dropdown style="line-height: 0">
- <el-button size="small" type="success" style="margin-right: 8px"
- :disabled="selectionList.length == 0">
- 发送 SI EDI<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item v-for="item in ediData_SI" :key="item.id"
- @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- <div style="margin-top: 10px">
- <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
- <el-tab-pane v-if="!(roleName.indexOf('总部中心') >= 0)" label="接单" name="0">
- <span slot="label">接单</span>
- </el-tab-pane>
- <el-tab-pane v-if="!(roleName.indexOf('总部中心') >= 0)" label="出号" name="4">
- <span slot="label">出号</span>
- </el-tab-pane>
- <el-tab-pane v-if="!(roleName.indexOf('总部中心') >= 0)" label="开船" name="5">
- <span slot="label">开船</span>
- </el-tab-pane>
- <el-tab-pane v-if="!(roleName.indexOf('总部中心') >= 0)" label="到港" name="6">
- <span slot="label">到港</span>
- </el-tab-pane>
- <el-tab-pane v-if="!(roleName.indexOf('总部中心') >= 0)" label="退舱" name="1">
- <span slot="label" style="color: #d86363">退舱</span>
- </el-tab-pane>
- <el-tab-pane v-if="roleName.indexOf('总部中心') >= 0" label="待处理" name="11">
- <span slot="label">待处理</span>
- </el-tab-pane>
- <el-tab-pane v-if="roleName.indexOf('总部中心') >= 0" label="待请核" name="12">
- <span slot="label">待请核</span>
- </el-tab-pane>
- <el-tab-pane label="完成" name="3"></el-tab-pane>
- <el-tab-pane label="全部" name="7"></el-tab-pane>
- </el-tabs>
- </div>
- </template>
- <template slot-scope="scope" slot="menu">
- <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != scope.row.createUser:false"-->
- <el-button :type="scope.type" :size="scope.size" icon="el-icon-edit"
- @click.stop="rowCellfun(scope.row.id, scope.row)">编辑
- </el-button>
- </template>
- <!-- <template slot="expand" slot-scope="{row}">
- <SplitList :typeMenu="true" :data="row.billsListAllData" :loading="SplitLoading"
- @corpfun="rowCellfun">
- </SplitList>
- </template> -->
- <temolate slot="billStatus" slot-scope="{ row }">
- <div>
- <span v-if="row.billStatus == item.dictKey" v-for="(item, index) in billStatusData" :key="index"
- :style="{ 'background-color': item.colour }"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
- {{ item.dictValue }}
- </span>
- </div>
- </temolate>
- <template slot="accountStatus" slot-scope="{ row }">
- <div>
- <span v-if="row.accountStatus == item.dictKey" v-for="(item, index) in accountStatusData"
- :key="index" :style="{ 'background-color': item.colour }"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
- {{ item.dictValue }}
- </span>
- </div>
- </template>
- <template slot="whetherModify" slot-scope="{ row }">
- <div>
- <span v-if="row.whetherModify == item.dictKey" v-for="(item, index) in khdcStatus" :key="index"
- :style="{ 'background-color': item.colour }"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
- {{ item.dictValue }}
- </span>
- </div>
- </template>
- <!-- <template slot="status" slot-scope="{ row }">
- <div>
- <span v-if="row.status == item.dictKey" v-for="(item, index) in auditStatusList" :key="index"
- :style="{ 'background-color': item.colour }"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
- {{ item.dictValue }}
- </span>
- </div>
- </template> -->
- <template slot="corpCnName" slot-scope="scope">
- <span
- style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
- @click.stop="rowCellfun(scope.row.id, scope.row)">
- {{ scope.row.shortName }}
- </span>
- </template>
- <template slot="billNo" slot-scope="scope">
- <span
- style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
- @click.stop="rowCellfun(scope.row.id, scope.row)">
- {{ scope.row.billNo }}
- </span>
- </template>
- <template slot="eta" slot-scope="scope">
- <span>{{
- scope.row.eta ? scope.row.eta.slice(0, 10) : ""
- }}</span>
- </template>
- <template slot="updateTime" slot-scope="scope">
- <span>{{
- scope.row.updateTime
- ? scope.row.updateTime.slice(0, 10)
- : ""
- }}</span>
- </template>
- <template slot="checkDrStatusDescr" slot-scope="{ row }">
- <div>
- <span v-if="row.checkDrStatusDescr == '未对账'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
- 未对账
- </span>
- <span v-if="row.checkDrStatusDescr == '已对账'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
- 已对账
- </span>
- <span v-if="row.checkDrStatusDescr == '部分对账'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
- 部分对账
- </span>
- </div>
- </template>
- <template slot="stlDrStatusDescr" slot-scope="{ row }">
- <div>
- <span v-if="row.stlDrStatusDescr == '未结'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
- 未结
- </span>
- <span v-if="row.stlDrStatusDescr == '已结'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
- 已结
- </span>
- <span v-if="row.stlDrStatusDescr == '部分结'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
- 部分结
- </span>
- </div>
- </template>
- <template slot="stlCrStatusDescr" slot-scope="{ row }">
- <div>
- <span v-if="row.stlCrStatusDescr == '未结'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
- 未结
- </span>
- <span v-if="row.stlCrStatusDescr == '结清'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
- 结清
- </span>
- <span v-if="row.stlCrStatusDescr == '部分'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
- 部分
- </span>
- </div>
- </template>
- <template slot="stlCrStatusDescr" slot-scope="{ row }">
- <div>
- <span v-if="row.stlCrStatusDescr == '未结'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
- 未结
- </span>
- <span v-if="row.stlCrStatusDescr == '结清'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
- 结清
- </span>
- <span v-if="row.stlCrStatusDescr == '部分'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
- 部分
- </span>
- </div>
- </template>
- <template slot="invoiceDrStatusDescr" slot-scope="{ row }">
- <div>
- <span v-if="row.invoiceDrStatusDescr == '未开'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
- 未开
- </span>
- <span v-if="row.invoiceDrStatusDescr == '部分'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
- 部分
- </span>
- <span v-if="row.invoiceDrStatusDescr == '全开'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
- 全开
- </span>
- </div>
- </template>
- <template slot="checkCrStatusDescr" slot-scope="{ row }">
- <div>
- <span v-if="row.checkCrStatusDescr == '未申请'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #67C23A;">
- 未申请
- </span>
- <span v-if="row.checkCrStatusDescr == '部分申请'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #409EFF;">
- 部分申请
- </span>
- <span v-if="row.checkCrStatusDescr == '已申请'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;background-color: #F56C6C;">
- 已申请
- </span>
- </div>
- </template>
- <template slot="logisticsStatus" slot-scope="{ row }">
- <span v-if="row.logisticsStatus == '录入'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;background-color: #409EFF;">{{
- row.logisticsStatus }}</span>
- <span v-if="row.logisticsStatus != '录入'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;background-color: #67C23A;">{{
- row.logisticsStatus }}</span>
- </template>
- <template slot="transferOrderStatus" slot-scope="{ row }">
- <span v-if="row.transferOrderStatus == '录入'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;background-color: #409EFF;">{{
- row.transferOrderStatus }}</span>
- <span v-if="row.transferOrderStatus != '录入'"
- style="color: #fff;border-radius: 30px;padding: 2px 15px;background-color: #67C23A;">{{
- row.transferOrderStatus }}</span>
- </template>
- </avue-crud>
- </basic-container>
- <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" :pageIds="pageIds" @goBack="goBack"
- @toAddEdit="toAddEdit" :key="datekey"></bills-details>
- <el-dialog title="主单列表" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose">
- <avue-crud :option="mawbOptionBack" :table-loading="mawbloading" :data="mawbData" :page.sync="mawbPage"
- :search="mawbQuery" ref="mawbOptionCrud" id="out-table" :header-cell-class-name="headerClassName"
- @search-change="mawbSearch" @size-change="mawbSizeChange" @current-change="mawbCurrentChange"
- @resetColumn="resetColumnTwo('mawbOptionCrud', 309.7)" @saveColumn="
- saveColumnTwo('mawbOptionCrud', mawbOptionBack, 309.7)
- ">
- <template slot="radio" slot-scope="{ row }">
- <el-radio style="margin-left: 8px;" v-model="dialogRadio" :label="row.id"
- @input="radioInput(row)"> </el-radio>
- </template>
- </avue-crud>
- <span slot="footer" class="dialog-footer">
- <el-button @click="
- dialogVisible = false;
- dialogRadio = null;
- ">取 消</el-button>
- <el-button type="primary" @click="AddToMainOrder">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog append-to-body title="费用模板" :visible.sync="templateDialog" width="60%" :before-close="handleClose">
- <span>
- <el-row>
- <el-col :span="5">
- <el-scrollbar>
- <basic-container>
- <avue-tree :option="treeOption" :data="templateData" @node-click="nodeClick">
- </avue-tree>
- </basic-container>
- </el-scrollbar>
- </el-col>
- <el-col :span="19">
- <avue-crud :data="templateList" :option="templateOption"></avue-crud>
- </el-col>
- </el-row>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="templateDialog = false" size="mini">取 消</el-button>
- <el-button type="primary" @click="importTemplate" size="mini">导 入</el-button>
- </span>
- </el-dialog>
- <extraction-cost ref="extractionCost" />
- <freight-rate ref="freightRate" @refreshPage="refreshChange"></freight-rate>
- </div>
- </template>
- <script>
- import {
- billsList,
- billsDetail,
- billsSubmit,
- billsRemove,
- billsIncreaseReinsurancePolicy,
- billsListAll,
- billsDisembarking,
- editypesSendingEdi,
- updateBillType,
- billsRevokeDisembarking,
- templateImportBatch,
- checkBillsBatch,
- increaseReinsurancePolicyTeu,
- pleaseVerifyCostBatch
- } from "@/api/iosBasicData/bills";
- import { mapGetters } from "vuex";
- import billsDetails from "@/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue";
- import feesTemplateItems from "@/views/iosBasicData/losbfeestemplate/feesTemplateItems.vue";
- import SplitList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/SplitList.vue";
- import { getWorkDicts } from "@/api/system/dictbiz";
- import { dateFormat, defaultDate } from "@/util/date";
- import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
- import freightRate from "@/views/iosBasicData/SeafreightExportF/bills/assembly/freightRate.vue";
- import { editypesList } from "@/api/iosBasicData/editypes";
- import { getBvesselsList } from "@/api/iosBasicData/bvessels";
- import {
- getBcorpslistByType,
- getBcorpsDetail
- } from "@/api/iosBasicData/bcorps";
- import { bportsList } from "@/api/iosBasicData/bports";
- import { blinesList } from "@/api/iosBasicData/blines";
- import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
- import extractionCost from "@/components/extractionCost/main.vue";
- import { getDeptTree } from "@/api/system/dept";
- import { getToken } from "@/util/auth";
- import { getListTemplate, getListTemplatelist } from "@/api/iosBasicData/losbfeestemplate";
- export default {
- components: {
- TreeSelect,
- SearchQuery,
- feesTemplateItems,
- billsDetails,
- SplitList,
- extractionCost,
- freightRate
- },
- data() {
- return {
- isHq: JSON.parse(localStorage.getItem('user-Information')).isHq,
- radioRow: {},
- roleName: [], // 当前登录人的角色权限
- dcDic: [
- {
- label: '收',
- value: 'D'
- },
- {
- label: '付',
- value: 'C'
- }
- ],
- selectionTemplateList: [],
- treeOption: {
- nodeKey: "id",
- // lazy: true,
- addBtn: false,
- menu: false,
- size: "small",
- props: {
- labelText: "标题",
- label: "cnName",
- value: "value",
- children: "children"
- }
- },
- dc: null,
- templateId: null,
- templateData: [],
- templateList: [],
- templateOption: {
- height: 500,
- menu: false,
- addBtn: false,
- editBtn: false,
- delBtn: false,
- viewBtn: false,
- header: false,
- index: true,
- tip: false,
- // selection: true,
- column: [
- {
- label: '类别',
- prop: 'type',
- overHidden: true,
- },
- {
- label: '费用',
- prop: 'feeCnName',
- overHidden: true,
- },
- {
- label: '计量单位',
- prop: 'unitNo',
- overHidden: true,
- },
- {
- label: '单价',
- prop: 'salesPrice',
- overHidden: true,
- },
- {
- label: '币别',
- prop: 'curCode',
- overHidden: true,
- },
- {
- label: '结算单位',
- prop: 'corpCnName',
- overHidden: true,
- },
- ]
- },
- templateDialog: false,
- datekey: Date.now(),
- ediData: [], // 获取的 edi 数据
- ediData_SO: [], // 获取的 SO edi 数据
- ediData_SI: [], // 获取的 SI edi 数据
- // 展开和收回
- fold: false,
- maxShow: 3,
- corpData: [], //委托人
- hConsigneeData: [], // 收货人
- // 船名
- vesselData: [],
- // 船公司
- carrierData: [],
- // 目的港(卸货港)
- podData: [],
- // 航线
- lineData: [],
- // 场站
- cyData: [],
- // 订舱代理
- bookingAgentData: [],
- createDeptData: [], // 部门数据
- auditStatusList: [],
- // 单据类型
- billTypeData: [
- {
- label: "直单",
- value: "DD"
- },
- {
- label: "主单",
- value: "MM"
- },
- {
- label: "分单",
- value: "MH"
- }
- ],
- // 业务来源
- srcTypeData: [
- {
- label: "公司",
- value: "OWN"
- },
- {
- label: "代理",
- value: "AGENT"
- },
- {
- label: "业务员",
- value: "SALES"
- }
- ],
- // 签单方式
- issueTypeData: [],
- isShow: true,
- detailData: {},
- dialogVisible: false, // 弹窗开启V
- // ETD是否可以检索
- etdDisabled: false,
- // ETA是否可以检索
- etaDisabled: false,
- form: {},
- // 开船日期和到港日期
- etdList: [
- defaultDate(1)[0] + " 00:00",
- defaultDate(1)[1] + " 23:59"
- ],
- etaList: [
- defaultDate(1)[0] + " 00:00",
- defaultDate(1)[1] + " 23:59"
- ],
- // 表格的检索条件
- query: {
- billStatus: "0",
- billSort: "1"
- },
- // 弹窗的搜索项
- mawbQuery: {
- billType: "MM"
- },
- loading: true,
- // 弹窗加载
- mawbloading: false,
- // 下拉的加载
- SplitLoading: false,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 500]
- },
- // 弹窗分页
- mawbPage: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- selectionList: [],
- // 弹窗的选择数据
- dialogRadio: null,
- option: {},
- optionBack: {
- // selectable:(row,index)=>{
- // // 禁用主单
- // return row.billType != 'MM'
- // },
- // expand: true,
- // expandRowKeys: [],
- rowKey: "id",
- height: 500,
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 24,
- searchLabelWidth: "100",
- border: true,
- index: true,
- selection: true, // 是否有选择框
- dialogClickModal: false,
- highlightCurrentRow: true, // 单选
- searchIcon: true,
- searchIndex: 3,
- // stripe: true,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: false,
- menuWidth: "auto",
- align: "center",
- showSummary: true,
- column: [
- {
- label: this.$t("seSeaibllsList.branchName"),
- prop: "branchId",
- width: "120",
- overHidden: true,
- hide: true,
- //showColumn: false,
- type: "select",
- filterable: true,
- dicUrl: "/api/blade-system/dept/lazy-list",
- props: {
- label: "deptName",
- value: "id",
- },
- search: false,
- searchOrder: 1
- },
- {
- label: this.$t("seSeaibllsList.branchName"),
- prop: "branchName",
- width: "120",
- overHidden: true,
- hide: true,
- //showColumn: false,
- },
- {
- label: this.$t("seSeaibllsList.corpName"),
- prop: "corpCnName",
- width: "160",
- overHidden: true,
- search: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bcorps/listByType?shortName={{key}}",
- props: {
- label: "cnName",
- value: "cnName",
- res: "data.records"
- },
- span: 6,
- searchOrder: 1.1
- },
- {
- label: '箱属',
- prop: 'boxBelongsTo',
- width: 100,
- overHidden: true,
- disabled: true,
- },
- {
- label: "MB/L NO",
- prop: "mblno",
- width: "160",
- overHidden: true,
- search: true,
- span: 6,
- searchOrder: 2
- },
- {
- label: "HB/L NO",
- prop: "hblno",
- width: "160",
- overHidden: true,
- search: true,
- span: 6,
- searchOrder: 3
- },
- {
- label: "主业务编号",
- prop: "masterBillNo",
- width: "100",
- overHidden: true
- },
- {
- label: "分单数",
- prop: "splitOrderSum",
- width: "100",
- overHidden: true
- },
- {
- label: "单据类型",
- prop: "billType",
- type: "select",
- search: true,
- span: 6,
- searchOrder: 3.1,
- dicData: [
- {
- label: "直单",
- value: "DD"
- },
- {
- label: "主单",
- value: "MM"
- },
- {
- label: "分单",
- value: "MH"
- }
- ],
- overHidden: true
- },
- {
- label: "单据编号",
- prop: "billNo",
- width: "160",
- overHidden: true,
- search: true,
- span: 6,
- searchOrder: 4
- },
- {
- label: '来源单号',
- prop: "temporaryNo",
- width: "100",
- search: true,
- overHidden: true,
- },
- {
- label: "船名",
- prop: "vesselCnName",
- width: "120",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bvessels/list?enName={{key}}",
- props: {
- label: "enName",
- value: "enName",
- res: "data.records"
- },
- search: true,
- span: 6,
- searchOrder: 5,
- hide: true,
- //showColumn: false
- },
- {
- label: "船名",
- width: "120",
- prop: "vesselEnName",
- overHidden: true
- },
- {
- label: "航次",
- prop: "voyageNo",
- width: "80",
- overHidden: true,
- search: true,
- span: 6,
- searchOrder: 6
- },
- {
- label: "客服",
- prop: "customerServiceName",
- width: "80",
- overHidden: true,
- },
- {
- label: "OP",
- prop: "operatorId",
- width: "120",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-user/userListAll?roleAlias=操作员&realName={{key}}",
- props: {
- label: "realName",
- value: "id",
- },
- search: true,
- span: 6,
- searchOrder: 7
- },
- {
- label: "开船日期",
- prop: "etd",
- width: "120",
- searchProp: "etdList",
- type: "date",
- unlinkPanels: true,
- searchRange: true,
- overHidden: true,
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- searchDefaultTime: ["00:00:00", "23:59:59"],
- search: true,
- span: 6,
- searchOrder: 8
- },
- {
- label: "到港日期",
- prop: "eta",
- width: "80",
- overHidden: true,
- searchProp: "etaList",
- type: "date",
- unlinkPanels: true,
- searchRange: true,
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- searchDefaultTime: ["00:00:00", "23:59:59"],
- search: true,
- span: 6,
- searchOrder: 9
- },
- {
- label: "承运人",
- prop: "carrierEnName",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bcorps/listByType?corpTypeName=船公司&enName={{key}}",
- props: {
- label: "enName",
- value: "enName",
- res: "data.records"
- },
- search: true,
- span: 6,
- searchOrder: 10,
- // hide: true,
- },
- // {
- // label: "承运人",
- // prop: "carrierShortName",
- // overHidden: true
- // },
- {
- label: "装货港",
- prop: "polEnName",
- width: "120",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bports/list?enName={{key}}",
- props: {
- label: "enName",
- value: "enName",
- res: "data.records"
- },
- search: true,
- span: 6,
- searchOrder: 10.3
- },
- {
- label: "卸货港",
- prop: "podEnName",
- width: "120",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bports/list?enName={{key}}",
- props: {
- label: "enName",
- value: "enName",
- res: "data.records"
- },
- search: true,
- span: 6,
- searchOrder: 10.5
- },
- {
- label: "目的港",
- prop: "destinationName",
- width: "120",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bports/list?enName={{key}}",
- props: {
- label: "enName",
- value: "enName",
- res: "data.records"
- },
- search: true,
- span: 6,
- searchOrder: 11
- },
- {
- label: "航线",
- prop: "lineCnName",
- width: "120",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/blines/list?cnName={{key}}",
- props: {
- label: "cnName",
- value: "cnName",
- res: "data.records"
- },
- search: true,
- span: 6,
- searchOrder: 12
- },
- {
- label: "场站",
- prop: "cyCnName",
- width: "120",
- overHidden: true,
- type: "select",
- filterable: true,
- remote: true,
- dicUrl:
- "/api/blade-los/bcorps/listByType?cnName={{key}}",
- props: {
- label: "cnName",
- value: "cnName",
- res: "data.records"
- },
- search: true,
- span: 6,
- searchOrder: 13,
- },
- {
- label: "箱型/箱量",
- prop: "quantityCntrDescr",
- width: "120",
- overHidden: true
- },
- {
- label: "物流状态",
- prop: "logisticsStatus",
- type: "select",
- search: true,
- span: 6,
- searchOrder: 3.2,
- dicData: [
- {
- label: "录入",
- value: "录入"
- },
- {
- label: "已提交",
- value: "已提交"
- }
- ],
- overHidden: true
- },
- {
- label: "转单状态",
- prop: "transferOrderStatus",
- width: "100",
- type: "select",
- search: true,
- span: 6,
- searchOrder: 3.3,
- dicData: [
- {
- label: "录入",
- value: "录入"
- },
- {
- label: "已转单",
- value: "已转单"
- }
- ],
- overHidden: true
- },
- {
- label: "业务来源",
- prop: "srcType",
- type: "select",
- dicData: [
- {
- label: "公司",
- value: "OWN"
- },
- {
- label: "代理",
- value: "AGENT"
- },
- {
- label: "业务员",
- value: "SALES"
- }
- ],
- overHidden: true,
- search: true,
- span: 6,
- searchOrder: 14
- },
- {
- label: "来源详情",
- prop: "srcCnName",
- width: "80",
- overHidden: true,
- search: true,
- span: 6,
- searchOrder: 15
- },
- {
- label: "货物类别",
- prop: "cargoType",
- type: "select",
- dicData: [
- {
- label: "普货",
- value: "dry"
- },
- {
- label: "危险品",
- value: "danger"
- },
- {
- label: "冻柜",
- value: "reefer"
- }
- ],
- overHidden: true
- },
- {
- label: "订舱代理",
- prop: "bookingAgentCnName",
- width: "120",
- overHidden: true,
- },
- {
- label: "收发货人",
- prop: "receivingAndShipping",
- width: "120",
- overHidden: true,
- search: true,
- span: 6,
- searchOrder: 18
- },
- {
- label: "唛头",
- prop: "marks",
- width: "80",
- overHidden: true
- },
- {
- label: "件数",
- prop: "quantity",
- overHidden: true
- },
- {
- label: "毛重 (KGM)",
- prop: "grossWeight",
- width: "120",
- overHidden: true
- },
- {
- label: "体积 (CBM)",
- prop: "measurement",
- width: "120",
- overHidden: true
- },
- {
- label: "TEU箱数",
- prop: "teu",
- width: "100",
- overHidden: true
- },
- {
- label: "订舱TEU",
- prop: "teuTotal",
- width: "100",
- overHidden: true
- },
- {
- label: "20GP",
- prop: "quantityV20",
- width: "100",
- overHidden: true
- },
- {
- label: "40GP",
- prop: "quantityV40",
- width: "100",
- overHidden: true
- },
- {
- label: "20HC",
- prop: "quantityV45",
- width: "100",
- overHidden: true
- },
- {
- label: "40FR",
- prop: "quantityV48",
- width: "100",
- overHidden: true
- },
- {
- label: "40HC",
- prop: "quantityV40hc",
- width: "100",
- overHidden: true
- },
- {
- label: "合计应收(CNY )",
- prop: "amountDrLoc",
- width: "160",
- overHidden: true
- },
- {
- label: "付费申请状态",
- prop: "checkCrStatusDescr",
- width: "160",
- overHidden: true
- },
- {
- label: "应收对账状态",
- prop: "checkDrStatusDescr",
- width: "160",
- overHidden: true
- },
- {
- label: "应收结算状态",
- prop: "stlDrStatusDescr",
- type: "select",
- search: true,
- dicData: [
- {
- label: "未结",
- value: "未结"
- },
- {
- label: "部分",
- value: "部分"
- },
- {
- label: "结清",
- value: "结清"
- }
- ],
- width: "100",
- searchLabelWidth: "100",
- overHidden: true
- },
- {
- label: "应付结算状态",
- prop: "stlCrStatusDescr",
- type: "select",
- search: true,
- dicData: [
- {
- label: "未结",
- value: "未结"
- },
- {
- label: "部分",
- value: "部分"
- },
- {
- label: "结清",
- value: "结清"
- }
- ],
- width: "100",
- searchLabelWidth: "100",
- overHidden: true
- },
- {
- label: "销项发票状态",
- prop: "invoiceDrStatusDescr",
- width: "160",
- overHidden: true
- },
- {
- label: "创建人",
- prop: "createUserName",
- search: true,
- rules: [
- {
- required: true,
- message: "请输入创建人",
- trigger: "blur"
- }
- ],
- overHidden: true
- },
- {
- label: "创建时间",
- prop: "createTime",
- width: "160",
- overHidden: true
- },
- {
- label: "排序方式",
- prop: "billSort",
- hide: true,
- search: true,
- searchValue: "1",
- searchSpan: 12,
- overHidden: true
- },
- {
- label: "业务状态",
- prop: "billStatus",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=bill_status",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- width: "120",
- overHidden: true
- },
- {
- label: '订舱状态',
- prop: "whetherModify",
- width: "100",
- overHidden: true,
- },
- {
- label: "财务状态",
- prop: "accountStatus",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=account_status",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- width: "120",
- overHidden: true
- },
- {
- label: "审核状态",
- prop: "status",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=audit_status_los",
- width: "120",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- overHidden: true,
- search: true,
- searchOrder: 19
- },
- {
- label: "提取成本",
- prop: "whetherExtractCost",
- type: "select",
- dicData: [{
- label: '否',
- value: 0
- }, {
- label: '是',
- value: 1
- }],
- overHidden: true,
- },
- {
- label: "备注",
- prop: "remarks",
- overHidden: true
- }
- ]
- },
- // 弹窗的配置
- mawbOption: {},
- mawbOptionBack: {
- height: "450",
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- selection: false, // 多选
- dialogClickModal: false,
- stripe: true,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- editBtn: false,
- menu: false,
- menuWidth: "auto",
- column: [
- {
- label: "行号",
- prop: "radio",
- width: 50,
- hide: false
- },
- {
- label: "船名",
- prop: "vesselCnName",
- overHidden: true
- },
- {
- label: "航次",
- prop: "voyageNo",
- overHidden: true
- },
- {
- label: "MB/L NO",
- prop: "mblno",
- search: true,
- overHidden: true
- },
- {
- label: "HB/L NO",
- prop: "hblno",
- search: true,
- overHidden: true
- },
- {
- label: "开船日期",
- prop: "etd",
- width: "80",
- overHidden: true
- },
- {
- label: "到港日期",
- prop: "eta",
- overHidden: true
- },
- {
- label: "装货港",
- prop: "polCnName",
- overHidden: true
- },
- {
- label: "卸货港",
- prop: "podCnName",
- width: "120",
- overHidden: true
- },
- {
- label: "单据编号",
- prop: "billNo",
- width: "160",
- overHidden: true
- },
- {
- label: "客户名",
- prop: "corpCnName",
- overHidden: true
- },
- {
- label: "客户英文",
- prop: "corpEnName",
- overHidden: true
- },
- {
- label: "件数",
- prop: "quantity",
- overHidden: true
- },
- {
- label: "包装单位",
- prop: "packingUnit",
- overHidden: true
- },
- {
- label: "毛重",
- prop: "grossWeight",
- overHidden: true
- },
- {
- label: "净重",
- prop: "netWeight",
- overHidden: true
- },
- {
- label: "体积",
- prop: "measurement",
- overHidden: true
- },
- {
- label: "单据日期",
- prop: "billDate",
- width: "150",
- overHidden: true
- }
- ]
- },
- data: [],
- // 弹窗数据
- mawbData: [],
- // 业务状态数据
- billStatusData: [],
- khdcStatus: [],
- // 财务状态
- accountStatusData: [],
- saberUserInfo: {}, // 当前登录人个人信息
- pageIds: []
- };
- },
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.bills_add, false),
- viewBtn: this.vaildData(this.permission.bills_view, false),
- delBtn: this.vaildData(this.permission.bills_delete, false),
- editBtn: this.vaildData(this.permission.bills_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
- },
- async created() {
- this.roleName = localStorage.getItem('roleName').split(',') // 获取角色数据
- // 获取当前登录人个人信息
- this.saberUserInfo = JSON.parse(
- localStorage.getItem("saber-userInfo")
- ).content;
- // 首页快捷跳转进来的
- if (this.$route.query.home) {
- this.addbtnfun();
- }
- // if (this.$route.query.id) {
- // this.rowCellfun(this.$route.query.id)
- // }
- this.option = await this.getColumnData(this.getColumnName(309), this.optionBack);
- // this.mawbOption = await this.getColumnData(this.getColumnName(309.7), this.mawbOptionBack); // 主单列表
- // if (localStorage.getItem(this.getColumnName(309))) {
- // this.optionBack = JSON.parse(
- // localStorage.getItem(this.getColumnName(309))
- // );
- // }
- if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
- this.option.searchMenuSpan = 12
- this.option.column.forEach(item => {
- if (item.prop == 'branchId') {
- item.search = true
- }
- if (item.prop == 'branchName') {
- item.hide = false
- // item.showColumn = true
- }
- })
- }
- this.billStatusWorkDictsfun(); // 获取业务状态字典数据
- this.accountStatusWorkDictsfun(); // 获取财务状态字典数据
- this.statusWorkDictsfun(); // 业务审核类型
- this.editypesListfun(); // edi 数据获取
- // console.log(,11111)
- },
- mounted() { },
- activated() {
- if (this.$route.query.id) {
- if (!this.$store.getters.seaFEStatus) {
- setTimeout(() => {
- this.rowCellfun(this.$route.query.id);
- }, 200);
- }
- }
- if (this.$route.query.params) {
- if (!this.$store.getters.seaFEStatus) {
- setTimeout(() => {
- this.rowCellfun(this.$route.query.params);
- }, 200);
- }
- }
- },
- methods: {
- summaryMethod({ columns, data }) {
- const sums = [];
- if (columns.length > 0) {
- columns.forEach((column, index) => {
- sums[0] = "合计";
- let prop = column.property
- if (['quantity', 'grossWeight', 'measurement', 'teu', 'teuTotal', 'quantityV20', 'quantityV40', 'quantityV40hc', 'quantityV45', 'quantityV48'].includes(prop)) {
- let values = this.data.filter(item => item.billType == 'MH').map(item => Number(item[prop] || 0));
- let all = values.length !== 0 ? sums[index] = values.reduce((a, b) => {
- return a + b;
- }) : 0
- if (prop == 'grossWeight' || prop == 'measurement') {
- sums[index] = all.toFixed(3)
- }
- if (prop == 'quantity' || prop == 'teu' || prop == 'quantityV20' || prop == 'quantityV40' || prop == 'quantityV40hc' || prop == 'quantityV45' || prop == 'quantityV48') {
- sums[index] = all
- }
- } else {
- sums[index]
- }
- });
- }
- return sums;
- },
- freightRateSubmit() {
- const ids = []
- for (let item of this.selectionList) {
- if (item.polId != this.selectionList[0].polId) {
- return this.$message.error("请选择相同的装货港");
- }
- if (item.podId != this.selectionList[0].podId) {
- return this.$message.error("请选择相同的卸货港");
- }
- if (item.carrierId != this.selectionList[0].carrierId) {
- return this.$message.error("请选择相同的船公司");
- }
- if (item.etd != this.selectionList[0].etd) {
- return this.$message.error("请选择相同的ETD");
- }
- ids.push(item.id)
- }
- let obj = {
- polId: this.selectionList[0].polId,
- podId: this.selectionList[0].podId,
- actualShippingCompanyId: this.selectionList[0].carrierId,
- etd: this.selectionList[0].etd,
- }
- this.$refs.freightRate.openDialog(obj, ids.join(','))
- },
- checkSubmit() {
- if (this.selectionList.filter(item => item.whetherExtractCost==1).length) {
- this.$confirm('已提取成本,是否再次提取?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.costSubmit()
- })
- } else {
- this.costSubmit()
- }
- },
- costSubmit() {
- let podId = []
- let destinationId = []
- let airlineId = []
- let shipNameId = []
- let shippingCompanyId = []
- let boxBelongsTo = []
- let etd = []
- let voyag = []
- let obj = {}
- let billsIds = []
- for (let item of this.selectionList) {
- if (item.status == 3) {
- return this.$message.error("单据已提交审核,请重新选择");
- }
- if (item.polId) podId.push(item.polId)
- if (item.podId) destinationId.push(item.podId)
- if (item.lineId) airlineId.push(item.lineId)
- if (item.vesselId) shipNameId.push(item.vesselId)
- if (item.carrierId) shippingCompanyId.push(item.carrierId)
- if (item.voyageNo) voyag.push(item.voyageNo)
- if (item.boxBelongsTo) boxBelongsTo.push(item.boxBelongsTo)
- if (item.etd) etd.push(item.etd)
- billsIds.push(item.id)
- }
- if ([...new Set(podId)].length > 1) {
- return this.$message.error("请选择相同的装货港");
- }
- console.log([...new Set(destinationId)])
- if ([...new Set(destinationId)].length > 1) {
- return this.$message.error("请选择相同的卸货港");
- }
- // if ([...new Set(airlineId)].length > 1) {
- // return this.$message.error("请选择相同的航线");
- // }
- // if ([...new Set(shipNameId)].length > 1) {
- // return this.$message.error("请选择相同的船名");
- // }
- console.log([...new Set(shippingCompanyId)])
- if ([...new Set(shippingCompanyId)].length > 1) {
- return this.$message.error("请选择相同的船公司");
- }
- if ([...new Set(boxBelongsTo)].length > 1) {
- return this.$message.error("请选择相同的箱属");
- }
- if ([...new Set(etd)].length > 1) {
- return this.$message.error("请选择相同的ETD");
- }
- obj = {
- podId: podId[0],
- destinationId: destinationId[0],
- shippingCompanyId: shippingCompanyId[0],
- businessType: boxBelongsTo[0],
- etd: etd[0]
- }
- this.$refs.extractionCost.inTemplate(obj, billsIds.join(','))
- },
- checkBills() {
- for (let item of this.selectionList) {
- if (item.status != 0) {
- return this.$message.error("单据已提交审核,请勿重复操作");
- }
- }
- let ids = []
- for (let item of this.selectionList) {
- ids.push(item.id)
- }
- let obj = {
- billsIds: ids.join(","),
- url: '/iosBasicData/SeafreightExportF/bills/approvalDetails',
- pageStatus: "this.$store.getters.approvalDetails",
- pageLabel: "海运出口(F)",
- }
- this.$confirm('是否批量单据请核?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- checkBillsBatch(obj).then(res => {
- this.$message.success("操作成功!");
- this.onLoad(this.page, this.query);
- }).finally(() => {
- loading.close();
- })
- })
- },
- importTemplate() {
- if (!this.templateList.length) {
- return this.$message.error("暂无模板数据,请先维护");
- }
- let billsIds = []
- for (let item of this.selectionList) {
- billsIds.push(item.id)
- }
- let obj = {
- billsIds: billsIds.join(","),
- templateId: this.templateId,
- dc: this.dc,
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- templateImportBatch(obj).then(res => {
- this.$message.success("操作成功!");
- this.templateDialog = false
- this.onLoad(this.page, this.query);
- }).finally(() => {
- loading.close();
- })
- },
- templateImport(dc) {
- for (let item of this.selectionList) {
- if (item.status != 0) {
- return this.$message.error("单据已提交审核,请勿重复操作");
- }
- if (!item.carrierId) {
- return this.$message.error("请先维护船公司");
- }
- if (item.carrierId != this.selectionList[0].carrierId) {
- return this.$message.error("请选择同一个船公司");
- }
- }
- this.templateId = null
- this.dc = dc
- this.templateData = []
- this.templateList = []
- this.templateDialog = true
- let obj = {
- current: 1,
- size: 100,
- status: 0,
- type: 'HYCK',
- dc: this.dc,
- shippingCompanyId: this.selectionList[0].carrierId,
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- getListTemplate(obj).then(res => {
- this.templateData = res.data.data.records
- if (res.data.data.records.length) {
- this.templateId = res.data.data.records[0].id
- getListTemplatelist({ current: 1, size: 100, pid: res.data.data.records[0].id }).then(res => {
- this.templateList = res.data.data.records
- })
- }
- }).finally(() => {
- loading.close();
- })
- },
- pleaseVerify(dc) {
- let ids = []
- for (let item of this.selectionList) {
- ids.push(item.id)
- }
- let obj = {
- type: 'HYCK',
- dc: dc,
- ids: ids.join(",")
- }
- this.$confirm('是否请核费用?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- pleaseVerifyCostBatch(obj).then(res => {
- this.$message.success("操作成功");
- this.refreshChange()
- }).finally(() => {
- loading.close();
- })
- })
- },
- // 左侧选择
- nodeClick(e) {
- this.templateId = e.id
- getListTemplatelist({ current: 1, size: 100, pid: e.id }).then(res => {
- this.templateList = res.data.data.records
- })
- },
- rowStyle({ row, column, rowIndex, columnIndex }) {
- if (row.status == 2) {
- return {
- // color: '#fff',
- backgroundColor: "#fbd26a"
- };
- }
- if (row.status == 3) {
- return {
- // color: '#fff',
- backgroundColor: "#ced094"
- };
- }
- if (row.status == 4) {
- return {
- // color: '#fff',
- backgroundColor: "#fbc4c4"
- };
- }
- },
- //导出
- outExport() {
- this.$confirm("是否导出当前所有数据?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let queryParams = {};
- queryParams = {
- businessType: "SE",
- seaType: "E",
- ...this.query
- };
- delete queryParams.billStatus;
- const routeData = this.$router.resolve({
- path: "/api/blade-los/bills/exportBills", //跳转目标窗口的地址
- query: {
- "Blade-Auth": getToken(),
- ...queryParams //括号内是要传递给新窗口的参数
- }
- });
- window.open(routeData.href.slice(1, routeData.href.length));
- });
- },
- // 发送EDI
- editypesSendingEdifun(row) {
- row.billId = this.ids;
- editypesSendingEdi(row).then(res => {
- console.log(res)
- this.$message.success(res.data.msg);
- this.onLoad(this.page);
- });
- },
- // 获取EDI列表数据
- editypesListfun() {
- editypesList(1, 1000).then(res => {
- console.log("EDI", res.data.data.records);
- this.ediData = res.data.data.records;
- this.ediData_SO = res.data.data.records.filter(
- r => r.groupName == "SO"
- );
- this.ediData_SI = res.data.data.records.filter(
- r => r.groupName == "SI"
- );
- console.log(this.ediData_SO, this.ediData_SI);
- });
- },
- // // 展开和收起
- // shiftCollapsiable() {
- // this.fold = !this.fold;
- // if (this.fold) {
- // this.option.searchMenuSpan = 18;
- // } else {
- // this.option.searchMenuSpan = 6;
- // }
- // },
- // 下拉的回调
- corpChange(value, name) {
- this.query[name] = value;
- },
- // 获取签单方式字典数据
- getWorkDictsfun() {
- getWorkDicts("issue_type_F").then(res => {
- this.issueTypeData = res.data.data;
- this.findObject(this.option.column, "issueType").dicData =
- res.data.data;
- });
- },
- // tabs切换筛选
- handleClick(tab, event) {
- // if (this.query.billStatus == 4) {
- // this.query.billStatus = null;
- // }
- this.onLoad(this.page, this.query);
- },
- // 获取委托人数据
- // corpBcorpslistByType(cnName) {
- // getBcorpslistByType(1, 10, { cnName, status: 0 }).then(res => {
- // this.corpData = res.data.data.records
- // this.findObject(this.option.column, "corpCnName").dicData = res.data.data.records
- // })
- // },
- // 获取收货人数据
- hConsigneeBcorpslistByType(cnName) {
- getBcorpslistByType(1, 10, { cnName, status: 0 }).then(res => {
- this.hConsigneeData = res.data.data.records;
- this.findObject(
- this.option.column,
- "hConsigneeCnName"
- ).dicData = res.data.data.records;
- });
- },
- // 获取船名
- vesselBvesselsListfun(enName) {
- getBvesselsList(1, 10, { enName, status: 0 }).then(res => {
- this.vesselData = res.data.data.records;
- this.findObject(this.option.column, "vesselEnName").dicData =
- res.data.data.records;
- });
- },
- // 获取船公司数据
- carrierBcorpslistByTypefun(enName) {
- let corpTypeName = "船公司";
- getBcorpslistByType(1, 10, {
- enName,
- status: 0,
- corpTypeName
- }).then(res => {
- this.carrierData = res.data.data.records;
- this.findObject(this.option.column, "carrierEnName").dicData =
- res.data.data.records;
- });
- },
- // 卸货港数据
- podBportsListfun(enName) {
- bportsList(1, 10, { enName, status: 0 }).then(res => {
- this.podData = res.data.data.records;
- this.findObject(this.option.column, "podEnName").dicData =
- res.data.data.records;
- });
- },
- // 航线数据
- lineBlinesListfun(cnName) {
- blinesList(1, 10, { cnName, status: 0 }).then(res => {
- this.lineData = res.data.data.records;
- this.findObject(this.option.column, "lineCnName").dicData =
- res.data.data.records;
- });
- },
- // 获取场站数据
- cyBcorpslistByType(cnName) {
- let corpTypeName = "场站";
- getBcorpslistByType(1, 10, {
- cnName,
- status: 0,
- corpTypeName
- }).then(res => {
- this.cyData = res.data.data.records;
- this.findObject(this.option.column, "cyCnName").dicData =
- res.data.data.records;
- });
- },
- // 订舱代理
- bookingAgentBcorpsListfun(cnName) {
- let corpTypeName =
- "国内直接客户,国内同行及代理,国外直接客户,国外同行及代理";
- getBcorpslistByType(1, 10, {
- cnName,
- status: 0,
- corpTypeName
- }).then(res => {
- this.bookingAgentData = res.data.data.records;
- this.findObject(
- this.option.column,
- "bookingAgentCnName"
- ).dicData = res.data.data.records;
- });
- },
- // 获取核算部分数据 // 机构管理接口
- createDeptLzylistfun() {
- getDeptTree().then(res => {
- this.createDeptData = res.data.data;
- this.findObject(this.option.column, "createDeptName").dicData =
- res.data.data;
- });
- },
- // 获取业务状态字典数据
- billStatusWorkDictsfun() {
- getWorkDicts("bill_status").then(res => {
- this.billStatusData = res.data.data;
- });
- getWorkDicts("KHDC_Status").then(res => {
- this.khdcStatus = res.data.data;
- });
- },
- // 获取财务状态字典数据
- accountStatusWorkDictsfun() {
- getWorkDicts("account_status").then(res => {
- this.accountStatusData = res.data.data;
- });
- },
- // 获取业务审核状态
- statusWorkDictsfun() {
- getWorkDicts("audit_status_los").then(res => {
- this.auditStatusList = res.data.data;
- });
- },
- // 添加到主单
- increaseMawb() {
- this.radioRow = {}
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- // 判断是否可以编辑别人业务 true 就没有权限
- if (this.ModifyOthersfun()) return;
- const obj = this.selectionList[0];
- for (let item of this.selectionList) {
- if (item.billType != "MH") {
- this.$message.warning("请选择分单");
- return;
- }
- // if (obj.placeReceiptId != item.placeReceiptId) {
- // // 收货地
- // this.$message.warning("请选择收货地相同的");
- // return;
- // }
- if (obj.polId != item.polId) {
- // 装货港一样
- this.$message.error("请选择装货港相同的单据");
- return;
- }
- if (obj.podId != item.podId) {
- // 装货港一样
- this.$message.error("请选择卸货港相同的单据");
- return;
- }
- }
- // this.mawbQuery.placeReceiptName = obj.placeReceiptName;
- // this.mawbQuery.polCnName = obj.polCnName;
- this.$nextTick(() => {
- this.dialogVisible = true;
- this.mawbOnLoad(this.mawbPage);
- });
- },
- // 判断是否可以编辑别人业务
- ModifyOthersfun() {
- let sumArr = [];
- const h = this.$createElement;
- // 判断是否有权限
- // if (
- // this.saberUserInfo.role_name.indexOf("admin") != -1
- // ? this.saberUserInfo.role_name.indexOf(
- // "允许修改他人业务"
- // ) != -1
- // : false
- // )
- // return false;
- // 当前登录人和选择的创建人对比是不是一个人
- // for (let item of this.selectionList) {
- // if (this.saberUserInfo.user_id != item.createUser) {
- // sumArr.push(
- // h("p", `你没有"允许修改他人业务"权限,请重新选择数据`)
- // );
- // }
- // }
- if (sumArr.length != 0) {
- this.$confirm("提示", {
- message: h("div", sumArr),
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).catch(err => { });
- return true;
- }
- },
- // 退舱
- Disembarkingfun() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- // 判断是否可以编辑别人业务 true 就没有权限
- if (this.ModifyOthersfun()) return;
- this.billsDisembarkingfun(this.ids);
- },
- // 退舱接口
- billsDisembarkingfun(ids) {
- billsDisembarking(ids).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.onLoad(this.page);
- });
- },
- // 撤销退仓
- revokeWithdrawalfun() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.billsRevokeDisembarkingfun(this.ids);
- },
- // 撤销退舱接口
- billsRevokeDisembarkingfun(ids) {
- billsRevokeDisembarking(ids).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.onLoad(this.page);
- });
- },
- // 下拉显示数据
- async expandChange(row) {
- if (row.billType == "MM") {
- this.SplitLoading = true;
- const res = await billsListAll({ masterId: row.id });
- this.$set(row, "billsListAllData", res.data.data);
- this.SplitLoading = false;
- } else {
- this.$refs.crud.toggleRowExpansion(row, false);
- }
- },
- // 弹窗单选
- radioInput(row) {
- console.log(row, 2134);
- this.radioRow = row
- console.log(this.dialogRadio, 2083);
- },
- // 弹窗确认
- AddToMainOrder() {
- if (!this.dialogRadio) {
- this.$message.warning("请选择一条数据");
- return;
- }
- if (this.radioRow.status == 3) {
- this.$message.error("此单据已审核通过,请重新选择!");
- return;
- }
- increaseReinsurancePolicyTeu(this.ids, this.dialogRadio).then(res => {
- if (res.data.data == '操作成功') {
- this.billsIncreaseReinsurancePolicyfun(this.ids, this.dialogRadio);
- } else {
- this.$confirm(res.data.data, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.billsIncreaseReinsurancePolicyfun(this.ids, this.dialogRadio);
- }).catch(() => {
- this.dialogRadio = null;
- this.dialogVisible = false;
- });
- }
- });
- },
- // 添加到主单接口
- billsIncreaseReinsurancePolicyfun(ids, id) {
- billsIncreaseReinsurancePolicy(ids, id).then(res => {
- this.dialogRadio = null;
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.dialogVisible = false;
- this.onLoad(this.page);
- });
- },
- // 弹窗关闭
- handleClose(done) {
- done();
- },
- toAddEdit() {
- this.datekey = Date.now();
- },
- // 详情的返回列表
- goBack() {
- // 初始化数据
- this.pageIds = []
- // this.detailData = this.$options.data().detailData;
- if (JSON.stringify(this.$route.query) != "{}") {
- this.$router.$avueRouter.closeTag();
- this.$router.push({
- path: "/iosBasicData/SeafreightExportF/bills/index"
- });
- }
- this.isShow = true;
- this.onLoad(this.page, this.search);
- this.$store.commit("OUT_SEAFE_DETAIL");
- },
- // 新增弹窗开启
- addbtnfun(type) {
- this.pageIds = []
- this.detailData.seeDisabled = false;
- this.detailData.billType = type;
- this.isShow = false;
- this.$store.commit("IN_SEAFE_DETAIL");
- },
- allClick(name) {
- if (name == '修改单据类型') {
- // if (this.selectionList.length !== 1) {
- // this.$message.warning("请选择一条数据");
- // return;
- // }
- for (let item of this.selectionList) {
- if (item.status != 0) {
- return this.$message.error("请选择未审核的单据");
- }
- }
- this.$DialogForm.show({
- title: "修改单据类型",
- width: "300px",
- menuPosition: "right",
- option: {
- submitText: "确认",
- emptyText: "取消",
- span: 24,
- column: [
- {
- label: "单据类型",
- prop: "billType",
- type: 'select',
- dicData: [
- {
- label: "直单",
- value: "DD"
- },
- {
- label: "主单",
- value: "MM"
- },
- {
- label: "分单",
- value: "MH"
- }
- ],
- span: 24
- }
- ]
- },
- beforeClose: done => {
- done();
- },
- callback: res => {
- res.done();
- // this.detailData.seeDisabled = false;
- // this.detailData.id = this.selectionList[0].id;
- // this.isShow = false;
- let ids = []
- for (let item of this.selectionList) {
- ids.push(item.id)
- }
- let obj = {
- ids: ids.join(','),
- billType: res.data.billType
- }
- updateBillType(obj).then(res => {
- this.refreshChange()
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- })
- // this.$nextTick(() => {
- // this.$refs.billsDetails.pageLoading = true;
- // this.$refs.billsDetails.billsCopyBillsfun(
- // this.selectionList[0].id,
- // res.data.checkbox
- // );
- // });
- // this.$store.commit("IN_SEAFE_DETAIL");
- res.close();
- }
- });
- }
- },
- // 复制单据
- CopyDocumentsfun() {
- if (this.selectionList.length !== 1) {
- this.$message.warning("请选择一条数据");
- return;
- }
- this.$DialogForm.show({
- title: "复制单据",
- width: "300px",
- menuPosition: "right",
- data: { checkbox: "" },
- option: {
- submitText: "确认",
- emptyText: "取消",
- span: 24,
- column: [
- {
- label: "单据类型",
- prop: "billType",
- type: "select",
- value: this.selectionList[0].billType,
- dicData: [
- {
- label: '直单',
- value: 'DD'
- },
- {
- label: '主单',
- value: 'MM'
- },
- {
- label: '分单',
- value: 'MH'
- }
- ],
- dataType: "string",
- span: 24
- },
- {
- label: "复制类型",
- prop: "checkbox",
- type: "checkbox",
- dicData: [
- {
- label: "复制费用",
- value: "复制费用"
- },
- {
- label: "复制箱型箱量",
- value: "复制箱型箱量"
- },
- {
- label: "复制配箱信息",
- value: "复制配箱信息"
- }
- ],
- dataType: "string",
- span: 24
- }
- ]
- },
- beforeClose: done => {
- done();
- },
- callback: res => {
- res.done();
- this.detailData.seeDisabled = false;
- this.detailData.id = this.selectionList[0].id;
- this.isShow = false;
- this.$nextTick(() => {
- this.$refs.billsDetails.pageLoading = true;
- this.$refs.billsDetails.billsCopyBillsfun(
- this.selectionList[0].id,
- res.data.checkbox,
- res.data.billType
- );
- });
- this.$store.commit("IN_SEAFE_DETAIL");
- res.close();
- }
- });
- },
- // 编辑详情打开
- rowCellfun(id, row) {
- this.pageIds = []
- this.data.forEach(item => {
- this.pageIds.push(item.id)
- })
- this.detailData = {
- id: id
- };
- if (row) {
- if (
- this.saberUserInfo.role_name.indexOf("admin") == -1
- ? this.saberUserInfo.role_name.indexOf(
- "允许修改他人业务"
- ) == -1
- ? this.saberUserInfo.user_id == row.createUser
- : true
- : true
- ) {
- this.detailData.seeDisabled = false;
- } else {
- this.detailData.seeDisabled = true;
- }
- } else {
- this.detailData.seeDisabled = false;
- }
- this.isShow = false;
- this.$nextTick(() => {
- this.$refs.billsDetails.pageLoading = true;
- this.$refs.billsDetails.billsDetailfun(id);
- });
- this.$store.commit("IN_SEAFE_DETAIL");
- },
- rowSave(row, done, loading) {
- billsSubmit(row).then(
- () => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- done();
- },
- error => {
- loading();
- window.console.log(error);
- }
- );
- },
- rowUpdate(row, index, done, loading) {
- billsSubmit(row).then(
- () => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- done();
- },
- error => {
- loading();
- console.log(error);
- }
- );
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return billsRemove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- });
- },
- // 批量删除
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- // 判断是否可以编辑别人业务 true 就没有权限
- if (this.ModifyOthersfun()) return;
- // 已经提交请核的提示不让删除
- let sumArr = [];
- const h = this.$createElement;
- for (let item of this.selectionList) {
- if (item.status == 1) {
- sumArr.push(
- h(
- "p",
- `序号${item.$index + 1}的数据已经提交请核请勿删除`
- )
- );
- }
- }
- if (sumArr.length != 0) {
- this.$confirm("提示", {
- message: h("div", sumArr),
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return billsRemove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- billsDetail(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- searchReset() {
- this.query = {};
- this.query.billSort = this.query.billSort
- ? this.query.billSort
- : "1";
- this.onLoad(this.page);
- },
- // 搜索
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- // // 判断检索条件是否可以使用
- // if(this.etdDisabled) {
- // this.query.etdList = this.etdList
- // }else {
- // delete params.etdList
- // }
- // if(this.etaDisabled) {
- // this.query.etaList = this.etaList
- // }else {
- // delete params.etaList
- // }
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- // 列表获取数据
- onLoad(page, params = {}) {
- this.loading = true;
- billsList(page.currentPage, page.pageSize, {
- ...Object.assign(params, this.query),
- businessType: "SE",
- seaType: "E",
- // status: this.query.billStatus == 3 ? 3 : undefined
- }).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records.map(item => {
- item.billsListAllData = [];
- item.billStatus = item.billStatus + "";
- item.accountStatus = item.accountStatus + "";
- item.status = item.status + "";
- return item;
- });
- this.$nextTick(() => {
- this.$refs.crud.doLayout();
- this.$refs.crud.dicInit();
- });
- this.loading = false;
- this.selectionClear();
- });
- },
- // 弹窗表格获取数据
- mawbOnLoad(page, params = {}) {
- this.mawbloading = true;
- billsListAll({
- ...Object.assign(params, this.mawbQuery),
- businessType: "SE",
- polId: this.selectionList[0].polId,
- podId: this.selectionList[0].podId
- }).then(res => {
- const data = res.data.data;
- // this.mawbPage.total = data.total;
- this.mawbData = data;
- this.mawbloading = false;
- });
- },
- // 弹窗列表的分页
- mawbSizeChange(val) {
- this.mawbPage.pageSize = val;
- this.mawbOnLoad(this.mawbPage, this.mawbQuery);
- },
- // 弹窗列表的分页
- mawbCurrentChange(val) {
- this.mawbPage.currentPage = val;
- this.mawbOnLoad(this.mawbPage, this.mawbQuery);
- },
- // 弹窗的搜索
- mawbSearch(params, done) {
- this.mawbQuery = params;
- this.mawbPage.currentPage = 1;
- this.mawbOnLoad(this.mawbPage, params);
- done();
- },
- //自定义列保存
- async saveColumn(ref, option, optionBack, code) {
- /**
- * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
- * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
- * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
- */
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- this.selectionList = []
- this.searchReset()
- }
- },
- //自定义列重置
- async resetColumn(ref, option, optionBack, code) {
- this[option] = this[optionBack];
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
- if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
- this.option.searchMenuSpan = 12
- this.option.column.forEach(item => {
- if (item.prop == 'branchId') {
- item.search = true
- }
- if (item.prop == 'branchName') {
- item.hide = false
- // item.showColumn = true
- }
- })
- }
- if (inSave) {
- this.$message.success("重置成功");
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- this.selectionList = []
- this.searchReset()
- }
- },
- // 更改表格颜色
- headerClassName(tab) {
- // //颜色间隔
- let back = "";
- if (tab.columnIndex >= 0 && tab.column.level === 1) {
- if (tab.columnIndex % 2 === 0) {
- back = "back-one";
- } else if (tab.columnIndex % 2 === 1) {
- back = "back-two";
- }
- }
- return back;
- }
- }
- };
- </script>
- <style scoped>
- ::v-deep#out-table .back-one {
- background: #ecf5ff !important;
- text-align: center;
- }
- ::v-deep#out-table .back-two {
- background: #ecf5ff !important;
- text-align: center;
- }
- /deep/ .el-col-md-8 {
- width: 24.33333%;
- }
- ::v-deep.el-form-item {
- margin-bottom: 0;
- }
- </style>
|