| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429 |
- <template>
- <div class="borderless" v-loading="pageLoading">
- <div class="customer-head">
- <div class="customer-back">
- <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList"
- >{{ $t("btn118n.toList") }}
- </el-button>
- <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">{{ $t("btn118n.previous") }}</el-button>
- <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">{{ $t("btn118n.next") }}</el-button>
- </div>
- <div class="add-customer-btn">
- <!--<el-popover-->
- <!-- placement="bottom-end"-->
- <!-- width="100"-->
- <!-- trigger="hover">-->
- <!-- <div>-->
- <!-- </div>-->
- <el-button size="small" type="primary" @click="addEdit">{{ $t("btn118n.new") }} </el-button>
- <el-button type="success" size="small" style="margin-right: 8px" @click="CopyDocumentsfun">{{ $t("btn118n.copy") }} </el-button>
- <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
- <el-button size="small" type="warning" style="margin-right: 8px" :disabled="form.status > 0 || showLock || !form.id">
- {{ $t("btn118n.importTemplate") }}<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="importData(item.id)">{{ item.name }} </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <!-- <el-dropdown style="line-height: 0">
- <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
- :disabled="!form.id || showLock">
- 发送 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" class="dropdown-max"
- @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" :loading="saveLoading"
- :disabled="!form.id || showLock">
- 发送 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" class="dropdown-max"
- @click.native="editypesSendingEdifun(item)">{{ item.cnName }}
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown> -->
- <el-button
- v-if="
- bigtabs != 'dz' &&
- !(form.billType == 'MM' && isHq != 1) &&
- (roleName.includes('admin') ||
- (roleName.includes('应付查看') && roleName.includes('应收查看')) ||
- (roleName.includes('应付修改') && roleName.includes('应收修改')))
- "
- size="small"
- style="margin-right: 8px"
- :loading="saveLoading"
- :disabled="!form.id"
- @click="previewDialogfun"
- >{{ $t("btn118n.preview") }}
- </el-button>
- <el-button v-if="form.id && form.logisticsStatus == '录入'" size="small" type="success" @click.stop="allClick('物流提交')"
- >{{ $t("btn118n.localApply") }}
- </el-button>
- <el-button v-if="form.id && form.logisticsStatus == '已提交'" size="small" type="danger" @click.stop="allClick('物流撤销提交')"
- >{{ $t("btn118n.unlocalApply") }}
- </el-button>
- <el-button
- v-if="
- form.id &&
- form.transferOrderStatus == '录入' &&
- form.billType != 'MH' &&
- (roleName.includes('admin') || roleName.includes('总部') || roleName.includes('国外费用'))
- "
- size="small"
- type="info"
- @click.stop="allClick('转单')"
- :loading="pageLoading"
- >{{ $t("btn118n.transferApply") }}
- </el-button>
- <el-button
- v-if="form.id && form.transferOrderStatus == '已转单'&&(roleName.includes('admin')||roleName.includes('总部'))"
- size="small"
- type="danger"
- @click.stop="allClick('撤销转单')"
- :loading="pageLoading"
- >{{ $t("btn118n.untransferApply") }}
- </el-button>
- <el-button size="small" type="warning" :disabled="!form.id || showLock" v-if="form.billType == 'MM'" @click.stop="allClick('同步主单到分单')"
- >{{ $t("btn118n.setInfoMMToMH") }}
- </el-button>
- <el-button size="small" type="warning" :disabled="!form.id || showLock" v-if="form.billType == 'MM'" @click.stop="allClick('同步分单信息')"
- >{{ $t("btn118n.getInfoMMToMH") }}
- </el-button>
- <el-button v-if="form.id && (form.billType == 'DD' || form.billType == 'MH')" size="small" type="success" @click.stop="allClick('提单确认')"
- >{{ $t("btn118n.SIInfoImport") }}
- </el-button>
- <el-button
- size="small"
- type="warning"
- :disabled="!form.id || showLock"
- v-if="form.status == 1 && form.billType != 'MH'"
- @click.stop="revokeDocumentApproval"
- >{{ $t("btn118n.unapply") }}
- </el-button>
- <el-button
- size="small"
- type="success"
- :disabled="!form.id || detailData.seeDisabled || showLock"
- v-if="(form.status == 0 || form.status == 4) && form.billType != 'MH'"
- @click.stop="DocumentApproval"
- >{{ $t("btn118n.apply") }}
- </el-button>
- <el-button
- size="small"
- type="danger"
- :disabled="showLock"
- v-if="form.status == 3 && form.billType != 'MH' && (roleName.includes('admin') || roleName.includes('撤销锁单'))"
- @click.stop="revokeLockOrder"
- >{{ $t("btn118n.unapply") }}
- </el-button>
- <el-button v-if="overTime && form.id && form.billType != 'MM'" type="success" size="small" @click="billModify"
- >{{ $t("btn118n.billModify") }}
- </el-button>
- <el-button
- size="small"
- type="primary"
- style="margin-right: 8px"
- :disabled="detailData.seeDisabled || showLock"
- :loading="saveLoading"
- @click="editCustomer"
- >{{ $t("btn118n.save") }}
- </el-button>
- <el-dropdown style="line-height: 0" v-if="form.billType != 'MH'">
- <el-button type="warning" :loading="saveLoading" :disabled="!form.id" size="small">
- {{ $t("btn118n.checked") }} <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" v-model="bigtabs" @tab-click="bigHandleClick">
- <el-tab-pane :label="$t('sea118n.orderInfo')" name="wt" class="scrollable-container">
- <div>
- <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm" :disabled="showLock">
- <!-- <containerTitle title="基础资料"></containerTitle>-->
- <basic-container>
- <el-row :gutter="60">
- <el-col v-for="(item, index) in basicData.column" :key="index" :span="8">
- <!--数组-->
- <div v-if="item instanceof Array" style="display: flex;align-items: center;justify-content: space-between">
- <el-row>
- <el-col :span="item[0].span ? item[0].span : 12">
- <el-form-item :label="item[0].label" :prop="item[0].prop" :rules="item[0].rules" :label-width="item[0].labelWidth">
- <span slot="label" v-if="item[0].label">
- <span
- v-if="item[0].label == 'HB/L NO'"
- style="color: #4c9e44;cursor: pointer;text-decoration: underline;"
- @click="applyforfun(item[0].label)"
- >{{ form.hblno ? "删除" : "申请" }} {{ item[0].label }}
- </span>
- <span v-else style="color: #1e9fff">{{ item[0].label }}</span>
- </span>
- <span v-if="item[0].type == 'button'"></span>
- <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
- <!-- size="mini" type="success" icon="el-icon-circle-plus" circle-->
- <!-- @click="applyforfun(item[0].label)" >-->
- <!--</el-button>-->
- <search-query
- v-else-if="item[0].type == 'select'"
- :datalist="item[0].dicData"
- :selectValue="form[item[0].prop]"
- :filterable="true"
- :allowCreate="item[0].allowCreate || false"
- :remote="true"
- :disabled="
- detailData.seeDisabled ||
- item[0].disabled ||
- form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
- form.feeCenterListC.filter(item => item.auditStatus > 0).length
- "
- :buttonIf="false"
- :placeholder="`${item[0].text || ''}`"
- :forParameter="item[0].forParameter"
- @remoteMethod="remoteMethod($event, item[0].prop)"
- @corpChange="corpChange($event, item[0].prop)"
- @corpFocus="remoteMethod($event, item[0].prop)"
- >
- </search-query>
- <el-input
- v-else
- type="age"
- style="width: 100%;"
- v-model="form[item[0].prop]"
- size="small"
- autocomplete="off"
- :disabled="
- detailData.seeDisabled ||
- item[0].disabled ||
- form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
- form.feeCenterListC.filter(item => item.auditStatus > 0).length
- "
- :placeholder="item[0].text || ''"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="item[1].span ? item[1].span : 12">
- <el-form-item :label="item[1].label" :prop="item[1].prop" :rules="item[1].rules" :label-width="item[1].labelWidth">
- <span slot="label" v-if="item[1].label">
- <span style="color: #1e9fff">{{ item[1].label }}</span>
- </span>
- <el-date-picker
- v-if="item[1].type == 'date'"
- v-model="form[item[1].prop]"
- clearable
- style="width: 100%;"
- type="date"
- size="small"
- :disabled="detailData.seeDisabled || item[1].disabled"
- value-format="yyyy-MM-dd HH:mm"
- placeholder="选择日期"
- >
- </el-date-picker>
- <search-query
- v-else-if="item[1].type == 'select'"
- :datalist="item[1].dicData"
- :selectValue="form[item[1].prop]"
- :filterable="true"
- :remote="true"
- :disabled="
- detailData.seeDisabled ||
- item[1].disabled ||
- form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
- form.feeCenterListC.filter(item => item.auditStatus > 0).length
- "
- :buttonIf="false"
- :placeholder="`${item[1].text || ''}`"
- :forParameter="item[1].forParameter"
- @remoteMethod="remoteMethod($event, item[1].prop)"
- @corpChange="corpChange($event, item[1].prop)"
- @corpFocus="remoteMethod($event, item[1].prop)"
- >
- </search-query>
- <tree-select
- v-else-if="item[1].type == 'tree'"
- v-model="form[item[1].prop]"
- :data="item[1].dicData"
- :props="item[1].forParameter"
- nodeKey="title"
- size="small"
- :clearable="false"
- :disabled="detailData.seeDisabled || item[1].disabled"
- :multiple="false"
- :placeholder="`${item[1].text || ''}`"
- @input="corpChange($event, item[1].prop)"
- >
- </tree-select>
- <el-input
- v-else
- type="age"
- style="width: 100%;"
- v-model="form[item[1].prop]"
- size="small"
- autocomplete="off"
- :disabled="detailData.seeDisabled || item[1].disabled"
- :placeholder="item[1].text || ''"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col v-if="item[2]" :span="item[2].span ? item[2].span : 12">
- <el-form-item :label="item[2].label" :prop="item[2].prop" :rules="item[2].rules" :label-width="item[2].labelWidth">
- <span slot="label" v-if="item[2].label">
- <span style="color: #1e9fff">{{ item[2].label }}</span>
- </span>
- <search-query
- v-if="item[2].type == 'select'"
- :datalist="item[2].dicData"
- :selectValue="form[item[2].prop]"
- :filterable="true"
- :clearable="false"
- :remote="true"
- :disabled="detailData.seeDisabled || item[2].disabled"
- :buttonIf="false"
- :forParameter="item[2].forParameter"
- :placeholder="`${item[2].text || ''}`"
- @remoteMethod="remoteMethod($event, item[2].prop)"
- @corpChange="corpChange($event, item[2].prop)"
- @corpFocus="remoteMethod($event, item[2].prop)"
- >
- </search-query>
- <el-input
- v-else
- type="age"
- style="width: 100%;"
- v-model="form[item[2].prop]"
- size="small"
- autocomplete="off"
- :disabled="detailData.seeDisabled || item[1].disabled"
- :placeholder="item[2].text || ''"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- <!--对象-->
- <div v-else>
- <el-form-item v-if="item.display == true" :label="item.label" :prop="item.prop" :rules="item.rules">
- <span slot="label" v-if="item.label">
- <span style="color: #1e9fff">{{ item.label }}</span>
- </span>
- <search-query
- v-if="item.type == 'select'"
- ref="searchQueryRef"
- :datalist="item.dicData"
- :selectValue="form[item.prop]"
- :filterable="true"
- :clearable="false"
- :remote="true"
- :disabled="
- detailData.seeDisabled ||
- form.feeCenterListD.filter(item => item.auditStatus > 0).length ||
- form.feeCenterListC.filter(item => item.auditStatus > 0).length
- "
- :buttonIf="item.buttonIf"
- :forParameter="item.forParameter"
- :placeholder="`${item.text || ''}`"
- :joinData="item.joinData"
- @remoteMethod="remoteMethod($event, item.prop)"
- @corpChange="corpChange($event, item.prop)"
- @corpFocus="remoteMethod($event, item.prop)"
- @eldialogConfirm="eldialogConfirm(item.slot)"
- >
- <bcorps
- v-show="item.slot == 'bcorps'"
- ref="bcorps"
- :eldialog="true"
- @selectionChange="eldialogMultipleChoice($event, item.slot)"
- >
- </bcorps>
- <bcorpstypedefine v-show="item.slot == 'bcorpstypedefine'"> </bcorpstypedefine>
- </search-query>
- <el-input
- v-else
- type="age"
- style="width: 100%;"
- v-model="form[item.prop]"
- size="small"
- autocomplete="off"
- :disabled="detailData.seeDisabled || item.disabled"
- :placeholder="item.text || ''"
- ></el-input>
- </el-form-item>
- </div>
- </el-col>
- </el-row>
- </basic-container>
- </el-form>
- </div>
- <div class="customer-main margintop">
- <!-- <containerTitle :title='$t("sea118n.info")'></containerTitle>-->
- <basic-container :showBtn="true">
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
- <el-tab-pane :label="$t('sea118n.billInfo')" name="first">
- <entrustment-lnformation
- :assemblyForm="form"
- :saberUserInfo="saberUserInfo"
- :detailData="detailData"
- :disabled="showLock"
- :overTime="overTime"
- :generateBillsfalse="generateBillsfalse"
- @billsDetailfun="billsDetailfun(form.id)"
- @editCustomer="editCustomer"
- >
- </entrustment-lnformation>
- </el-tab-pane>
- <el-tab-pane :label="$t('sea118n.ctnrList')" name="second">
- <DistributionBox
- :key="form.id"
- :assemblyForm="form"
- :detailData="detailData"
- :showLock="showLock"
- :pleasereviewType="pleasereviewType"
- @billsAddfun="billsAddfun"
- @billsDetailfun="billsDetailfun(form.id)"
- >
- </DistributionBox>
- </el-tab-pane>
- <el-tab-pane label="MB/L Info" name="third">
- <mbinformation :assemblyForm="form" :detailData="detailData" :disabled="showLock"> </mbinformation>
- </el-tab-pane>
- <el-tab-pane
- :label="$t('sea118n.reportManage')"
- name="fourth"
- v-if="roleName.includes('admin') ? true : roleName.includes('报表管理') ? true : false"
- >
- <reports :id="form.id" :assemblyForm="form" :disabled="detailData.seeDisabled || showLock" businessValue="HYCK"></reports>
- </el-tab-pane>
- <!-- <el-tab-pane label="EDI 及其他" name="sixth">
- <edicode :assemblyForm="form" :detailData="detailData" :disabled="showLock">
- </edicode>
- </el-tab-pane> -->
- <el-tab-pane :label="$t('sea118n.fileCerter')" name="seventh">
- <filescenter ref="filescenter" :assemblyForm="form" :pid="form.id" :detailData="detailData" :showLock="showLock"></filescenter>
- </el-tab-pane>
- </el-tabs>
- </basic-container>
- <basic-container :showBtn="true" v-show="activeName == 'first' || activeName == 'third'">
- <formbottom :assemblyForm="form" :generateBillsfalse="generateBillsfalse" :disabled="showLock" :detailData="detailData"
- @billsDetailfun="billsDetailfun(form.id)"></formbottom>
- </basic-container>
- </div>
- </el-tab-pane>
- <el-tab-pane
- :label="$t('sea118n.feeInfo')"
- name="fy"
- class="scrollable-container"
- v-if="
- (!(form.billType == 'MM' && isHq != 1) &&
- (roleName.includes('admin') ||
- roleName.includes('应收修改') ||
- roleName.includes('应付修改') ||
- roleName.includes('应收查看') ||
- roleName.includes('应付查看'))) ||
- roleName.includes('国外费用') ||
- roleName.includes('允许修改他人费用')
- "
- >
- <feecenter
- :assemblyForm="form"
- :copyFormData="copyFormData"
- :detailData="detailData"
- :disabled="detailData.seeDisabled || showLock"
- :showLock="showLock"
- :pleasereviewType="pleasereviewType"
- :pid="form.id"
- @billsDetailfun="billsDetailfun(form.id)"
- >
- </feecenter>
- </el-tab-pane>
- <el-tab-pane :label="$t('sea118n.docCenter')" name="dz" class="scrollable-container">
- <document-center
- ref="documentCenter"
- :detailData="detailData"
- :assemblyForm="form"
- :disabled="showLock"
- @billsDetailfun="billsDetailfun(form.id)"
- ></document-center>
- </el-tab-pane>
- <el-tab-pane :label="$t('sea118n.hblnolist')" name="fd" v-if="form.billType == 'MM'" class="scrollable-container">
- <Split-list
- :detailData="detailData"
- :assemblyForm="form"
- :data="billsListAllData"
- :disabled="detailData.seeDisabled || showLock"
- @billsListAllfun="billsListAllfun(form.id)"
- @billsDetailfun="billsDetailfun(form.id)"
- ></Split-list>
- </el-tab-pane>
- <el-tab-pane label="海关信息">
- <customs-information :form="form" @synchronization="billsDetailfun(form.id)"></customs-information>
- </el-tab-pane>
- </el-tabs>
- </div>
- <!--导入模板-->
- <el-dialog
- :title="$t('btn118n.importTemplate')"
- 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>
- <!--审核弹窗-->
- <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>
- <!--预览报表弹窗-->
- <el-dialog
- append-to-body
- title="预览报表"
- class="el-dialogDeep"
- :visible.sync="previewDialog"
- width="60%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <business-reports
- v-if="previewDialog"
- :id="form.id"
- :classifycode="getReportTypeByBigHandle()"
- :disabled="detailData.seeDisabled"
- ></business-reports>
- </el-dialog>
- <el-dialog
- append-to-body
- title="物流信息"
- class="el-dialogDeep"
- :visible.sync="logisticsDialog"
- width="30%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <span>
- <avue-form v-if="logisticsDialog" ref="logisticsForm" :option="logisticsOption" v-model="logisticsForm">
- <tempalte slot="shippingCompany">
- <dic-select
- v-model="logisticsForm.shippingCompany"
- placeholder="船务公司"
- key="id"
- label="deptName"
- url="/blade-system/dept/getDeptList?isHq=1"
- :filterable="true"
- :remote="true"
- dataName="deptName"
- @selectChange="dicChange('shippingCompany', $event)"
- ></dic-select>
- </tempalte>
- <tempalte slot="shippingStaffName">
- <dic-select
- v-model="logisticsForm.shippingStaffName"
- placeholder="船务员工"
- :key="logisticsForm.shippingCompanyId"
- label="realName"
- :url="'/blade-user/userListAll?deptId=' + logisticsForm.shippingCompanyId"
- :filterable="true"
- :remote="true"
- dataName="realName"
- @selectChange="dicChange('shippingStaffName', $event)"
- ></dic-select>
- </tempalte>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="logisticsDialog = false" size="mini">取 消</el-button>
- <el-button type="primary" @click="logisticsSubmit" size="mini">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- append-to-body
- title="转单信息"
- class="el-dialogDeep"
- :visible.sync="transferDialog"
- width="30%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- >
- <span>
- <avue-form v-if="transferDialog" ref="transferForm" :option="transferOption" v-model="transferForm">
- <tempalte slot="podCompanyName">
- <dic-select
- v-model="transferForm.podCompanyName"
- placeholder="目的港公司"
- key="id"
- label="deptName"
- url="/blade-system/dept/lazy-list"
- :filterable="true"
- @selectChange="dicChange('podCompanyName', $event)"
- ></dic-select>
- </tempalte>
- <tempalte slot="podStaffName">
- <dic-select
- v-model="transferForm.podStaffName"
- placeholder="目的港员工"
- label="realName"
- :key="transferForm.podCompanyId"
- :url="'/blade-user/userListAll?deptId=' + transferForm.podCompanyId"
- :filterable="true"
- :remote="true"
- dataName="realName"
- @selectChange="dicChange('podStaffName', $event)"
- ></dic-select>
- </tempalte>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="transferDialog = false" size="mini">取 消</el-button>
- <el-button type="primary" @click="transferSubmit" size="mini">确 定</el-button>
- </span>
- </el-dialog>
- <bill-lading ref="billLading" :oldForm="form" @upDate="billsDetailfun(form.id)"></bill-lading>
- </div>
- </template>
- <script>
- import EntrustmentLnformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue";
- import mbinformation from "@/views/iosBasicData/SeafreightExportF/bills/assembly/mbinformation.vue";
- import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
- import formbottom from "@/views/iosBasicData/SeafreightExportF/bills/assembly/formbottom.vue";
- import edicode from "@/views/iosBasicData/SeafreightExportF/bills/assembly/edicode.vue";
- import filescenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/filescenter.vue";
- import DistributionBox from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox.vue";
- import feecenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue";
- import { getList as userGetList } from "@/api/system/user";
- import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
- import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
- import bcorps from "@/views/iosBasicData/bcorps/index.vue";
- import dicSelect from "@/components/dicSelect/main";
- import bcorpstypedefine from "@/views/iosBasicData/bcorps/bcorpstypedefine.vue";
- import SplitList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/SplitList.vue";
- import { getLazylist } from "@/api/basicData/agreement";
- import { getBcorpsList, getBcorpslistByType } from "@/api/iosBasicData/bcorps";
- import { getBlocationsList } from "@/api/iosBasicData/blocations";
- import { getBcorpsattnList } from "@/api/iosBasicData/bcorpsattn";
- import { getWorkDicts } from "@/api/system/dictbiz";
- import { getDeptLazyTree, getDeptTree, getLazyList } from "@/api/system/dept";
- import {
- billsCheckBills,
- billsCopyBills,
- billsDetail,
- billsGetBillNo,
- removeHblNo,
- billsListAll,
- billsRevokeCheckBills,
- editypesSendingEdi,
- billsSubmit,
- billsAdd,
- deptGetDetailPol,
- postSelectByUser,
- logisticsSubmission,
- logisticsRevokeSubmission,
- transferOrder,
- revokeTransferOrder,
- synchronizeData,
- revokeLockOrder,
- synchronizeDataMM,
- verifyData,
- updateVerifyData
- } from "@/api/iosBasicData/bills";
- import { dateFormat } from "@/util/date";
- import { validatenull } from "@/util/validate";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import { getBvesselsList } from "@/api/iosBasicData/bvessels";
- import DocumentCenter from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue";
- import businessReports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/businessReports.vue";
- import { popupReminder } from "@/util/messageReminder";
- import editypes from "@/views/iosBasicData/editypes/index.vue";
- import { editypesList } from "@/api/iosBasicData/editypes";
- import { verifyEnglish, checkFullWidthSymbols, lineQuantityVerification, tabVerify } from "@/util/date";
- import { contrastObj, contrastList } from "@/util/contrastData";
- import { selectListLos } from "@/api/approval/processConfig";
- import { isProcurement } from "@/api/basicData/configuration";
- import billLading from "./assembly/billLading.vue";
- import customsInformation from "./assembly/customsInformation.vue";
- import { submit } from "@/api/iosBasicData/sailingSchedule.js";
- import _ from "lodash";
- export default {
- name: "海运出口(F)",
- components: {
- checkSchedule,
- SearchQuery,
- EntrustmentLnformation,
- formbottom,
- mbinformation,
- reports,
- edicode,
- filescenter,
- DistributionBox,
- feecenter,
- bcorps,
- bcorpstypedefine,
- SplitList,
- TreeSelect,
- DocumentCenter,
- businessReports,
- editypes,
- dicSelect,
- billLading,
- customsInformation
- },
- props: {
- detailData: {
- type: Object
- },
- pageIds: {
- type: Array, // 指定 prop 的类型为 Array
- default: () => [] // 提供一个默认值,这里使用函数形式返回一个空数组
- }
- },
- data() {
- return {
- isCutOffDate: false,
- overTime: false,
- roleName: localStorage.getItem("roleName"),
- transferForm: {
- podCompanyId: null
- },
- transferOption: {
- menuBtn: false,
- disabled: false,
- column: [
- {
- label: "目的港公司",
- prop: "podCompanyName",
- disabled: false,
- span: 24,
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ]
- },
- {
- label: "目的港员工",
- prop: "podStaffName",
- disabled: false,
- span: 24,
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ]
- }
- ]
- },
- transferDialog: false,
- logisticsForm: {
- shippingCompanyId: null
- },
- logisticsOption: {
- menuBtn: false,
- disabled: false,
- column: [
- {
- label: "船务公司",
- prop: "shippingCompany",
- disabled: false,
- span: 24
- },
- {
- label: "船务员工",
- prop: "shippingStaffName",
- disabled: false,
- span: 24,
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ]
- }
- ]
- },
- logisticsDialog: false,
- showLock: false,
- ediData: [], // edi 列表数据
- ediData_SO: [], // edi SO 列表数据
- ediData_SI: [], // edi SI 列表数据
- previewDialog: false, // 预览报表弹窗开启
- generateBillsfalse: false, // 如果生成账单就禁用
- pleasereviewType: false, // 如果请核就禁用
- checkScheduleDialog: false, // 审核弹窗
- checkId: "", // 审核需要的id
- batchNo: "",
- billsListAllData: [], // 分单列表数据
- pageLoading: false, // 全屏的动画
- saveLoading: false,
- copyFormData: {}, // 详情的备份数据
- // 详情数据
- form: {
- branchId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
- branchName: JSON.parse(localStorage.getItem("sysitemData")).deptName,
- billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 单据日期 默认 当天
- operatorName: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_name, // OP 默认登录人
- operatorId: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id, // OP 默认登录人
- businessType: "SE", // 业务类型 默认 海运出口
- businessTypes: "海运",
- billType: "DD", // 单据类型 默认 直单
- accDeptName: "", // 核算部门 默认登录人的部门
- issueType: "TER", // 签单方式 默认 正本提单
- mpaymode: "PP", // 主单付费方式 默认PP
- hpaymode: "PP", // 分单付费方式 默认 PP
- loadType: JSON.parse(localStorage.getItem("saber-tenantId")).content == "409341" ? "FCL" : "整箱", // 装箱方式默认整箱
- srcType: "OWN", // 业务来源默认公司 来源 内容 默认登录人所属公司
- numberOfObl: "NONE", // 正本份数 默认 THREE
- numberOfCopy: "NONE", // 副本份数 默认 THREE
- seaType: "E", // 进出口 默认出口 E=出口 I=进口"
- cargoType: "dry", // 货物类型默认普货
- marks: "N/M",
- dgPackingLevel: "0", // 危险品包装等级
- serviceTerms: "CY-CY", // 服务方式
- polFreeBoxUseDays: "7",
- podFreeBoxUseDays: "14",
- boxBelongsTo: "SOC",
- cabinType: "DF自营",
- bookingDate: dateFormat(new Date(), "yyyy-MM-dd"),
- filesList: [], // 文件中心
- feeCenterListD: [], // 收
- feeCenterListC: [], // 付
- preContainersList: [], // 箱
- feeCenterAmendList: [],
- containerNumberItemList: [],
- containersList: [],
- waitingBoxList: [],
- placeReceiptName: "",
- placeReceiptNamePrint: "",
- polEnName: "",
- polNamePrint: "",
- podEnName: "",
- podNamePrint: "",
- destinationName: "",
- destinationNamePrint: "",
- placeDeliveryName: "",
- placeDeliveryNamePrint: "",
- potEnName: "",
- potNamePrint: "",
- detail: {},
- hmmEdi: {}
- },
- oldForm: {
- branchId: JSON.parse(localStorage.getItem("sysitemData")).deptId,
- branchName: JSON.parse(localStorage.getItem("sysitemData")).deptName,
- billDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00", // 单据日期 默认 当天
- operatorName: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_name, // OP 默认登录人
- operatorId: JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id, // OP 默认登录人
- businessType: "SE", // 业务类型 默认 海运出口
- businessTypes: "海运",
- billType: "DD", // 单据类型 默认 直单
- accDeptName: "", // 核算部门 默认登录人的部门
- issueType: "TER", // 签单方式 默认 正本提单
- mpaymode: "PP", // 主单付费方式 默认PP
- hpaymode: "PP", // 分单付费方式 默认 PP
- loadType: JSON.parse(localStorage.getItem("saber-tenantId")).content == "409341" ? "FCL" : "整箱", // 装箱方式默认整箱
- srcType: "OWN", // 业务来源默认公司 来源 内容 默认登录人所属公司
- numberOfObl: "NONE", // 正本份数 默认 THREE
- numberOfCopy: "NONE", // 副本份数 默认 THREE
- seaType: "E", // 进出口 默认出口 E=出口 I=进口"
- cargoType: "dry", // 货物类型默认普货
- marks: "N/M",
- dgPackingLevel: "0", // 危险品包装等级
- serviceTerms: "CY-CY", // 服务方式
- polFreeBoxUseDays: "7",
- podFreeBoxUseDays: "14",
- boxBelongsTo: "SOC",
- bookingDate: dateFormat(new Date(), "yyyy-MM-dd"),
- filesList: [], // 文件中心
- feeCenterListD: [], // 收
- feeCenterListC: [], // 付
- preContainersList: [], // 箱
- feeCenterAmendList: [],
- containerNumberItemList: [],
- containersList: [],
- waitingBoxList: [],
- placeReceiptName: "",
- placeReceiptNamePrint: "",
- polEnName: "",
- polNamePrint: "",
- podEnName: "",
- podNamePrint: "",
- destinationName: "",
- destinationNamePrint: "",
- placeDeliveryName: "",
- placeDeliveryNamePrint: "",
- potEnName: "",
- potNamePrint: "",
- detail: {},
- hmmEdi: {}
- },
- // 循环的配置
- basicData: {
- column: [
- {
- label: this.$t("sea118n.corpName"), // 调往来单位接口
- prop: "corpCnName",
- text: "请选择客户名称",
- type: "select",
- dicData: [],
- disabled: false,
- buttonIf: true,
- joinData: true,
- slot: "bcorps",
- display: true,
- forParameter: {
- key: "id",
- label: "cnName",
- value: "cnName",
- short: "shortName"
- },
- rules: [
- {
- required: true,
- message: " ",
- trigger: "blur"
- }
- ]
- },
- {
- label: "booking NO", // 订舱号
- text: "请输入booking NO",
- prop: "bookingNo",
- disabled: false,
- display: true
- },
- {
- label: "HB/L NO",
- text: "请输入HB/L NO",
- prop: "hblno",
- disabled: false,
- display: false
- },
- [
- {
- label: "MB/L NO",
- text: "请输入MB/L NO",
- prop: "mblno",
- span: 18,
- disabled: false
- },
- {
- label: "", // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
- text: "请选择付款方式",
- prop: "mpaymode",
- type: "select",
- labelWidth: "30px",
- disabled: false,
- span: 6,
- dicData: [],
- forParameter: {
- key: "dictKey",
- label: "dictValue",
- value: "dictKey"
- }
- }
- ]
- ]
- },
- activeName: "first",
- bigtabs: "wt",
- saberUserInfo: {}, // 当前登录人信息
- // 需要加判断是否必填的数据
- messageData: [
- {
- name: "客户",
- value: "corpCnName"
- },
- {
- name: "业务来源",
- value: "srcType"
- },
- {
- name: "MBLNO",
- value: "mblno"
- },
- // {
- // name: 'booking NO',
- // value: 'bookingNo',
- // },
- // {
- // name: 'REF MBLNO',
- // value: 'refno',
- // },
- {
- name: "船名(VSL)",
- value: "vesselCnName"
- },
- {
- name: "航次(VOY)",
- value: "voyageNo"
- },
- {
- name: "ETD",
- value: "etd"
- },
- {
- name: "ATD",
- value: "actualEtd"
- },
- {
- name: "装货港",
- value: "polCnName"
- },
- {
- name: "卸货港",
- value: "podCnName"
- },
- // {
- // name: '包装单位',
- // value: 'packingUnit',
- // },
- {
- name: "承运人",
- value: "carrierCnName"
- },
- {
- name: "舱位类型",
- value: "cabinType"
- }
- ],
- imporiData: [
- // { id: 0, name: '导入 ONE 模板' },
- // { id: 1, name: '导入 PIL 订舱模板' },
- // { id: 2, name: '导入截单格式' },
- // { id: 3, name: '导入海信提单' },
- { id: 4, name: "提单样本" }
- ],
- 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,
- saberTenantId: 0,
- importTemplate: null,
- isHq: null,
- textareaNumber: 5,
- lineLength: 35
- };
- },
- watch: {
- // 监听业务类型 如果不是分单 可以编辑分单号
- "form.billType": {
- // 执行方法
- handler(oldValue, newValue) {
- if (oldValue == "MH" || oldValue == "MM") {
- this.basicData.column.forEach(item => {
- if (item.prop == "bookingNo") {
- item.display = false;
- }
- if (item.prop == "hblno") {
- item.display = true;
- }
- });
- } else {
- this.basicData.column.forEach(item => {
- if (item.prop == "bookingNo") {
- item.display = false;
- }
- if (item.prop == "hblno") {
- item.display = true;
- }
- });
- }
- // 只有分单不能编辑
- if (oldValue == "MH") {
- this.basicData.column.forEach((item, index) => {
- if (index == 3) {
- item.forEach(row => {
- if (row.prop == "mblno") {
- row.disabled = true;
- }
- });
- }
- });
- } else {
- this.basicData.column.forEach((item, index) => {
- if (index == 3) {
- item.forEach(row => {
- if (row.prop == "mblno") {
- row.disabled = false;
- }
- });
- }
- });
- }
- // 王风刚 2025-02-21 所有分单号都不能手动输入,都可以申请
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行
- },
- // 监听箱信息数据 箱信息中有温度 自动切换 冻货
- "form.preContainersList": {
- // 执行方法
- handler(oldValue, newValue) {
- // 判断是否是数组
- if (oldValue instanceof Array) {
- // 循环 有温度反 true 没有反 false
- const arr = oldValue.map(item => {
- if (Number(item.temperature)) {
- return true;
- } else {
- return false;
- }
- });
- console.log(arr, 12345);
- // 判断是否有温度
- if (arr[0]) {
- // 判断之前是否是冻货
- if (this.form.cargoType == "reefer") return;
- this.$message({
- message: "箱信息里有温度已将货描切换为冻柜",
- type: "warning"
- });
- this.$set(this.form, "cargoType", "reefer");
- }
- }
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行,
- },
- billsListAllData: {
- // 执行方法
- handler(oldValue, newValue) {
- if (oldValue.length && this.form.billType == "MM") {
- this.basicData.column.forEach((item, index) => {
- if (index == 3) {
- item.forEach(row => {
- if (row.prop == "mblno") {
- row.disabled = true;
- }
- });
- }
- });
- console.log(this.basicData.column);
- }
- },
- deep: true, // 深度监听
- immediate: true // 第一次改变就执行,
- }
- },
- created() {
- let Obj = JSON.parse(localStorage.getItem("saber-tenantId"));
- this.saberTenantId = Obj ? Obj.content : 0;
- this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content;
- this.isHq = JSON.parse(localStorage.getItem("user-Information")).isHq;
- isProcurement({ param: "import.template" }).then(res => {
- this.importTemplate = res.data.data;
- });
- isProcurement({ param: "textarea.number" }).then(res => {
- if (res.data.data) {
- this.textareaNumber = res.data.data;
- }
- });
- // isProcurement({ param: "line.length" }).then(res => {
- // if (res.data.data) {
- // this.lineLength = res.data.data;
- // }
- // });
- if (this.detailData.billType) {
- this.form.billType = this.detailData.billType;
- }
- // 判断是否员id, 有id 就不显示
- if (!this.form.id) {
- this.deptGetDetailPolfun(); // 收货地 装货港 当前登录人的默认
- // this.userGetListfun(undefined, true); // 获取用户管理数据
- }
- this.ownDeptLazyTreefun(); // 获取公司数据
- this.getLazylistfun(); // 获取审核数据
- this.mpaymodeWorkDictsfun(); // 获取 付款方式字典
- this.srcTypeWorkDictsfun();
- // 获取EDI 数据
- this.editypesListfun();
- // 获取所属团队数据
- this.postSelectByUserfun();
- },
- methods: {
- inLock() {
- this.showLock = true;
- const data = {
- moduleName: "SE",
- tableName: "SE_order",
- billId: this.form.id,
- no: localStorage.getItem("browserID"),
- billNo: this.form.billNo
- };
- this.inDetailsKey(this.$route.name, {
- moduleName: "SE",
- tableName: "SE_order",
- billId: this.form.id,
- billNo: this.form.billNo
- });
- this.checkLock(data).then(res => {
- if (res.data.code == 200) {
- this.onLock(data).then(res => {
- if (res.data.code == 200) {
- this.showLock = false;
- }
- });
- }
- });
- },
- 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.billNo
- });
- }
- this.pageLoading = true;
- this.billsDetailfun(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.billNo
- });
- }
- this.pageLoading = true;
- this.billsDetailfun(this.pageIds[nextIndex]);
- }
- },
- billModify() {
- if (this.verifyTags("提单修改")) {
- this.$router.push({
- name: "提单修改",
- query: {
- generateId: this.form.id
- }
- });
- }
- },
- addEdit() {
- if (this.form.billStatus >= 3) {
- this.$emit("toAddEdit");
- } else {
- if (
- contrastObj(this.form, this.oldForm) ||
- contrastList(this.form.preContainersList, this.oldForm.preContainersList) ||
- contrastList(this.form.containersList, this.oldForm.containersList) ||
- contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) ||
- contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) ||
- contrastList(this.form.filesList, this.oldForm.filesList) ||
- contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
- ) {
- this.$confirm("是否需要保存?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.editCustomer("toAddEdit");
- })
- .catch(() => {
- this.$emit("toAddEdit");
- });
- } else {
- this.$emit("toAddEdit");
- }
- }
- },
- CopyDocumentsfun() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- this.$DialogForm.show({
- title: "复制单据",
- width: "300px",
- menuPosition: "right",
- data: { checkbox: "复制费用,复制箱型箱量" },
- option: {
- submitText: "确认",
- emptyText: "取消",
- span: 24,
- column: [
- {
- label: "单据类型",
- prop: "billType",
- type: "select",
- value: this.form.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: "复制箱型箱量"
- }
- ],
- dataType: "string",
- span: 24
- }
- ]
- },
- beforeClose: done => {
- done();
- },
- callback: res => {
- res.done();
- this.billsCopyBillsfun(this.form.id, res.data.checkbox, res.data.billType);
- res.close();
- }
- });
- },
- //文档导入
- importData(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/importBills?billId=${this.form.id}`;
- }
- this.excelBox = true;
- },
- // uploadBefore(file, done, loading) {
- // done();
- // loading = true;
- // },
- removeEmptyValues(obj) {
- Object.keys(obj).forEach(key => {
- if (obj[key] === null || obj[key] === undefined || obj[key] === "") {
- delete obj[key];
- }
- });
- return obj;
- },
- // 上传成功
- 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") {
- if (key != "preContainersList") {
- 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();
- }
- },
- allClick(name) {
- if (name == "物流提交") {
- this.logisticsForm = {
- shippingCompanyId: null
- };
- this.logisticsDialog = true;
- }
- if (name == "转单") {
- if (!this.form.podId) {
- return this.$message.error("请选择卸货港");
- }
- if (!this.form.actualEtd) {
- return this.$message.error("请填写ATD");
- }
- this.transferForm = {
- podCompanyId: null
- };
- getLazylist().then(res => {
- for (let item of res.data.data) {
- if (this.form.podId == item.polId) {
- this.transferForm.podCompanyId = item.id;
- this.transferForm.podCompanyName = item.deptName;
- return;
- }
- }
- });
- this.transferDialog = true;
- }
- if (name == "物流撤销提交") {
- this.$confirm("是否撤销物流?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- logisticsRevokeSubmission(this.form).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.logisticsDialog = false;
- this.billsDetailfun(this.form.id);
- });
- });
- }
- if (name == "撤销转单") {
- this.$confirm("是否撤销转单?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.pageLoading = true;
- revokeTransferOrder(this.form)
- .then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.logisticsDialog = false;
- this.billsDetailfun(this.form.id);
- })
- .catch(() => {
- this.pageLoading = false;
- });
- });
- }
- if (name == "同步主单到分单") {
- this.$confirm("是否同步主单到分单?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- synchronizeDataMM({ billId: this.form.id }).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.billsDetailfun(this.form.id);
- });
- });
- }
- if (name == "同步分单信息") {
- this.$confirm("是否同步分单到主单?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- synchronizeData({ billId: this.form.id }).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.billsDetailfun(this.form.id);
- });
- });
- }
- if (name == "提单确认") {
- if (!this.form.temporaryId) {
- return this.$message.error("此单据不能点提单确认");
- }
- if (this.form.cyTrailerTime) {
- const nowDate = new Date(dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss"));
- const cyTrailerTime = new Date(this.form.cyTrailerTime).getTime();
- if (nowDate > cyTrailerTime) {
- return this.$message.error("现在时间超过截单时间不允许提单确认");
- }
- }
- this.$refs.billLading.openDialog(this.form.temporaryId);
- }
- },
- dicChange(name, row) {
- if (name == "shippingCompany") {
- if (row) {
- this.logisticsForm.shippingCompanyId = row.id;
- } else {
- this.logisticsForm.shippingCompanyId = null;
- this.logisticsForm.shippingCompany = null;
- }
- }
- if (name == "shippingStaffName") {
- if (row) {
- this.logisticsForm.shippingStaffId = row.id;
- } else {
- this.logisticsForm.shippingStaffId = null;
- this.logisticsForm.shippingStaffName = null;
- }
- }
- if (name == "podStaffName") {
- if (row) {
- this.transferForm.podStaffId = row.id;
- } else {
- this.transferForm.podStaffId = null;
- this.transferForm.podStaffName = null;
- }
- }
- if (name == "podCompanyName") {
- if (row) {
- this.transferForm.podCompanyId = row.id;
- } else {
- this.transferForm.podCompanyId = null;
- this.transferForm.podCompanyName = null;
- }
- }
- },
- logisticsSubmit() {
- this.$refs["logisticsForm"].validate((valid, done) => {
- done();
- if (valid) {
- let obj = {
- ...this.form,
- ...this.logisticsForm
- };
- logisticsSubmission(obj).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.logisticsDialog = false;
- this.billsDetailfun(this.form.id);
- });
- } else {
- return false;
- }
- });
- },
- transferSubmit() {
- this.$refs["transferForm"].validate((valid, done) => {
- done();
- if (valid) {
- let obj = {
- ...this.form,
- ...this.transferForm
- };
- this.pageLoading = true;
- transferOrder(obj)
- .then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.transferDialog = false;
- this.billsDetailfun(this.form.id);
- })
- .catch(err => {
- this.pageLoading = false;
- });
- } else {
- return false;
- }
- });
- },
- // 获取EDI列表数据
- editypesListfun() {
- editypesList(1, 1000).then(res => {
- 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");
- });
- },
- // 发送edi
- editypesSendingEdifun(row) {
- row.billId = this.form.id;
- // let msgsList = [];
- // 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.detail.mshipperDetails).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.detail.mshipperDetails).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `MBL 发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- // type: "error"
- // });
- // return;
- // }
- // }
- // if (checkFullWidthSymbols(this.form.detail.mconsigneeDetails).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.detail.mconsigneeDetails).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `MBL 收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- // type: "error"
- // });
- // return;
- // }
- // }
- // if (checkFullWidthSymbols(this.form.detail.mnotifyDetails).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.detail.mnotifyDetails).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `MBL 通知人:<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 (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- // type: "error"
- // });
- // return;
- // }
- // if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
- // return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
- // }
- // if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
- // return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
- // }
- // if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
- // return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
- // }
- // if (!verifyEnglish(this.form.detail.hshipperDetails)) {
- // msgsList.push("发货人");
- // }
- // if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
- // msgsList.push("收货人");
- // }
- // if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
- // msgsList.push("通知人");
- // }
- // if (!verifyEnglish(this.form.detail.mshipperDetails)) {
- // msgsList.push("MBL 发货人");
- // }
- // if (!verifyEnglish(this.form.detail.mconsigneeDetails)) {
- // msgsList.push("MBL 收货人");
- // }
- // if (!verifyEnglish(this.form.detail.mnotifyDetails)) {
- // msgsList.push("MBL 通知人");
- // }
- // if (!verifyEnglish(this.form.marks)) {
- // msgsList.push("唛头");
- // }
- // if (!verifyEnglish(this.form.commodityDescr)) {
- // msgsList.push("货描");
- // }
- // if (!verifyEnglish(this.form.forwarding)) {
- // msgsList.push("FORWARDING");
- // }
- // if (msgsList.length > 0) {
- // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
- // return;
- // }
- this.saveLoading = true;
- editypesSendingEdi(row)
- .then(res => {
- this.saveLoading = false;
- // 判断data是否有值,没有值说明不成功给个弹窗返回
- if (!res.data.data) {
- let text = res.data.msg.replace("\r\n", "<br>");
- console.log(text);
- this.$message({
- type: "warning",
- dangerouslyUseHTMLString: true,
- message: text,
- // message: `<p>${text.slice(text.indexOf('非空'), text.indexOf('特殊字符'))}</p><p>${text.slice(text.indexOf('特殊字符'), text.indexOf('长度超长'))}</p><p>${text.slice(text.indexOf('长度超长'), text.indexOf('其他'))}</p><p>${text.slice(text.indexOf('其他'))}</p>`,
- duration: 5000
- });
- } else {
- this.$message.success("操作成功,请去文件中心查看");
- this.billsDetailfun(this.form.id); // 详情接口
- }
- })
- .catch(err => {
- this.saveLoading = false;
- });
- },
- // 报表弹窗
- previewDialogfun() {
- this.getReportTypeByBigHandle("业务");
- this.previewDialog = true;
- },
- //请核关闭
- choceScheduleFun() {
- this.checkScheduleDialog = false;
- },
- // 收货地 装货港 当前登录人的默认
- deptGetDetailPolfun() {
- deptGetDetailPol(this.saberUserInfo.dept_pid.split(",")[0]).then(res => {
- // 收货地
- this.form.placeReceiptName = res.data.data.polEnName;
- this.form.placeReceiptId = res.data.data.polId;
- this.form.placeReceiptCode = res.data.data.polCode;
- this.form.placeReceiptNamePrint = res.data.data.polEnName;
- 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.$set(this.form, "issueAtId", this.form.polId);
- this.$set(this.form, "issueAt", this.form.polEnName);
- // 主单单付费地点 默认 如果主单付费方式 为PP 取装货港 如果主单付费地点为CC 取卸货港
- if (this.form.mpaymode == "PP") {
- this.$set(this.form, "mpayplace", this.form.polEnName);
- }
- // 分单单付费地点 默认 如果分单付费方式 为PP 取装货港 如果分单付费地点为CC 取卸货港
- if (this.form.hpaymode == "PP") {
- this.$set(this.form, "hpayplace", this.form.polEnName);
- }
- });
- },
- // 获取用户管理数据
- userGetListfun(account = undefined, type = false) {
- // userGetList(1, 10, { account }, this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
- // this.columnforfun('operatorName').dicData = res.data.data.records
- // if (type) {
- // // 核算部门 默认登录人的部门
- // for (let item of this.columnforfun('operatorName').dicData) {
- // if (item.name == this.form.operatorName) {
- // this.$set(this.form, 'accDeptName', item.deptName)
- // this.$set(this.form, 'accDept', item.deptId)
- // this.$set(this.form, 'operatorDept', item.deptId.split(',').pop())
- // this.$set(this.form, 'operatorDeptName', item.deptId)
- // }
- // }
- // }
- // })
- },
- // 获取所属岗位数据
- postSelectByUserfun() {
- postSelectByUser(JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id).then(res => {
- // this.columnforfun('teamName').dicData = res.data.data
- // 判断是否有值,没有的话默认第一个
- if (!this.form.teamName) {
- this.$set(this.form, "teamId", res.data.data[0].id);
- this.$set(this.form, "teamName", res.data.data[0].postName);
- }
- });
- },
- // 获取付款方式字典数据
- mpaymodeWorkDictsfun() {
- getWorkDicts("payment_method_los").then(res => {
- this.columnforfun("mpaymode").dicData = res.data.data;
- // this.columnforfun('hpaymode').dicData = res.data.data
- });
- },
- // 获取核算部分数据 // 机构管理接口
- getLazylistfun() {
- // getDeptTree().then(res => {
- // this.columnforfun('accDeptName').dicData = res.data.data
- // })
- },
- // 获取客户名称数据 往来单位数据
- getBcorpsListfun(cnName) {
- getBcorpsList(1, 20, { shortName: cnName, status: 0 }).then(res => {
- this.columnforfun("corpCnName").dicData = res.data.data.records;
- });
- },
- // 获取客户联系人 客户OP
- getBcorpsattnListfun(cname) {
- // getBcorpsattnList(1, 10, { pid: this.form.corpId, cname }).then(res => {
- // this.columnforfun('corpAttnName').dicData = res.data.data.records
- // // if (res.data.data.records.length == 0) {
- // // this.form.corpAttnName = ''
- // // this.form.corpAttnId = ''
- // // this.$set(this.form, 'corpAttnTel', '')
- // // this.$set(this.form, 'corpAttnEmail', '')
- // // return
- // // }
- // // this.form.corpAttnName = res.data.data.records[0].cname
- // // this.form.corpAttnId = res.data.data.records[0].id
- // // this.$set(this.form, 'corpAttnTel', res.data.data.records[0].tel)
- // // this.$set(this.form, 'corpAttnEmail', res.data.data.records[0].email)
- // })
- },
- // 获取地点信息
- getBlocationsListfun(cnName) {
- // getBlocationsList(1, 10, { cnName }).then(res => {
- // this.columnforfun('mPayplace').dicData = res.data.data.records
- // })
- },
- // 获取业务来源数据
- srcTypeWorkDictsfun() {
- // getWorkDicts('src_type_los').then(res => {
- // this.columnforfun('srcType').dicData = res.data.data
- // })
- },
- // 获取业务来源代理数据
- agentBcorpsListfun(cnName) {
- // let corpTypeName = '国内直接客户,国内同行及代理,国外直接客户,国外同行及代理'
- // getBcorpslistByType(1, 20, { cnName, status: 0, corpTypeName }).then(res => {
- // this.columnforfun('srcCnName').dicData = res.data.data.records
- // })
- },
- // 获取业务来源业务员数据
- salesUserGetListfun(account) {
- // if (this.$store.getters.userInfo.tenant_id === "263057") {
- // userGetList(1, 10, { roleId: '业务员' }).then(res => {
- // this.columnforfun('srcCnName').dicData = res.data.data.records
- // })
- // } else {
- // selectListLos('业务员', account).then(res => {
- // this.columnforfun('srcCnName').dicData = res.data.data
- // })
- // }
- },
- // 获取公司名称 用户管理左侧
- ownDeptLazyTreefun() {
- // getDeptLazyTree(0).then(res => {
- // this.columnforfun('srcCnName').dicData = res.data.data
- // // 来源 内容 默认登录人所属公司
- // for (let item of this.columnforfun('srcCnName').dicData) {
- // if (item.id == JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]) {
- // this.$set(this.form, 'srcId', item.id)
- // this.$set(this.form, 'srcCnName', item.title)
- // this.$set(this.form, 'srcEnName', item.title)
- // }
- // }
- // })
- },
- // 申请B/L NO
- billsGetBillNofun() {
- let billNoFormat = "";
- if (this.form.cargoType == "dry") {
- billNoFormat = "HYCK-PH";
- } else if (this.form.cargoType == "danger") {
- billNoFormat = "HYCK-WXP";
- } else if (this.form.cargoType == "reefer") {
- billNoFormat = "HYCK-DG";
- }
- billsGetBillNo({
- businessTypeCode: "HYCK",
- billNoFormat: billNoFormat
- }).then(res => {
- // this.columnforfun('hpaymode').disabled = false
- this.$set(this.form, "hblno", res.data.data);
- this.billsSubmitfun();
- });
- },
- // 下拉多选弹窗的确认
- eldialogConfirm(name) {
- if (name == "bcorps") {
- if (this.$refs.bcorps[0].isShow) {
- console.log("列表确认");
- this.form.corpCnName = this.$refs.bcorps[0].selectionList[0].cnName;
- this.form.corpEnName = this.$refs.bcorps[0].selectionList[0].enName;
- this.form.corpId = this.$refs.bcorps[0].selectionList[0].id;
- this.form.corpCode = this.$refs.bcorps[0].selectionList[0].code;
- this.form.corpSource = this.$refs.bcorps[0].selectionList[0].corpSource;
- // 获取 客户op数据
- this.getBcorpsattnListfun();
- // 业务来源参数带出
- this.$set(this.form, "srcType", this.$refs.bcorps[0].selectionList[0].sourceType);
- this.$set(this.form, "srcId", this.$refs.bcorps[0].selectionList[0].srcId);
- this.$set(this.form, "srcCnName", this.$refs.bcorps[0].selectionList[0].srcCnName);
- this.$set(this.form, "srcEnName", this.$refs.bcorps[0].selectionList[0].srcEnName);
- // this.columnforfun('srcType').disabled = false
- // this.columnforfun('srcCnName').disabled = false
- // 航线带出往来单位的优势航线
- this.$set(this.form, "lineCnName", this.$refs.bcorps[0].selectionList[0].advantageRoute);
- // 带出发货人数据
- this.$set(this.form.detail, "hshipperId", this.$refs.bcorps[0].selectionList[0].id);
- this.$set(this.form.detail, "hshipperCnName", this.$refs.bcorps[0].selectionList[0].cnName);
- this.$set(this.form.detail, "hshipperEnName", this.$refs.bcorps[0].selectionList[0].enName);
- this.$set(this.form.detail, "hshipperCode", this.$refs.bcorps[0].selectionList[0].code);
- this.$set(this.form.detail, "hshipperDetails", this.$refs.bcorps[0].selectionList[0].details);
- this.$set(this.form.detail, "hshipperCntyName", this.$refs.bcorps[0].selectionList[0].cntyName);
- this.$set(this.form.detail, "hshipperCntyCode", this.$refs.bcorps[0].selectionList[0].cntyCode);
- // this.columnforfun('corpAttnName').disabled = false
- // this.columnforfun('corpAttnTel').disabled = false
- // this.columnforfun('corpAttnEmail').disabled = false
- } else {
- console.log("详情确认");
- console.log(this.$refs.bcorps, 962);
- this.$refs.bcorps[0].$refs.detail.submitForm();
- this.form.corpCnName = this.$refs.bcorps[0].$refs.detail.formData.cnName;
- this.form.corpEnName = this.$refs.bcorps[0].$refs.detail.formData.enName;
- this.form.corpId = this.$refs.bcorps[0].$refs.detail.formData.id;
- this.form.corpCode = this.$refs.bcorps[0].$refs.detail.formData.code;
- this.form.corpSource = this.$refs.bcorps[0].$refs.detail.formData.corpSource;
- // 获取 客户op数据
- this.getBcorpsattnListfun();
- // 业务来源参数带出
- this.$set(this.form, "srcType", this.$refs.bcorps[0].$refs.detail.formData.sourceType);
- this.$set(this.form, "srcId", this.$refs.bcorps[0].$refs.detail.formData.srcId);
- this.$set(this.form, "srcCnName", this.$refs.bcorps[0].$refs.detail.formData.srcCnName);
- this.$set(this.form, "srcEnName", this.$refs.bcorps[0].$refs.detail.formData.srcEnName);
- // this.columnforfun('srcType').disabled = false
- // this.columnforfun('srcCnName').disabled = false
- // 航线带出往来单位的优势航线
- this.$set(this.form, "lineCnName", this.$refs.bcorps[0].$refs.detail.formData.advantageRoute);
- // 带出发货人数据
- this.$set(this.form.detail, "hshipperId", this.$refs.bcorps[0].$refs.detail.formData.id);
- this.$set(this.form.detail, "hshipperCnName", this.$refs.bcorps[0].$refs.detail.formData.cnName);
- this.$set(this.form.detail, "hshipperEnName", this.$refs.bcorps[0].$refs.detail.formData.enName);
- this.$set(this.form.detail, "hshipperCode", this.$refs.bcorps[0].$refs.detail.formData.code);
- this.$set(this.form.detail, "hshipperDetails", this.$refs.bcorps[0].$refs.detail.formData.details);
- this.$set(this.form.detail, "hshipperCntyName", this.$refs.bcorps[0].$refs.detail.formData.cntyName);
- this.$set(this.form.detail, "hshipperCntyCode", this.$refs.bcorps[0].$refs.detail.formData.cntyCode);
- // this.columnforfun('corpAttnName').disabled = false
- // this.columnforfun('corpAttnTel').disabled = false
- // this.columnforfun('corpAttnEmail').disabled = false
- }
- }
- this.$refs.searchQueryRef[0].corpVisible = false;
- },
- // 下拉多选弹窗数据多选回调
- eldialogMultipleChoice(list, name) {
- if (name == "bcorps") {
- let arr = [];
- if (list.length > 1) {
- this.$refs.bcorps[0].$refs.crud.toggleSelection(); // 先清空所以选择的数据
- arr = [list[list.length - 1]]; // 获取最新点击的数组
- this.$refs.bcorps[0].$refs.crud.toggleSelection(arr, true); // 把刚点击的数组变成选择状态
- } else {
- arr = list;
- }
- this.$refs.bcorps[0].selectionList = arr;
- }
- },
- /* 远程模糊查询操作用户 */
- remoteMethod(value, name) {
- // if (name == 'operatorName') {
- // this.userGetListfun(value)
- // }
- // else if (name == 'accDeptName') {
- // this.getLazylistfun(value)
- // }
- if (name == "corpCnName") {
- this.getBcorpsListfun(value);
- }
- // else if (name == 'mPayplace') {
- // this.getBlocationsListfun(value)
- // }
- // else if (name == 'corpAttnName') {
- // this.getBcorpsattnListfun(value)
- // }
- // else if (name == 'srcType') {
- // this.srcTypeWorkDictsfun()
- // }
- // else if (name == 'srcCnName') {
- // if (this.form.srcType == 'SALES') {
- // // 业务员
- // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
- // this.salesUserGetListfun(value)
- // } else if (this.form.srcType == 'AGENT') {
- // // 代理
- // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
- // this.agentBcorpsListfun(value)
- // } else if (this.form.srcType == 'OWN') {
- // // 公司
- // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
- // this.ownDeptLazyTreefun()
- // }
- // } else if (name == 'teamName') {
- // this.postSelectByUserfun()
- // }
- },
- // 下拉的监听事件
- corpChange(value, name) {
- // if (name == 'operatorName') {
- // // OP 下拉赋值 用户管理列表
- // for (let item of this.columnforfun('operatorName').dicData) {
- // if (item.name == value) {
- // this.form.operatorName = item.name
- // this.form.operatorId = item.id
- // this.form.operatorDept = item.deptId.split(',').pop()
- // this.form.operatorDeptName = item.deptName
- // }
- // }
- // }
- // else if (name == 'accDeptName') {
- // // OP 下拉赋值 用户管理列表
- // for (let item of this.columnforfun('accDeptName').dicData) {
- // if (item.title == value) {
- // this.form.accDeptName = item.title
- // this.form.accDept = item.id
- // }
- // }
- // }
- if (name == "corpCnName") {
- if (value) {
- // this.columnforfun('corpAttnName').disabled = false
- // this.columnforfun('corpAttnTel').disabled = false
- // this.columnforfun('corpAttnEmail').disabled = false
- } else {
- // this.columnforfun('corpAttnName').disabled = true
- // this.columnforfun('corpAttnTel').disabled = true
- // this.columnforfun('corpAttnEmail').disabled = true
- // 如果点击清空按钮把值赋值为空
- this.form.corpCnName = "";
- this.form.corpEnName = "";
- this.form.corpId = "";
- this.form.corpCode = "";
- this.form.shortName = "";
- this.form.corpSource = "";
- // 清空 客户OP
- // this.form.corpAttnName = ''
- this.form.corpAttnId = "";
- this.$set(this.form, "corpAttnTel", "");
- this.$set(this.form, "corpAttnEmail", "");
- // 清空 业务来源和来源详情
- this.$set(this.form, "srcType", "");
- this.$set(this.form, "srcId", "");
- this.$set(this.form, "srcCnName", "");
- this.$set(this.form, "srcEnName", "");
- }
- // 往来单位
- for (let item of this.columnforfun("corpCnName").dicData) {
- if (item.cnName == value) {
- this.form.corpCnName = item.cnName;
- this.form.corpEnName = item.enName;
- this.form.corpId = item.id;
- this.form.corpCode = item.code;
- this.form.shortName = item.shortName;
- this.form.corpSource = item.corpSource;
- // 获取 客户op数据
- this.getBcorpsattnListfun();
- // 业务来源参数带出
- this.$set(this.form, "srcType", item.sourceType);
- this.$set(this.form, "srcId", item.srcId);
- this.$set(this.form, "srcCnName", item.srcCnName);
- this.$set(this.form, "srcEnName", item.srcEnName);
- this.$set(this.form, "srcDeptId", item.deptId.split(",").pop());
- this.$set(this.form, "srcDeptName", item.deptName);
- this.columnforfun("srcType").disabled = false;
- this.columnforfun("srcCnName").disabled = false;
- // 航线带出往来单位的优势航线
- this.$set(this.form, "lineCnName", item.advantageRoute);
- // 带出发货人数据
- // this.$set(this.form,'hshipperId',item.id)
- // this.$set(this.form,'hshipperCnName',item.cnName)
- // this.$set(this.form,'hshipperEnName',item.enName)
- // this.$set(this.form,'hshipperCode',item.code)
- // this.$set(this.form,'hshipperDetails',item.details)
- // this.$set(this.form,'hshipperCntyName',item.cntyName)
- // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
- }
- }
- }
- // else if (name == 'corpAttnName') {
- // if (this.columnforfun('corpAttnName').dicData.length) {
- // for (let item of this.columnforfun('corpAttnName').dicData) {
- // if (item.cname == value) {
- // this.form.corpAttnName = item.cname
- // this.form.corpAttnId = item.id
- // this.$set(this.form, 'corpAttnTel', item.tel)
- // this.$set(this.form, 'corpAttnEmail', item.email)
- // }
- // }
- // } else {
- // if (value) {
- // this.form.corpAttnName = value
- // this.form.corpAttnId = null
- // }
- // }
- // }
- // else if (name == 'srcType') {
- // if (!value) {
- // this.$set(this.form, 'srcType', '')
- // // this.columnforfun('srcCnName').disabled = true
- // return
- // }
- // this.$set(this.form, 'srcId', '')
- // this.$set(this.form, 'srcCnName', '')
- // this.$set(this.form, 'srcEnName', '')
- // this.form[name] = value
- // if (value == 'OWN') {
- // // 公司
- // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'title', value: 'title' }
- // this.ownDeptLazyTreefun()
- // } else if (value == 'AGENT') {
- // // 代理
- // this.columnforfun('srcCnName').type = 'select'
- // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'cnName', value: 'cnName' }
- // this.columnforfun('srcCnName').disabled = false
- // this.agentBcorpsListfun()
- // } else if (value == 'SALES') {
- // // 业务员
- // this.columnforfun('srcCnName').type = 'select'
- // this.columnforfun('srcCnName').forParameter = { key: 'id', label: 'name', value: 'name' }
- // this.columnforfun('srcCnName').disabled = false
- // this.salesUserGetListfun()
- // }
- // }
- // else if (name == 'srcCnName') {
- // for (let item of this.columnforfun('srcCnName').dicData) {
- // if (item[this.columnforfun('srcCnName').forParameter.value] == value) {
- // if (this.form.srcType == 'SALES') {
- // // 业务员
- // this.$set(this.form, 'srcId', item.id)
- // this.$set(this.form, 'srcCnName', item.name)
- // this.$set(this.form, 'srcEnName', item.name)
- // this.$set(this.form, 'srcDeptId', item.deptId.split(',').pop())
- // this.$set(this.form, 'srcDeptName', item.deptName)
- // } else if (this.form.srcType == 'AGENT') {
- // // 代理
- // this.$set(this.form, 'srcId', item.id)
- // this.$set(this.form, 'srcCnName', item.cnName)
- // this.$set(this.form, 'srcEnName', item.enName)
- // }
- // }
- // }
- // }
- // else if (name == 'coloaderCnName') {
- // for (let item of this.columnforfun('coloaderCnName').dicData) {
- // if (item.cnName == value) {
- // this.$set(this.form, 'coloaderId', item.id)
- // this.$set(this.form, 'coloaderCnName', item.cnName)
- // this.$set(this.form, 'coloaderEnName', item.enName)
- // }
- // }
- // }
- else if (name == "mpaymode") {
- // 主单付费方式
- this.form[name] = value;
- if (value == "PP") {
- this.$set(this.form, "mpayplace", this.form.polEnName ? this.form.polEnName.split(" - ")[0] : "");
- } else {
- this.$set(this.form, "mpayplace", this.form.podEnName ? this.form.podEnName.split(" - ")[0] : "");
- }
- }
- // else if (name == 'hpaymode') {
- // // 分单付费方式
- // this.form[name] = value
- // if (value == 'PP') {
- // this.$set(this.form, 'hpayplace', this.form.polEnName.split(' - ')[0])
- // } else {
- // this.$set(this.form, 'hpayplace', this.form.podEnName.split(' - ')[0])
- // }
- // }
- // else if (name == 'teamName') {
- // if (!value) {
- // this.$set(this.form, 'teamId', '')
- // this.$set(this.form, 'teamName', '')
- // }
- // for (let item of this.columnforfun('teamName').dicData) {
- // if (item.id == value) {
- // this.$set(this.form, 'teamId', item.id)
- // this.$set(this.form, 'teamName', item.postName)
- // }
- // }
- // }
- else {
- this.form[name] = value;
- }
- },
- // 申请B/L NO
- applyforfun(text) {
- if (!this.form.id) {
- this.$message({
- message: "请先保存数据",
- type: "warning"
- });
- return;
- }
- // 如果不是分单
- // 王风刚 2025-02-21 所有分单号都不能手动输入,都可以申请
- // if (this.form.billType != 'MH') {
- // this.$message({
- // message: '只有分单需要申请',
- // type: 'warning'
- // });
- // return
- // }
- if (!this.form.businessType) {
- this.$message({
- message: "请先选择业务类型",
- type: "warning"
- });
- return;
- }
- if (!this.form.corpCnName) {
- this.$message({
- message: "请先选择客户名称",
- type: "warning"
- });
- return;
- }
- if (this.form.hblno) {
- this.$confirm(`确定删除${text}?`, {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(res => {
- removeHblNo({ id: this.form.id }).then(res => {
- this.form.hblno = null;
- this.billsSubmitfun();
- });
- });
- } else {
- if (!this.form.hblno) {
- // 王风刚 2025-02-21 无需弹窗,直接申请分单号
- // this.$confirm(`确定${text}?`, {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning"
- // }).then(res => {
- // this.billsGetBillNofun()
- // })
- this.billsGetBillNofun();
- }
- }
- },
- // 配置项
- columnforfun(value) {
- for (let item of this.basicData.column) {
- if (item instanceof Array) {
- for (let ite of item) {
- if (value == ite.prop) {
- return ite;
- }
- }
- } else {
- if (value == item.prop) {
- return item;
- }
- }
- }
- },
- //返回列表
- backToList() {
- console.log(
- this.form.feeCenterListC,
- this.oldForm.feeCenterListC,
- this.form.feeCenterListD,
- this.oldForm.feeCenterListD,
- this.form.filesList,
- this.oldForm.filesList,
- this.form.waitingBoxList,
- this.oldForm.waitingBoxList,
- 3
- );
- if (
- contrastObj(this.form, this.oldForm) ||
- contrastList(this.form.preContainersList, this.oldForm.preContainersList) ||
- contrastList(this.form.containersList, this.oldForm.containersList) ||
- contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) ||
- contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) ||
- contrastList(this.form.filesList, this.oldForm.filesList) ||
- contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
- ) {
- this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.editCustomer("goBack");
- })
- .catch(() => {
- if (this.form.id) {
- this.unLock({
- moduleName: "SE",
- tableName: "SE_order",
- billId: this.form.id,
- billNo: this.form.billNo
- });
- }
- this.$emit("goBack");
- });
- } else {
- if (this.form.id) {
- this.unLock({
- moduleName: "SE",
- tableName: "SE_order",
- billId: this.form.id,
- billNo: this.form.billNo
- });
- }
- this.$emit("goBack");
- }
- },
- // 单据请核
- DocumentApproval() {
- if (this.form.billType == "MH") {
- this.$message.warning("分单不能提交请核");
- return;
- }
- if (popupReminder(this.form, this.messageData)) {
- console.log(popupReminder(this.form, this.messageData));
- this.$confirm(popupReminder(this.form, this.messageData), {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- // if (popupReminder(this.form, this.messageData)) {
- // }
- if (this.form.billType == "DD") {
- if (this.form.feeCenterListC.length == 0 && this.form.feeCenterListD.length == 0) {
- return this.$message.warning("请添加费用信息");
- }
- }
- this.$confirm("确定要请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.pageLoading = true;
- billsCheckBills({
- id: this.form.id,
- url: "/iosBasicData/SeafreightExportF/bills/approvalDetails",
- pageStatus: "this.$store.getters.approvalDetails",
- pageLabel: "审批详情(F)"
- })
- .then(res => {
- this.pageLoading = false;
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- // 详情
- this.billsDetailfun(this.form.id);
- })
- .catch(() => {
- this.pageLoading = false;
- });
- });
- },
- // 撤销单据请核
- revokeDocumentApproval() {
- this.$confirm("确定要撤销请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.pageLoading = true;
- billsRevokeCheckBills({
- id: this.form.id
- }).then(res => {
- this.pageLoading = false;
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- // 详情
- this.billsDetailfun(this.form.id);
- });
- });
- },
- //撤销锁单
- revokeLockOrder() {
- this.$confirm("是否撤销锁单?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.pageLoading = true;
- revokeLockOrder({
- id: this.form.id
- }).then(res => {
- this.pageLoading = false;
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- // 详情
- this.billsDetailfun(this.form.id);
- });
- });
- },
- // 编辑按钮
- editHandle() {
- this.detailData.seeDisabled = false;
- },
- //去除文本框的空格
- getTextTirim(data) {
- if (data) {
- let obj = data.split("\n");
- let res = [];
- obj.forEach(item => {
- res.push(_.toUpper(_.trimEnd(item)));
- });
- return res.join("\n");
- } else {
- return null;
- }
- },
- // 大保存按钮
- editCustomer(status) {
- this.$refs.form.validate(valid => {
- if (valid) {
- // 判断必填项
- let msgs = [];
- if (!this.form.cargoType) {
- msgs.push("货描");
- }
- if (!this.form.quantity) {
- msgs.push("件数");
- }
- if (!this.form.packingUnit) {
- msgs.push("包装");
- }
- if (!this.form.grossWeight) {
- msgs.push("毛重");
- }
- if (!this.form.measurement) {
- msgs.push("尺码");
- }
- if (!this.form.etd) {
- msgs.push("ETD");
- }
- if (!this.form.actualEtd) {
- msgs.push("ATD");
- }
- if (!this.form.srcType || !this.form.srcCnName) {
- msgs.push("业务来源");
- }
- if (!this.form.cabinType) {
- msgs.push("舱位类型");
- }
- if (this.form.billType != "MM") {
- if (!this.form.operatorName) {
- msgs.push("OP");
- }
- if (!this.form.customerServiceName) {
- msgs.push("客服");
- }
- }
- // if (!this.form.issueType) {
- // msgs.push("签单方式");
- // }
- // if (!this.form.teamName) {
- // msgs.push('所属团队')
- // }
- for (let item of this.form.preContainersList) {
- if (!item.cntrTypeCode) {
- this.$message.error("请选择尺码箱型");
- return;
- }
- if (validatenull(item.quantity)) {
- this.$message.error("箱量不能为空");
- return;
- }
- }
- for (let item of this.form.feeCenterListD) {
- if (!item.corpId || !item.feeId || !item.curCode) {
- msgs.push(
- `应收第${item.$index + 1}行${!item.corpId ? " 往来单位" : ""}${!item.feeId ? " 费用简称" : ""}${!item.curCode ? " 币种" : ""}`
- );
- }
- }
- for (let item of this.form.feeCenterListC) {
- if (!item.corpId || !item.feeId || !item.curCode) {
- msgs.push(
- `应付第${item.$index + 1}行${!item.corpId ? " 往来单位" : ""}${!item.feeId ? " 费用简称" : ""}${!item.curCode ? " 币种" : ""}${
- item.feeCnName == "快递费" && !item.trackingNumber ? " 快递费" : ""
- }`
- );
- }
- }
- if (msgs.length > 0) {
- this.$confirm(`请填写下列信息:${msgs.join(" ,")}!`, {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- });
- return;
- }
- let msgsList = [];
- // 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}"`);
- // }
- // if (msg.length > 0) {
- // 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}"`);
- // }
- // if (msg.length > 0) {
- // 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}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `通知人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- // type: "error"
- // });
- // return;
- // }
- // }
- // if (checkFullWidthSymbols(this.form.detail.mshipperDetails).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.detail.mshipperDetails).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `MBL 发货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- // type: "error"
- // });
- // return;
- // }
- // }
- // if (checkFullWidthSymbols(this.form.detail.mconsigneeDetails).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.detail.mconsigneeDetails).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `MBL 收货人:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- // type: "error"
- // });
- // return;
- // }
- // }
- // if (checkFullWidthSymbols(this.form.detail.mnotifyDetails).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.detail.mnotifyDetails).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `MBL 通知人:<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}"`);
- // }
- // if (msg.length > 0) {
- // 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}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `货描:<br>${msg.join(";<br>")}<br>存在全角或汉字符号、汉字,请确认`,
- // type: "error"
- // });
- // return;
- // }
- // }
- // if (checkFullWidthSymbols(this.form.forwarding).hasFullWidth) {
- // let msg = [];
- // for (let item of checkFullWidthSymbols(this.form.forwarding).positions) {
- // msg.push(`第${item.row}行的"${item.symbol}"`);
- // }
- // if (msg.length > 0) {
- // this.$message({
- // dangerouslyUseHTMLString: true,
- // message: `FORWARDING:<br>${msg.join(";<br>")}<br>存在全角或汉字符号,,请修正后再保存!`,
- // type: "error"
- // });
- // return;
- // }
- // }
- // if (lineQuantityVerification(this.form.detail.hshipperDetails, this.lineLength)) {
- // return this.$message.error(`发货人详情超长,请手动断行,否则影响打印`);
- // }
- // if (this.form.detail.hshipperDetails) {
- // let msg = tabVerify(this.form.detail.hshipperDetails);
- // if (msg.length > 0) {
- // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "发货人详情", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消"
- // }).then(() => {
- // this.form.detail.hshipperDetails = this.form.detail.hshipperDetails.replace(/\t/g, " ");
- // });
- // return;
- // }
- // }
- // if (lineQuantityVerification(this.form.detail.hconsigneeDetails, this.lineLength)) {
- // return this.$message.error(`收货人详情超长,请手动断行,否则影响打印`);
- // }
- // if (this.form.detail.hconsigneeDetails) {
- // let msg = tabVerify(this.form.detail.hconsigneeDetails);
- // if (msg.length > 0) {
- // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "收货人详情", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消"
- // }).then(() => {
- // this.form.detail.hconsigneeDetails = this.form.detail.hconsigneeDetails.replace(/\t/g, " ");
- // });
- // return;
- // }
- // }
- // if (lineQuantityVerification(this.form.detail.hnotifyDetails, this.lineLength)) {
- // return this.$message.error(`通知人详情超长,请手动断行,否则影响打印`);
- // }
- // if (this.form.detail.hnotifyDetails) {
- // let msg = tabVerify(this.form.detail.hnotifyDetails);
- // if (msg.length > 0) {
- // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "通知人详情", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消"
- // }).then(() => {
- // this.form.detail.hnotifyDetails = this.form.detail.hnotifyDetails.replace(/\t/g, " ");
- // });
- // return;
- // }
- // }
- // if (this.form.marks) {
- // let msg = tabVerify(this.form.marks);
- // if (msg.length > 0) {
- // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "唛头", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消"
- // }).then(() => {
- // this.form.marks = this.form.marks.replace(/\t/g, " ");
- // });
- // return;
- // }
- // }
- // if (this.form.commodityDescr) {
- // let msg = tabVerify(this.form.commodityDescr);
- // if (msg.length > 0) {
- // this.$confirm(`${msg.join(",")}含有TAB字符,是否替换成空格!`, "货描", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消"
- // }).then(() => {
- // this.form.commodityDescr = this.form.commodityDescr.replace(/\t/g, " ");
- // });
- // return;
- // }
- // }
- // console.log(this.form.detail);
- // if (!verifyEnglish(this.form.detail.hshipperDetails)) {
- // msgsList.push("发货人");
- // }
- // if (!verifyEnglish(this.form.detail.hconsigneeDetails)) {
- // msgsList.push("收货人");
- // }
- // if (!verifyEnglish(this.form.detail.hnotifyDetails)) {
- // msgsList.push("通知人");
- // }
- // if (!verifyEnglish(this.form.detail.mshipperDetails)) {
- // msgsList.push("MBL 发货人");
- // }
- // if (!verifyEnglish(this.form.detail.mconsigneeDetails)) {
- // msgsList.push("MBL 收货人");
- // }
- // if (!verifyEnglish(this.form.detail.mnotifyDetails)) {
- // msgsList.push("MBL 通知人");
- // }
- // if (!verifyEnglish(this.form.marks)) {
- // msgsList.push("唛头");
- // }
- // if (!verifyEnglish(this.form.commodityDescr)) {
- // msgsList.push("货描");
- // }
- // if (!verifyEnglish(this.form.forwarding)) {
- // msgsList.push("FORWARDING");
- // }
- // if (msgsList.length > 0) {
- // // this.$message.error(`请正确输入${msgsList.join(",")}的英文`);
- // this.$message.error(`${msgsList.join(",")}存在非英文字符,如汉字等,请修正后再保存!`);
- // return;
- // }
- this.form.detail.hshipperDetails = this.getTextTirim(this.form.detail.hshipperDetails);
- this.form.detail.hconsigneeDetails = this.getTextTirim(this.form.detail.hconsigneeDetails);
- this.form.detail.hnotifyDetails = this.getTextTirim(this.form.detail.hnotifyDetails);
- this.form.detail.marks = this.getTextTirim(this.form.detail.marks);
- this.form.detail.commodityDescr = this.getTextTirim(this.form.detail.commodityDescr);
- this.form.forwarding = this.getTextTirim(this.form.forwarding);
- // 赋值 ETD 日期
- // this.form.billDate = this.form.etd ? this.form.etd.slice(0, 10) + ' 00:00:00' : null // 单据日期
- // 调用保存接口
- // this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
- // confirmButtonText: "覆盖",
- // cancelButtonText: "更新",
- // type: "warning"
- // })
- // .then(() => {
- // })
- // .catch(() => {
- // });
- for (let item of this.form.preContainersList) {
- if (this.form.containersList.filter(e => e.cntrTypeCode == item.cntrTypeCode).length > item.quantity) {
- return this.$message.error(`${item.cntrTypeCode}箱量不能超过${item.quantity}条`);
- }
- // let qtySUM = 0;
- // for (let row of this.form.containersList) {
- // if (item.cntrTypeCode == row.cntrTypeCode) {
- // qtySUM += Number(row.quantity);
- // }
- // if (qtySUM > item.number) {
- // return this.$message.error(`箱型:${item.cntrTypeCode}的总数量不能超过${item.number}`);
- // }
- // }
- }
- this.billsSubmitfun(status);
- }
- });
- },
- // 主表保存接口大保存
- billsSubmitfun(status) {
- if (this.form.cargoType == "dry") {
- // 普货
- this.form.billNoFormat = "HYCK-PH";
- } else if (this.form.cargoType == "danger") {
- // 危险品
- this.form.billNoFormat = "HYCK-WXP";
- } else if (this.form.cargoType == "reefer") {
- // 冻柜
- this.form.billNoFormat = "HYCK-DG";
- } else {
- this.form.billNoFormat = "HYCK";
- }
- this.form.businessTypeCode = "HYCK";
- delete this.form.extendedData;
- // 把拼接的数据拆开 开始 🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒🐒
- // this.searchSplit()
- // 把拼接的数据拆开 结束 💩💩💩💩💩💩💩💩💩💩💩💩💩💩
- // 费用 收 赋值数据
- // this.form.shortName=this.form.corpCnName.split('-')[1]
- // 处理超长数据
- if (this.form.detail.hshipperDetails) {
- let arrDeteil = [];
- arrDeteil = this.form.detail.hshipperDetails.split("\n");
- if (arrDeteil.length > this.textareaNumber) {
- this.form.detail.hshipperDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "*";
- this.form.commodityDescr += "\n*" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
- } else {
- this.form.detail.hshipperDetails = this.form.detail.hshipperDetails;
- }
- }
- if (this.form.detail.hconsigneeDetails) {
- let arrDeteil = [];
- arrDeteil = this.form.detail.hconsigneeDetails.split("\n");
- if (arrDeteil.length > this.textareaNumber) {
- this.form.detail.hconsigneeDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "**";
- this.form.commodityDescr += "\n**" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
- } else {
- this.form.detail.hconsigneeDetails = this.form.detail.hconsigneeDetails;
- }
- }
- if (this.form.detail.hnotifyDetails) {
- let arrDeteil = [];
- arrDeteil = this.form.detail.hnotifyDetails.split("\n");
- if (arrDeteil.length > this.textareaNumber) {
- this.form.detail.hnotifyDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "***";
- this.form.commodityDescr += "\n***" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
- } else {
- this.form.detail.hnotifyDetails = this.form.detail.hnotifyDetails;
- }
- }
- this.form.feeCenterListD.map((row, index) => {
- row.dc = "D";
- row.sort = Number(index) + 1;
- row.businessType = this.form.businessType; // 业务类型
- row.billType = this.form.billType; // 单据类型
- row.billNo = this.form.billNo; // 单据编号
- row.billDate = this.form.billDate;
- row.billCorpId = this.form.corpId; // 主表客户 id
- row.billCorpCnName = this.form.corpCnName; // 主表客户中文名称
- row.billCorpEnName = this.form.corpEnName; // 主表客户英文名称
- row.lineId = this.form.lineId; // 航线 id
- row.lineCnName = this.form.lineCnName; // 航线中文名称
- row.lineEnName = this.form.lineEnName; // 航线英文名称
- row.vesselId = this.form.vesselId; // 船名 id
- row.vesselCnName = this.form.vesselCnName; // 中文船名
- row.vesselEnName = this.form.vesselEnName; // 英文船名
- row.voyageNo = this.form.voyageNo; // 航次
- row.mblno = this.form.mblno; // MB/L NO
- row.hblno = this.form.hblno; // HB/L NO
- row.etd = this.form.etd; // 开船日期
- row.eta = this.form.eta; // 到港日期
- row.polId = this.form.polId; // 装货港 id
- row.polCode = this.form.polCode; // 装货港代码
- row.polCnName = this.form.polCnName; // 装货港中文名称
- row.polEnName = this.form.polEnName; // 装货港英文名称
- row.podId = this.form.podId; // 卸货港 id
- row.podCode = this.form.podCode; // 卸货港代码
- row.podCnName = this.form.podCnName; // 卸货港中文名称
- row.podEnName = this.form.podEnName; // 卸货港英文名称
- row.corpArgreementNo = this.form.corpArgreementNo; // 客户约号
- // 数量 * 单价 = 净额
- // 总税率 = 税率 + 附件税率
- // 税额 = 净额 * 总税率
- // 含税
- if (row.curCode == this.getLocalCurrency()) {
- row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
- } else {
- row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
- }
- // 净额
- if (row.curCode == this.getLocalCurrency()) {
- row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
- } else {
- row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
- }
- });
- // 费用 付 赋值数据
- this.form.feeCenterListC.map((row, index) => {
- row.dc = "C";
- row.sort = Number(index) + 1;
- row.businessType = this.form.businessType; // 业务类型
- row.billType = this.form.billType; // 单据类型
- row.billNo = this.form.billNo; // 单据编号
- row.billDate = this.form.billDate; // 单据日期
- row.billCorpId = this.form.corpId; // 主表客户 id
- row.billCorpCnName = this.form.corpCnName; // 主表客户中文名称
- row.billCorpEnName = this.form.corpEnName; // 主表客户英文名称
- row.lineId = this.form.lineId; // 航线 id
- row.lineCnName = this.form.lineCnName; // 航线中文名称
- row.lineEnName = this.form.lineEnName; // 航线英文名称
- row.vesselId = this.form.vesselId; // 船名 id
- row.vesselCnName = this.form.vesselCnName; // 中文船名
- row.vesselEnName = this.form.vesselEnName; // 英文船名
- row.voyageNo = this.form.voyageNo; // 航次
- row.mblno = this.form.mblno; // MB/L NO
- row.hblno = this.form.hblno; // HB/L NO
- row.etd = this.form.etd; // 开船日期
- row.eta = this.form.eta; // 到港日期
- row.polId = this.form.polId; // 装货港 id
- row.polCode = this.form.polCode; // 装货港代码
- row.polCnName = this.form.polCnName; // 装货港中文名称
- row.polEnName = this.form.polEnName; // 装货港英文名称
- row.podId = this.form.podId; // 卸货港 id
- row.podCode = this.form.podCode; // 卸货港代码
- row.podCnName = this.form.podCnName; // 卸货港中文名称
- row.podEnName = this.form.podEnName; // 卸货港英文名称
- row.corpArgreementNo = this.form.corpArgreementNo; // 客户约号
- // 数量 * 单价 = 净额
- // 总税率 = 税率 + 附件税率
- // 税额 = 净额 * 总税率
- // 含税
- if (row.curCode == this.getLocalCurrency()) {
- row.amount = row.rmbAmount ? row.rmbAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
- } else {
- row.amount = row.usdAmount ? row.usdAmount : (Number(row.quantity) * Number(row.price)).toFixed(2);
- }
- // 净额
- if (row.curCode == this.getLocalCurrency()) {
- row.amountNet = row.rmbAmountNet ? row.rmbAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
- } else {
- row.amountNet = row.usdAmountNet ? row.usdAmountNet : (Number(row.quantity) * Number(row.price)).toFixed(2);
- }
- });
- this.pageLoading = true;
- billsSubmit(this.form)
- .then(res => {
- this.pageLoading = false;
- if (res.data.code === 601) {
- console.info("11111111111----", res);
- this.billsDetailfun(this.form.id);
- this.$message({
- type: "error",
- message: res.data.msg
- });
- return true;
- }
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- if (status == "goBack") {
- if (this.form.id) {
- this.unLock({
- moduleName: "SE",
- tableName: "SE_order",
- billId: this.form.id,
- billNo: this.form.billNo
- });
- }
- this.$emit("goBack");
- }
- // this.detailData.seeDisabled = true
- this.billsDetailfun(res.data.data.id, status);
- })
- .catch(err => {
- this.pageLoading = false;
- })
- .finally(() => {});
- },
- // 提取箱专用的保存
- billsAddfun() {
- billsAdd(this.form)
- .then(res => {
- this.pageLoading = false;
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- // this.detailData.seeDisabled = true
- this.billsDetailfun(res.data.data.id);
- })
- .catch(err => {
- this.pageLoading = false;
- });
- },
- // 复制单据接口
- async billsCopyBillsfun(id, type, billType) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- let types = typeof type == "string" ? type.split(",") : [];
- console.log(types.indexOf("复制配箱信息", 1));
- let res = await billsCopyBills({ id, containers: types.indexOf("复制配箱信息") != -1 ? 1 : null });
- this.detailData.seeDisabled = false;
- loading.close();
- // if (type == '复制费用' || type == '') {
- // res.data.data.preContainersList = []
- // }
- // if (type == '复制箱型箱量' || type == '') {
- // res.data.data.feeCenterListD = []
- // res.data.data.feeCenterListC = []
- // }
- if (types.indexOf("复制箱型箱量") < 0) {
- res.data.data.preContainersList = [];
- }
- if (types.indexOf("复制费用") < 0) {
- res.data.data.feeCenterListD = [];
- res.data.data.feeCenterListC = [];
- }
- if (types.indexOf("复制配箱信息") < 0) {
- res.data.data.containersList = [];
- }
- res.data.data.billType = billType;
- if (
- !this.roleName.includes("admin") &&
- (this.roleName.includes("应收修改") || this.roleName.includes("应收查看")) &&
- !(this.roleName.includes("应付修改") || this.roleName.includes("应付查看") || !this.roleName.includes("允许修改他人费用"))
- ) {
- res.data.data.feeCenterListC = [];
- }
- if (
- !this.roleName.includes("admin") &&
- (this.roleName.includes("应付修改") || this.roleName.includes("应付查看")) &&
- !(this.roleName.includes("应收修改") || this.roleName.includes("应收查看") || !this.roleName.includes("允许修改他人费用"))
- ) {
- res.data.data.feeCenterListD = [];
- }
- if (res.data.data.billType == "DD" || res.data.data.billType == "MM") {
- res.data.data.hblno = null;
- }
- await this.saveLocalCurrency(res.data.data.branchId);
- this.form = res.data.data;
- this.pageLoading = false;
- // this.searchMontage() // 下拉 中文名称和编号拼接
- // 配箱最上面可以编辑
- for (let item of this.form.containersList) {
- item.edit = false;
- }
- // 先把状态改成可以编辑,然后判断是否可以编辑
- this.generateBillsfalse = false;
- // 应收
- for (let item of this.form.feeCenterListD) {
- // 判断是否生成了账单
- if (item.accStatus == 1) {
- this.columnforfun("corpCnName").disabled = true;
- // this.columnforfun('srcType').disabled = true
- this.columnforfun("mblno").disabled = true;
- this.columnforfun("bookingNo").disabled = true;
- // this.columnforfun('refno').disabled = true
- this.generateBillsfalse = true;
- }
- if (item.curCode == this.getLocalCurrency()) {
- this.$set(item, "rmbAmount", item.amount);
- this.$set(item, "usdAmount", "");
- this.$set(item, "rmbAmountNet", item.amountNet);
- this.$set(item, "usdAmountNet", "");
- } else {
- this.$set(item, "usdAmount", item.amount);
- this.$set(item, "rmbAmount", "");
- this.$set(item, "usdAmountNet", item.amountNet);
- this.$set(item, "rmbAmountNet", "");
- }
- item.edit = false;
- }
- console.log(this.form.feeCenterListD);
- // 应付
- for (let item of this.form.feeCenterListC) {
- // 判断是否生成了账单
- if (item.accStatus == 1) {
- this.generateBillsfalse = true;
- this.columnforfun("corpCnName").disabled = true;
- // this.columnforfun('srcType').disabled = true
- this.columnforfun("mblno").disabled = true;
- this.columnforfun("bookingNo").disabled = true;
- // this.columnforfun('refno').disabled = true
- }
- if (item.curCode == this.getLocalCurrency()) {
- this.$set(item, "rmbAmount", item.amount);
- this.$set(item, "usdAmount", "");
- this.$set(item, "rmbAmountNet", item.amountNet);
- this.$set(item, "usdAmountNet", "");
- } else {
- this.$set(item, "usdAmount", item.amount);
- this.$set(item, "rmbAmount", "");
- this.$set(item, "usdAmountNet", item.amountNet);
- this.$set(item, "rmbAmountNet", "");
- }
- item.edit = false;
- }
- console.log(this.form.feeCenterListD);
- // 文件中心
- for (let item of this.form.filesList) {
- this.$set(item, "edit", false);
- }
- },
- // 详情接口
- async billsDetailfun(id, status) {
- const loading = this.$loading({
- lock: true,
- text: "加载中",
- spinner: "el-icon-loading",
- background: "rgba(255,255,255,0.7)"
- });
- const isCODate = await isProcurement({ param: "is.cutOffDate" });
- this.isCutOffDate = isCODate.data.data == 1 ? true : false;
- const res = await billsDetail(id);
- loading.close();
- // this.form = res.data.data;
- await this.saveLocalCurrency(res.data.data.branchId);
- if (
- !this.roleName.includes("admin") &&
- (this.roleName.includes("应收修改") || this.roleName.includes("应收查看")) &&
- !(this.roleName.includes("应付修改") || this.roleName.includes("应付查看") || !this.roleName.includes("允许修改他人费用"))
- ) {
- res.data.data.feeCenterListC = [];
- }
- if (
- !this.roleName.includes("admin") &&
- (this.roleName.includes("应付修改") || this.roleName.includes("应付查看")) &&
- !(this.roleName.includes("应收修改") || this.roleName.includes("应收查看") || !this.roleName.includes("允许修改他人费用"))
- ) {
- res.data.data.feeCenterListD = [];
- }
- res.data.data.marks = res.data.data.marks ? res.data.data.marks.split("&|&").join("\n") : "";
- res.data.data.commodityDescr = res.data.data.commodityDescr ? res.data.data.commodityDescr.split("&|&").join("\n") : "";
- this.$set(this, "form", res.data.data);
- // this.inLock();
- // console.log('form', this.form)
- // console.log(this.$refs)
- if (this.form.id) {
- this.$refs.documentCenter.reportslogListfun({ currentPage: 1, pageSize: 10 });
- }
- this.billsListAllfun(this.form.id);
- this.copyFormData = JSON.parse(JSON.stringify(res.data.data));
- // 如果已经请核就禁用按钮
- if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
- this.detailData.seeDisabled = true;
- } else {
- if (this.isCutOffDate && this.form.cyTrailerTime&&this.form.boxBelongsTo=='SOC') {
- const cutOffDate = new Date(this.form.cyTrailerTime);
- const newDate = new Date(dateFormat(new Date(), "yyyy-MM-dd"));
- if (newDate > cutOffDate) {
- this.overTime = true;
- } else {
- this.overTime = false;
- }
- } else {
- this.overTime = false;
- }
- this.detailData.seeDisabled = false;
- }
- // this.columnforfun('teamName').disabled = true
- // this.columnforfun('operatorName').disabled = true
- // this.columnforfun('accDeptName').disabled = true
- if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
- this.columnforfun("corpCnName").disabled = true;
- // this.columnforfun('srcType').disabled = true
- this.columnforfun("mblno").disabled = true;
- this.columnforfun("bookingNo").disabled = true;
- // this.columnforfun('refno').disabled = true
- // this.columnforfun('teamId').disabled = true
- this.generateBillsfalse = true;
- this.pleasereviewType = true; // 请核禁用
- } else {
- // 判断是否可以编辑
- this.columnforfun("corpCnName").disabled = false;
- // this.columnforfun('srcType').disabled = false
- this.columnforfun("mblno").disabled = false;
- this.columnforfun("bookingNo").disabled = false;
- // this.columnforfun('refno').disabled = false
- // if (this.saberTenantId == '607913') {
- // this.columnforfun('operatorName').disabled = false
- // this.columnforfun('accDeptName').disabled = false
- // }
- // this.columnforfun('teamId').disabled = false
- this.generateBillsfalse = false;
- this.pleasereviewType = false;
- }
- this.pageLoading = false;
- // this.searchMontage() // 下拉 中文名称和编号拼接
- // 配箱最上面可以编辑
- for (let item of this.form.containersList) {
- item.edit = false;
- }
- // 配箱最下面的
- for (let item of this.form.waitingBoxList) {
- this.$set(item, "editQuantity", item.quantity);
- this.$set(item, "editGrossWeight", item.grossWeight);
- this.$set(item, "editMeasurement", item.measurement);
- this.$set(item, "edit", false);
- }
- // 应收
- for (let item of this.form.feeCenterListD) {
- // 判断是否生成了账单
- if (item.accStatus == 1) {
- this.generateBillsfalse = true;
- this.columnforfun("corpCnName").disabled = true;
- // this.columnforfun('srcType').disabled = true
- this.columnforfun("mblno").disabled = true;
- this.columnforfun("bookingNo").disabled = true;
- // this.columnforfun('refno').disabled = true
- }
- if (item.curCode == this.getLocalCurrency()) {
- this.$set(item, "rmbAmount", item.amount);
- this.$set(item, "usdAmount", "");
- this.$set(item, "rmbAmountNet", item.amountNet);
- this.$set(item, "usdAmountNet", "");
- } else {
- this.$set(item, "usdAmount", item.amount);
- this.$set(item, "rmbAmount", "");
- this.$set(item, "usdAmountNet", item.amountNet);
- this.$set(item, "rmbAmountNet", "");
- }
- item.edit = false;
- }
- // 应付
- for (let item of this.form.feeCenterListC) {
- // 判断是否生成了账单
- if (item.accStatus == 1) {
- this.generateBillsfalse = true;
- this.columnforfun("corpCnName").disabled = true;
- // this.columnforfun('srcType').disabled = true
- this.columnforfun("mblno").disabled = true;
- this.columnforfun("bookingNo").disabled = true;
- // this.columnforfun('refno').disabled = true
- }
- if (item.curCode == this.getLocalCurrency()) {
- this.$set(item, "rmbAmount", item.amount);
- this.$set(item, "usdAmount", "");
- this.$set(item, "rmbAmountNet", item.amountNet);
- this.$set(item, "usdAmountNet", "");
- } else {
- this.$set(item, "usdAmount", item.amount);
- this.$set(item, "rmbAmount", "");
- this.$set(item, "usdAmountNet", item.amountNet);
- this.$set(item, "rmbAmountNet", "");
- }
- item.edit = false;
- }
- // 文件中心
- this.$refs.filescenter.getData(res.data.data);
- for (let item of this.form.filesList) {
- this.$set(item, "edit", false);
- }
- if (status == "toAddEdit") {
- this.$emit(status);
- }
- this.oldForm = this.deepClone(this.form);
- },
- // tbas切换
- handleClick(tba, event) {},
- // 大tbas切换
- bigHandleClick() {
- if (this.bigtabs == "fd") {
- if (this.form.id) {
- this.billsListAllfun(this.form.id);
- }
- }
- if (this.bigtabs == "dz") {
- if (this.form.id) {
- this.$refs.documentCenter.reportslogListfun({ currentPage: 1, pageSize: 10 });
- }
- this.getReportTypeByBigHandle("单证");
- }
- if (this.bigtabs == "fy") this.getReportTypeByBigHandle("费用");
- },
- getReportTypeByBigHandle(name) {
- return name;
- },
- // 获取不分页的分单列表
- billsListAllfun(masterId) {
- billsListAll({ masterId }).then(res => {
- this.billsListAllData = res.data.data;
- });
- }
- }
- };
- </script>
- <style scoped lang="scss">
- ::v-deep .el-tabs--border-card > .el-tabs__content {
- padding: 4px !important;
- }
- .scrollable-container {
- height: 84vh;
- /* 设置容器高度 */
- overflow-y: auto;
- /* 添加垂直滚动条 */
- }
- .borderless {
- height: 100%;
- box-sizing: border-box;
- }
- .customer-main {
- margin-bottom: 15px;
- }
- .demo-ruleForm {
- font-size: 14px;
- }
- .margintop {
- margin-top: 0px !important;
- }
- ::v-deep.el-form-item {
- margin-bottom: 0;
- }
- ::v-deep .basic-container .el-card__body {
- padding: 6px 20px;
- }
- ::v-deep .el-tabs__header {
- margin: 0 05px;
- }
- .isShow {
- display: none;
- }
- .dropdown-max {
- top: 150px !important;
- max-width: 600px;
- display: flex;
- flex-flow: row wrap;
- li {
- margin-right: 5px;
- white-space: nowrap;
- }
- }
- </style>
|