| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687 |
- <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>
- </div>
- <div class="add-customer-btn">
- <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" v-else style="margin-left: 6px;" type="primary" size="small"
- :disabled="isSaveBtn" @click="submit">保 存
- </el-button>
- <!-- <el-button v-if="form.status == '审核提交'" 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">
- <el-tabs type="border-card">
- <el-tab-pane label="基础信息">
- <trade-card title="基础信息">
- <avue-form :option="optionForm" v-model="form" ref="form">
- <tempalte slot="purchaseCompanyName">
- <dic-select v-model="form.purchaseCompanyName" placeholder="出租方" key="id" label="shortName"
- res="records" url="/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=箱东"
- :filterable="true" :remote="true" dataName="shortName"
- @selectChange="dicChange('purchaseCompanyName', $event)" :slotRight="true" rightLabel="code"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="polStationCname">
- <dic-select v-model="form.polStationCname" placeholder="退/还箱地" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=场站" :filterable="true"
- :remote="true" dataName="cnName" @selectChange="dicChange('polStationCname', $event)"
- :slotRight="true" rightLabel="code" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="addressCname">
- <dic-select v-model="form.addressCname" placeholder="港口" key="id" label="cnName" res="records"
- url="/blade-los/bports/list?status=0¤t=1&size=5" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('addressCname', $event)" :slotRight="true"
- rightLabel="code" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="stationCname">
- <dic-select v-model="form.stationCname" placeholder="场站" :key="updateFormKey" label="cnName"
- res="records" :slotRight="true" rightLabel="code"
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=场站&ids=' + (form.cyText ? form.cyText : '')"
- :filterable="true" :remote="true" dataName="cnName" @selectChange="dicChange('stationCname', $event)"
- :disabled="editDisabled || !form.addressId"></dic-select>
- </tempalte>
- <tempalte slot="totalAmountC">
- <el-input-number v-model="form.totalAmountC" :min="0" placeholder="请输入 押金" size="small"
- :controls="false" style="width:100%" :disabled="editDisabled"></el-input-number>
- </tempalte>
- <tempalte slot="effectiveDate">
- <el-date-picker v-model="form.effectiveDate" type="date" size="small" placeholder="请选择 租入日期"
- format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" @change="dicChange('effectiveDate', $event)"
- :disabled="editDisabled || (form.id && form.buxStaus != '录入')">
- </el-date-picker>
- </tempalte>
- </avue-form>
- </trade-card>
- <trade-card title="箱型箱量">
- <avue-crud ref="crudBox" :option="boxOption" :data="form.boxTypeList"
- @selection-change="boxSelectionChange">
- <template slot="menuLeft">
- <el-button type="info" plain size="small" :disabled="editDisabled || !form.id || form.buxStaus != '录入'"
- @click="allClick('box一键保存')">一键保存</el-button>
- <el-button type="info" plain size="small"
- :disabled="editDisabled || form.boxTypeList.length == 0 || form.buxStaus != '录入'"
- @click="allClick('box一键编辑')">一键编辑</el-button>
- <el-button type="danger" plain size="small"
- :disabled="editDisabled || boxSelectionList.length == 0 || form.buxStaus != '录入'"
- @click="allClick('box批量删除')">批量删除</el-button>
- </template>
- <template slot="indexHeader" slot-scope="{row,index}">
- <el-button type="primary" size="mini" icon="el-icon-plus"
- :disabled="editDisabled || !form.id || form.buxStaus != '录入'" circle @click="boxAddRow()">
- </el-button>
- </template>
- <template slot="index" slot-scope="{row,index}">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="boxTypeForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.boxType" key="id" label="cnName" res="records"
- url="/blade-los/bcntrtypes/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="rowDicChange('boxType', $event, row)"></dic-select>
- <span v-else>{{ row.boxType }}</span>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="箱明细">
- <avue-crud :option="option" :data="form.tradingBoxItemsList" 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', 473)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 473)">
- <template slot="menuLeft">
- <el-button type="info" plain size="small" :disabled="editDisabled || !form.id || form.buxStaus != '录入'"
- @click="allClick('一键保存')">一键保存</el-button>
- <el-button type="info" plain size="small"
- :disabled="editDisabled || form.tradingBoxItemsList.length == 0 || form.buxStaus != '录入'"
- @click="allClick('一键编辑')">一键编辑</el-button>
- <el-button type="danger" plain size="small"
- :disabled="editDisabled || selectionList.length == 0 || form.buxStaus != '录入'"
- @click="allClick('批量删除')">批量删除</el-button>
- <el-button type="primary" plain size="small" @click="allClick('起租')"
- :disabled="form.buxStaus != '录入' || form.tradingBoxItemsList.length == 0">起租</el-button>
- <el-button type="success" plain size="small" @click="allClick('生成租金')"
- :disabled="form.buxStaus != '已启租'">生成租金</el-button>
- <el-button type="danger" plain size="small" @click="allClick('撤销租金')"
- :disabled="form.buxStaus != '已启租'">撤销租金</el-button>
- <el-button type="warning" plain size="small" @click="allClick('退租')"
- :disabled="form.buxStaus != '已启租'">退租</el-button>
- <el-button type="danger" plain size="small" @click="allClick('撤销退租')"
- :disabled="form.buxStaus != '已退租'">撤销退租</el-button>
- <el-button type="success" size="small" @click="allClick('导入')"
- :disabled="!form.id || form.buxStaus != '录入'">导入</el-button>
- <el-button type="info" size="small" @click="allClick('启用')"
- :disabled="selectionList.length == 0 || form.buxStaus != '已启租'">启用</el-button>
- <!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
- <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true"
- @click="$refs.print.openDialog()">打印报表
- </el-button>
- </template>
- <template slot="indexHeader" slot-scope="{row,index}">
- <el-button type="primary" size="mini" icon="el-icon-plus"
- :disabled="editDisabled || form.buxStaus != '录入'" circle @click="addRow()">
- </el-button>
- </template>
- <template slot="index" slot-scope="{row,index}">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="boxTypeForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.boxType" key="id" label="cnName" res="records"
- url="/blade-los/bcntrtypes/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="rowDicChange('boxType', $event, row)"></dic-select>
- <span v-else>{{ row.boxType }}</span>
- </template>
- <template slot="codeForm" slot-scope="{ row }">
- <el-input v-if="row.$cellEdit" v-model="row.code" maxlength='11' size="small" placeholder="请输入箱号"
- @change="verifyChange('code', row)"></el-input>
- <span v-else>{{ row.code }}</span>
- </template>
- <template slot="currencyForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.currency" placeholder="币别" label="code"
- :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.effectiveDate + '&type=1'"
- :filterable="true" @selectChange="rowDicChange('currency', $event, row)"></dic-select>
- <span v-else>{{ row.currency }}</span>
- </template>
- <tempalte slot="originalBoxEastNameForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.originalBoxEastName" placeholder="箱东" key="id"
- label="shortName" res="records"
- url="/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=箱东" :filterable="true"
- :remote="true" dataName="shortName" @selectChange="rowDicChange('originalBoxEastName', $event, row)"
- :slotRight="true" rightLabel="code">
- </dic-select>
- <span v-else>{{ row.originalBoxEastName }}</span>
- </tempalte>
- <tempalte slot="stationCnameForm" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.stationCname" placeholder="场站" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=场站"
- :filterable="true" :remote="true" dataName="cnName"
- @selectChange="rowDicChange('stationCname', $event, row)" :slotRight="true"
- rightLabel="code"></dic-select>
- <span v-else>{{ row.stationCname }}</span>
- </tempalte>
- <tempalte slot="restrictedPortsNameForm" slot-scope="{ row }">
- <dic-select v-show="row.$cellEdit" v-model="row.restrictedPortsName" placeholder="港口" key="id"
- label="code" url="/blade-los/bports/listAll?status=0" :filterable="true" :multiple="true"
- :collapseTags="true" @selectChange="rowDicChange('restrictedPortsName', $event, row)"
- dataType="string" :slotRight="true" rightLabel="code"></dic-select>
- <span v-show="!row.$cellEdit">{{ row.restrictedPortsName }}</span>
- </tempalte>
- <tempalte slot="restrictingShippingCompaniesNameForm" slot-scope="{ row }">
- <dic-select v-show="row.$cellEdit" v-model="row.restrictingShippingCompaniesName" placeholder="船公司"
- key="id" label="cnName" url="/blade-los/bcorps/listAll?status=0&corpTypeName=船公司" :filterable="true"
- :multiple="true" :collapseTags="true" :slotRight="true" rightLabel="code"
- @selectChange="rowDicChange('restrictingShippingCompaniesName', $event, row)"
- dataType="string"></dic-select>
- <span v-show="!row.$cellEdit">{{ row.restrictingShippingCompaniesName }}</span>
- </tempalte>
- </avue-crud>
- </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="费用信息">
- <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.feeCenterList" 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" @click="allClick('费用一键保存')">一键保存</el-button>
- <el-button type="info" plain size="small" @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" circle @click="feecAddRow()">
- </el-button>
- </template>
- <template slot="index" slot-scope="{row,index}">
- <span>{{ index + 1 }}</span>
- </template>
- <template slot="billTypeForm" slot-scope="{row,index}">
- <dic-select v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.billType" 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('billType', $event, row, index)"></dic-select>
- <span v-else>{{ row.billType }}</span>
- </template>
- <template slot="cntrNoForm" slot-scope="{row,index}">
- <dic-select v-if="row.$cellEdit && !(row.automaticGenerated == 1)" 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 && !(row.automaticGenerated == 1)" :key="updateSearchKey"
- v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records" :slotRight="true"
- rightLabel="code"
- :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + row.billType"
- :filterable="true" :remote="true" dataName="shortName"
- @selectChange="rowDicChange('corpCnName', $event, row)"></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 && !(row.automaticGenerated == 1)" v-model="row.feeCnName" key="id"
- placeholder="费用名称" label="cnName" res="records"
- url="/blade-los/bfees/list?current=1&size=5&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.effectiveDate + '&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 && !(row.automaticGenerated == 1)" 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 && !(row.automaticGenerated == 1)" 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 && !(row.automaticGenerated == 1)" 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 && !(row.automaticGenerated == 1)" 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 && !(row.automaticGenerated == 1)" 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.tradingBoxFilesList" :enumerationValue="76"
- deleteUrl="/api/blade-los/tradingBoxFiles/remove" display :disabled="editButton"></c-upload>
- </el-tab-pane>
- </el-tabs>
- </div>
- <business-reports :id="form.id" :itemIds="itemIds" ref="print" businessValue="MYDL" :type="true"></business-reports>
- <business-reports :id="form.id" :itemIds="itemCIds" ref="printC" businessValue="MYDL" classifyCode="费用"
- groupCode="应付" :selecList="selectionfeecList"></business-reports>
- <reports :id="form.id" :assemblyForm="form" businessValue="MYDL" 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="activationDialog" width="30%" :before-close="activationClose"
- v-dialog-drag>
- <span>
- <avue-form ref="form2" v-model="activationForm" :option="activationOption">
- <tempalte slot="polCname">
- <dic-select v-model="activationForm.polCname" placeholder="港口" key="id" label="cnName" res="records"
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('polCname', $event)"></dic-select>
- </tempalte>
- <tempalte slot="polStationCname">
- <dic-select v-model="activationForm.polStationCname" placeholder="场站" :key="updateStationKey" label="cnName"
- res="records" :slotRight="true" rightLabel="code"
- :url="'/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=场站&ids=' + (form.cyTextOne ? form.cyTextOne : '')"
- :filterable="true" :remote="true" dataName="cnName" @selectChange="dicChange('polStationCname2', $event)"
- :disabled="editDisabled || !activationForm.polCname"></dic-select>
- </tempalte>
- <tempalte slot="podCname">
- <dic-select v-model="activationForm.podCname" placeholder="港口" key="id" label="code"
- url="/blade-los/bports/listAll?status=0" :filterable="true" @selectChange="dicChange('podCname', $event)"
- :multiple="true" :collapseTags="true" :disabled="editDisabled" dataType="string" :slotRight="true"
- rightLabel="code"></dic-select>
- </tempalte>
- </avue-form>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="activationDialog = false" size="mini">取 消</el-button>
- <el-button type="primary" @click.stop="activationSubmit" size="mini">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog title="导入数据" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
- v-dialog-drag>
- <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
- :upload-after="onSuccess">
- <template slot="excelTemplate">
- <el-button type="primary" @click="handleGet">
- 点击下载<i class="el-icon-download el-icon--right"></i>
- </el-button>
- </template>
- </avue-form>
- <p style="text-align: center;color: #DC0505">
- 温馨提示 第一次导入时请先下载模板
- </p>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- detail,
- submit,
- pleaseCheck,
- repealCancel,
- tradingBoxItem,
- tradingBoxFees,
- submitItemList,
- submitFeeList,
- enable,
- submitBoxList,
- boxRemove,
- startingRent,
- revokeRentingOut,
- rentCalculation,
- revokeRentCalculation,
- copyAgent,
- pleaseVerifyCost
- } from "@/api/boxManagement/buyContainer/index.js";
- import dicSelect from "@/components/dicSelect/main";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import businessReports from "@/components/tradeAgency/businessReports.vue";
- import reports from "@/components/tradeAgency/reports.vue";
- import { dateFormat } from "@/util/date";
- import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
- import { getToken } from "@/util/auth";
- import _ from "lodash";
- import { Header } from "element-ui";
- import { values } from "lodash";
- export default {
- name: "detailsPage",
- data() {
- return {
- boxSelectionList: [],
- rulesList: [],
- rtOption: {
- border: true,
- align: 'center',
- menuWidth: 120,
- // menu: false,
- editBtn: false,
- delBtn: false,
- header: false,
- addBtn: false,
- height: '400px',
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true,
- },
- {
- label: '起',
- prop: 'riseDays',
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true,
- },
- {
- label: '止',
- prop: 'stopDays',
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true,
- },
- {
- label: '费率',
- prop: 'rate',
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true,
- },
- {
- label: '币别',
- prop: 'curCode',
- cell: true,
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- overHidden: true,
- },
- ]
- },
- rtDialog: false,
- boxOption: {
- calcHeight: 30,
- menuWidth: 120,
- menu: false,
- tip: false,
- border: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- // header: false,
- columnBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "index",
- prop: "index",
- width: "55",
- fixed: true,
- headerslot: true,
- },
- {
- label: "箱型",
- prop: "boxType",
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [{
- required: true,
- message: "请选择箱型",
- trigger: "blur"
- }]
- },
- {
- label: "预计箱量",
- prop: "number",
- cell: true,
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入预计箱量",
- trigger: "blur"
- }]
- },
- {
- label: "箱/天",
- prop: "price",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入箱/天",
- trigger: "blur"
- }]
- },
- ]
- },
- excelBox: false,
- excelForm: {},
- excelLoading: false,
- excelOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- {
- label: "模板下载",
- prop: "excelTemplate",
- formslot: true,
- span: 24
- },
- {
- label: "模板上传",
- prop: "excelFile",
- type: "upload",
- drag: true,
- loadText: "模板上传中,请稍等",
- span: 24,
- propsHttp: {
- res: "data"
- },
- tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/blade-los/tradingBoxItem/importBoxItem"
- }
- ]
- },
- activationForm: {},
- activationOption: {
- menuBtn: false,
- span: 6,
- disabled: false,
- column: [
- {
- label: '放箱号',
- prop: 'containerNumber',
- span: 24,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '起运港',
- prop: 'polCname',
- span: 24,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '起运港场站',
- prop: 'polStationCname',
- span: 24,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '目的港',
- prop: 'podCname',
- span: 24,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- },
- {
- label: '启用日期',
- prop: 'activationDate',
- span: 24,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [{
- required: true,
- message: "",
- trigger: "blur"
- }]
- },
- ]
- },
- activationDialog: false,
- itemCIds: null,
- feeType: null,
- selectionList: [],
- selectionfeecList: [],
- checkId: '', // 审核需要的id
- batchNo: '',
- checkScheduleDialog: false, // 审核弹窗
- editButton: false,
- editDisabled: false,
- form: {
- type: "ZR",
- totalAmountC: 0,
- agreement: '到协议场站',
- boxCondition: '新',
- log: '否',
- boxTypeList: [],
- tradingBoxItemsList: [],
- feeCenterList: [],
- tradingBoxFilesList: [],
- },
- oldForm: {},
- optionForm: {
- menuBtn: false,
- span: 6,
- disabled: false,
- labelWidth: 100,
- column: [
- {
- label: '出租方',
- prop: 'purchaseCompanyName',
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- disabled: false
- },
- {
- label: '合同号',
- prop: 'contractNo',
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- disabled: false
- },
- {
- label: '租入日期',
- prop: 'effectiveDate',
- // type: "date",
- // format: "yyyy-MM-dd",
- // valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- disabled: false
- },
- {
- label: '到期日期',
- prop: 'expiryDate',
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- disabled: false
- },
- {
- label: '港口',
- prop: 'addressCname',
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '场站',
- prop: 'stationCname',
- disabled: false
- },
- {
- label: '租/还箱标准',
- prop: 'standard',
- disabled: false,
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=conditions",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '退/还箱地',
- prop: 'polStationCname',
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '业务状态',
- prop: 'buxStaus',
- disabled: true,
- },
- {
- label: '押金',
- prop: 'totalAmountC',
- disabled: false,
- },
- {
- label: '起租日期',
- prop: 'purchaseDate',
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- disabled: true
- },
- {
- label: '备注',
- prop: 'remarks',
- type: 'textarea',
- minRows: 2,
- span: 6
- }]
- },
- optionForm2: {
- menuBtn: false,
- span: 5,
- disabled: true,
- labelWidth: 100,
- column: [
- {
- label: '系统号',
- prop: 'sysNo',
- disabled: true
- },
- {
- label: '制单人',
- prop: "createUserName",
- disabled: true,
- span: 4,
- },
- {
- label: '制单日期',
- prop: "createTime",
- disabled: true,
- },
- {
- label: '修改人',
- prop: "updateUserName",
- disabled: true,
- span: 4,
- },
- {
- label: '修改日期',
- prop: "updateTime",
- disabled: true,
- }
- ]
- },
- option: {},
- optionBack: {
- // height: 'auto',
- maxHeight: 340,
- calcHeight: 30,
- menuWidth: 60,
- searchMenuSpan: 18,
- 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: "whetherEnable",
- overHidden: true,
- },
- {
- label: '放箱号',
- prop: 'containerNumber',
- overHidden: true,
- width: 100,
- },
- {
- label: '箱号',
- prop: 'code',
- width: 140,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入箱号",
- trigger: "blur"
- }]
- },
- {
- label: '箱型',
- prop: 'boxType',
- width: 100,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [{
- required: true,
- message: "请选择箱型",
- trigger: "blur"
- }]
- },
- {
- label: '箱属',
- prop: 'boxBelongsTo',
- overHidden: true,
- // cell: true,
- // width: 100,
- // type: 'select',
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxBelongsTo",
- // props: {
- // label: "dictValue",
- // value: "dictValue"
- // },
- // rules: [{
- // required: true,
- // message: "请选择箱属",
- // trigger: "blur"
- // }]
- },
- {
- label: '放箱号类型',
- prop: 'boxCategory',
- overHidden: true,
- cell: true,
- width: 100,
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxCategory",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [{
- required: true,
- message: "请选择放箱号类型",
- trigger: "blur"
- }]
- },
- {
- label: '箱况',
- prop: 'boxCondition',
- overHidden: true,
- cell: true,
- width: 100,
- type: 'select',
- dicData: [{
- label: '新',
- value: '新',
- }, {
- label: '旧',
- value: '旧',
- }],
- rules: [{
- required: true,
- message: "请选择箱况",
- trigger: "blur"
- }]
- },
- {
- label: '箱状态',
- prop: 'status',
- width: 100,
- overHidden: true,
- },
- {
- label: '箱好坏',
- prop: 'boxStatus',
- width: 100,
- cell: true,
- overHidden: true,
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=box_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- rules: [{
- required: true,
- message: "请选择箱好坏",
- trigger: "blur"
- }]
- },
- {
- label: '箱动态',
- prop: 'boxDynamics',
- width: 100,
- overHidden: true,
- },
- // {
- // label: '金额',
- // prop: 'amount',
- // cell: true,
- // type: 'number',
- // controls: false,
- // overHidden: true,
- // width: 100,
- // rules: [{
- // required: true,
- // message: "请输入金额",
- // trigger: "blur"
- // }]
- // },
- {
- label: '币别',
- prop: 'currency',
- width: 100,
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- rules: [{
- required: true,
- message: "请选择币别",
- trigger: "blur"
- }]
- },
- {
- label: '汇率',
- prop: 'exrate',
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true,
- width: 100,
- rules: [{
- required: true,
- message: "请输入汇率",
- trigger: "blur"
- }]
- },
- {
- label: '造箱日期',
- prop: 'boxMakingDate',
- overHidden: true,
- cell: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 100,
- },
- {
- label: '账单日',
- prop: 'rentEndDate',
- overHidden: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 100,
- },
- {
- label: '箱东',
- prop: 'boxEastName',
- overHidden: true,
- width: 100,
- },
- {
- label: '原箱东',
- prop: 'originalBoxEastName',
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 100,
- },
- {
- label: '场站',
- prop: 'stationCname',
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 100,
- rules: [{
- required: true,
- message: "请选择场站",
- trigger: "blur"
- }]
- },
- {
- label: '限制港口',
- prop: 'restrictedPortsName',
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 200,
- },
- {
- label: '限制船公司',
- prop: 'restrictingShippingCompaniesName',
- cell: true,
- slot: true,
- formslot: true,
- overHidden: true,
- width: 200,
- },
- {
- label: '启用日期',
- prop: 'activationDate',
- // cell: true,
- overHidden: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- },
- {
- label: "制单人",
- prop: "createUserName",
- overHidden: true,
- },
- {
- label: "制单日期",
- prop: "createTime",
- type: "date",
- overHidden: true,
- width: 120,
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- label: "修改人",
- prop: "updateUserName",
- overHidden: true,
- },
- {
- label: "修改日期",
- prop: "updateTime",
- type: "date",
- overHidden: true,
- width: 120,
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- label: '备注',
- prop: 'remarks',
- cell: true,
- width: 150,
- overHidden: true,
- }]
- },
- 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: "billType",
- 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: 140,
- 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: "days",
- width: "80",
- overHidden: true,
- },
- {
- label: "租金起始",
- prop: "storageDate",
- width: "100",
- overHidden: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- label: "租金截止",
- prop: "outboundDate",
- width: "100",
- overHidden: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss"
- },
- {
- 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: [],
- updateSearchKey: new Date().getTime(),
- updateFormKey: new Date().getTime(),
- updateStationKey: new Date().getTime(),
- deptId: JSON.parse(localStorage.getItem('sysitemData')).deptId
- }
- },
- components: {
- dicSelect,
- checkSchedule,
- businessReports,
- reports
- },
- props: {
- detailData: Object
- },
- async created() {
- this.roleName = localStorage.getItem('roleName').split(',')
- this.option = await this.getColumnData(this.getColumnName(473), this.optionBack);
- this.feecOption = await this.getColumnData(this.getColumnName(235.2), this.feecOptionBack);
- if (this.detailData.id) {
- // this.editButton = true
- // this.editDisabled = true
- // this.optionForm.disabled = true
- this.getDetail(this.detailData.id)
- }
- if (this.$route.query.params) {
- this.getDetail(this.$route.query.params)
- }
- if (this.detailData.copyId) {
- this.getCopydate(this.detailData.copyId)
- }
- this.saveLocalCurrency(this.deptId)
- },
- methods: {
- verifyChange(name, row) {
- const regex = /^([a-zA-Z]{4})([0-9]{7})$/;
- if (regex.test(row[name])) {
- if (this.calculateCheckDigit(row[name]) == row[name][10]) {
- // this.$message.success('集装箱校验正确!')
- } else {
- this.$confirm(`箱号:${row[name]}是否强制加入系统?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- // this.$message({
- // type: 'success',
- // message: '删除成功!'
- // });
- }).catch(() => {
- this.$set(row, [name], null)
- });
- }
- } else {
- this.$confirm(`箱号:${row[name]}是否强制加入系统?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- // this.$message({
- // type: 'success',
- // message: '删除成功!'
- // });
- }).catch(() => {
- this.$set(row, [name], null)
- });
- }
- },
- calculateCheckDigit(containerNo) {
- let charCode = "0123456789A?BCDEFGHIJK?LMNOPQRSTU?VWXYZ";
- let num = 0;
- for (let i = 0; i < 10; i++) {
- let idx = charCode.indexOf(containerNo[i]);
- idx = idx * Math.pow(2, i);
- num += idx;
- }
- return num = (num % 11) % 10;
- },
- openRtDialog(row) {
- this.rulesList = row.rentTermList
- this.rtDialog = true
- },
- rowSave(row, list) {
- console.log(row)
- row.rentTermList = list
- this.rtDialog = false
- },
- 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)
- }
- },
- activationSubmit() {
- this.$refs["form2"].validate((valid, done) => {
- done();
- if (valid) {
- let obj = {
- id: this.form.id,
- ...this.activationForm,
- tradingBoxItemsList: this.selectionList
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- enable(obj).then(res => {
- this.$message.success("操作成功!");
- this.getDetail(this.form.id)
- this.activationDialog = false
- }).finally(() => {
- loading.close();
- })
- } else {
- return false;
- }
- });
- },
- uploadBefore(file, done, loading) {
- done();
- loading = true;
- },
- // 上传成功
- onSuccess(res, done, loading, column) {
- if (res.length > 0) {
- this.$message.success("上传成功!");
- }
- this.excelBox = false;
- this.getDetail(this.form.id)
- loading = false;
- done();
- },
- // 下载模板
- handleGet() {
- window.open(
- `/api/blade-los/tradingBoxItem/boxItemTemplate?${this.website.tokenHeader
- }=${getToken()}&type=2`
- );
- },
- async dicChange(name, row) {
- if (name == 'purchaseCompanyName') {
- if (row) {
- this.form.purchaseCompanyId = row.id
- } else {
- this.form.purchaseCompanyId = null
- this.form.purchaseCompanyName = null
- }
- }
- if (name == 'addressCname') {
- if (row) {
- this.form.addressId = row.id
- this.form.addressCode = row.code
- this.form.addressEname = row.enName
- this.form.cyText = row.addressId
- this.form.stationId = null
- this.form.stationCode = null
- this.form.stationCname = null
- this.form.stationEname = null
- this.updateFormKey = new Date().getTime()
- } else {
- this.form.addressId = null
- this.form.addressCode = null
- this.form.addressEname = null
- this.form.addressCname = null
- this.form.cyText = null
- this.form.stationId = null
- this.form.stationCode = null
- this.form.stationCname = null
- this.form.stationEname = null
- }
- }
- if (name == 'stationCname') {
- if (row) {
- this.form.stationId = row.id
- this.form.stationCode = row.code
- this.form.stationEname = row.enName
- } else {
- this.form.stationId = null
- this.form.stationCode = null
- this.form.stationCname = null
- this.form.stationEname = null
- }
- }
- if (name == 'polStationCname') {
- if (row) {
- this.form.polStationId = row.id
- this.form.polStationCode = row.code
- this.form.polStationEname = row.enName
- } else {
- this.form.polStationId = null
- this.form.polStationCode = null
- this.form.polStationEname = null
- this.form.polStationCname = null
- }
- }
- // if (name == 'podCname') {
- // if (row) {
- // this.form.podId = row.id
- // this.form.podCode = row.code
- // this.form.podEname = row.enName
- // } else {
- // this.form.podId = null
- // this.form.podCode = null
- // this.form.podEname = null
- // this.form.podCname = null
- // }
- // }
- if (name == 'polCname') {
- if (row) {
- this.activationForm.polId = row.id
- this.activationForm.polCode = row.code
- this.activationForm.polEname = row.enName
- this.form.cyTextOne = row.addressId
- this.activationForm.polStationId = null
- this.activationForm.polStationCode = null
- this.activationForm.polStationCname = null
- this.activationForm.polStationEname = null
- this.updateStationKey = new Date().getTime()
- } else {
- this.activationForm.polId = null
- this.activationForm.polCode = null
- this.activationForm.polEname = null
- this.activationForm.polCname = null
- this.form.cyTextOne = null
- this.activationForm.polStationId = null
- this.activationForm.polStationCode = null
- this.activationForm.polStationCname = null
- this.activationForm.polStationEname = null
- }
- }
- if (name == 'polStationCname2') {
- if (row) {
- this.activationForm.polStationId = row.id
- this.activationForm.polStationCode = row.code
- this.activationForm.polStationEname = row.enName
- } else {
- this.activationForm.polStationId = null
- this.activationForm.polStationCode = null
- this.activationForm.polStationCname = null
- this.activationForm.polStationEname = null
- }
- }
- if (name == 'podCname') {
- if (row) {
- this.activationForm.podId = row.ids
- this.activationForm.podCode = row.names
- this.activationForm.podEname = row.names
- this.activationForm.podCname = row.names
- } else {
- this.activationForm.podId = null
- this.activationForm.podCode = null
- this.activationForm.podEname = null
- this.activationForm.podCname = null
- }
- }
- if (name == 'effectiveDate') {
- if (row) {
- await this.checkRate(null, row, null, 1, this.deptId)
- this.form.tradingBoxItemsList.forEach(item => {
- item.exrate = this.getExchangeRate(item.currency, 'C', 1)
- })
- this.form.feeCenterList.forEach(item => {
- item.exrate = this.getExchangeRate(item.curCode, 'C', 1)
- })
- }
- }
- },
- rowDicChange(name, row, el, index) {
- if (name == 'currency') {
- if (row) {
- el.exrate = row.exratePayable
- } else {
- el.exrate = 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 == 'boxType') {
- if (row) {
- el.boxTypeId = row.id
- } else {
- el.boxTypeId = null
- el.boxType = null
- }
- }
- if (name == 'stationCname') {
- if (row) {
- el.stationId = row.id
- el.stationCode = row.code
- el.stationEname = row.enName
- } else {
- el.stationId = null
- el.stationCode = null
- el.stationCname = null
- el.stationEname = null
- }
- }
- if (name == 'billType') {
- el.corpId = null
- el.shortName = null
- el.corpCnName = null
- el.corpEnName = null
- this.updateSearchKey = new Date().getTime()
- }
- if (name == 'corpCnName') {
- if (row) {
- el.corpId = row.id
- el.shortName = row.shortName
- el.corpEnName = row.enName
- } else {
- el.corpId = null
- el.shortName = null
- el.corpCnName = null
- el.corpEnName = null
- }
- }
- if (name == 'restrictedPortsName') {
- if (row) {
- el.restrictedPortsIds = row.ids
- el.restrictedPortsName = row.names
- } else {
- el.restrictedPortsIds = null
- el.restrictedPortsName = null
- }
- }
- if (name == 'restrictingShippingCompaniesName') {
- console.log(row)
- if (row) {
- el.restrictingShippingCompaniesIds = row.ids
- el.restrictingShippingCompaniesName = row.names
- } else {
- el.restrictingShippingCompaniesIds = null
- el.restrictingShippingCompaniesName = null
- }
- }
- if (name == 'originalBoxEastName') {
- if (row) {
- el.originalBoxEastId = row.id
- } else {
- el.originalBoxEastId = null
- el.originalBoxEastName = null
- }
- }
- },
- rowEdit(row) {
- if (row.$cellEdit == true) {
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- },
- rowItemEdit(row) {
- if (row.$cellEdit == true) {
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- },
- rowItemDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxItem({ ids: row.id }).then(res => {
- this.rulesList.splice(index, 1);
- this.$message.success("成功删除");
- })
- } else {
- this.rulesList.splice(index, 1);
- }
- });
- },
- boxAddRow() {
- this.form.boxTypeList.push(
- {
- pid: this.form.id ? this.form.id : null,
- $cellEdit: true
- }
- )
- },
- rtAddRow() {
- this.rulesList.push({ curCode: this.getLocalCurrency(), $cellEdit: true })
- },
- async addRow() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- await this.checkRate(null, this.form.effectiveDate, null, 1, this.deptId)
- this.$refs.crud.dicInit();
- this.form.tradingBoxItemsList.push({
- pid: this.form.id,
- boxBelongsTo: 'SOC',
- boxCategory: '自有箱',
- boxStatus: '好',
- boxCondition: this.form.boxCondition,
- stationId: this.form.stationId,
- stationCode: this.form.stationCode,
- stationCname: this.form.stationCname,
- stationEname: this.form.stationEname,
- currency: 'USD',
- exrate: this.getExchangeRate('USD', 'C', 1),
- status: '空箱入场',
- $cellEdit: true
- })
- },
- async feecAddRow() {
- if (!this.form.id) {
- return this.$message.error("请保存数据");
- }
- await this.checkRate(null, this.form.effectiveDate, null, 1, this.deptId)
- this.form.feeCenterList.push({
- pid: this.form.id,
- feesType: 1,
- dc: 'C',
- billType: '箱东',
- corpId: this.form.purchaseCompanyId,
- shortName: this.form.purchaseCompanyName,
- corpCnName: this.form.purchaseCompanyName,
- curCode: this.getLocalCurrency(),
- exrate: this.getExchangeRate(this.getLocalCurrency(), 'C', 1),
- $cellEdit: true
- })
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- boxSelectionChange(list) {
- this.boxSelectionList = 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;
- },
- getDetail(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- detail({ id: id }).then(res => {
- res.data.data.feeCenterList.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
- }
- if (row.auditStatus > 0) {
- this.editDisabled = true
- this.optionForm.disabled = true
- }
- })
- this.form = res.data.data
- this.updateFormKey = new Date().getTime()
- // if (res.data.data.status != '录入') {
- // this.editButton = true
- // this.editDisabled = true
- // this.optionForm.disabled = true
- // }
- }).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
- this.updateFormKey = new Date().getTime()
- }).finally(() => {
- loading.close()
- })
- },
- inEdit() {
- this.editButton = false
- if (this.form.status == '录入') {
- this.editDisabled = false
- this.optionForm.disabled = false
- }
- },
- rowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxItem({ ids: row.id }).then(res => {
- this.form.tradingBoxItemsList.splice(index, 1);
- this.$message.success("成功删除");
- })
- } else {
- this.form.tradingBoxItemsList.splice(index, 1);
- }
- });
- },
- polRowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxFees({ ids: row.id }).then(res => {
- this.form.feeCenterList.splice(index, 1);
- this.$message.success("成功删除");
- })
- } else {
- this.form.feeCenterList.splice(index, 1);
- }
- });
- },
- podRowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- tradingBoxFees({ ids: row.id }).then(res => {
- this.podFeeList.splice(index, 1);
- this.$message.success("成功删除");
- })
- } else {
- this.podFeeList.splice(index, 1);
- }
- });
- },
- allClick(name) {
- if (name == 'box一键保存') {
- if (!this.form.boxTypeList.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.form.boxTypeList) {
- if (!row.boxType || !row.number || !row.price) {
- this.$refs.crudBox.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)'
- });
- submitBoxList(this.form.boxTypeList).then(res => {
- this.$message.success("保存成功");
- this.form.boxTypeList = res.data.data
- }).finally(() => {
- loading.close();
- })
- }
- if (name == 'box一键编辑') {
- for (let row of this.form.boxTypeList) {
- this.$set(row, "$cellEdit", true);
- }
- }
- if (name == 'box批量删除') {
- for (let item of this.selectionList) {
- if (item.whetherEnable == '是') {
- return this.$message.error("启用状态不能删除!");
- }
- }
- let multiList = []
- let arr = []
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- multiList = this.boxSelectionList
- arr = this.form.boxTypeList
- // 获取有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)'
- });
- boxRemove({ ids: arrIds.join(',') }).then(res => {
- this.$message.success("删除成功");
- }).finally(() => {
- loading.close();
- })
- }
- })
- }
- if (name == '一键保存') {
- if (!this.form.tradingBoxItemsList.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.form.tradingBoxItemsList) {
- if (!row.code || !row.boxType || !row.boxCategory || !row.boxStatus || !row.boxCondition || !row.currency || !row.exrate || !row.stationCname || !row.status) {
- 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.tradingBoxItemsList).then(res => {
- this.$message.success("保存成功");
- this.form.tradingBoxItemsList = res.data.data
- }).finally(() => {
- loading.close();
- })
- }
- if (name == '一键编辑') {
- for (let row of this.form.tradingBoxItemsList) {
- if (row.whetherEnable != '是') {
- this.$set(row, "$cellEdit", true);
- }
- }
- this.$refs.crud.dicInit();
- }
- if (name == '批量删除') {
- for (let item of this.selectionList) {
- if (item.whetherEnable == '是') {
- return this.$message.error("启用状态不能删除!");
- }
- }
- let multiList = []
- let arr = []
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- multiList = this.selectionList
- arr = this.form.tradingBoxItemsList
- // 获取有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)'
- });
- tradingBoxItem({ ids: arrIds.join(',') }).then(res => {
- this.$message.success("删除成功");
- }).finally(() => {
- loading.close();
- })
- }
- })
- }
- if (name == '起租') {
- let _this = this
- this.$DialogForm.show({
- title: '起租',
- width: '30%',
- menuPosition: 'right',
- option: {
- submitText: '确定',
- emptyText: '取消',
- span: 24,
- column: [{
- label: "起租日期",
- prop: "value",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- value: _this.form.effectiveDate,
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() < new Date(_this.form.effectiveDate).getTime();
- },
- },
- rules: [{
- required: true,
- message: "请选择起租日期",
- trigger: "blur",
- }],
- }]
- },
- beforeClose: (done) => {
- done()
- },
- callback: (res) => {
- res.done()
- let obj = {
- ...this.form,
- rentType: 1,
- rentDate: res.data.value
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- startingRent(obj).then(res => {
- this.$message.success("操作成功!");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- })
- res.close()
- }
- })
- }
- if (name == '生成租金') {
- let date = new Date(this.form.rentEndDate)
- date.setDate(date.getDate() + 1);
- date = dateFormat(date, 'yyyy-MM-dd') + ' 00:00:00'
- this.$DialogForm.show({
- title: '生成租金',
- width: '30%',
- menuPosition: 'right',
- option: {
- submitText: '确定',
- emptyText: '取消',
- labelWidth: '100',
- span: 24,
- column: [{
- label: "租金截至日期",
- prop: "value",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- value: date,
- pickerOptions: {
- disabledDate(time) {
- const date2 = new Date(date)
- // date.setDate(date.getDate() + 1);
- return time.getTime() < date2.getTime();
- },
- },
- rules: [{
- required: true,
- message: "请选择日期",
- trigger: "blur",
- }],
- }]
- },
- beforeClose: (done) => {
- done()
- },
- callback: (res) => {
- res.done()
- this.$confirm('是否生成租金?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let obj = {
- ...this.form,
- rentDate: res.data.value
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- rentCalculation(obj).then(res => {
- this.$message.success("操作成功!");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- })
- res.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)'
- });
- revokeRentCalculation(this.form).then(res => {
- this.$message.success("操作成功!");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- })
- })
- }
- if (name == '退租') {
- let date = new Date(this.form.rentEndDate)
- date.setDate(date.getDate() + 1);
- date = dateFormat(date, 'yyyy-MM-dd') + ' 00:00:00'
- this.$DialogForm.show({
- title: '退租',
- width: '30%',
- menuPosition: 'right',
- option: {
- submitText: '确定',
- emptyText: '取消',
- span: 24,
- column: [{
- label: "退租日期",
- prop: "value",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- value: date,
- pickerOptions: {
- disabledDate(time) {
- const date2 = new Date(date)
- // date.setDate(date.getDate() + 1);
- return time.getTime() < date2.getTime();
- },
- },
- rules: [{
- required: true,
- message: "请选择退租起租日期",
- trigger: "blur",
- }],
- }]
- },
- beforeClose: (done) => {
- done()
- },
- callback: (res) => {
- res.done()
- this.$confirm('是否退租?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let obj = {
- ...this.form,
- rentType: 2,
- rentDate: res.data.value
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- startingRent(obj).then(res => {
- this.$message.success("操作成功!");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- })
- res.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)'
- });
- revokeRentingOut(this.form).then(res => {
- this.$message.success("操作成功!");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- })
- })
- }
- if (name == '导入') {
- this.excelOption.column.forEach(item => {
- if (item.prop == 'excelFile') {
- item.action = "/api/blade-los/tradingBoxItem/importBoxItem?type=2&id=" + this.form.id
- }
- })
- this.excelBox = true
- }
- if (name == '启用') {
- for (let item of this.selectionList) {
- if (item.whetherEnable == '是') {
- return this.$message.error("请勿重复启用");
- }
- }
- this.form.cyTextOne = this.form.cyText
- this.activationForm = {
- containerNumber: null,
- polId: this.form.addressId,
- polCode: this.form.addressCode,
- polEname: this.form.addressEname,
- polCname: this.form.addressCname,
- polStationId: this.form.stationId,
- polStationCode: this.form.stationCode,
- polStationCname: this.form.stationCname,
- polStationEname: this.form.stationEname,
- podId: null,
- podCode: null,
- podEname: null,
- podCname: null,
- activationDate: null,
- }
- this.activationDialog = true
- }
- if (name == '费用一键保存') {
- if (!this.form.feeCenterList.length) {
- return this.$message.error("请添加数据");
- }
- for (let row of this.form.feeCenterList) {
- row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
- if (!row.billType || !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.feeCenterList).then(res => {
- this.$message.success("保存成功");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- })
- }
- if (name == '费用一键编辑') {
- for (let row of this.form.feeCenterList) {
- if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
- 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.feeCenterList
- // 获取有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)'
- });
- tradingBoxFees({ ids: arrIds.join(',') }).then(res => {
- this.$message.success("删除成功");
- }).finally(() => {
- loading.close();
- })
- }
- })
- }
- if (name == '费用申请') {
- for (let row of this.selectionfeecList) {
- if (row.stlPid && row.accStatus != 0) {
- return this.$message.error("已生成账单,不允许重复申请");
- }
- if (row.stlPid && row.auditStatus != 0) {
- return this.$message.error("已申请费用,不允许重复申请");
- }
- }
- this.$confirm("确定申请费用?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- srcId: this.form.id,
- srcType: this.form.type,
- feeCenterList: this.selectionfeecList,
- url: '/boxManagement/rentalBox/index',
- pageStatus: '',
- pageLabel: '租箱',
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- pleaseVerifyCost(obj).then(res => {
- this.$message.success("操作成功");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- })
- });
- }
- },
- submit(type) {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- for (let row of this.form.boxTypeList) {
- if (!row.boxType || !row.number || !row.price) {
- this.$refs.crudBox.rowCell(row, row.$index)
- return this.$message.error("请完善箱型箱量");
- }
- }
- for (let row of this.form.tradingBoxItemsList) {
- if (!row.code || !row.boxType || !row.boxCategory || !row.boxStatus || !row.boxCondition || !row.currency || !row.exrate || !row.stationCname || !row.status) {
- this.$refs.crud.rowCell(row, row.$index)
- return this.$message.error("请完善箱明细信息");
- }
- }
- for (let row of this.form.feeCenterList) {
- row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
- if (!row.billType || !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)'
- });
- submit(this.form).then(res => {
- this.$message.success("保存成功");
- this.getDetail(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- } else {
- return false;
- }
- });
- },
- application() {
- this.$confirm("确定请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/iosBasicData/costcenter/coc/index',
- pageStatus: '',
- pageLabel: '航线成本(COC)',
- }
- 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.getDetail(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.getDetail(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) {
- 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;
- }
- .disabledBox {
- display: flex;
- align-items: center;
- }
- .meetSize {
- font-size: 16px;
- color: #54BCBD;
- }
- </style>
|