| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746 |
- <template>
- <div class="line-container-p24">
- <i class="el-icon-arrow-left"></i>
- <div
- class="dib go-back ml8 pointer"
- @click="router.replace('/voyage/voyageList')"
- >
- 返回航次列表
- </div>
- </div>
- <div class="container-title df aic jcsb">
- <div class="df aic">
- <div class="mr30">航次信息</div>
- <el-tooltip
- v-if="blockchainInfo"
- class="box-item"
- effect="light"
- :content="blockchainInfo.hash"
- placement="top"
- >
- <div class="pointer" style="font-size: 14px; font-weight: normal">
- 汇很多科技区块链认证
- </div>
- </el-tooltip>
- </div>
- <el-button
- v-auth="'DOWNLOADSHIPTRACK'"
- style="width: 220px; margin-right: 20px"
- type="primary"
- @click="downloadExcel"
- :loading="isLoadingExcel"
- >
- 下载船舶跟踪表
- </el-button>
- </div>
- <div class="line-container-p24">
- <div v-auth="'VOYAGEINFO'">
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">航次名称</div>
- <el-input
- class="info-line-text"
- v-model="voyage.voyageName"
- disabled
- ></el-input>
- </div>
- <div class="info-gap" v-if="shipAudits.length"></div>
- <div class="info-line">
- <div class="info-line-title">货主</div>
- <el-input
- class="info-line-text"
- v-model="voyage.cargoOwnerName"
- disabled
- ></el-input>
- </div>
- </div>
- <!-- <div class="line">
- <div class="info-line">
- <div class="info-line-title">船东</div>
- <el-input
- class="info-line-text"
- v-model="voyage.shipOwnerName"
- disabled
- ></el-input>
- </div>
- <div class="info-line">
- <div class="info-line-title">船东手机号</div>
- <el-input
- class="info-line-text"
- v-model="voyage.shipOwnerPhone"
- disabled
- ></el-input>
- </div>
- </div> -->
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">船舶名称</div>
- <el-input
- class="info-line-text"
- v-model="voyage.shipName"
- disabled
- ></el-input>
- </div>
- <div
- class="info-gap"
- v-if="shipAudits.length"
- @click="isCertsVisable = true"
- >
- 汇很多认证
- </div>
- <el-dialog
- @open="showCerts"
- v-model="isCertsVisable"
- destroy-on-close
- width="30%"
- >
- <Certs ref="certs"></Certs>
- </el-dialog>
- <div class="info-line">
- <div class="info-line-title">MMSI</div>
- <el-input
- class="info-line-text"
- v-model="voyage.shipMmsi"
- disabled
- ></el-input>
- </div>
- </div>
- <div id="map-container" class="map-container"></div>
- <div class="line" style="margin-top: 30px">
- <div class="info-line">
- <div class="info-line-title">开始时间</div>
- <el-input
- class="info-line-text"
- v-model="voyage.startTime"
- disabled
- ></el-input>
- </div>
- <div class="info-line">
- <div class="info-line-title">结束时间</div>
- <el-input
- class="info-line-text"
- v-model="voyage.endTime"
- disabled
- ></el-input>
- </div>
- </div>
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">装货港</div>
- <el-input
- class="info-line-text"
- v-model="voyage.loadPort"
- disabled
- ></el-input>
- </div>
- <div class="info-line">
- <div class="info-line-title">卸货港</div>
- <el-input
- class="info-line-text"
- v-model="voyage.dischargePorts"
- disabled
- ></el-input>
- </div>
- </div>
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">货种</div>
- <el-input
- class="info-line-text"
- v-model="voyage.cargo"
- disabled
- ></el-input>
- </div>
- <div class="info-line">
- <div style="width: 120px !important" class="info-line-title">
- 货量
- </div>
- <el-input
- style="width: 100px !important"
- class="info-line-text"
- v-model="voyage.tons"
- disabled
- ></el-input>
- <span class="unit">吨</span>
- <el-input
- style="width: 80px !important"
- class="info-line-text"
- v-model="voyage.pieces"
- disabled
- ></el-input>
- <span class="unit">件</span>
- </div>
- </div>
- </div>
- <div v-auth="'SHIPTRANS'">
- <div class="container-second-title df aic jcsb mt40">
- <div>船舶运输记录详情</div>
- <div style="margin-right: 20px">
- 信息更新时间 :
- <span style="font-size: 18px">
- {{ subStr(voyage.infoUpdateTime) }}</span
- >
- </div>
- </div>
- <div class="line-container-p24">
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">到达装货港时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="voyage.arrivalLoadPortTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="到达装货港时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- <div class="info-line">
- <div class="info-line-title">实装货量</div>
- <el-input
- style="width: 100px !important"
- class="info-line-text"
- v-model="voyage.actualLoadTons"
- :disabled="disabledStatus"
- placeholder="实装吨位"
- ></el-input>
- <span class="unit">吨</span>
- <el-input
- style="width: 80px !important"
- class="info-line-text"
- v-model="voyage.actualLoadPieces"
- :disabled="disabledStatus"
- placeholder="实装件数"
- ></el-input>
- <span class="unit">件</span>
- </div>
- </div>
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">装货开始时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="voyage.loadStartTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="装货开始时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- <div class="info-line">
- <div class="info-line-title">装货结束时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="voyage.loadEndTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="装货开始时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- </div>
- <el-tabs v-model="currentPortId" type="border-card" class="demo-tabs">
- <el-tab-pane
- v-for="(item, index) in voyage.voyageDetails"
- :label="item.portName + ' # ' + (index + 1)"
- :name="item.portId + ''"
- >
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">开航时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="item.setSailTime"
- type="datetime"
- @change="calExpectedArrivalTime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="开航时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- <div class="info-line">
- <div class="info-line-title">预计到港时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="item.expectedArrivalTime"
- type="datetime"
- format="YYYY/MM/DD"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="预计到港时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- </div>
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">实际到港时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="item.actualArrivalTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="实际到港时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- <!-- <div class="info-line">
- <div class="info-line-title">抵达目的地港时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="voyage.arrivalPortTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="抵达目的地港时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div> -->
- </div>
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">卸货开始时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="item.dischargeStartTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="卸货开始时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- <div class="info-line">
- <div class="info-line-title">卸货结束时间</div>
- <el-date-picker
- class="info-line-text"
- v-model="item.dischargeEndTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="卸货结束时间"
- :disabled="disabledStatus"
- ></el-date-picker>
- </div>
- </div>
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">实际卸货量</div>
- <el-input
- style="width: 100px !important"
- class="info-line-text"
- placeholder="实际卸货吨位"
- v-model="item.actualDischargeTons"
- :disabled="disabledStatus"
- ></el-input>
- <span class="unit">吨</span>
- <el-input
- style="width: 80px !important"
- class="info-line-text"
- placeholder="实际卸货件数"
- v-model="item.actualDischargePieces"
- :disabled="disabledStatus"
- ></el-input>
- <span class="unit">件</span>
- </div>
- <!-- <div class="info-line">
- <div class="info-line-title">是否购买保险</div>
- <el-checkbox
- v-model="voyage.hasInsurance"
- :checked="voyage.hasInsurance == 1"
- :disabled="disabledStatus"
- label="购买保险"
- ></el-checkbox>
- </div> -->
- </div>
- </el-tab-pane>
- </el-tabs>
- <div class="line">
- <div class="info-line">
- <div class="info-line-title">备注</div>
- <el-input
- class="info-line-textarea"
- v-model="voyage.remark"
- autosize
- type="textarea"
- :disabled="disabledStatus"
- ></el-input>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="container-title">卸货信息</div>
- <div class="line-container-p24">
- <el-tabs
- v-model="currentDiscPortId"
- type="card"
- class="demo-tabs"
- @tab-click="changeDiscPortTab"
- >
- <el-tab-pane
- v-for="(item, index) in voyage.voyageDetails"
- :label="item.portName + ' # ' + (index + 1)"
- :name="item.portId + ''"
- ></el-tab-pane>
- </el-tabs>
- <div>
- <div class="container-second-title df aic jcsb">
- <div>天气信息</div>
- </div>
- <el-table style="width: 1200px" :data="weatherTableData" stripe>
- <el-table-column
- type="index"
- label="序号"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="weather"
- label="天气"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="temperature"
- label="温度"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="winddirection"
- label="风向"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="windpower"
- label="风力"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="reporttime"
- label="记录时间"
- min-width="100"
- align="center"
- ></el-table-column>
- </el-table>
- <div style="width: 1200px; text-align: right; margin-top: 43px">
- <el-pagination
- background
- layout="prev, pager, next"
- :total="weatherTotal"
- @current-change="weatherPageChange"
- ></el-pagination>
- </div>
- <div class="hr m30-0"></div>
- </div>
- <div v-auth="'LABDETAIL'">
- <div class="container-second-title df aic jcsb">
- <div>提单信息</div>
- </div>
- <el-table :data="labTableData" stripe style="width: 1200px">
- <el-table-column
- type="index"
- label="序号"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="billingDate"
- label="开单日期"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="billingNum"
- label="开单数量"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column label="单据" min-width="150" align="center">
- <template v-slot="scope">
- <el-button
- @click="showLab(scope.row, scope.$index, '查看提单')"
- type="primary"
- size="small"
- >
- 查看
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right; margin-top: 43px; width: 1200px">
- <el-pagination
- background
- layout="prev, pager, next"
- :total="labTotal"
- @current-change="labPageChange"
- ></el-pagination>
- </div>
- <el-dialog
- v-model="isAddLabVisable"
- :title="labModalType"
- width="780px"
- center
- @close="cancelUploadLab"
- >
- <el-form
- :model="labForm"
- inline
- style="margin-bottom: 20px"
- label-width="100px"
- >
- <el-form-item label="开单日期">
- <el-date-picker
- class="info-line-text"
- v-model="labForm.billingDate"
- type="date"
- format="YYYY/MM/DD"
- value-format="YYYY/MM/DD"
- placeholder="开单日期"
- disabled
- ></el-date-picker>
- </el-form-item>
- <el-form-item label="开单数量">
- <el-input
- style="width: 240px"
- v-model="labForm.billingNum"
- placeholder="开单数量"
- disabled
- ></el-input>
- </el-form-item>
- <el-form-item label="提单">
- <Uploader
- disabled
- :actionUrl="store.state.wayBillUrl"
- :uploaderId="'labLoad'"
- :params="labParams"
- @onSendFileList="getLabBillList"
- :fileList="labBillList"
- uploadText="上传提单"
- :limit="1"
- ></Uploader>
- </el-form-item>
- </el-form>
- </el-dialog>
- <div class="hr m30-0"></div>
- </div>
- <div v-auth="'SHIPDISCHARGE'">
- <div class="container-second-title df aic jcsb">
- <div>卸货记录</div>
- <el-button
- v-auth="'DOWNLOADDISCHARGE'"
- @click="exportDischargeExcel"
- style="width: 220px; margin-right: 20px"
- type="primary"
- :loading="isDischargeLoadingExcel"
- >下载卸货信息</el-button
- >
- </div>
- <el-table :data="dischargeList" stripe style="width: 1200px">
- <el-table-column
- type="index"
- label="序号"
- min-width="80"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="dischargeTime"
- label="卸货时间"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="dischargeTons"
- label="卸货吨位"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="dischargePieces"
- label="卸货件数"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column label="磅单" min-width="150" align="center">
- <template v-slot="scope">
- <el-button
- @click="showUpdateDischarge(scope.row, scope.$index)"
- type="primary"
- size="small"
- v-if="scope.row.files"
- >
- 查看
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="width: 1200px; text-align: right; margin-top: 43px">
- <el-pagination
- background
- layout="prev, pager, next"
- :total="total"
- @current-change="pageChange"
- ></el-pagination>
- </div>
- <div class="hr m30-0"></div>
- </div>
- <el-dialog v-model="dialogVisible" title="图片预览" width="30%">
- <el-image
- :src="dialogImageUrl"
- style="height: 100%; width: 100%"
- ></el-image>
- </el-dialog>
- <div v-auth="'CARLOAD'">
- <div class="container-second-title df aic jcsb mt40">
- <div>汽车装货记录详情</div>
- </div>
- <el-table :data="truckTableData" stripe>
- <el-table-column
- type="index"
- label="序号"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="portName"
- label="港口名称"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="weighTime"
- label="称重时间"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="carNum"
- label="车号"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="cargoName"
- label="货物名称"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="shippingUnit"
- label="发货单位"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="receivingUnit"
- label="收货单位"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="grossWeight"
- label="毛重"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="tare"
- label="皮重"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="netWeight"
- label="净重"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="shipName"
- label="货船名称"
- min-width="120"
- align="center"
- ></el-table-column>
- <el-table-column
- prop="weigher"
- label="司磅员"
- min-width="100"
- align="center"
- ></el-table-column>
- <el-table-column label="单据" min-width="150" align="center">
- <template v-slot="scope">
- <el-button
- @click="showTruckRecord(scope.row, scope.$index, '查看单据')"
- type="primary"
- size="small"
- >
- 查看
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right; margin-top: 43px">
- <el-pagination
- background
- layout="prev, pager, next"
- :total="truckTotal"
- @current-change="truckPageChange"
- ></el-pagination>
- </div>
- </div>
- <el-dialog
- v-model="isAddTruckRecordVisable"
- title="查看记录"
- width="780px"
- center
- >
- <el-form
- :model="truckRecordForm"
- inline
- style="margin-bottom: 20px"
- label-width="100px"
- >
- <el-form-item label="港口名称">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.portName"
- placeholder="港口名称"
- ></el-input>
- </el-form-item>
- <el-form-item label="称重时间">
- <el-date-picker
- class="info-line-text"
- v-model="truckRecordForm.weighTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="称重时间"
- ></el-date-picker>
- </el-form-item>
- <el-form-item label="车号">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.carNum"
- placeholder="车号"
- ></el-input>
- </el-form-item>
- <el-form-item label="货物名称">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.cargoName"
- placeholder="货物名称"
- ></el-input>
- </el-form-item>
- <el-form-item label="发货单位">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.shippingUnit"
- placeholder="发货单位"
- ></el-input>
- </el-form-item>
- <el-form-item label="毛重">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.grossWeight"
- placeholder="毛重"
- ></el-input>
- </el-form-item>
- <el-form-item label="收货单位">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.receivingUnit"
- placeholder="收货单位"
- ></el-input>
- </el-form-item>
- <el-form-item label="皮重">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.tare"
- placeholder="皮重"
- ></el-input>
- </el-form-item>
- <el-form-item label="运输单位">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.transUnit"
- placeholder="运输单位"
- ></el-input>
- </el-form-item>
- <el-form-item label="净重">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.netWeight"
- placeholder="净重"
- ></el-input>
- </el-form-item>
- <el-form-item label="货船名称">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.shipName"
- placeholder="货船名称"
- ></el-input>
- </el-form-item>
- <el-form-item label="司磅员">
- <el-input
- style="width: 240px"
- v-model="truckRecordForm.weigher"
- placeholder="司磅员"
- ></el-input>
- </el-form-item>
- <el-form-item label="汽车装货单">
- <Uploader
- actionUrl="#"
- :uploaderId="'truckLoad'"
- :params="truckLoadParams"
- @onSendFileList="getTruckLoadBillList"
- :fileList="truckRecordBillList"
- uploadText="上传装货单"
- :limit="1"
- disabled
- ></Uploader>
- </el-form-item>
- </el-form>
- </el-dialog>
- </div>
- <div v-auth="'BILLINFO'">
- <div class="container-title df aic jcsb">
- 单据信息
- <el-button
- style="margin-right: 30px"
- size="medium"
- type="primary"
- v-auth="'BILLDOWNLOAD'"
- @click="downloadBillZip"
- :loading="billZipLoading"
- >下载单据</el-button
- >
- </div>
- <div class="line-container-p24" style="padding-left: 60px">
- <div class="df aic">
- <div class="info-line-title">保险单:</div>
- <el-image
- style="width: 200px; height: 200px; margin-right: 20px"
- :src="item.viewUrl"
- v-for="item in policyList"
- :key="item"
- @click="openMediaModal(item.viewUrl, 1, '保险单查看')"
- ></el-image>
- </div>
- <hr class="hr m30-0" />
- <div class="df aic">
- <div class="info-line-title">运单:</div>
- <el-image
- style="width: 200px; height: 200px; margin-right: 20px"
- :src="item.viewUrl"
- v-for="item in voyageBill"
- :key="item"
- @click="openMediaModal(item.viewUrl, 1, '运单查看')"
- ></el-image>
- </div>
- </div>
- </div>
- <div v-auth="'VOYAGEIMAGE'">
- <div class="container-title">航次图片</div>
- <div class="line-container-p24">
- <div v-if="medias.length" class="medias-content df ffw">
- <div class="pic-container">
- <div v-for="(item, index) in medias" :key="item" class="pic-main">
- <div
- :class="[
- 'box',
- index % 2 == 0 ? '' : 'bottom-box',
- item.status == 1 ? 'now-box' : '',
- ]"
- >
- <div class="card-note">
- {{ item.shipName }} 拍摄于
- <br />
- {{ item.createTime }}
- <br />
- 天气 : {{ item.weather.weather }} - 气温 :
- {{ item.weather.temperature }}℃
- </div>
- <div class="medias-box mb10" style="position: relative">
- <el-image
- v-if="item.mediaType == 1"
- style="width: 100%; height: 100%"
- fit="contain"
- :src="item.downloadUrl"
- @click="openMediaModal(item.downloadUrl, 1, '图片审核')"
- ></el-image>
- <video
- style="width: 100%; height: 100%"
- v-else
- :src="item.downloadUrl"
- ></video>
- <img
- @click="openMediaModal(item.downloadUrl, 2, '视频审核')"
- v-if="item.mediaType == 2"
- src="../../assets/icon-player.png"
- style="
- object-fit: contain;
- width: 40px;
- height: 40px;
- position: absolute;
- top: calc(50% - 20px);
- left: calc(50% - 20px);
- background: #fff;
- border-radius: 50%;
- "
- alt=""
- />
- </div>
- </div>
- <div
- :class="[
- 's-line',
- index % 2 == 0 ? '' : 'top210px',
- item.status == 1 ? 'now-s-line' : '',
- ]"
- ></div>
- <div :class="['point', item.status == 1 ? '' : 'now-point']"></div>
- <div
- :class="['l-line', item.status == 1 ? 'now-l-line' : '']"
- v-if="index + 1 != medias.length"
- ></div>
- </div>
- </div>
- </div>
- <el-dialog v-model="mediaModal" :title="modalTitle">
- <el-image
- v-if="modalType == 1"
- style="height: 60vh; display: flex"
- fit="contain"
- :src="currentUrl"
- :preview-src-list="modalPreview"
- ></el-image>
- <video
- v-else
- autoplay
- controls
- style="width: 100%; height: 100%"
- :src="currentUrl"
- ></video>
- </el-dialog>
- <el-dialog
- v-model="updateDischargeDialog"
- title="查看记录"
- width="700px"
- center
- >
- <el-form :model="updateForm" style="margin-bottom: 20px">
- <!-- <el-form-item label="记录ID">
- <span style="padding-left: 20px">{{ updateForm.id }}</span>
- </el-form-item> -->
- <el-form-item label="卸货时间">
- <el-date-picker
- class="info-line-text"
- v-model="updateForm.dischargeTime"
- type="datetime"
- format="YYYY/MM/DD HH:mm:ss"
- value-format="YYYY/MM/DD HH:mm:ss"
- placeholder="卸货时间"
- disabled
- ></el-date-picker>
- </el-form-item>
- <el-form-item label="卸货吨位">
- <el-input
- style="width: 240px"
- v-model="updateForm.dischargeTons"
- placeholder="卸货吨位"
- disabled
- ></el-input>
- </el-form-item>
- <el-form-item label="磅单查看">
- <el-image
- style="width: 200px; height: 200px; margin-right: 20px"
- v-for="item in updatePoundBillList"
- :src="item.viewUrl"
- :key="item"
- @click="openMediaModal(item.viewUrl, 1, '磅单查看')"
- ></el-image>
- </el-form-item>
- </el-form>
- </el-dialog>
- </div>
- </div>
- </template>
- <script setup>
- import { onMounted, reactive, ref, toRefs } from "vue";
- import api from "../../apis/fetch";
- import { useRoute } from "vue-router";
- import _ from "lodash";
- import router from "../../router";
- import store from "../../store";
- import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
- import downloadBlobFile from "../../utils/downloadBlobFile";
- import url from "../../apis/config";
- const route = useRoute();
- let map = ref();
- let voyage = ref({});
- let medias = ref([]);
- let coordinates = ref();
- let previewSrcList = ref([]);
- let policyList = ref([]);
- let previewPoundList = ref([]);
- let shipAudits = ref([]);
- let certs = ref(null);
- let isCertsVisable = ref(false);
- function showCerts() {
- setTimeout(() => {
- certs.value.initCerts(shipAudits.value);
- });
- }
- async function getVoyageDetail(isInit) {
- policyList.value = [];
- voyageBill.value = [];
- previewSrcList.value = [];
- let res = await api.getVoyageDetail({
- type: localStorage.userType,
- voyageId: route.query.id,
- });
- if (res.data.status == 0) {
- ElNotification({
- type: "success",
- title: res.data.msg,
- });
- blockchainInfo.value = res.data.result.blockChain;
- coordinates.value = res.data.result.coordinates;
- voyage.value = res.data.result.voyage;
- currentPortId.value = voyage.value.voyageDetails[0].portId + "";
- currentDiscPortId.value = voyage.value.voyageDetails[0].portId + "";
- medias.value = res.data.result.medias;
- shipAudits.value = res.data.result.shipAudits;
- for (let i of res.data.result.policys || []) {
- policyList.value.push({
- ...i,
- url: i.viewUrl,
- });
- }
- for (let i of res.data.result.waybills) {
- voyageBill.value.push({
- ...i,
- url: i.viewUrl,
- });
- }
- for (let i of medias.value) {
- previewSrcList.value.push(i.downloadUrl);
- }
- if (isInit) {
- getDischargeList();
- getTruckLoadRecord();
- getLabList();
- getPortWeatherList();
- initMap();
- }
- } else {
- console.log(res);
- ElNotification({
- type: "error",
- title: res.data.msg,
- });
- }
- }
- let total = ref(0);
- function pageChange(e) {
- dischargeCurrentPage.value = e;
- getDischargeList();
- }
- async function addDischarge() {
- if (!formInline.value.dischargeTime || !formInline.value.dischargeTons)
- return;
- let res = await api.addDischarge({
- ...formInline.value,
- voyageId: route.query.id,
- });
- if (res.data.status == 0) {
- getDischargeList(1);
- formInline.value = {};
- } else {
- console.log(res);
- }
- }
- async function deleteDischarge(id, index) {
- let res = await api.deleteDischarge({
- id,
- });
- if (res.data.status == 0) {
- dischargeList.value.splice(index, 1);
- ElNotification({
- type: "success",
- title: res.data.msg,
- });
- } else {
- console.log(res);
- ElNotification({
- type: "error",
- title: res.data.msg,
- });
- }
- }
- async function exportExcel() {}
- let dischargeCurrentPage = ref(1);
- let dischargeList = ref();
- let formInline = ref({});
- async function getDischargeList(type) {
- let res = await api.getDischargeList({
- voyageId: route.query.id,
- portId: currentDiscPortId.value,
- currentPage: dischargeCurrentPage.value,
- size: 10,
- });
- if (res.data.status == 0) {
- dischargeList.value = res.data.result;
- total.value = res.data.total;
- } else {
- console.log(res);
- }
- }
- let updateForm = ref({});
- let updateDischargeDialog = ref(false);
- let currentUpdateIndex = ref(-1);
- async function updateDischarge() {
- let res = await api.updateDischarge({
- ...updateForm.value,
- });
- if (res.data.status == 0) {
- dischargeList.value[currentUpdateIndex.value] = res.data.result;
- cancelUpdateDischarge();
- ElNotification({
- type: "success",
- title: res.data.msg,
- });
- } else {
- console.log(res);
- ElNotification({
- type: "error",
- title: res.data.msg,
- });
- }
- }
- let updatePoundParams = ref([]);
- let updatePoundBillList = ref([]);
- function showUpdateDischarge(item, index) {
- updateDischargeDialog.value = true;
- updatePoundBillList.value = [];
- let { id, dischargeTons, dischargeTime, voyageId, files } = item;
- updatePoundBillList.value = files;
- updateForm.value = {
- id,
- dischargeTons,
- dischargeTime,
- };
- currentUpdateIndex.value = index;
- }
- function cancelUpdateDischarge() {
- updateDischargeDialog.value = false;
- updateForm.value = {};
- currentUpdateIndex.value = -1;
- }
- function initMap() {
- map.value = new AMap.Map("map-container", {
- zoom: 11, //级别
- center: [120.563757, 31.891174], //中心点坐标
- mapStyle: "amap://styles/f48d96805f5fa7f5aada657c5ee37017",
- zoomEnable: false,
- dragEnable: false,
- });
- let toolBar = new AMap.ToolBar({
- position: {
- top: "40px",
- right: "40px",
- },
- });
- let hawkEye = new AMap.HawkEye({
- opened: false,
- });
- // map.value.addControl(toolBar);
- map.value.addControl(hawkEye);
- let markers = [];
- for (let i of medias.value) {
- let content = `<div style='width:160px'>
- ${
- i.audit == 1
- ? `<img id='img${i.id}' style='width:160px;height:160px;object-fit:contain;' src='${i.viewUrl}'/>`
- : ``
- }
- <img src='https://hhd-pat-1255802371.cos.ap-shanghai.myqcloud.com/frontend/ship-red-icon.png' style='display:block;width:20px;height:20px;margin:6px auto'/
- </div>`;
- let marker = new AMap.Marker({
- content,
- position: new AMap.LngLat(i.longitude, i.latitude),
- offset: new AMap.Pixel(-75, i.audit == 1 ? -195 : -30),
- });
- if (i.audit == 1) {
- marker.on("click", () => {
- openMediaModal(i.viewUrl, 1, "航次图片", i);
- });
- }
- markers.push(marker);
- }
- let overlayGroups = new AMap.OverlayGroup(markers);
- map.value.on("complete", function () {
- let t = setTimeout(() => {
- map.value.add(overlayGroups);
- map.value.setFitView(markers, true, [200, 50, 0, 0], 18);
- clearTimeout(t);
- }, 2000);
- });
- }
- function setShipMarker(longitude = 121.524761, latitude = 31.228721) {
- map.value.setCenter([longitude, latitude]);
- var marker = new AMap.Marker({
- position: new AMap.LngLat(longitude, latitude),
- offset: new AMap.Pixel(-20, -20),
- size: new AMap.Size(80, 80),
- icon: "https://hhd-pat-1255802371.cos.ap-shanghai.myqcloud.com/frontend/ship-red-icon.png", // 添加 Icon 图标 URL
- title: "",
- });
- map.value.add(marker);
- }
- let disabledStatus = ref(true);
- let updateCache = {};
- function changeVoyageInfo() {
- updateCache = _.cloneDeep(voyage.value);
- disabledStatus.value = false;
- }
- function cancelVoyageChange() {
- voyage.value = updateCache;
- disabledStatus.value = true;
- }
- async function submitVoyageChange() {
- let {
- id,
- transStatus,
- loadStartTime,
- loadEndTime,
- dischargeStartTime,
- dischargeEndTime,
- actualDischargeTons,
- remark,
- } = voyage.value;
- let res = await api.updateVoyage({
- id,
- transStatus,
- loadStartTime,
- loadEndTime,
- dischargeStartTime,
- dischargeEndTime,
- actualDischargeTons,
- remark,
- });
- if (res.data.status == 0) {
- ElNotification({
- type: "success",
- title: res.data.msg,
- });
- disabledStatus.value = true;
- } else {
- ElNotification({
- type: "error",
- title: res.data.msg,
- });
- console.log(res);
- }
- }
- let options = ref([
- { value: 0, label: "请选择" },
- {
- value: 1,
- label: "航行",
- },
- {
- value: 2,
- label: "停泊",
- },
- {
- value: 3,
- label: "装货",
- },
- {
- value: 4,
- label: "运输中",
- },
- {
- value: 5,
- label: "卸货",
- },
- ]);
- async function finishVoyage() {
- if (!voyage.value.dischargeEndTime) return;
- let res = await api.finishVoyage({
- voyageId: route.query.id,
- });
- if (res.data.status == 0) {
- voyage.value.voyageStatus = 2;
- ElNotification({
- type: "success",
- title: res.data.msg,
- });
- } else {
- ElNotification({
- type: "error",
- title: res.data.msg,
- });
- console.log(res);
- }
- }
- let currentUrl = ref("");
- let mediaModal = ref(false);
- let modalType = ref(1);
- let modalTitle = ref();
- let modalPreview = ref([]);
- function openMediaModal(url, type, title) {
- console.log(url, type, title);
- modalPreview.value = [url];
- modalTitle.value = title;
- modalType.value = type;
- currentUrl.value = url;
- mediaModal.value = true;
- }
- async function auditMedia(mediaId, a, index, mediaType) {
- console.log(mediaId, a, index, mediaType);
- let res = await api.auditMedia({
- mediaId,
- audit: a,
- });
- if (res.data.status == 0) {
- medias.value[index].audit = a;
- ElNotification({
- type: "success",
- title: res.data.msg,
- });
- } else {
- console.log(res);
- }
- }
- let dialogImageUrl = ref();
- let dialogVisible = ref(false);
- function handlePictureCardPreview(file) {
- dialogVisible.value = true;
- dialogImageUrl.value = file.url;
- }
- async function handleRemoveBill(file, list) {
- let cache = _.cloneDeep(voyageBill.value);
- console.log(cache);
- ElMessageBox.confirm("确认删除运单?", "Warning", {
- confirmButtonText: "删除",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(async () => {
- let { id } = file;
- let res = await api.deleteWaybill({
- id,
- });
- if (res.data.status == 0) {
- ElMessage({
- message: "删除成功!",
- type: "success",
- });
- voyageBill.value = list;
- }
- })
- .catch(() => {
- voyageBill.value = cache;
- ElMessage({
- type: "info",
- message: "取消删除",
- });
- });
- }
- let voyageBill = ref([]);
- function billUploadSuccess(response, file, list) {
- list[list.length - 1] = {
- ...response.result,
- url: response.result.viewUrl,
- };
- console.log(list);
- voyageBill.value = list;
- }
- let billParams = ref({
- voyageId: route.query.id,
- });
- async function calExpectedArrivalTime() {
- let res = await api.calExpectedArrivalTime({
- voyageId: route.query.id,
- setSailTime: voyage.value.setSailTime,
- });
- if (res.data.status == 0) {
- voyage.value.expectedArrivalTime = res.data.result;
- }
- }
- let isLoadingExcel = ref(false);
- async function downloadExcel() {
- isLoadingExcel.value = true;
- let res = await downloadBlobFile(
- `${url.baseurl}/voyage/exportExcel`,
- { voyageId: route.query.id },
- "船舶跟踪表",
- "post",
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
- );
- if (res) {
- isLoadingExcel.value = false;
- }
- }
- let isDischargeLoadingExcel = ref(false);
- async function exportDischargeExcel() {
- isDischargeLoadingExcel.value = true;
- let res = await downloadBlobFile(
- `${url.baseurl}/voyage/exportDischargeExcel`,
- { voyageId: route.query.id },
- "卸货记录表",
- "post",
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
- );
- if (res) {
- isDischargeLoadingExcel.value = false;
- }
- }
- function subStr(str = "") {
- return str.substring(0, 10);
- }
- let truckTableData = ref([]);
- let truckCurrentPage = ref(1);
- let truckTotal = ref(0);
- async function getTruckLoadRecord() {
- let res = await api.getTruckLoadRecord({
- voyageId: route.query.id,
- portId: currentDiscPortId.value,
- currentPage: truckCurrentPage.value,
- size: 10,
- });
- truckTableData.value = res.data.result;
- truckTotal.value = res.data.total;
- }
- function truckPageChange(e) {
- truckCurrentPage.value = e;
- getTruckLoadRecord();
- }
- let truckRecordForm = ref({});
- let isAddTruckRecordVisable = ref(false);
- let truckRecordBillList = ref([]);
- function showTruckRecord(item, index, text) {
- isAddTruckRecordVisable.value = true;
- if (item.file) {
- truckRecordBillList.value[0] = {
- ...item.file,
- url: item.file.viewUrl,
- };
- }
- truckRecordForm.value = { ...item };
- }
- let truckLoadParams = ref({});
- function getTruckLoadBillList() {}
- let blockchainInfo = ref("");
- let billZipLoading = ref(false);
- async function downloadBillZip() {
- billZipLoading.value = true;
- let res = await downloadBlobFile(
- `${url.baseurl}/voyage/exportBillZip`,
- { voyageId: route.query.id },
- "单据文件",
- "post",
- "application/zip"
- );
- billZipLoading.value = false;
- }
- let weatherTableData = ref([]);
- let weatherCurrentPage = ref(1);
- let weatherTotal = ref(0);
- async function getPortWeatherList() {
- let res = await api.getPortWeatherList({
- voyageId: route.query.id,
- portId: currentDiscPortId.value,
- size: 10,
- currentPage: weatherCurrentPage.value,
- });
- weatherTableData.value = res.data.result;
- weatherTotal.value = res.data.total;
- }
- function weatherPageChange(e) {
- weatherCurrentPage.value = e;
- getPortWeatherList();
- }
- let labTableData = ref([]);
- let labTotal = ref(0);
- let labCurrentPage = ref(1);
- async function getLabList() {
- let res = await api.getLabList({
- voyageId: route.query.id,
- portId: currentDiscPortId.value,
- currentPage: labCurrentPage.value,
- size: 10,
- });
- labTableData.value = res.data.result;
- labTotal.value = res.data.total;
- }
- function labPageChange(e) {
- labCurrentPage.value = e;
- getLabList();
- }
- let isAddLabVisable = ref(false);
- let labBillList = ref([]);
- let labForm = ref({});
- function showLab(item) {
- isAddLabVisable.value = true;
- if (item.file) {
- labBillList.value[0] = {
- ...item.file,
- url: item.file.viewUrl,
- };
- }
- labForm.value = { ...item };
- }
- let currentPortId = ref("");
- let currentDiscPortId = ref("");
- let currentDiscPortIndex = ref(0);
- function changeDiscPortTab(e) {
- currentDiscPortIndex.value = e.index;
- currentDiscPortId.value =
- voyage.value.voyageDetails[currentDiscPortIndex.value].portId + "";
- weatherTableData.value = [];
- weatherTotal.value = 0;
- labTableData.value = [];
- labTotal.value = 0;
- dischargeList.value = [];
- total.value = 0;
- truckTableData.value = [];
- truckTotal.value = 0;
- labCurrentPage.value = 1;
- dischargeCurrentPage.value = 1;
- weatherCurrentPage.value = 1;
- truckCurrentPage.value = 1;
- getDischargeList();
- getTruckLoadRecord();
- getLabList();
- getPortWeatherList();
- }
- onMounted(() => {
- getVoyageDetail(true);
- });
- </script>
- <style scoped>
- .map-container {
- width: 100%;
- height: 500px;
- }
- .card-note {
- height: 30px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #777777;
- }
- .medias-box {
- width: 200px;
- height: 200px;
- margin-top: 20px;
- }
- .checkbox-group {
- width: 200px;
- height: 50px;
- margin-top: 20px;
- }
- .medias-content {
- width: 100%;
- height: 600px;
- background: #f7f7f7;
- border-radius: 2px;
- }
- .pic-container {
- width: 100%;
- height: 100%;
- box-sizing: border-box;
- display: flex;
- padding: 30px;
- overflow-x: scroll;
- overflow-y: hidden;
- white-space: nowrap;
- }
- .pic-main {
- position: relative;
- width: 120px;
- }
- .box {
- position: absolute;
- height: 240px;
- width: var(--box-width);
- border: 5px solid #dddddd;
- transition: all 0.5s;
- background: #fff;
- z-index: 10;
- }
- .point {
- position: relative;
- left: 93px;
- top: 258px;
- width: 16px;
- height: 16px;
- background-image: url(../../assets/blue-circle.png);
- }
- .s-line {
- position: absolute;
- left: 100px;
- top: 242px;
- height: 20px;
- border-left: 2px dashed;
- box-sizing: border-box;
- border-color: #ddd;
- }
- .l-line {
- position: relative;
- bottom: 30px;
- left: 111px;
- top: 249px;
- height: 3px;
- width: 100px;
- background-color: #dddddd;
- }
- .bottom-box {
- top: 290px;
- }
- .top210px {
- top: 270px;
- }
- .box:hover {
- transform: scale(1.2);
- }
- .medias-box {
- width: 80px;
- height: 80px;
- margin-top: 10px;
- }
- .card-note {
- height: 30px;
- font-size: 12px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #777777;
- padding: 10px 20px;
- }
- .medias-box {
- width: 100%;
- height: 100px;
- margin-top: 20px;
- }
- .checkbox-group {
- width: 180px;
- height: 50px;
- margin-top: 20px;
- }
- .el-checkbox {
- margin: 0;
- }
- .now-box {
- border: 5px solid #0094fe;
- }
- .now-l-line {
- background-color: #0094fe;
- }
- .now-s-line {
- border-color: #97caf6;
- }
- .now-point {
- filter: grayscale(1);
- }
- .info-line-text-table {
- width: 180px !important;
- }
- .upload-plus-icon {
- height: 15%;
- color: rgb(139, 147, 156);
- line-height: 100px;
- font-size: 40px;
- font-weight: 200;
- }
- .upload-text {
- height: 25%;
- color: rgb(139, 147, 156);
- }
- .info-gap {
- width: 40px;
- font-size: 14px;
- overflow: visible;
- white-space: nowrap;
- color: #006ebc;
- cursor: pointer;
- }
- .unit {
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #353a42;
- line-height: 100%;
- margin: 0 10px;
- }
- </style>
|