| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009 |
- <template>
- <div>
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="goBack()">返回列表 </el-button>
- <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
- <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">下一票</el-button>
- </div>
- <div class="add-customer-btn">
- <el-button size="small" :disabled="!form.id" @click="$refs.print.openDialog()">预 览 </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1" size="small" :disabled="!form.id" @click="$refs.report.openDialog()">报表设计 </el-button>
- <!-- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small"
- @click="allClick('预定订舱')">预定订舱
- </el-button>-->
- <!-- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" v-if="editButton"
- :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
- @click="inEdit">编 辑
- </el-button> -->
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" @click="allClick('模板保存')"
- >模板保存
- </el-button>
- <el-button
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="success"
- size="small"
- :disabled="isSaveBtn || editDisabled"
- @click="allClick('导入模板')"
- >导入模板
- </el-button>
- <el-button
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="primary"
- size="small"
- :disabled="isSaveBtn || editDisabled"
- @click="submit"
- >保 存
- </el-button>
- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small" @click="allClick('退舱')"
- >退 舱
- </el-button>
- <el-button
- v-if="form.id && form.issueStatus == 0"
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="success"
- size="small"
- :disabled="form.issueStatus == 1 || form.issueStatus == 2"
- @click="allClick('提交订舱')"
- >提交订舱
- </el-button>
- <el-button
- v-if="form.issueStatus == 2"
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="danger"
- size="small"
- @click="allClick('撤销订舱')"
- >撤销订舱
- </el-button>
- <el-button
- v-if="form.issueStatus == 1 || form.issueStatus == 2"
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="danger"
- size="small"
- @click="allClick('提单修改')"
- >截单SI修改
- </el-button>
- <el-button
- v-if="form.issueStatus == 1 || form.issueStatus == 2"
- class="el-button--small-yh"
- style="margin-left: 6px;"
- type="success"
- size="small"
- :disabled="flxDisabled"
- @click="allClick('提单确认')"
- >确认提交
- </el-button>
- <!-- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
- :disabled="form.status != 0 || form.issueStatus == 1" @click="application">提单确认
- </el-button> -->
- <!-- <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
- size="small" @click="revokeApplication">撤销单据请核
- </el-button> -->
- <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
- <el-button size="small" type="warning" style="margin-left: 8px" :disabled="isSaveBtn || editDisabled || showLock">
- 导入模板<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item v-for="item in imporiData" :key="item.id" @click.native="importData2(item.id)">{{ item.name }} </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <!-- <el-dropdown style="line-height: 0">
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
- size="small">
- 审 批<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- </div>
- </div>
- <div style="margin-top: 50px">
- <el-tabs type="border-card">
- <el-tab-pane label="基础信息">
- <trade-card title="基础信息">
- <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm" :disabled="editDisabled">
- <el-row>
- <el-col span="12">
- <el-row>
- <el-col span="12">
- <el-form-item label="船公司客服" prop="customerServiceName">
- <dic-select
- v-model="form.customerServiceName"
- placeholder="船公司客服"
- :key="form.branchId"
- label="realName"
- :url="'/blade-user/userListAll?roleAlias=客服&deptId=' + form.branchId"
- :filterable="true"
- @selectChange="dicChange('customerServiceName', $event)"
- :disabled="editDisabled"
- ></dic-select>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="B/L NO" prop="hblno">
- <el-input style="width: 100%;" v-model="form.hblno" size="small" :disabled="true" clearable placeholder="HB/L NO"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-row>
- <el-form-item label="发货人" prop="hshipperDetails">
- <el-input
- type="textarea"
- style="width: 100%;"
- v-model="form.detail.hshipperDetails"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- :rows="7"
- clearable
- placeholder="请输入发货人提单描述"
- @change="textareaBlur('hshipperDetails', $event)"
- ></el-input>
- </el-form-item>
- </el-row>
- <el-row>
- <el-form-item label="收货人" prop="hconsigneeDetails">
- <el-input
- type="textarea"
- style="width: 100%;"
- v-model="form.detail.hconsigneeDetails"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- :rows="7"
- clearable
- placeholder="请输入收货人提单描述"
- @change="textareaBlur('hconsigneeDetails', $event)"
- ></el-input>
- </el-form-item>
- </el-row>
- <el-row>
- <el-form-item label="通知人" prop="hnotifyDetails">
- <el-input
- type="textarea"
- style="width: 100%;"
- v-model="form.detail.hnotifyDetails"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- :rows="7"
- clearable
- placeholder="请输入通知人提单描述"
- @change="textareaBlur('hnotifyDetails', $event)"
- ></el-input>
- </el-form-item>
- </el-row>
- </el-col>
- <el-col span="12">
- <el-row>
- <el-form-item
- label="唛头"
- prop="marks"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- type="textarea"
- style="width: 100%;"
- v-model="form.marks"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- :rows="7"
- clearable
- placeholder="请输入唛头"
- @change="textareaBlur2('marks', $event)"
- ></el-input>
- </el-form-item>
- </el-row>
- <el-row>
- <el-form-item
- label="货物"
- prop="commodityDescr"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- type="textarea"
- style="width: 100%;"
- v-model="form.commodityDescr"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- :rows="15"
- clearable
- placeholder="请输入提单上货物描述"
- @change="textareaBlur2('commodityDescr', $event)"
- ></el-input>
- </el-form-item>
- </el-row>
- </el-col>
- </el-row>
- </el-col>
- <el-col span="12">
- <el-row>
- <el-col span="12">
- <el-form-item label="船名" prop="vesselCnName">
- <el-input
- style="width: 100%;"
- v-model="form.vesselCnName"
- size="small"
- :disabled="true"
- clearable
- placeholder="船名"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="航次" prop="voyageNo">
- <el-input style="width: 100%;" v-model="form.voyageNo" size="small" :disabled="true" clearable placeholder="航次"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item
- label="起运港"
- prop="polCnName"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <dic-select
- ref="pol"
- v-model="form.polCnName"
- placeholder="起运港"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bports/list?current=1&size=5"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="dicChange('polCnName', $event)"
- :disabled="editDisabled || !flxDisabled"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- <el-input
- style="width: 100%;"
- v-model="form.polNamePrint"
- size="small"
- :disabled="editDisabled || !flxDisabled"
- clearable
- placeholder="装货港"
- @change="textareaBlur2('polNamePrint', $event)"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item
- label="卸货港"
- prop="podCnName"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <dic-select
- ref="pod"
- v-model="form.podCnName"
- placeholder="卸货港"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bports/list?current=1&size=5"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="dicChange('podCnName', $event)"
- :disabled="editDisabled || !flxDisabled"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- <el-input
- style="width: 100%;"
- v-model="form.podNamePrint"
- size="small"
- :disabled="editDisabled || !flxDisabled"
- clearable
- placeholder="卸货港"
- @change="textareaBlur2('podNamePrint', $event)"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="交货地" prop="placeDeliveryName">
- <dic-select
- ref="placeDelivery"
- v-model="form.placeDeliveryName"
- placeholder="交货地"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bports/list?current=1&size=5"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="dicChange('placeDeliveryName', $event)"
- :disabled="editDisabled || !flxDisabled"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- <el-input
- style="width: 100%;"
- v-model="form.placeDeliveryNamePrint"
- size="small"
- :disabled="editDisabled || !flxDisabled"
- clearable
- placeholder="交货地"
- @change="textareaBlur2('placeDeliveryNamePrint', $event)"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item
- label="HS CODE"
- prop="hscode"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- style="width: 100%;"
- v-model="form.hscode"
- size="small"
- :disabled="editDisabled"
- clearable
- placeholder="HS CODE"
- ></el-input>
- <el-input
- style="width: 100%;"
- v-model="form.commodityCnName"
- size="small"
- :disabled="editDisabled"
- clearable
- placeholder="英文名称"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item
- label="ETD"
- prop="etd"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-date-picker
- v-model="form.etd"
- type="date"
- placeholder="请选择 ETD"
- :disabled="editDisabled"
- size="small"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- style="width: 100%;"
- @selectChange="dicChange('ETD', $event)"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="订舱日期" prop="bookingDate">
- <el-date-picker
- v-model="form.bookingDate"
- type="date"
- placeholder="请选择 订舱日期"
- :disabled="editDisabled"
- size="small"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- style="width: 100%;"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item
- label="付款方式"
- prop="mpaymode"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <dic-select
- v-model="form.mpaymode"
- placeholder="付款方式"
- key="dictKey"
- label="dictValue"
- keyValue="dictKey"
- url="/blade-system/dict-biz/dictionary?code=payment_method_los"
- :filterable="true"
- :disabled="editDisabled"
- ></dic-select>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item
- label="运输条款"
- prop="serviceTerms"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <dic-select
- v-model="form.serviceTerms"
- placeholder="运输条款"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bserviceterms/list?status=0¤t=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- :disabled="editDisabled"
- ></dic-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item
- label="总件数"
- prop="quantity"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- style="width: 100%;"
- v-model="form.quantity"
- size="small"
- autocomplete="off"
- min="1"
- :disabled="editDisabled"
- clearable
- placeholder="请输入 件数"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item
- label="包装"
- prop="packingUnit"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <dic-select
- v-model="form.packingUnit"
- placeholder="包装"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bpackages/list?current=1&size=5&status=0&whetherDg=0"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="dicChange('packingUnit', $event)"
- :disabled="editDisabled"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item
- label="总重量(KGS)"
- prop="grossWeight"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- style="width: 100%;"
- v-model="form.grossWeight"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- clearable
- placeholder="请输入 总重量"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item
- label="总体积(CBM)"
- prop="measurement"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- style="width: 100%;"
- v-model="form.measurement"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- clearable
- placeholder="请输入 总体积(CBM)"
- >
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <!--
- <el-form-item label="所属公司" prop="branchName">
- <dic-select v-model="form.branchName" placeholder="所属公司" key="id" label="deptName"
- url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
- @selectChange="dicChange('branchName', $event)" :default="true"
- :disabled="editDisabled || roleName.includes('secondaryAdmin')"></dic-select>
- </el-form-item>
- </el-col>-->
- <el-col span="24">
- <el-row>
- <el-col span="12">
- <el-form-item
- label="货类"
- prop="cargoType"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-select v-model="form.cargoType" placeholder="请选择 货类" :disabled="editDisabled" size="small" style="width: 100%;">
- <el-option v-for="item in cargoTypeData" :key="item.value" :label="item.label" :value="item.value"> </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="签单方式" prop="issueType">
- <dic-select
- v-model="form.issueType"
- placeholder="签单方式"
- key="dictKey"
- label="dictValue"
- keyValue="dictKey"
- url="/blade-system/dict-biz/dictionary?code=issue_type_F"
- :filterable="true"
- :disabled="detailData.seeDisabled"
- :initData="true"
- ></dic-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="8">
- <el-form-item
- label="联系人"
- prop="contact"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- style="width: 100%;"
- size="small"
- v-model="form.contact"
- :disabled="editDisabled"
- placeholder="文件联络人"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="8">
- <el-form-item
- label="邮箱"
- prop="fileEmail"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- style="width: 100%;"
- size="small"
- v-model="form.fileEmail"
- :disabled="editDisabled"
- placeholder="文件联络人邮箱"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="8">
- <el-form-item
- label="电话"
- prop="fileTel"
- :rules="[
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]"
- >
- <el-input
- style="width: 100%;"
- size="small"
- v-model="form.fileTel"
- :disabled="editDisabled"
- placeholder="文件联络人电话"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col span="12">
- <el-form-item label="订舱备注" prop="cyRemarks">
- <el-input
- type="textarea"
- style="width: 100%;"
- v-model="form.cyRemarks"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- :rows="2"
- clearable
- placeholder="请输入备注"
- @change="textareaBlur('cyRemarks', $event)"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col span="12">
- <el-form-item label="SI备注" prop="siRemarks">
- <el-input
- type="textarea"
- style="width: 100%;"
- v-model="form.siRemarks"
- size="small"
- autocomplete="off"
- :disabled="editDisabled"
- :rows="2"
- clearable
- placeholder="请输入备注"
- @change="textareaBlur('siRemarks', $event)"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-col>
- </el-row>
- </el-form>
- </trade-card>
- <trade-card title="集装箱">
- <avue-crud
- :option="option"
- :data="form.preContainersList"
- id="out-table"
- ref="crud"
- :header-cell-class-name="headerClassName"
- :row-style="{ height: '20px', padding: '0px' }"
- :cell-style="{ height: '20px', padding: '0px' }"
- @selection-change="selectionChange"
- @select="selectHandle"
- @row-update="rowUpdate"
- @resetColumn="resetColumn('crud', 'option', 'optionBack', 512)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 512)"
- >
- <template slot="menuLeft">
- <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('一键保存')">一键保存</el-button>
- <el-button type="info" plain size="small" :disabled="editDisabled" @click="allClick('一键编辑')">一键编辑</el-button>
- <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0" @click="allClick('批量删除')"
- >批量删除</el-button
- >
- <el-button v-if="form.issueStatus > 0" type="success" plain size="small" @click="allClick('提交箱型')">修改预配箱</el-button>
- </template>
- <template slot="indexHeader" slot-scope="{ row, index }">
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled || !form.id" circle @click="addRow()"> </el-button>
- </template>
- <template slot="index" slot-scope="{ row, index }">
- <span>{{ index + 1 }}</span>
- </template>
- <tempalte slot="cntrTypeCodeForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.cntrTypeCode"
- placeholder="箱型"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bcntrtypes/list?current=1&size=5"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('cntrTypeCode', $event, row)"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- <span v-else>{{ row.corpCnName }}</span>
- </tempalte>
- </avue-crud>
- </trade-card>
- <trade-card title="配箱信息">
- <DistributionBox
- :assemblyForm="form"
- :detailData="detailData"
- :showLock="showLock"
- :pleasereviewType="editDisabled"
- @billsAddfun="billsAddfun"
- @billsDetailfun="getDetails(form.id, true)"
- >
- </DistributionBox>
- </trade-card>
- <trade-card title="操作记录">
- <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
- </trade-card>
- </el-tab-pane>
- <el-tab-pane label="费用信息" v-if="false">
- <el-card
- v-show="roleName.indexOf('admin') != -1 || roleName.indexOf('应付修改') != -1 ? true : roleName.indexOf('应付查看') != -1"
- class="box-card"
- style="margin: 2px 0"
- >
- <avue-crud
- :option="feecOption"
- :data="form.feeCenterListC"
- id="out-table"
- ref="crud2"
- :header-cell-class-name="headerClassName"
- :row-style="{ height: '20px' }"
- :cell-style="{ padding: '0px' }"
- @selection-change="feecChange"
- @row-update="rowUpdate"
- @resetColumn="resetColumn('crud2', 'feecOption', 'feecOptionBack', 235.2)"
- @saveColumn="saveColumn('crud2', 'feecOption', 'feecOptionBack', 235.2)"
- >
- <template slot="menuLeft">
- <div style="display: inline-block;margin-right: 20px" class="disabledBox meetSize">
- <i class="el-icon-coin"></i>
- <span>应付费用</span>
- </div>
- <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('费用一键保存')">一键保存</el-button>
- <el-button type="info" plain size="small" :disabled="editDisabled || !form.id" @click="allClick('费用一键编辑')">一键编辑</el-button>
- <el-button type="danger" plain size="small" :disabled="selectionfeecList.length == 0" @click="allClick('费用批量删除')"
- >批量删除</el-button
- >
- <!-- <el-button type="primary" plain size="small" :disabled="selectionfeecList.length == 0"
- @click="allClick('费用申请')">请核费用</el-button> -->
- <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
- </template>
- <template slot="indexHeader" slot-scope="{ row, index }">
- <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled || !form.id" circle @click="feecAddRow()">
- </el-button>
- </template>
- <template slot="index" slot-scope="{ row, index }">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="corpTypeForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.corpType"
- key="id"
- label="cnName"
- res="records"
- url="/blade-los/bcorpstypedefine/list?status=0¤t=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('corpType', $event, row, index)"
- ></dic-select>
- <span v-else>{{ row.corpType }}</span>
- </template>
- <template slot="cntrNoForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.cntrNo"
- key="id"
- label="code"
- :mockData="form.tradingBoxItemsList"
- :filterable="true"
- ></dic-select>
- <span v-else>{{ row.cntrNo }}</span>
- </template>
- <template slot="corpCnNameForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit"
- :key="row.corpType"
- v-model="row.corpCnName"
- placeholder="付费对象"
- label="shortName"
- res="records"
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + row.corpType"
- :filterable="true"
- :remote="true"
- dataName="shortName"
- @selectChange="rowDicChange('corpCnName', $event, row)"
- :slotRight="true"
- rightLabel="code"
- ></dic-select>
- <span v-else>{{ row.corpCnName }}</span>
- <!-- <dic-select v-if="row.$cellEdit" v-model="row.corpCnName" key="id" placeholder="付费对象" label="cnName"
- res="records" url="/blade-los/bcorps/selectList?corpTypeName=船公司&status=0¤t=1&size=20"
- :filterable="true" :remote="true" dataName="cnName"
- @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
- <span v-else>{{ row.corpCnName }}</span> -->
- </template>
- <template slot="feeCnNameForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.feeCnName"
- key="id"
- placeholder="费用名称"
- label="cnName"
- res="records"
- url="/blade-los/bfees/list?status=0¤t=1&size=20"
- :filterable="true"
- :remote="true"
- dataName="cnName"
- @selectChange="rowDicChange('feeCnName', $event, row)"
- ></dic-select>
- <span v-else>{{ row.feeCnName }}</span>
- </template>
- <template slot="curCodeForm" slot-scope="{ row }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.curCode"
- placeholder="币别"
- label="code"
- :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.purchaseDate + '&type=1'"
- :filterable="true"
- @selectChange="rowDicChange('curCodeC', $event, row)"
- ></dic-select>
- <span v-else>{{ row.curCode }}</span>
- </template>
- <template slot="exrateForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit"
- v-model="row.exrate"
- :controls="false"
- placeholder="请输入 汇率"
- size="small"
- style="width: 100%;"
- ></el-input-number>
- <span v-else>{{ row.exrate }}</span>
- </template>
- <template slot="unitNoForm" slot-scope="{ row, index }">
- <dic-select
- v-if="row.$cellEdit"
- v-model="row.unitNo"
- label="cnName"
- url="/blade-los/bunits/listAll?status=0"
- :filterable="true"
- ></dic-select>
- <span v-else>{{ row.unitNo }}</span>
- </template>
- <template slot="priceForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit"
- v-model="row.price"
- :controls="false"
- placeholder="请输入 成本价"
- size="small"
- style="width: 100%;"
- :precision="2"
- @change="countChange(row)"
- ></el-input-number>
- <span v-else>{{ row.price }}</span>
- </template>
- <template slot="quantityForm" slot-scope="{ row }">
- <el-input-number
- v-if="row.$cellEdit"
- v-model="row.quantity"
- :controls="false"
- placeholder="请输入 成本价"
- size="small"
- style="width: 100%;"
- :precision="0"
- @change="countChange(row)"
- ></el-input-number>
- <span v-else>{{ row.quantity }}</span>
- </template>
- <template slot="remarks" slot-scope="{ row }">
- <el-input v-if="row.$cellEdit" v-model="row.remarks" placeholder="请输入 备注" size="small" style="width: 100%;"></el-input>
- <span v-else>{{ row.remarks }}</span>
- </template>
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" icon="el-icon-delete" type="text" @click="polRowDel(row, index)">删 除</el-button>
- </template>
- </avue-crud>
- </el-card>
- </el-tab-pane>
- <el-tab-pane label="文件中心">
- <containerTitle title="上传附件"></containerTitle>
- <c-upload
- :data="form.filesList"
- :enumerationValue="76"
- deleteUrl="/api/blade-los/filescenter/remove"
- display
- :disabled="editButton"
- ></c-upload>
- </el-tab-pane>
- </el-tabs>
- </div>
- <business-reports :id="form.id" ref="print" businessValue="KHTS" :type="true"></business-reports>
- <reports :id="form.id" :assemblyForm="form" businessValue="KHTS" ref="report"></reports>
- <!--审核弹窗-->
- <el-dialog
- append-to-body
- title="审批进度"
- class="el-dialogDeep"
- :visible.sync="checkScheduleDialog"
- width="40%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
- </el-dialog>
- <freight-rate ref="freightRate" @importData="importData" />
- <import-temp ref="importTemp" @importData="importTemp"></import-temp>
- <!--导入模板-->
- <el-dialog title="导入模板" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false" v-dialog-drag>
- <avue-form v-if="excelBox" :option="excelOption" v-model="excelForm" :upload-before="uploadBefore" :upload-after="onSuccess"> </avue-form>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- submit,
- getDetail,
- submitConfirm,
- submitCustomerBooking,
- revokeCustomerBooking,
- submitBookingCabin,
- sendMessageBooking,
- copyAgent,
- pleaseCheck,
- repealCancel,
- submitItemList,
- itemRemove,
- submitFeeList,
- itemFeeRemove,
- getBCorps,
- submitCommonTemplates,
- submitBoxType,
- refundCabin
- } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
- import dicSelect from "@/components/dicSelect/main";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import businessReports from "@/components/boxManagement/businessReportsTS.vue";
- import reports from "@/components/boxManagement/reportsTS.vue";
- import freightRate from "./components/freightRate.vue";
- import importTemp from "./components/importTemp.vue";
- import DistributionBox from "./components/DistributionBox.vue";
- import { billsAdd, deptGetDetailPol } from "@/api/iosBasicData/bills";
- import { getDicinit } from "@/api/dicSelect/index";
- import _ from "lodash";
- import { Header } from "element-ui";
- import { dateFormat } from "@/util/date";
- import { isProcurement } from "@/api/basicData/configuration";
- import { verifyEnglish, checkFullWidthSymbols } from "@/util/date";
- export default {
- name: "detailsPage",
- data() {
- return {
- cargoTypeData: [
- {
- label: "普货",
- value: "dry"
- },
- {
- label: "危险品",
- value: "danger"
- },
- {
- label: "冻柜",
- value: "reefer"
- }
- ],
- excelForm: {},
- excelLoading: false,
- excelOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- {
- label: "模板上传",
- prop: "excelFile",
- type: "upload",
- drag: true,
- loadText: "模板上传中,请稍等",
- span: 24,
- propsHttp: {
- res: "data"
- },
- tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "api/blade-los/templateImport/importOne"
- }
- ]
- },
- excelBox: false,
- imporiData: [
- // { id: 0, name: '导入 ONE 模板' },
- // { id: 1, name: '导入 PIL 订舱模板' },
- // { id: 2, name: '导入截单格式' },
- // { id: 3, name: '导入海信提单' },
- { id: 4, name: "提单样本" }
- ],
- importTemplate: null,
- selectionTemplateList: [],
- selectionfeecList: [],
- feeType: null,
- treeOption: {
- nodeKey: "id",
- // lazy: true,
- addBtn: false,
- menu: false,
- size: "small",
- props: {
- labelText: "标题",
- label: "cnName",
- value: "value",
- children: "children"
- }
- },
- templateData: [],
- templateList: [],
- templateOption: {
- height: 500,
- menu: false,
- addBtn: false,
- editBtn: false,
- delBtn: false,
- viewBtn: false,
- header: false,
- index: true,
- selection: true,
- column: [
- {
- label: "费用",
- prop: "feeCnName",
- overHidden: true
- },
- {
- label: "成本价",
- prop: "price",
- overHidden: true
- },
- {
- label: "币别",
- prop: "curCode",
- overHidden: true
- },
- {
- label: "汇率",
- prop: "curCode",
- overHidden: true
- }
- ]
- },
- templateDialog: false,
- selectionList: [],
- selectionPolList: [],
- selectionPodList: [],
- checkId: "", // 审核需要的id
- batchNo: "",
- checkScheduleDialog: false, // 审核弹窗
- isSaveBtn: false,
- editButton: false,
- editDisabled: false,
- form: {
- branchId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
- branchName: JSON.parse(localStorage.getItem("sysitemData")).deptName,
- // customerServiceName: JSON.parse(localStorage.getItem('sysitemData')).name, // OP 默认登录人
- // customerServiceId: JSON.parse(localStorage.getItem('sysitemData')).id,
- businessType: "KHTS",
- billNoFormat: "KHTS",
- businessTypeCode: "KHTS",
- boxBelongsTo: "SOC",
- cargoType: "dry",
- issueType: "TER", // 签单方式 默认 正本提单
- bookingDate: dateFormat(new Date()),
- polId: null,
- polCode: null,
- polEnName: null,
- polCnName: null,
- polNamePrint: null,
- podId: null,
- podCode: null,
- podEnName: null,
- podCnName: null,
- podNamePrint: null,
- placeDeliveryId: null,
- placeDeliveryCode: null,
- placeDeliveryName: null,
- placeDeliveryNamePrint: null,
- serviceTerms: "CY-CY",
- mpaymode: "PP",
- srcType: "SALES",
- srcId: JSON.parse(localStorage.getItem("sysitemData")).id,
- srcEnName: JSON.parse(localStorage.getItem("sysitemData")).name,
- srcCnName: JSON.parse(localStorage.getItem("sysitemData")).name,
- polFreeBoxUseDays: 7,
- podFreeBoxUseDays: 14,
- loadType: "整箱", // 装箱方式默认整箱
- detail: {},
- preContainersList: [],
- feeCenterListC: [],
- filesList: []
- },
- polFeeList: [],
- podFeeList: [],
- oldForm: {},
- optionForm2: {
- menuBtn: false,
- span: 6,
- disabled: false,
- labelWidth: 100,
- column: [
- {
- label: "系统号",
- prop: "billNo",
- disabled: true
- },
- // {
- // label: 'B/L NO',
- // prop: "hblno",
- // disabled: true,
- // },
- // {
- // label: '船名',
- // prop: "vesselCnName",
- // disabled: true,
- // },
- // {
- // label: '航次',
- // prop: "voyageNo",
- // disabled: true,
- // },
- {
- label: "截单日期",
- prop: "cyTrailerTime",
- disabled: true,
- type: "date",
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- label: "截港日期",
- prop: "cyReturnTime",
- disabled: true,
- type: "date",
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- // {
- // label: '系统号',
- // prop: "businessNo",
- // disabled: true,
- // },
- {
- label: "制单人",
- prop: "createUserName",
- disabled: true
- },
- {
- label: "制单日期",
- prop: "createTime",
- disabled: true
- },
- {
- label: "修改人",
- prop: "updateUserName",
- disabled: true
- },
- {
- label: "修改日期",
- prop: "updateTime",
- disabled: true
- }
- ]
- },
- option: {},
- optionBack: {
- // height: 'auto',
- calcHeight: 30,
- menuWidth: 60,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: "center",
- menu: false,
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true
- },
- {
- label: "箱型",
- prop: "cntrTypeCode",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择箱型",
- trigger: "blur"
- }
- ]
- },
- {
- label: "箱量",
- prop: "quantity",
- overHidden: true,
- cell: true,
- rules: [
- {
- required: true,
- message: "请选择箱型",
- trigger: "blur"
- }
- ]
- }
- ]
- },
- feecOption: {},
- feecOptionBack: {
- // height: 'auto',
- maxHeight: "250",
- calcHeight: 30,
- menuWidth: 60,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: "center",
- menu: false,
- summaryText: "合计",
- showSummary: true,
- sumColumnList: [
- {
- name: "amountCNY",
- type: "sum",
- decimals: 2
- },
- {
- name: "amountUSD",
- type: "sum",
- decimals: 2
- },
- {
- name: "appliedInvoiceAmount",
- type: "sum",
- decimals: 2
- },
- {
- name: "uninvoicedAmount",
- type: "sum",
- decimals: 2
- },
- {
- name: "stlTtlAmount",
- type: "sum",
- decimals: 2
- }
- ],
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true
- },
- // {
- // label: '账单状态',
- // prop: 'accStatus',
- // overHidden: true,
- // width: 80,
- // type: 'select',
- // dicData: [{
- // label: '未生成',
- // value: 0,
- // }, {
- // label: '已生成',
- // value: 1,
- // }],
- // },
- // {
- // label: '审核状态',
- // prop: 'auditStatus',
- // overHidden: true,
- // width: 80,
- // type: 'select',
- // dicData: [{
- // label: '录入',
- // value: '0',
- // }, {
- // label: '提交审核',
- // value: '1',
- // }, {
- // label: '审核中',
- // value: '2',
- // }, {
- // label: '审核通过',
- // value: '4',
- // }],
- // },
- {
- label: "类别",
- prop: "corpType",
- width: 100,
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择类别",
- trigger: "blur"
- }
- ]
- },
- {
- label: "付费对象",
- prop: "corpCnName",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择付费对象",
- trigger: "blur"
- }
- ]
- },
- // {
- // label: "箱号",
- // prop: "cntrNo",
- // width: "100",
- // cell: true,
- // slot: true,
- // formslot: true,
- // overHidden: true,
- // },
- {
- label: "费用名称",
- prop: "feeCnName",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择费用名称",
- trigger: "blur"
- }
- ]
- },
- {
- label: "计量单位",
- prop: "unitNo",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true
- },
- {
- label: "币别",
- prop: "curCode",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请选择币别",
- trigger: "blur"
- }
- ]
- },
- {
- label: "汇率",
- prop: "exrate",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true
- },
- {
- label: "单价",
- prop: "price",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请输入单价",
- trigger: "blur"
- }
- ]
- },
- {
- label: "数量",
- prop: "quantity",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: "请输入数量",
- trigger: "blur"
- }
- ]
- },
- {
- label: "本币",
- prop: "amountCNY",
- width: "100",
- overHidden: true
- },
- {
- label: "外币",
- prop: "amountUSD",
- width: "100",
- overHidden: true
- },
- {
- label: "申请发票金额",
- prop: "appliedInvoiceAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "已开票金额",
- prop: "uninvoicedAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "已结算金额",
- prop: "stlTtlAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "制单人",
- prop: "createUserName",
- width: "100",
- overHidden: true
- },
- {
- label: "制单日期",
- prop: "createTime",
- width: "120",
- overHidden: true
- },
- {
- label: "修改人",
- prop: "updateUserName",
- width: "100",
- overHidden: true
- },
- {
- label: "修改日期",
- prop: "updateTime",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- // cell: true,
- width: 150,
- overHidden: true
- }
- ]
- },
- roleName: [],
- saberUserInfo: null,
- deptId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
- flxDisabled: true,
- verifySymbolStatus: 0
- };
- },
- components: {
- dicSelect,
- checkSchedule,
- businessReports,
- reports,
- freightRate,
- DistributionBox,
- importTemp
- },
- props: {
- detailData: Object,
- pageIds: {
- type: Array, // 指定 prop 的类型为 Array
- default: () => [] // 提供一个默认值,这里使用函数形式返回一个空数组
- }
- },
- async created() {
- this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
- this.roleName = localStorage.getItem("roleName").split(",");
- this.option = await this.getColumnData(this.getColumnName(512), this.optionBack);
- this.feecOption = await this.getColumnData(this.getColumnName(235.2), this.feecOptionBack);
- this.saveLocalCurrency(JSON.parse(localStorage.getItem("sysitemData")).deptId);
- isProcurement({ param: "import.template" }).then(res => {
- this.importTemplate = res.data.data;
- });
- isProcurement({ param: "verify.symbol" }).then(res => {
- this.verifySymbolStatus = res.data.data;
- });
- if (this.detailData && this.detailData.id) {
- this.getDetails(this.detailData.id);
- }
- if (this.$route.query.billId) {
- this.getDetails(this.$route.query.billId);
- }
- if (this.detailData && this.detailData.copyId) {
- this.getCopydate(this.detailData.copyId);
- }
- if (this.detailData.type == "new") {
- if (this.roleName.includes("客户")) {
- let obj = {
- userId: JSON.parse(localStorage.getItem("sysitemData")).id
- };
- getBCorps(obj).then(res => {
- this.form.corpId = res.data.data.id;
- this.form.corpCode = res.data.data.code;
- this.form.corpEnName = res.data.data.enName;
- this.form.corpCnName = res.data.data.cnName;
- this.form.shortName = res.data.data.shortName;
- });
- }
- deptGetDetailPol(this.saberUserInfo.dept_pid.split(",")[0]).then(res => {
- // 装货港
- this.form.polCnName = res.data.data.polCnName;
- this.form.polEnName = res.data.data.polEnName;
- this.form.polId = res.data.data.polId;
- this.form.polCode = res.data.data.polCode;
- this.form.polNamePrint = res.data.data.polEnName;
- });
- }
- this.saveLocalCurrency(this.deptId);
- },
- methods: {
- importTemp(val) {
- delete val.hblno;
- delete val.version;
- delete val.billNo;
- delete val.issueStatus;
- delete val.confirmStatus;
- delete val.detail.id;
- delete val.detail.pid;
- if (this.form.issueStatus == 1 || this.form.issueStatus == 2) {
- delete val.preContainersList;
- }
- const obj = this.deepClone(this.form);
- this.form = {
- ...obj,
- ...val,
- detail: {
- ...obj.detail,
- ...val.detail
- }
- };
- },
- lastPage() {
- if (this.pageIds.length) {
- const index = this.pageIds.indexOf(this.form.id);
- if (index == 0) {
- return this.$message.error("没有上一票了");
- }
- const lastIndex = index - 1;
- // if (this.form.id) {
- // this.unLock({
- // moduleName: "SE",
- // tableName: "SE_order",
- // billId: this.form.id,
- // billNo: this.form.mblno
- // });
- // }
- this.getDetails(this.pageIds[lastIndex]);
- }
- },
- nextPage() {
- if (this.pageIds.length) {
- const index = this.pageIds.indexOf(this.form.id);
- if (this.pageIds[this.pageIds.length - 1] == this.form.id) {
- return this.$message.error("没有下一票了");
- }
- const nextIndex = index + 1;
- // if (this.form.id) {
- // this.unLock({
- // moduleName: "SE",
- // tableName: "SE_order",
- // billId: this.form.id,
- // billNo: this.form.mblno
- // });
- // }
- this.getDetails(this.pageIds[nextIndex]);
- }
- },
- // 提取箱专用的保存
- billsAddfun() {
- billsAdd(this.form).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.getDetails(this.form.id);
- });
- },
- //文档导入
- importData2(row) {
- if (row == 0) {
- this.excelOption.column[0].action = `/api/blade-los/templateImport/importOne?billId=${this.form.id}`;
- } else if (row == 1) {
- this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilBooking?billId=${this.form.id}`;
- } else if (row == 2) {
- this.excelOption.column[0].action = `/api/blade-los/templateImport/importPilCutOffOrders?billId=${this.form.id}`;
- } else if (row == 3) {
- this.excelOption.column[0].action = `/api/blade-los/templateImport/importHisenseBill?billId=${this.form.id}`;
- } else if (row == 4) {
- this.excelOption.column[0].action = `/api/blade-los/templateImport/importBookingCabin`;
- }
- this.excelBox = true;
- },
- // 上传成功
- onSuccess(res, done, loading, column) {
- loading = true;
- if (Object.keys(res).length) {
- // loading = false;
- this.$confirm("此操作将覆盖数据, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- // this.form = res;
- Object.keys(res).forEach(key => {
- if (res[key]) {
- if (key != "detail") {
- // this.form[key] = res[key]
- this.$set(this.form, key, res[key]);
- }
- if (key == "detail") {
- Object.keys(res.detail).forEach(key => {
- if (res.detail[key]) {
- // this.form.detail[key] = res.detail[key]
- this.$set(this.form.detail, key, res.detail[key]);
- }
- });
- }
- }
- });
- this.excelBox = false;
- this.$message.success("导入成功!");
- loading = false;
- done();
- })
- .catch(() => {
- this.excelBox = false;
- loading = false;
- done();
- });
- } else {
- loading = false;
- done();
- }
- },
- countChange(row) {
- if (row.curCode == this.getLocalCurrency()) {
- row.amountCNY = _.round(_.multiply(row.price, row.quantity), 2);
- row.amountUSD = 0;
- } else {
- row.amountCNY = 0;
- row.amountUSD = _.round(_.multiply(row.price, row.quantity), 2);
- }
- },
- importData(row) {
- this.form.preContainersList.forEach(item => {
- if (item.cntrTypeCode == "20GP") {
- item.salesPrice = row.gp20;
- item.costPrice = row.gp20Cost;
- }
- if (item.cntrTypeCode == "40GP") {
- item.salesPrice = row.gp40;
- item.costPrice = row.gp40Cost;
- }
- if (item.cntrTypeCode == "40HC") {
- item.salesPrice = row.hc40;
- item.costPrice = row.hc40Cost;
- }
- });
- this.submit();
- },
- textareaBlur(name, row) {
- this.form.detail[name] = row.toUpperCase();
- },
- textareaBlur2(name, row) {
- this.form[name] = row.toUpperCase();
- },
- rowDicChange(name, row, el, index) {
- if (name == "cntrTypeCode") {
- if (row) {
- if (this.form.preContainersList.filter(item => item.cntrTypeCode == row.cnName).length > 1) {
- el.cntrTypeCodeId = null;
- el.cntrTypeCode = null;
- el.teu = null;
- return this.$message.error("箱型不能重复");
- }
- el.cntrTypeCodeId = row.id;
- el.teu = row.teu;
- } else {
- el.cntrTypeCodeId = null;
- el.cntrTypeCode = null;
- el.teu = null;
- }
- }
- if (name == "curCodeC") {
- if (row) {
- el.exrate = row.exratePayable;
- this.countChange(el);
- } else {
- el.exrate = null;
- el.amountCNY = 0;
- el.amountUSD = 0;
- }
- }
- if (name == "feeCnName") {
- if (row) {
- el.feeId = row.id;
- el.feeCode = row.code;
- } else {
- el.feeId = null;
- el.feeCode = null;
- el.feeCnName = null;
- }
- }
- if (name == "corpType") {
- el.corpId = null;
- el.corpCode = null;
- el.shortName = null;
- el.corpCnName = null;
- el.corpEnName = null;
- }
- if (name == "corpCnName") {
- if (row) {
- el.corpId = row.id;
- el.corpCode = row.code;
- el.shortName = row.shortName;
- el.corpEnName = row.enName;
- } else {
- el.corpId = null;
- el.corpCode = null;
- el.shortName = null;
- el.corpCnName = null;
- el.corpEnName = null;
- }
- }
- },
- async dicChange(name, row) {
- if (name == "packingUnit") {
- if (row) {
- this.form.packingUnitId = row.id;
- } else {
- this.form.branchId = null;
- this.form.packingUnit = null;
- }
- }
- if (name == "branchName") {
- if (row) {
- this.form.branchId = row.id;
- } else {
- this.form.branchId = null;
- this.form.branchName = null;
- }
- }
- if (name == "corpCnName") {
- if (row) {
- this.form.corpId = row.id;
- this.form.corpCode = row.code;
- this.form.corpEnName = row.enName;
- this.form.shortName = row.shortName;
- } else {
- this.form.corpId = null;
- this.form.corpCode = null;
- this.form.corpCnName = null;
- this.form.corpEnName = null;
- this.form.shortName = null;
- }
- }
- if (name == "operatorName") {
- if (row) {
- this.form.operatorName = row.realName;
- this.form.operatorId = row.id;
- } else {
- this.form.operatorName = null;
- this.form.operatorId = null;
- }
- }
- if (name == "customerServiceName") {
- if (row) {
- this.form.customerServiceId = row.id;
- this.form.srcId = row.id;
- this.form.srcEnName = row.name;
- this.form.srcCnName = row.name;
- } else {
- this.form.customerServiceName = null;
- this.form.customerServiceId = null;
- this.form.srcId = null;
- this.form.srcEnName = null;
- this.form.srcCnName = null;
- }
- }
- if (name == "polCnName") {
- if (row) {
- this.form.polId = row.id;
- this.form.polCode = row.code;
- this.form.polEnName = row.enName;
- // this.form.polNamePrint = row.enName;
- if (this.form.polNamePrint) {
- this.$confirm("是否覆盖内容?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.form.polNamePrint = row.enName;
- this.$refs.pol.$refs.mySelect.blur();
- })
- .catch(() => {
- this.$refs.pol.$refs.mySelect.blur();
- });
- } else {
- this.form.polNamePrint = row.enName;
- }
- } else {
- this.form.polId = null;
- this.form.polCode = null;
- this.form.polEnName = null;
- this.form.polCnName = null;
- this.form.polNamePrint = null;
- }
- }
- if (name == "podCnName") {
- if (row) {
- this.form.podId = row.id;
- this.form.podCode = row.code;
- this.form.podEnName = row.enName;
- // this.form.podNamePrint = row.enName;
- if (this.form.podNamePrint) {
- this.$confirm("是否覆盖内容?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.form.podNamePrint = row.enName;
- this.$refs.pod.$refs.mySelect.blur();
- })
- .catch(() => {
- this.$refs.pod.$refs.mySelect.blur();
- });
- } else {
- this.form.podNamePrint = row.enName;
- }
- } else {
- this.form.podId = null;
- this.form.podCode = null;
- this.form.podEnName = null;
- this.form.podCnName = null;
- this.form.podNamePrint = null;
- }
- }
- if (name == "placeDeliveryName") {
- if (row) {
- this.form.placeDeliveryId = row.id;
- this.form.placeDeliveryCode = row.code;
- this.form.podEnName = row.enName;
- // this.form.placeDeliveryNamePrint = row.enName;
- if (this.form.placeDeliveryNamePrint) {
- this.$confirm("是否覆盖内容?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.form.placeDeliveryNamePrint = row.enName;
- this.$refs.placeDelivery.$refs.mySelect.blur();
- })
- .catch(() => {
- this.$refs.placeDelivery.$refs.mySelect.blur();
- });
- } else {
- this.form.placeDeliveryNamePrint = row.enName;
- }
- } else {
- this.form.placeDeliveryId = null;
- this.form.placeDeliveryCode = null;
- // this.form.podEnName = null
- this.form.placeDeliveryName = null;
- this.form.placeDeliveryNamePrint = null;
- }
- }
- if (name == "srcType") {
- this.form.srcId = null;
- this.form.srcEnName = null;
- this.form.srcCnName = null;
- }
- if (name == "OWN") {
- if (row) {
- this.form.srcId = row.id;
- this.form.srcEnName = row.title;
- this.form.srcCnName = row.title;
- } else {
- this.form.srcId = null;
- this.form.srcEnName = null;
- this.form.srcCnName = null;
- }
- }
- if (name == "AGENT") {
- if (row) {
- this.form.srcId = row.id;
- this.form.srcEnName = row.cnName;
- this.form.srcCnName = row.cnName;
- } else {
- this.form.srcId = null;
- this.form.srcEnName = null;
- this.form.srcCnName = null;
- }
- }
- if (name == "SALES") {
- if (row) {
- this.form.srcId = row.id;
- this.form.srcEnName = row.name;
- this.form.srcCnName = row.name;
- } else {
- this.form.srcId = null;
- this.form.srcEnName = null;
- this.form.srcCnName = null;
- }
- }
- if (name == "ETD") {
- if (row) {
- await this.checkRate(null, row, null, 1, this.deptId);
- this.form.feeCenterListC.forEach(item => {
- item.exrate = this.getExchangeRate(item.curCode, "C", 1);
- });
- }
- }
- },
- rowEdit(row) {},
- addRow() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- this.form.preContainersList.push({
- pid: this.form.id,
- $cellEdit: true,
- oceanFreight: 0,
- salesPrice: 0
- });
- },
- async feecAddRow() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId);
- this.form.feeCenterListC.push({
- pid: this.form.id,
- dc: "C",
- paymode: "C",
- sort: Number(this.form.feeCenterListC.length) + 1,
- businessType: this.form.businessType, // 业务类型
- billType: this.form.billType, // 单据类型
- billNo: this.form.billNo, // 单据编号
- billDate: this.form.etd,
- branchId: this.form.branchId,
- branchName: this.form.branchName,
- corpId: this.form.corpId,
- shortName: this.form.shortName,
- corpCnName: this.form.corpCnName,
- corpEnName: this.form.corpCnName,
- etd: this.form.etd, // 开船日期
- polId: this.form.polId, // 装货港 id
- polCode: this.form.polCode, // 装货港代码
- polCnName: this.form.polCnName, // 装货港中文名称
- polEnName: this.form.polEnName, // 装货港英文名称
- podId: this.form.podId, // 卸货港 id
- podCode: this.form.podCode, // 卸货港代码
- podCnName: this.form.podCnName, // 卸货港中文名称
- podEnName: this.form.podEnName, // 卸货港英文名称
- curCode: this.getLocalCurrency(),
- exrate: this.getExchangeRate(this.getLocalCurrency(), "C", 1),
- $cellEdit: true
- });
- },
- templateChange(list) {
- this.selectionTemplateList = list;
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- feecChange(list) {
- let ids = [];
- list.forEach(e => {
- ids.push(e.id);
- });
- if (ids.length) {
- this.itemCIds = ids.join(",");
- } else {
- this.itemCIds = null;
- }
- this.selectionfeecList = list;
- },
- getDetails(id, type) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- getDetail({ id: id })
- .then(res => {
- res.data.data.feeCenterListC.forEach(row => {
- if (row.curCode == this.getLocalCurrency()) {
- row.amountCNY = row.amount;
- row.amountUSD = 0;
- }
- if (row.curCode != this.getLocalCurrency()) {
- row.amountUSD = row.amount;
- row.amountCNY = 0;
- }
- });
- this.form = res.data.data;
- if (!type) {
- if (res.data.data.issueStatus == 1 || res.data.data.issueStatus == 2 || res.data.data.confirmStatus == 1) {
- this.isSaveBtn = true;
- this.editDisabled = true;
- this.optionForm.disabled = true;
- } else {
- this.editDisabled = false;
- this.optionForm.disabled = false;
- }
- }
- })
- .finally(() => {
- loading.close();
- });
- },
- getCopydate(id) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- copyAgent({ id: id })
- .then(res => {
- this.form = res.data.data;
- })
- .finally(() => {
- loading.close();
- });
- },
- inEdit() {
- this.editButton = false;
- if (this.form.status == "录入") {
- this.editDisabled = false;
- this.optionForm.disabled = false;
- }
- },
- allClick(name) {
- if (name == "提取价格") {
- let obj = {
- polId: this.form.polId,
- podId: this.form.podId,
- // actualShippingCompanyId: this.selectionList[0].carrierId,
- etd: this.form.etd
- };
- this.$refs.freightRate.openDialog(obj);
- }
- if (name == "预定订舱") {
- 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)"
- });
- sendMessageBooking(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetails(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "生成订单") {
- if (!this.form.preContainersList.length) {
- return this.$message.error("集装箱明细不能为空");
- }
- if (this.form.status != 3) {
- for (let item of this.form.preContainersList) {
- if (!item.id) {
- return this.$message.error("请保存数据");
- }
- if (Number(item.oceanFreight) < Number(item.salesPrice)) {
- return this.$message.error("集装箱的海运费低于销售价,请点击运费申请");
- }
- }
- }
- this.$confirm("是否生成订单?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- for (let row of this.form.preContainersList) {
- if (!row.cntrTypeCode || !row.quantity) {
- this.$refs.crud.rowCell(row, row.$index);
- return this.$message.error("请完善明细信息");
- }
- }
- this.form.businessType = "KHTS";
- this.form.billNoFormat = "KHTS";
- this.form.businessTypeCode = "KHTS";
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitBookingCabin(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetails(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "一键保存") {
- if (!this.form.preContainersList.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.form.preContainersList) {
- if (!row.cntrTypeCode || !row.quantity) {
- this.$refs.crud.rowCell(row, row.$index);
- return this.$message.error("请完善明细信息");
- }
- }
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitItemList(this.form.preContainersList)
- .then(res => {
- this.$message.success("保存成功");
- this.form.preContainersList = res.data.data;
- })
- .finally(() => {
- loading.close();
- });
- }
- if (name == "一键编辑") {
- for (let row of this.form.preContainersList) {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == "批量删除") {
- let multiList = [];
- let arr = [];
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- multiList = this.selectionList;
- arr = this.form.preContainersList;
- // 获取有id 的数据
- const itemsWithId = multiList.filter(item => item.id != null);
- let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
- // 把选中的删除掉
- multiList.forEach(item => {
- for (let index in arr) {
- if (JSON.stringify(item) == JSON.stringify(arr[index])) {
- arr.splice(Number(index), 1);
- }
- }
- });
- if (itemsWithId.length != 0) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- itemRemove({ ids: arrIds.join(",") })
- .then(res => {
- this.$message.success("删除成功");
- })
- .finally(() => {
- loading.close();
- });
- }
- });
- }
- if (name == "提交箱型") {
- this.$confirm("是否提交箱型?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {
- id: this.form.id
- };
- submitBoxType(obj).then(res => {
- this.$message.success("操作成功");
- this.getDetails(this.form.id);
- });
- });
- }
- if (name == "费用一键保存") {
- if (!this.form.feeCenterListC.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.form.feeCenterListC) {
- row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
- row.amountNet = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
- if (!row.corpType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
- this.$refs.crud2.rowCell(row, row.$index);
- return this.$message.error("请完善费用明细");
- }
- }
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitFeeList(this.form.feeCenterListC)
- .then(res => {
- this.$message.success("保存成功");
- this.getDetails(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- }
- if (name == "费用一键编辑") {
- for (let row of this.form.feeCenterListC) {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == "费用批量删除") {
- // for (let row of this.selectionfeecList) {
- // if (row.automaticGenerated == 1) {
- // return this.$message.error("系统自动生成的费用不允许删除");
- // }
- // if (row.stlPid && row.accStatus != 0) {
- // return this.$message.error("已生成账单,不允许删除");
- // }
- // if (row.stlPid && row.auditStatus != 0) {
- // return this.$message.error("已申请费用,不允许删除");
- // }
- // }
- let multiList = [];
- let arr = [];
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- multiList = this.selectionfeecList;
- arr = this.form.feeCenterListC;
- // 获取有id 的数据
- const itemsWithId = multiList.filter(item => item.id != null);
- let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
- // 把选中的删除掉
- multiList.forEach(item => {
- for (let index in arr) {
- if (JSON.stringify(item) == JSON.stringify(arr[index])) {
- arr.splice(Number(index), 1);
- }
- }
- });
- if (itemsWithId.length != 0) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- itemFeeRemove({ ids: arrIds.join(",") })
- .then(res => {
- this.$message.success("删除成功");
- })
- .finally(() => {
- loading.close();
- });
- }
- });
- }
- if (name == "提交订舱") {
- if (this.verifySymbolStatus == 1) {
- if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.marks).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- }
- if (!this.form.preContainersList.length) {
- return this.$message.error("集装箱明细不能为空");
- }
- let htmlText = [];
- for (let item of this.form.preContainersList) {
- if (!item.id) {
- return this.$message.error("请保存数据");
- }
- if (!item.cntrTypeCode || !item.quantity) {
- this.$refs.crud.rowCell(item, item.$index);
- return this.$message.error("请完善明细信息");
- }
- htmlText.push(item.cntrTypeCode + "*" + item.quantity);
- }
- for (let item of this.form.containersList) {
- if (!item.id) {
- return this.$message.error("请保存数据");
- }
- }
- submit(this.form).then(res => {
- this.$confirm(`预定集装箱:${htmlText.join(",")}<br/>是否提交订舱?`, {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- dangerouslyUseHTMLString: true,
- type: "warning"
- }).then(() => {
- this.form.businessType = "KHTS";
- this.form.billNoFormat = "KHTS";
- this.form.businessTypeCode = "KHTS";
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitCustomerBooking(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetails(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- });
- }
- if (name == "撤销订舱") {
- 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)"
- });
- revokeCustomerBooking(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetails(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- if (name == "提单修改") {
- this.flxDisabled = false;
- this.isSaveBtn = false;
- this.editDisabled = false;
- this.optionForm.disabled = false;
- }
- if (name == "提单确认") {
- if (this.form.containersList.length == 0) {
- return this.$message.error("配箱信息不能为空");
- }
- for (let item of this.form.containersList) {
- let textList = [];
- if (!item.cntrTypeCode) {
- textList.push("箱型");
- }
- if (!item.cntrNo) {
- textList.push("箱号");
- }
- if (!item.sealNo) {
- textList.push("封号");
- }
- if (!item.quantity || Number(item.quantity) == 0) {
- textList.push("件数");
- }
- if (!item.grossWeight || Number(item.grossWeight) == 0) {
- textList.push("毛重");
- }
- if (!item.measurement || Number(item.measurement) == 0) {
- textList.push("尺码/体积");
- }
- if (textList.length) {
- return this.$message.error(`请完善配箱信息的${textList.join(",")}!`);
- }
- }
- submit(this.form).then(res => {
- this.form = res.data.data;
- 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)"
- });
- submitConfirm(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetails(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- });
- }
- if (name == "模板保存") {
- this.$DialogForm.show({
- title: "订舱模板",
- width: "30%",
- // data: this.assemblyForm.hmmEdi,
- menuPosition: "right",
- option: {
- submitText: "确定",
- emptyText: "取消",
- column: [
- {
- label: "模板名称",
- span: 24,
- prop: "templatesName",
- rules: [
- {
- required: true,
- message: "请输入模板名称",
- trigger: "blur"
- }
- ]
- }
- ]
- },
- beforeClose: done => {
- done();
- },
- callback: res => {
- res.done();
- console.log(res);
- this.form.businessType = "KHDC";
- this.form.billNoFormat = "DCMB";
- this.form.businessTypeCode = "KHDC";
- let obj = {
- ...this.form,
- templatesName: res.data.templatesName
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submitCommonTemplates(obj)
- .then(res => {
- this.$message.success("操作成功");
- })
- .finally(() => {
- loading.close();
- });
- res.close();
- }
- });
- }
- if (name == "导入模板") {
- this.$refs.importTemp.openDialog();
- }
- if (name == "退舱") {
- 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)"
- });
- refundCabin(this.form)
- .then(res => {
- this.$message.success("操作成功");
- this.getDetails(this.form.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- }
- },
- submit(type) {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (!this.form.detail.hshipperDetails) {
- return this.$message.error("请输入发货人提单描述");
- }
- if (!this.form.detail.hconsigneeDetails) {
- return this.$message.error("请输入收货人提单描述");
- }
- if (!this.form.detail.hnotifyDetails) {
- return this.$message.error("请输入通知人提单描述");
- }
- if (this.verifySymbolStatus == 1) {
- if (checkFullWidthSymbols(this.form.detail.hshipperDetails).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.detail.hshipperDetails).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.detail.hconsigneeDetails).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.detail.hconsigneeDetails).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.detail.hnotifyDetails).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.detail.hnotifyDetails).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.marks).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.marks).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `唛头:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- if (checkFullWidthSymbols(this.form.commodityDescr).hasFullWidth) {
- let msg = [];
- for (let item of checkFullWidthSymbols(this.form.commodityDescr).positions) {
- msg.push(`第${item.row}行的"${item.symbol}"`);
- }
- this.$message({
- dangerouslyUseHTMLString: true,
- message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- type: "error"
- });
- return;
- }
- }
- for (let row of this.form.preContainersList) {
- if (!row.cntrTypeCode || !row.quantity) {
- this.$refs.crud.rowCell(row, row.$index);
- return this.$message.error("请完善明细信息");
- }
- }
- // for (let row of this.form.feeCenterListC) {
- // row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
- // row.amountNet = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
- // if (!row.corpType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
- // this.$refs.crud2.rowCell(row, row.$index)
- // return this.$message.error("请完善费用明细");
- // }
- // }
- this.form.billDate = this.form.etd;
- this.form.businessType = "KHTS";
- this.form.billNoFormat = "KHTS";
- this.form.businessTypeCode = "KHTS";
- // this.form.billNoFormat = 'COC'
- // this.form.businessTypeCode = 'COC'
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- submit(this.form)
- .then(res => {
- this.$message.success("保存成功");
- this.getDetails(res.data.data.id);
- })
- .finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- application() {
- if (!this.form.preContainersList.length) {
- return this.$message.error("集装箱明细不能为空");
- }
- this.$confirm("是否提单确认?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- id: this.form.id,
- url: "/iosBasicData/businessCenter/customerBooking/index",
- pageStatus: "",
- pageLabel: "客户订舱 "
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- pleaseCheck(obj)
- .then(res => {
- this.$message.success("请核成功");
- this.getDetails(res.data.data.id);
- })
- .finally(() => {
- loading.close();
- });
- });
- },
- revokeApplication() {
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {};
- obj = {
- id: this.form.id
- };
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- repealCancel(obj)
- .then(res => {
- this.$message.success("撤销请核成功");
- this.getDetails(res.data.data.id);
- this.editDisabled = false;
- this.optionForm.disabled = false;
- })
- .finally(() => {
- loading.close();
- });
- });
- },
- //请核关闭
- choceScheduleFun() {
- this.checkScheduleDialog = false;
- },
- //自定义列保存
- async saveColumn(ref, option, optionBack, code) {
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumn(ref, option, optionBack, code) {
- this[option] = this[optionBack];
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
- if (inSave) {
- this.$message.success("重置成功");
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- // 更改表格颜色
- 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;
- },
- goBack(type) {
- if (this.form.issueStatus > 0 && this.form.whetherModify == 0) {
- for (let item of this.form.preContainersList) {
- const names = item.cntrTypeCode + "+" + item.quantity;
- if (names != item.whetherModifyJson) {
- return this.$message.error("请提交箱型");
- }
- }
- }
- this.$emit("goBack");
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item__error {
- display: none !important;
- }
- ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-table .cell {
- padding: 0 2px !important;
- .el-form-item {
- margin-bottom: 0px !important;
- }
- }
- ::v-deep .avue-crud .el-table .el-form-item__label {
- left: -1px;
- }
- // ::v-deep#out-table .back-one {
- // background: #ecf5ff !important;
- // }
- // ::v-deep#out-table .back-two {
- // background: #ecf5ff !important;
- // }
- ::v-deep #out-table .back-one {
- background: #ecf5ff !important;
- text-align: center;
- padding: 4px 0;
- }
- ::v-deep #out-table .back-two {
- background: #ecf5ff !important;
- text-align: center;
- padding: 4px 0;
- }
- ::v-deep .el-table--small td,
- .el-table--small th {
- padding: 2px !important;
- }
- ::v-deep .el-card__body {
- padding: 3px 10px;
- }
- ::v-deep .box-card .el-card__body {
- padding: 4px !important;
- }
- ::v-deep .el-form-item__content {
- line-height: 32px !important;
- }
- .disabledBox {
- display: flex;
- align-items: center;
- }
- .meetSize {
- font-size: 16px;
- color: #54bcbd;
- }
- </style>
|