12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648 |
- <template>
- <div>
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
- @click="goBack(0)">返回列表
- </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
- @click="$refs.print.openDialog()">预 览
- </el-button>
- <el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px"
- :disabled="!form.id" @click="$refs.report.openDialog()">报表设计
- </el-button>
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
- v-if="editButton"
- :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser || saberUserInfo.user_name == form.operatorName)"
- @click="inEdit">编 辑
- </el-button>
- <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
- :disabled="isSaveBtn" @click="submit">保 存
- </el-button>
- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success"
- size="small" :disabled="(form.status != 0 && form.status != 4)" @click="application">单据请核
- </el-button>
- <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
- size="small" @click="revokeApplication">撤销单据请核
- </el-button>
- <el-dropdown style="line-height: 0">
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
- size="small">
- 审 批<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- <div style="margin-top: 50px">
- <trade-card title="基础信息">
- <avue-form :option="optionForm" v-model="form" ref="form">
- <template slot="corpCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">客户:</span>
- </template>
- <template slot="hshipperCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">发货人:</span>
- </template>
- <template slot="hconsigneeCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">收货人:</span>
- </template>
- <template slot="mnotifyCntyCodeLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('原产地')">原产地:</span>
- </template>
- <template slot="polCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('港口')">起运港:</span>
- </template>
- <template slot="podCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('港口')">目的港:</span>
- </template>
- <template slot="vesselCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('船名')">船名:</span>
- </template>
- <template slot="carrierCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">船公司:</span>
- </template>
- <template slot="bookingAgentCnNameLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">船代:</span>
- </template>
- <template slot="hscodeLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">HSCODE:</span>
- </template>
- <template slot="packingUnitLabel">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('包装')">包装:</span>
- </template>
- <tempalte slot="corpCnName">
- <dic-select v-model="form.corpCnName" placeholder="客户" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('corpCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="polCnName">
- <dic-select v-model="form.polCnName" placeholder="起运港" key="id" label="cnName" res="records"
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('polCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="podCnName">
- <dic-select v-model="form.podCnName" placeholder="目的港" key="id" label="cnName" res="records"
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('podCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="mnotifyCntyName" slot-scope="{ row }">
- <dic-select v-model="form.detail.mnotifyCntyName" placeholder="运输方式" key="dictKey"
- label="dictValue" url="/blade-system/dict-biz/dictionary?code=mode_transport"
- :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="mshipperCntyName" slot-scope="{ row }">
- <dic-select v-model="form.detail.mshipperCntyName" placeholder="贸易方式" key="dictKey"
- label="dictValue" url="/blade-system/dict-biz/dictionary?code=trade_Mode" :filterable="true"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="mconsigneeCntyCode" slot-scope="{ row }">
- <dic-select v-model="form.detail.mconsigneeCntyCode" placeholder="放单方式" key="dictKey"
- label="dictValue" url="/blade-system/dict-biz/dictionary?code=release_method"
- :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="mnotify2CntyName" slot-scope="{ row }">
- <el-input v-model="form.detail.mnotify2CntyName" placeholder="请输入 报关单号" :disabled="editDisabled">
- </el-input>
- </tempalte>
- <!-- <tempalte slot="srcCnName">
- <dic-select v-model="form.srcCnName" placeholder="业务员" key="id" label="realName" res="records"
- url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
- @selectChange="dicChange('srcCnName', $event)" :disabled="editDisabled"></dic-select>
- </tempalte> -->
- <tempalte slot="srcType" slot-scope="{ row }">
- <div style="display: flex;">
- <dic-select style="margin-right: 4px;" v-model="form.srcType" placeholder="业务来源"
- key="dictKey" keyValue="dictKey" label="dictValue"
- url="/blade-system/dict-biz/dictionary?code=source_Type" :filterable="true"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- @selectChange="dicChange('srcType', $event)"></dic-select>
- <el-input v-show="!form.srcType" v-model="form.srcCnName" placeholder="请选择"
- :disabled="true">
- </el-input>
- <dic-select v-show="form.srcType == 'OWN'" v-model="form.srcCnName" placeholder="所属公司"
- key="id" label="deptName" url="/blade-system/dept/lazy-list?parentId=0"
- :filterable="true" @selectChange="dicChange('srcCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- <dic-select v-show="form.srcType == 'AGENT'" v-model="form.srcCnName" placeholder="代理"
- key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=代理客户" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('srcCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- <dic-select v-show="form.srcType == 'SALES'" v-model="form.srcCnName" placeholder="业务员"
- key="id" label="realName" res="records" url="/blade-user/page" :filterable="true"
- :remote="true" dataName="realName" @selectChange="dicChange('srcCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- </div>
- </tempalte>
- <tempalte slot="hshipperCnName">
- <dic-select v-model="form.detail.hshipperCnName" placeholder="发货人" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=国外工厂" :filterable="true"
- :remote="true" dataName="cnName" @selectChange="dicChange('hshipperCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="hconsigneeCnName">
- <dic-select v-model="form.detail.hconsigneeCnName" placeholder="收货人" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=国内贸易商" :filterable="true"
- :remote="true" dataName="cnName" @selectChange="dicChange('hconsigneeCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="carrierCnName">
- <dic-select v-model="form.carrierCnName" placeholder="船公司" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType?corpTypeName=船公司" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('carrierCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- </tempalte>
- <tempalte slot="bookingAgentCnName">
- <dic-select v-model="form.bookingAgentCnName" placeholder="船代" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=船代" :filterable="true"
- :remote="true" dataName="cnName" @selectChange="dicChange('bookingAgentCnName', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- :searchShow="true"></dic-select>
- </tempalte>
- <!-- <template slot="hscode">
- <div style="display:flex;">
- <dic-select v-model="form.hscode" placeholder="品名" key="id" res="records" label="hsCode"
- url="/blade-los/bcommodity/list" :filterable="true" :remote="true" dataName="hsCode"
- @selectChange="dicChange('hscode', $event)"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></dic-select>
- <el-input style="margin-left: 10px;" v-model="form.commodityCnName" placeholder="请输入品名"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"></el-input>
- </div>
- </template> -->
- <tempalte slot="mnotifyCntyCode" slot-scope="{ row }">
- <dic-select v-model="form.detail.mnotifyCntyCode" placeholder="原产地" key="id" label="cnName"
- res="records" url="/blade-los/bcountrys/list" :filterable="true" :remote="true"
- dataName="cnName"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- @selectChange="dicChange('mnotifyCntyCode', $event)" :searchShow="true"></dic-select>
- </tempalte>
- <tempalte slot="operatorName">
- <dic-select v-model="form.operatorName" placeholder="操作员" key="id" label="realName"
- res="records" url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- @selectChange="dicChange('operatorName', $event)"></dic-select>
- </tempalte>
- <tempalte slot="remarks">
- <el-input type="textarea" :rows="2" placeholder="请输入 备注" v-model="form.remarks"
- :disabled="editButton">
- </el-input>
- </tempalte>
- </avue-form>
- </trade-card>
- <trade-card title="箱信息">
- <avue-crud :option="option" :data="form.preContainersList" id="out-table" ref="crud"
- @selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 388)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 388)">
- <template slot="indexHeader" slot-scope="{row,index}">
- <el-button type="primary" size="mini" icon="el-icon-plus"
- :disabled="editDisabled || form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') !== -1"
- circle @click="addRow()">
- </el-button>
- </template>
- <template slot="cntrTypeCodeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('箱型')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="goodsNameHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="hsCodeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="goodsTypeHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('类型')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="index" slot-scope="{row,index}">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="cntrTypeCode" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.cntrTypeCode" placeholder="箱型"
- key="id" res="records" label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true"
- :remote="true" dataName="cnName"></dic-select>
- <span v-else>{{ row.cntrTypeCode }}</span>
- </template>
- <template slot="boxNo" slot-scope="{ row }">
- <el-input v-if="row.$cellEdit && !row.srcId" v-model="row.boxNo" placeholder="请输入内容"
- size="small"></el-input>
- <span v-else>{{ row.boxNo }}</span>
- </template>
- <template slot="hsCodeForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.hsCode" placeholder="HSCODE" key="id"
- res="records" label="hsCode" url="/blade-los/bcommodity/list" :filterable="true"
- :remote="true" dataName="hsCode"
- @selectChange="rowDicChange('hsCode', $event, row)"></dic-select>
- <span v-else>{{ row.hsCode }}</span>
- </template>
- <template slot="goodsName" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsName" placeholder="品名" key="id"
- res="records" label="cnName" url="/blade-los/bcommodity/list" :filterable="true"
- :remote="true" dataName="cnName"
- @selectChange="rowDicChange('goodsName', $event, row)"></dic-select>
- <span v-else>{{ row.goodsName }}</span>
- </template>
- <tempalte slot="goodsType" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsType" placeholder="类型"
- key="dictKey" label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
- :filterable="true"></dic-select>
- <span v-else>{{ row.goodsType }}</span>
- </tempalte>
- <tempalte slot="number" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.number" :controls="false"
- placeholder="请输入 件数" size="small" style="width: 100%;"
- @change="amountChange(row)"></el-input-number>
- <span v-else>{{ row.number }}</span>
- </tempalte>
- <tempalte slot="netWeight" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.netWeight" :controls="false"
- placeholder="请输入 净重" size="small" style="width: 100%;"></el-input-number>
- <span v-else>{{ row.netWeight }}</span>
- </tempalte>
- <tempalte slot="amount" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.amount" :controls="false"
- placeholder="请输入 总金额" size="small" style="width: 100%;"
- @change="amountChange(row)"></el-input-number>
- <span v-else>{{ row.amount }}</span>
- </tempalte>
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
- @click="rowCell('箱编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.type == 2"
- @click="rowCell('派车', row, index)">{{ row.type == 1 ? '撤销派车' : '派车' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.type == 1"
- @click="rowCell('自提', row, index)">{{ row.type == 2 ? '撤销自提' : '自 提' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
- @click="rowCell('箱删除', row, index)">删 除</el-button>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="派车">
- <avue-crud :option="option2" :data="form.dispatchVehiclesList" id="out-table" ref="crud2"
- @selection-change="selectionChange"
- @resetColumn="resetColumn('crud2', 'option2', 'optionBack2', 389)"
- @saveColumn="saveColumn('crud2', 'option2', 'optionBack2', 389)">
- <tempalte slot="fleetName" slot-scope="{ row, index }">
- <dic-select v-if="row.$cellEdit" v-model="row.fleetName" placeholder="承运车队" key="id"
- label="cnName" res="records" url="/blade-los/bcorps/listByType?corpTypeName=车队"
- :filterable="true" :remote="true" dataName="cnName"
- @selectChange="rowDicChange('fleetName', $event, row)"
- :disabled="editDisabled"></dic-select>
- <span v-else>{{ row.fleetName }}</span>
- </tempalte>
- <tempalte slot="pickupAddressName" slot-scope="{ row, index }">
- <dic-select v-if="row.$cellEdit" v-model="row.pickupAddressName" placeholder="提箱地点" key="id"
- label="cnName" res="records" url="/blade-los/blocations/list" :filterable="true"
- :remote="true" dataName="cnName"
- @selectChange="rowDicChange('pickupAddressName', $event, row)"
- :disabled="editDisabled"></dic-select>
- <span v-else>{{ row.pickupAddressName }}</span>
- </tempalte>
- <tempalte slot="deliveryAddressName" slot-scope="{ row, index }">
- <dic-select v-if="row.$cellEdit" v-model="row.deliveryAddressName" placeholder="送货地点" key="id"
- label="cnName" res="records" url="/blade-los/blocations/list" :filterable="true"
- :remote="true" dataName="cnName"
- @selectChange="rowDicChange('deliveryAddressName', $event, row)"
- :disabled="editDisabled"></dic-select>
- <span v-else>{{ row.deliveryAddressName }}</span>
- </tempalte>
- <!-- <template slot="returnCyName" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.returnCyName" placeholder="返空场站" key="id"
- label="cnName" res="records" url="/blade-los/bcorps/listByType?corpTypeName=场站"
- :filterable="true" :remote="true" dataName="cnName"
- @selectChange="rowDicChange('returnCyName', $event, row)"></dic-select>
- <span v-else>{{ row.returnCyName }}</span>
- </template> -->
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
- @click="rowCell('派车编辑', row, index)">
- {{ row.$cellEdit ? '保 存' : '编 辑' }}
- </el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
- @click="rowCell('还箱', row, index)">{{ row.whetherReturn == 1 ? '撤销还箱' : '确认还箱'
- }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
- @click="rowCell('送货派车', row, index)">{{ row.whetherInspection == 1 ? '撤销送货派车' : '送货派车'
- }}</el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherWarehouseEntry == 1 || row.$cellEdit"
- @click="rowCell('入库派车', row, index)">
- {{ row.whetherDispatchVehicles == 1 ? '撤销入库派车' : '入库派车' }}
- </el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.$cellEdit"
- @click="rowCell('生成入库', row, index)">{{ row.whetherWarehouseEntry == 1 ? '撤销入库' : '入 库'
- }}</el-button>
- <!-- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
- @click="rowCell('派车删除', row, index)">删 除</el-button> -->
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="入库">
- <avue-crud :option="option3" :data="form.inStorageList" id="out-table" ref="crud3"
- @selection-change="selectionChange"
- @resetColumn="resetColumn('crud3', 'option3', 'optionBack3', 390)"
- @saveColumn="saveColumn('crud3', 'option3', 'optionBack3', 390)">
- <template slot="storageUnitHeader" slot-scope="{column}">
- <span style="color: #1e9fff;cursor: pointer;" @click="inJump('入库单位')">{{ (column || {}).label
- }}</span>
- </template>
- <template slot="warehouseName" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.warehouseName" placeholder="入库" key="id"
- label="cname" url="/blade-los/storage/list" res="records" :filterable="true" :remote="true"
- dataName="cname" @selectChange="rowDicChange('warehouseName', $event, row)"></dic-select>
- <span v-else>{{ row.warehouseName }}</span>
- </template>
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
- @click="rowCell('入库编辑', row, index)">
- {{ row.$cellEdit ? '保 存' : '编 辑' }}
- </el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.whetherInOutStorage == 1 || row.$cellEdit"
- @click="rowCell('入库确认', row, index)">
- {{ row.confirmDispatchVehicles == 1 ? '撤销确认' : '入库确认' }}
- </el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
- @click="rowCell('生成出库', row, index)">
- 出 库
- </el-button>
- <el-button size="small" type="text"
- :disabled="editDisabled || row.surplusQuantity == 0 || row.$cellEdit"
- @click="rowCell('撤销出库', row, index)">
- 撤销出库
- </el-button>
- <!-- <el-button size="small" type="text"
- :disabled="editDisabled || row.confirmDispatchVehicles == 1 || row.whetherInOutStorage == 1"
- @click="rowCell('入库删除', row, index)">删 除</el-button> -->
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="出库">
- <avue-crud :option="option4" :data="form.outStorageList" id="out-table" ref="crud4"
- @selection-change="selectionChange"
- @resetColumn="resetColumn('crud4', 'option4', 'optionBack4', 391)"
- @saveColumn="saveColumn('crud4', 'option4', 'optionBack4', 391)">
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
- @click="rowCell('出库编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled"
- @click="rowCell('出库确认', row, index)">{{
- row.confirmDispatchVehicles ==
- 1 ? '撤销确认' : '出库确认' }}</el-button>
- <el-button size="small" type="text" :disabled="editDisabled"
- @click="rowCell('开票', row, index)">开
- 票</el-button>
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
- @click="rowCell('出库删除', row, index)">删 除</el-button>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="费用明细">
- <fee-info ref="feeInfo" :form="form" :disabled="editDisabled" @getDetails="getDetails"></fee-info>
- </trade-card>
- <containerTitle title="上传附件"></containerTitle>
- <c-upload :data="form.filesList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
- display :disabled="editButton"></c-upload>
- </div>
- <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务" groupCode="销售报告"
- :type="1"></business-reports>
- <reports :id="form.id" :assemblyForm="form" businessValue="HYJK" ref="report"></reports>
- <!--审核弹窗-->
- <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
- <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
- </el-dialog>
- <el-dialog append-to-body title="送货派车" :visible.sync="carVisible" width="40%" :close-on-click-modal="false"
- v-dialog-drag @closed="carClosed">
- <span>
- <avue-form :option="carOption" v-model="carForm">
- <tempalte slot="inspectionFleetName">
- <dic-select v-model="carForm.inspectionFleetName" placeholder="承运车队" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=车队" :filterable="true"
- :remote="true" dataName="cnName"
- @selectChange="dicChange('inspectionFleetName', $event)"></dic-select>
- </tempalte>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="carVisible = false">取 消</el-button>
- <el-button type="primary" @click="carSubmit(carForm)">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog append-to-body title="还箱" :visible.sync="boxVisible" width="40%" :close-on-click-modal="false"
- v-dialog-drag @closed="boxClosed()">
- <span>
- <avue-form :option="boxOption" v-model="boxForm">
- <template slot="returnCyName">
- <dic-select v-model="boxForm.returnCyName" placeholder="返空场站" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType?corpTypeName=场站" :filterable="true"
- :remote="true" dataName="cnName"></dic-select>
- </template>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="boxVisible = false">取 消</el-button>
- <el-button type="primary" @click="boxSubmit(boxForm)">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog append-to-body title="出库确认" :visible.sync="ckVisible" width="40%" :close-on-click-modal="false"
- v-dialog-drag @closed="ckClosed()">
- <span>
- <avue-form :option="ckOption" v-model="ckForm">
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="ckVisible = false">取 消</el-button>
- <el-button type="primary" @click="ckSubmit(ckForm)">确 定</el-button>
- </span>
- </el-dialog>
- <dictbiz-dialog ref="dictbiz" :title="dicTitle" :code="dicCode" :parentId="parentId" @closed="getAllWorkDicts">
- </dictbiz-dialog>
- </div>
- </template>
- <script>
- import { storagefeeitems, submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound, confirmInspection, revokeInspection, confirmReturnBox, revokeReturnBox } from "@/api/tradeAgency/oceanFreightImport";
- import { contrastObj, contrastList } from "@/util/contrastData";
- import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
- import reports from "@/components/tradeAgency/reports.vue";
- import dicSelect from "@/components/dicSelect/main";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import businessReports from "@/components/tradeAgency/businessReportsJK.vue";
- import { precontainersRemove } from "@/api/iosBasicData/ReceivingOrders/precontainers";
- import _ from "lodash";
- export default {
- name: "detailsPage",
- data() {
- return {
- ckForm: {
- // id: null,
- // returnDate: null,
- // returnCyName: null,
- },
- ckVisible: false,
- dicTitle: null,
- parentId: null,
- dicCode: null,
- carForm: {
- // id: null,
- // inspectionFleetId: null,
- // inspectionFleetName: null,
- // inspectionLicenseNumber: null,
- // inspectionFullName: null,
- // inspectionContactInformation: null
- },
- boxForm: {
- // id: null,
- // returnDate: null,
- // returnCyName: null,
- },
- boxVisible: false,
- carVisible: false,
- checkId: '', // 审核需要的id
- batchNo: '',
- checkScheduleDialog: false, // 审核弹窗
- editButton: false,
- editDisabled: false,
- form: {
- billNoFormat: 'HYJK',
- businessTypeCode: 'HYJK',
- businessType: 'SI',
- status: 0,
- seaType: 'I',
- billingStatus: 0,
- feeCenterListC: [],
- feeCenterListD: [],
- filesList: [],
- inStorageList: [],//入库
- outStorageList: [],//出库
- dispatchVehiclesList: [],//派车
- preContainersList: [],//箱信息
- detail: {
- mnotifyCntyName: '海运',
- mshipperCntyName: '一般贸易',
- }
- },
- oldForm: {
- billNoFormat: 'HYJK',
- businessTypeCode: 'HYJK',
- businessType: 'SI',
- status: 0,
- seaType: 'I',
- billingStatus: 0,
- feeCenterListC: [],
- feeCenterListD: [],
- filesList: [],
- inStorageList: [],//入库
- outStorageList: [],//出库
- dispatchVehiclesList: [],//派车
- preContainersList: [],//箱信息
- detail: {
- mnotifyCntyName: '海运',
- mshipperCntyName: '一般贸易',
- }
- },
- optionForm: {
- menuBtn: false,
- span: 8,
- disabled: false,
- column: [
- {
- label: '客户',
- prop: "corpCnName",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: "委托编号",
- prop: "billNo",
- disabled: true,
- },
- {
- label: "提单号",
- prop: "mblno",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '合同号',
- prop: "bookingNo",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '原产地',
- prop: "mnotifyCntyCode",
- type: 'select',
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bcountrys/list",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- disabled: false,
- },
- {
- label: '运输方式',
- prop: "mnotifyCntyName",
- // type: 'select',
- // filterable: true,
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
- // props: {
- // label: 'dictValue',
- // value: 'dictValue',
- // },
- // disabled: false,
- // rules: [{
- // required: true,
- // message: " ",
- // trigger: "blur"
- // }]
- },
- {
- label: "发货人",
- prop: "hshipperCnName",
- disabled: false,
- },
- {
- label: "收货人",
- prop: "hconsigneeCnName",
- disabled: false,
- },
- {
- label: "船名",
- prop: "vesselCnName",
- type: 'select',
- filterable: true,
- remote: true,
- allowCreate: true,
- dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- disabled: false,
- },
- {
- label: "航次",
- prop: "voyageNo",
- overHidden: true,
- },
- {
- label: '起运港',
- prop: "polCnName",
- disabled: false,
- },
- {
- label: '目的港',
- prop: "podCnName",
- disabled: false,
- },
- {
- label: "开船日期",
- prop: "etd",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "预计到港",
- prop: "bookingDate",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "实际到港",
- prop: "eta",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: "船公司",
- prop: "carrierCnName",
- disabled: false,
- },
- {
- label: "船代",
- prop: "bookingAgentCnName",
- disabled: false,
- },
- {
- label: '装箱方式',
- prop: "loadType",
- type: 'select',
- dicData: [{
- label: '整箱',
- value: 'FCL'
- }, {
- label: '拼箱',
- value: 'LCL'
- }],
- disabled: false,
- },
- // {
- // label: "HSCODE",
- // prop: "hscode",
- // disabled: false,
- // },
- {
- label: "件数",
- prop: "quantity",
- disabled: false,
- },
- {
- label: "包装",
- prop: "packingUnit",
- type: 'select',
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bpackages/list?cnName={{key}}",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- disabled: false,
- },
- {
- label: "尺码",
- prop: "measurement",
- disabled: false,
- },
- {
- label: "毛重",
- prop: "grossWeight",
- disabled: false,
- },
- {
- label: "净重",
- prop: "netWeight",
- disabled: false,
- },
- {
- label: "是否退押",
- prop: "billingStatus",
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- disabled: true,
- },
- {
- label: "放单方式",
- prop: "mconsigneeCntyCode",
- type: 'select',
- filterable: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=release_method",
- props: {
- label: 'dictValue',
- value: 'dictValue',
- },
- disabled: false,
- },
- {
- label: "免箱期",
- prop: "iqNo",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '报关单号',
- prop: "mnotify2CntyName",
- width: "100",
- overHidden: true
- },
- {
- label: "报关日期",
- prop: "issueDate",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "放行日期",
- prop: "cyReturnTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- },
- {
- label: "提箱码头",
- prop: "charData",
- type: 'select',
- filterable: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=container_terminal",
- props: {
- label: 'dictValue',
- value: 'dictValue',
- },
- disabled: false,
- },
- {
- label: '业务来源',
- prop: "srcType",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '贸易方式',
- prop: "mshipperCntyName",
- // type: "select",
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=trade_Mode",
- // props: {
- // label: "dictValue",
- // value: "dictValue"
- // },
- // disabled: false,
- // rules: [{
- // required: true,
- // message: " ",
- // trigger: "blur"
- // }],
- },
- {
- label: '操作员',
- prop: 'operatorName',
- },
- // {
- // label: '业务员',
- // prop: "srcCnName",
- // disabled: false,
- // rules: [{
- // required: true,
- // message: " ",
- // trigger: "blur"
- // }]
- // },
- {
- label: '备注',
- prop: "remarks",
- type: 'textarea',
- disabled: false,
- span: 18,
- minRows: 2,
- },
- ]
- },
- carOption: {
- labelWidth: 120,
- menuBtn: false,
- span: 12,
- disabled: false,
- column: [
- {
- label: '送货承运车队',
- prop: "inspectionFleetName",
- disabled: false,
- },
- {
- label: '送货车号',
- prop: "inspectionLicenseNumber",
- disabled: false,
- },
- {
- label: '送货姓名',
- prop: "inspectionFullName",
- disabled: false,
- },
- {
- label: '送货联系方式',
- prop: "inspectionContactInformation",
- disabled: false,
- }
- ]
- },
- boxOption: {
- // labelWidth: 120,
- menuBtn: false,
- span: 12,
- disabled: false,
- column: [
- {
- label: "返空时间",
- prop: "returnDate",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- },
- {
- label: "返空场站",
- prop: "returnCyName",
- },
- ]
- },
- ckOption: {
- // labelWidth: 120,
- menuBtn: false,
- span: 24,
- disabled: false,
- column: [
- {
- label: "仓储费单价收",
- prop: "storageFeePriceD",
- },
- {
- label: "仓储费单价付",
- prop: "storageFeePriceC",
- },
- ]
- },
- option: {},
- optionBack: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 180,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- headerslot: true,
- },
- {
- label: "箱型",
- prop: "cntrTypeCode",
- width: "100",
- overHidden: true,
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "100",
- overHidden: true
- },
- {
- label: "HSCODE",
- prop: "hsCode",
- width: "100",
- overHidden: true,
- cell: true,
- slot: true,
- formslot: true,
- rules: [
- {
- required: true,
- message: '请输入HSCODE',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "品名",
- prop: "goodsName",
- width: "100",
- overHidden: true
- },
- {
- label: "类型",
- prop: "goodsType",
- width: "80",
- overHidden: true
- },
- {
- label: "件数",
- prop: "number",
- width: "100",
- overHidden: true
- },
- {
- label: "净重",
- prop: "netWeight",
- width: "100",
- overHidden: true
- },
- {
- label: "总金额",
- prop: "amount",
- width: "100",
- overHidden: true
- },
- {
- label: '币别',
- prop: 'curCode',
- type: 'select',
- cell: true,
- filterable: true,
- dicData: [
- { label: 'CNY', value: 'CNY' },
- { label: 'USD', value: 'USD' }
- ],
- overHidden: true,
- },
- {
- label: "查验类型",
- prop: "inspectionType",
- cell: true,
- type: 'select',
- filterable: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=inspection_type",
- props: {
- label: 'dictValue',
- value: 'dictValue',
- },
- width: "120",
- overHidden: true
- },
- {
- label: "查验时间",
- prop: "inspectionDate",
- width: "100",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "是否机检",
- prop: "whetherMachineInspection",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- {
- label: "是否取样",
- prop: "whetherSampling",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- {
- label: "是否入库",
- prop: "whetherWarehousing",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- {
- label: "是否返场",
- prop: "whetherReturnSite",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "90",
- overHidden: true
- },
- // {
- // label: "是否还箱",
- // prop: "whetherReturn",
- // cell: true,
- // type: 'select',
- // dicData: [{
- // label: '是',
- // value: 1
- // }, {
- // label: '否',
- // value: 0
- // }],
- // width: "90",
- // overHidden: true
- // },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option2: {},
- optionBack2: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 360,
- tip: false,
- border: true,
- index: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "承运车队",
- prop: "fleetName",
- width: "120",
- overHidden: true,
- },
- {
- label: "车号",
- prop: "licenseNumber",
- cell: true,
- width: "120",
- overHidden: true
- },
- {
- label: "姓名",
- prop: "fullName",
- cell: true,
- width: "120",
- overHidden: true
- },
- {
- label: "联系方式",
- prop: "contactInformation",
- cell: true,
- width: "120",
- overHidden: true
- },
- {
- label: "是否入库",
- prop: "whetherWarehousing",
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "120",
- overHidden: true
- },
- {
- label: "提箱时间",
- prop: "pickupDate",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- width: "120",
- overHidden: true
- },
- {
- label: "提箱地点",
- prop: "pickupAddressName",
- width: "120",
- overHidden: true
- },
- {
- label: "送货时间",
- prop: "deliveryDate",
- width: "120",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "送货地点",
- prop: "deliveryAddressName",
- width: "120",
- overHidden: true
- },
- {
- label: "是否打冷",
- prop: "whetherChill",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- width: "120",
- overHidden: true
- },
- {
- label: "运费价格",
- prop: "freightPrice",
- cell: true,
- type: 'number',
- controls: false,
- width: "120",
- overHidden: true
- },
- {
- label: "应还箱日期",
- prop: "shouldBeReturnedDate",
- // cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- width: "140",
- overHidden: true
- },
- {
- label: "返空时间",
- prop: "returnDate",
- // cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- width: "120",
- overHidden: true
- },
- {
- label: "返空场站",
- prop: "returnCyName",
- width: "120",
- overHidden: true
- },
- {
- label: "送货承运车队",
- prop: "inspectionFleetName",
- width: "120",
- overHidden: true
- },
- {
- label: "送货车号",
- prop: "inspectionLicenseNumber",
- width: "120",
- overHidden: true
- },
- {
- label: "送货姓名",
- prop: "inspectionFullName",
- width: "120",
- overHidden: true
- },
- {
- label: "送货联系方式",
- prop: "inspectionContactInformation",
- width: "120",
- overHidden: true
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option3: {},
- optionBack3: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 200,
- tip: false,
- border: true,
- index: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "仓库",
- prop: "warehouseName",
- width: "120",
- overHidden: true,
- },
- {
- label: "品名",
- prop: "goodsName",
- width: "120",
- overHidden: true
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "120",
- overHidden: true
- },
- {
- label: "入库单位",
- prop: "storageUnit",
- width: "120",
- cell: true,
- type: 'select',
- filterable: true,
- remote: true,
- dicUrl: "/api/blade-los/bunits/list",
- props: {
- label: 'cnName',
- value: 'cnName',
- res: 'data.records'
- },
- overHidden: true
- },
- {
- label: "入库时间",
- prop: "storageDate",
- width: "120",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "件数",
- prop: "quantity",
- width: "120",
- overHidden: true
- },
- {
- label: "净重",
- prop: "grossWeight",
- width: "120",
- overHidden: true
- },
- {
- label: "是否保税",
- prop: "whetherBonded",
- cell: true,
- width: "120",
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- overHidden: true
- },
- {
- label: "是否分拣",
- prop: "whetherSorting",
- width: "120",
- cell: true,
- type: 'select',
- dicData: [{
- label: '是',
- value: 1
- }, {
- label: '否',
- value: 0
- }],
- overHidden: true
- },
- {
- label: "平均单价",
- prop: "warehouseUnitPrice",
- cell: true,
- type: 'number',
- controls: false,
- width: "120",
- overHidden: true
- },
- {
- label: "车号",
- prop: "licenseNumber",
- width: "120",
- overHidden: true
- },
- {
- label: "姓名",
- prop: "fullName",
- width: "120",
- overHidden: true
- },
- {
- label: "联系方式",
- prop: "tel",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option4: {},
- optionBack4: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 180,
- tip: false,
- border: true,
- index: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "品名",
- prop: "goodsName",
- width: "120",
- overHidden: true
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "120",
- overHidden: true
- },
- {
- label: "出库时间",
- prop: "outStorageDate",
- width: "120",
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- overHidden: true
- },
- {
- label: "出库件数",
- prop: "outQuantity",
- width: "120",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true
- },
- {
- label: "出库净重",
- prop: "outWeight",
- width: "120",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true
- },
- {
- label: "件数",
- prop: "quantity",
- width: "120",
- overHidden: true
- },
- {
- label: "净重",
- prop: "grossWeight",
- width: "120",
- overHidden: true
- },
- {
- label: "存储天数",
- prop: "storageDays",
- width: "120",
- overHidden: true
- },
- {
- label: "仓储费",
- prop: "storageFeesAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "剩余件数",
- prop: "surplusQuantity",
- width: "120",
- overHidden: true
- },
- {
- label: "剩余重量",
- prop: "surplusWeight",
- width: "120",
- overHidden: true
- },
- {
- label: "剩余货值",
- prop: "surplusGoodsAmount",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- showLock: false,
- roleName: [],
- saberUserInfo: ''
- }
- },
- components: {
- dicSelect,
- feeInfo,
- checkSchedule,
- businessReports,
- reports
- },
- props: {
- detailData: Object
- },
- async created() {
- this.roleName = localStorage.getItem('roleName').split(',')
- this.saberUserInfo = JSON.parse(localStorage.getItem("saber-userInfo")).content
- this.option = await this.getColumnData(this.getColumnName(388), this.optionBack);
- this.option2 = await this.getColumnData(this.getColumnName(389), this.optionBack2);
- this.option3 = await this.getColumnData(this.getColumnName(390), this.optionBack3);
- this.option4 = await this.getColumnData(this.getColumnName(391), this.optionBack4);
- if (this.detailData.id) {
- this.showLock = true
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- this.getDetails(this.detailData.id)
- }
- if (this.$route.query.billNo) {
- this.showLock = true
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- this.getDetaiByMblno(this.$route.query.billNo)
- }
- if (this.$route.query.billId) {
- this.showLock = true
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- this.getDetails(this.$route.query.billId)
- }
- if (this.$route.query.id) {
- this.showLock = true
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- this.getDetails(this.$route.query.id)
- }
- if (this.detailData.copyId) {
- this.getCopydate(this.detailData.copyId)
- }
- },
- methods: {
- inLock() {
- const data = {
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- no: localStorage.getItem("browserID"),
- billNo: this.form.mblno
- };
- this.inDetailsKey(this.$route.name, {
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- this.checkLock(data).then(res => {
- if (res.data.code == 200) {
- this.onLock(data).then(res => {
- if (res.data.code == 200) {
- this.showLock = false
- }
- });
- }
- });
- },
- inJump(name) {
- if (name == '客户') {
- this.$router.push({
- path: "/iosBasicData/bcorps/index",
- query: { type: 'new' },
- })
- }
- if (name == '原产地') {
- this.$router.push({
- path: "/iosBasicData/bcountrys/index",
- query: { type: 'new' },
- })
- }
- if (name == '港口') {
- this.$router.push({
- path: "/iosBasicData/bports/index",
- query: { type: 'new' },
- })
- }
- if (name == 'HSCODE') {
- this.$router.push({
- path: "/iosBasicData/bcommodity/index",
- query: { type: 'new' },
- })
- }
- if (name == '船名') {
- this.$router.push({
- path: "/iosBasicData/bvessels/index",
- query: { type: 'new' },
- })
- }
- if (name == '包装') {
- this.$router.push({
- path: "/iosBasicData/bpackages/index",
- query: { type: 'new' },
- })
- }
- if (name == '箱型') {
- this.$router.push({
- path: "/iosBasicData/bcntrtypes/index",
- query: { type: 'new' },
- })
- }
- if (name == '类型') {
- this.$refs.dictbiz.open()
- this.dicTitle = '添加类型'
- this.parentId = '1813125517193330690'
- this.dicCode = 'goods-type'
- }
- if (name == '入库单位') {
- this.$router.push({
- path: "/iosBasicData/bunits/index",
- query: { type: 'new' },
- })
- }
- },
- getAllWorkDicts() {
- this.dicTitle = null
- this.parentId = null
- this.dicCode = null
- },
- getDetaiByMblno(billNo) {
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- detailTradeByMblno({ mblno: this.$route.query.billNo }).then(res => {
- this.form = res.data.data
- this.$refs.crud.dicInit();
- this.$refs.crud3.dicInit();
- }).finally(() => {
- loading.close()
- })
- },
- addRow() {
- if (!this.form.corpId) return this.$message.error("请选择客户名称");
- this.form.preContainersList.push({
- whetherMachineInspection: 0,
- whetherSampling: 0,
- whetherWarehousing: 0,
- whetherReturnSite: 0,
- curCode: 'CNY',
- $cellEdit: true
- })
- this.$nextTick(() => {
- this.$refs.crud.doLayout();
- this.$refs.crud.dicInit();
- });
- },
- amountChange(row) {
- if (!row.number) row.number = 1
- row.price = _.round(_.divide(row.amount, row.number ? row.number : 1), 2)
- },
- boxClosed() {
- this.boxForm = {
- // id: null,
- // returnDate: null,
- // returnCyName: null,
- }
- },
- ckClosed() {
- this.ckForm = {
- // id: null,
- // returnDate: null,
- // returnCyName: null,
- }
- },
- carClosed() {
- this.carForm = {
- // id: null,
- // inspectionFleetId: null,
- // inspectionFleetName: null,
- // inspectionLicenseNumber: null,
- // inspectionFullName: null,
- // inspectionContactInformation: null
- }
- },
- carSubmit(row) {
- this.form.dispatchVehiclesList.forEach(e => {
- if (e.id == row.id) {
- this.$set(e, 'inspectionFleetId', row.inspectionFleetId)
- this.$set(e, 'inspectionFleetName', row.inspectionFleetName)
- this.$set(e, 'inspectionLicenseNumber', row.inspectionLicenseNumber)
- this.$set(e, 'inspectionFullName', row.inspectionFullName)
- this.$set(e, 'inspectionContactInformation', row.inspectionContactInformation)
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmInspection(row).then(res => {
- this.$message.success("送货派车成功");
- this.carVisible = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- })
- },
- boxSubmit(row) {
- this.form.dispatchVehiclesList.forEach(e => {
- if (e.id == row.id) {
- this.$set(e, 'returnDate', row.returnDate)
- this.$set(e, 'returnCyName', row.returnCyName)
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmReturnBox(row).then(res => {
- this.$message.success("还箱成功");
- this.boxVisible = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- })
- },
- ckSubmit(row) {
- if (row.storageFeePriceD == 0 || row.storageFeePriceD == null || row.storageFeePriceC == 0 || row.storageFeePriceC == null) return this.$message.success("仓储费单价收和仓储费单价付不能为空或0");
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmWarehouseEntry(row).then(res => {
- this.$message.success("出库成功");
- this.ckVisible = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- },
- dicChange(name, row) {
- if (name == 'inspectionFleetName') {
- if (row) {
- this.carForm.inspectionFleetId = row.id
- this.carForm.inspectionFullName = row.mgrName
- this.carForm.inspectionContactInformation = row.tel
- } else {
- this.carForm.inspectionFleetId = null
- this.carForm.inspectionFullName = null
- this.carForm.inspectionContactInformation = null
- }
- }
- if (name == 'corpCnName') {
- if (row) {
- this.form.corpId = row.id
- this.form.corpCnName = row.cnName
- this.form.srcType = row.sourceType
- this.form.srcCnName = row.srcCnName
- this.form.srcId = row.srcId
- } else {
- this.form.corpId = null
- this.form.srcType = null
- this.form.srcCnName = null
- this.form.srcId = null
- }
- }
- if (name == 'polCnName') {
- console.log(row)
- if (row) {
- this.form.polId = row.id
- this.form.polCode = row.code
- this.form.polCnName = row.cnName
- this.form.polEnName = row.enName
- } else {
- this.form.polId = null
- this.form.polCode = null
- this.form.polEnName = null
- }
- }
- if (name == 'podCnName') {
- if (row) {
- this.form.polId = row.id
- this.form.polCode = row.code
- this.form.podCnName = row.cnName
- this.form.polEnName = row.enName
- } else {
- this.form.polId = null
- this.form.polCode = null
- this.form.polEnName = null
- }
- }
- if (name == 'srcType') {
- if (!row) {
- this.form.srcId = null
- this.form.srcCnName = null
- }
- }
- if (name == 'srcCnName') {
- if (row) {
- this.form.srcId = row.id
- } else {
- this.form.srcId = null
- }
- }
- if (name == 'hshipperCnName') {
- if (row) {
- this.form.detail.hshipperId = row.id
- this.form.detail.hshipperCnName = row.cnName
- } else {
- this.form.detail.hshipperId = null
- }
- }
- if (name == 'hconsigneeCnName') {
- if (row) {
- this.form.detail.hconsigneeId = row.id
- this.form.detail.hconsigneeCnName = row.cnName
- } else {
- this.form.detail.hconsigneeId = null
- }
- }
- if (name == 'carrierCnName') {
- if (row) {
- this.form.carrierId = row.id
- } else {
- this.form.carrierId = null
- }
- }
- // if (name == 'hscode') {
- // if (row) {
- // this.form.commodityCnName = row.cnName
- // } else {
- // this.form.commodityCnName = null
- // }
- // }
- if (name == 'bookingAgentCnName') {
- if (row) {
- this.form.bookingAgentId = row.id
- this.form.bookingAgentCnName = row.cnName
- } else {
- this.form.bookingAgentId = null
- }
- }
- if (name == 'mnotifyCntyCode') {
- if (row) {
- this.form.detail.mnotifyCntyCode = row.cnName
- }
- }
- if (name == 'operatorName') {
- if (row) {
- this.form.operatorId = row.id
- } else {
- this.form.operatorId = null
- }
- }
- },
- rowDicChange(name, row, el) {
- if (name == 'hsCode') {
- if (row) {
- el.goodsName = row.cnName
- } else {
- el.goodsName = null
- }
- }
- // if (name == 'goodsName') {
- // if (row) {
- // el.hsCode = row.hsCode
- // } else {
- // el.hsCode = null
- // }
- // }
- if (name == 'fleetName') {
- if (row) {
- el.fleetId = row.id
- el.fullName = row.mgrName
- el.contactInformation = row.tel
- } else {
- el.fleetId = null
- el.fullName = null
- el.contactInformation = null
- }
- }
- if (name == 'pickupAddressName') {
- if (row) {
- el.pickupAddressId = row.id
- } else {
- el.pickupAddressId = null
- }
- }
- if (name == 'deliveryAddressName') {
- if (row) {
- el.deliveryAddressId = row.id
- } else {
- el.deliveryAddressId = null
- }
- }
- if (name == 'warehouseName') {
- if (row) {
- el.warehouseId = row.id
- } else {
- el.warehouseId = null
- }
- }
- },
- rowCell(name, row, index) {
- if (name == '箱编辑') {
- if (row.$cellEdit == true) {
- if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.amount) {
- return this.$message.error((!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
- }
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '箱删除') {
- if (row.id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- precontainersRemove(row.id).then(res => {
- this.$message.success("删除成功");
- this.form.preContainersList.splice(index, 1);
- }).finally(() => {
- loading.close()
- })
- } else {
- this.$message.success("删除成功");
- this.form.preContainersList.splice(index, 1);
- }
- }
- if (name == '派车编辑') {
- if (row.$cellEdit == true) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submitList1(this.form.dispatchVehiclesList).then(res => {
- this.form.dispatchVehiclesList = res.data.data
- this.$message.success("保存成功");
- }).finally(() => {
- loading.close()
- })
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '入库编辑') {
- if (row.$cellEdit == true) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submitList2(this.form.inStorageList).then(res => {
- this.form.inStorageList = res.data.data
- this.$message.success("保存成功");
- }).finally(() => {
- loading.close()
- })
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '出库编辑') {
- if (row.$cellEdit == true) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submitList2(this.form.outStorageList).then(res => {
- this.form.outStorageList = res.data.data
- this.$message.success("保存成功");
- }).finally(() => {
- loading.close()
- })
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == '派车') {
- if (!row.id) {
- return this.$message.error('请保存数据');
- }
- if (row.whetherMachineInspection == 1) {
- if (!row.inspectionType || !row.inspectionDate) {
- return this.$message.error((!row.inspectionType ? "查验类型," : '') + (!row.inspectionDate ? "查验时间" : '') + "不能为空");
- }
- }
- let obj = {
- ...row,
- type: 1,
- }
- if (row.whetherDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokePrecontainers(obj).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateDispatchVehicles(obj).then(res => {
- this.$message.success("派车成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- if (name == '自提') {
- if (!row.id) {
- return this.$message.error('请保存数据');
- }
- let obj = {
- ...row,
- type: 2,
- }
- if (row.whetherDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokePrecontainers(obj).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateDispatchVehicles(obj).then(res => {
- this.$message.success("自提成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- // if (name == '派车删除') {
- // const loading = this.$loading({
- // lock: true,
- // text: '加载中',
- // spinner: 'el-icon-loading',
- // background: 'rgba(255,255,255,0.7)'
- // });
- // dispatchvehiclesRemove({ ids: row.id }).then(res => {
- // this.$message.success("删除成功");
- // this.form.dispatchVehiclesList.splice(index, 1);
- // }).finally(() => {
- // loading.close()
- // })
- // }
- if (name == '还箱') {
- if (row.whetherReturn == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeReturnBox(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- this.boxForm = row
- this.boxVisible = true
- }
- }
- if (name == '送货派车') {
- if (row.whetherInspection == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeInspection(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- this.carForm = row
- this.carVisible = true
- }
- }
- if (name == '入库派车') {
- if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation) {
- return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式" : '') + "不能为空");
- }
- if (row.whetherDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeDispatchVehicles(row).then(res => {
- this.$message.success("撤销成功");
- this.optionForm.disabled = false
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- console.log(row)
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmDispatchVehicles(row).then(res => {
- this.$message.success("派车成功");
- this.optionForm.disabled = true
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- if (name == '生成入库') {
- if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation) {
- return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式" : '') + "不能为空");
- }
- if (row.whetherWarehouseEntry == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeWarehouseEntry(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateWarehouseEntry(row).then(res => {
- this.$message.success("生成入库成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- }
- if (name == '入库确认') {
- if (!this.form.eta || !row.storageDate || !row.warehouseName) {
- return this.$message.error((!this.form.eta ? "基础信息的实际到港," : '') + (!row.storageDate ? "入库时间," : '') + (!row.warehouseName ? "仓库" : '') + "不能为空");
- }
- if (row.confirmDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeInoutstorage(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- calculationWarehouseUnitPrice(row).then(res => {
- this.$confirm(res.data.data, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- dangerouslyUseHTMLString: true,
- }).then(() => {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmWarehouseEntry(row).then(res => {
- this.$message.success("入库成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- })
- })
- }
- }
- if (name == '生成出库') {
- if (!row.warehouseName || !row.warehouseUnitPrice) {
- return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateOutbound(row).then(res => {
- this.$message.success("生成出库成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- if (name == '撤销出库') {
- if (!row.warehouseName || !row.warehouseUnitPrice) {
- return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeOutbound(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- }
- if (name == '出库确认') {
- if (!row.outStorageDate || !row.outQuantity || !row.outWeight) {
- return this.$message.error((!row.outStorageDate ? "出库时间," : '') + (!row.outQuantity ? "出库件数," : '') + (!row.outWeight ? "出库重量" : '') + "不能为空");
- }
- if (row.confirmDispatchVehicles == 1) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeInoutstorage(row).then(res => {
- this.$message.success("撤销成功");
- this.getDetails(this.form.id)
- }).finally(() => {
- loading.close()
- })
- } else {
- storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
- this.ckForm = {
- ...row,
- storageFeePriceD: res.data.data.price,
- storageFeePriceC: res.data.data.priceC
- }
- this.ckVisible = true
- })
- // const loading = this.$loading({
- // lock: true,
- // text: '加载中',
- // spinner: 'el-icon-loading',
- // background: 'rgba(255,255,255,0.7)'
- // });
- // confirmWarehouseEntry(row).then(res => {
- // this.$message.success("出库成功");
- // this.getDetails(this.form.id)
- // }).finally(() => {
- // loading.close()
- // })
- }
- }
- if (name == '开票') {
- this.$message.error("待开发");
- }
- if (name == '出库删除') {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- inoutstorageRemove({ ids: row.id }).then(res => {
- this.$message.success("删除成功");
- this.form.outStorageList.splice(index, 1);
- }).finally(() => {
- loading.close()
- })
- }
- },
- getDetails(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- getDetail({ id: id }).then(res => {
- this.form = res.data.data
- this.oldForm = this.deepClone(res.data.data)
- this.inLock()
- this.$refs.crud.dicInit();
- this.$refs.crud3.dicInit();
- }).finally(() => {
- loading.close()
- })
- },
- getCopydate(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- billsCopyBills({ id: id }).then(res => {
- console.log(res.data.data, 33333333333333)
- res.data.data.billNoFormat = 'HYJK'
- res.data.data.businessTypeCode = 'HYJK'
- this.form = res.data.data
- }).finally(() => {
- loading.close()
- })
- },
- inEdit() {
- this.editButton = false
- if (this.form.status == 0 || this.form.status == 4) {
- if (this.form.dispatchVehiclesList.findIndex(item => item.whetherDispatchVehicles == '1') == -1) {
- this.optionForm.disabled = false
- }
- this.editDisabled = false
- }
- },
- allClick(name) {
- },
- submit(type) {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- for (let row of this.form.preContainersList) {
- if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.amount) {
- return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
- }
- }
- if (this.$refs.feeInfo.submitValidate()) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- submit(this.form).then(res => {
- this.$message.success("保存成功");
- if (type == 'goBack') {
- if (this.form.id) {
- this.unLock({
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- }
- this.getDetails(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- }
- } else {
- return false;
- }
- });
- },
- application() {
- if (this.form.feeCenterListD.length == 0 && this.form.feeCenterListC.length == 0) return this.$message.error("费用不能为空");
- if (this.$refs.feeInfo.submitValidate()) {
- this.$confirm("确定请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/oceanFreightImport/index',
- pageStatus: '',
- pageLabel: '海运进口(T)',
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- checkAgent(obj).then(res => {
- this.$message.success("请核成功");
- this.editDisabled = true
- this.optionForm.disabled = true
- this.getDetails(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- });
- }
- },
- revokeApplication() {
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeCheckAgent(obj).then(res => {
- this.$message.success("撤销请核成功");
- this.getDetails(res.data.data.id)
- this.editDisabled = false
- this.optionForm.disabled = false
- }).finally(() => {
- loading.close();
- })
- });
- },
- //请核关闭
- choceScheduleFun() {
- this.checkScheduleDialog = false
- },
- //自定义列保存
- async saveColumn(ref, option, optionBack, code) {
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumn(ref, option, optionBack, code) {
- this[option] = this[optionBack];
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
- if (inSave) {
- this.$message.success("重置成功");
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- goBack(type) {
- if (contrastObj(this.form, this.oldForm) || contrastList(this.form.preContainersList, this.oldForm.preContainersList) || contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) || contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC) || contrastList(this.form.filesList, this.oldForm.filesList)) {
- this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- this.submit('goBack')
- })
- .catch(() => {
- if (this.form.id) {
- this.unLock({
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- });
- } else {
- if (this.form.id) {
- this.unLock({
- moduleName: "SI",
- tableName: "SI_Detail",
- billId: this.form.id,
- billNo: this.form.mblno
- });
- }
- this.$emit("goBack", type);
- this.$emit('updateKey')
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-table .cell {
- padding: 0 2px !important;
- .el-form-item {
- margin-bottom: 0px !important;
- }
- }
- ::v-deep .avue-crud .el-table .el-form-item__label {
- left: -1px;
- }
- ::v-deep#out-table .back-one {
- background: #ecf5ff !important;
- }
- ::v-deep#out-table .back-two {
- background: #ecf5ff !important;
- }
- ::v-deep .el-table--small td,
- .el-table--small th {
- padding: 2px !important;
- }
- ::v-deep .el-card__body {
- padding: 3px 10px;
- }
- </style>
|