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