1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303 |
- <template>
- <div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
- <el-row>
- <el-form-item label="航次" prop="fNo" label-width="110px">
- <el-input
- v-model="queryParams.fNo"
- style="width:200px"
- placeholder="请输入航次"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item label="装货港" prop="fPortofloadid" label-width="110px">
- <el-select
- v-model="queryParams.fPortofloadid"
- style="width:200px"
- placeholder="请输入装货港名称"
- clearable
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="卸货港" prop="fPortofdischargeid" label-width="110px">
- <el-select
- v-model="queryParams.fPortofdischargeid"
- style="width:200px"
- clearable
- placeholder="请输入卸货港名称"
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="目的地" prop="fDistinationid" label-width="110px">
- <el-select
- v-model="queryParams.fDistinationid"
- style="width:200px"
- clearable
- placeholder="请输入目的地名称"
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-row>
- <div v-show="queryParamsHidden">
- <el-row>
- <el-form-item label="中转港" prop="fPortoftransshipment" label-width="110px">
- <el-select
- v-model="queryParams.fPortoftransshipment"
- style="width:200px"
- clearable
- placeholder="请输入中转港名称"
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="预计开船日期" prop="fEtd" label-width="110px">
- <el-date-picker
- v-model="queryParams.fEtd"
- style="width:200px"
- type="date"
- clearable
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="开船日期" prop="fAtd" label-width="110px">
- <el-date-picker
- v-model="queryParams.fAtd"
- style="width:200px"
- type="date"
- clearable
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="到港日" prop="fAta" label-width="110px">
- <el-date-picker
- v-model="queryParams.fAta"
- style="width:200px"
- type="date"
- clearable
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="船管人" prop="fManageid" label-width="110px">
- <el-select
- v-model="queryParams.fManageid"
- style="width:200px"
- clearable
- placeholder="请输入船管人"
- :remote-method="manageRemoteMethod"
- >
- <el-option
- v-for="item in this.getManageOptions"
- :key="item.userId"
- :label="item.userName"
- :value="item.userId"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="航期" prop="fDays" label-width="110px">
- <el-input
- v-model="queryParams.fDays"
- style="width:200px"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item label="状态" prop="fStatus" label-width="110px">
- <el-select v-model="queryParams.fStatus" style="width:200px" placeholder="请输入状态" clearable>
- <el-option label="正常" value='T'></el-option>
- <el-option label="停用" value='F'></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="录入人" prop="createBy" label-width="110px">
- <el-input
- v-model="queryParams.createBy"
- style="width: 200px"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item label="备注" label-width="110px">
- <el-input
- v-model="queryParams.remark"
- type="textarea"
- style="width:200px"
- clearable
- size="small"
- />
- </el-form-item>
- </el-row>
- </div>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="success"
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['shipping:voyage:add']"
- >新增</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="warning"
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['shipping:voyage:edit']"
- >修改</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['shipping:voyage:remove']"
- >删除</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['basicdata:yard:import']"
- >导入</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['shipping:voyage:export']"
- >导出</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="info"
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['basicdata:yard:list']"
- >取消</el-button>
- </el-col>
- <el-col style="position: absolute;left:75%" :span="5" >
- <el-button size="small" @click="queryParamsHidden ? (queryParamsHidden = false) : (queryParamsHidden = true)">{{ queryParamsHidden ? '隐藏' : '更多' }}</el-button>
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
- </el-col>
- <div class="tabSetting">
- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar>
- <div style="margin: 0 12px">
- <el-button
- icon="el-icon-setting"
- size="mini"
- circle
- @click="showSetting = !showSetting"
- ></el-button>
- </div>
- </div>
- </el-row>
- <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag>
- <template slot="title">
- <div class="avue-crud__dialog__header">
- <span class="el-dialog__title">
- <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
- </span>
- </div>
- </template>
- <div>配置排序列数据(拖动调整顺序)</div>
- <div style="margin-left: 17px">
- <el-checkbox
- v-model="allCheck"
- label="全选"
- @change="allChecked"
- ></el-checkbox>
- </div>
- <div style="padding: 4px; display: flex; justify-content: center">
- <draggable
- v-model="setRowList"
- group="site"
- animation="300"
- @start="onStart"
- @end="onEnd"
- handle=".indraggable"
- >
- <transition-group>
- <div
- v-for="item in setRowList"
- :key="item.surface"
- class="listStyle"
- >
- <div style="width: 500px" class="indraggable">
- <div class="progress" :style="{ width: item.width + 'px' }">
- <el-checkbox
- :label="item.name"
- v-model="item.checked"
- :true-label="0"
- :false-label="1"
- >{{ item.name }}
- </el-checkbox>
- </div>
- </div>
- <el-input-number
- v-model.number="item.width"
- controls-position="right"
- :min="1"
- :max="500"
- size="mini"
- ></el-input-number>
- </div>
- </transition-group>
- </draggable>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="showSetting = false">取 消</el-button>
- <el-button @click="delRow" type="danger">重 置</el-button>
- <el-button type="primary" @click="save()">确 定</el-button>
- </span>
- </el-dialog>
- <el-table v-loading="loading" :data="corpsList" @selection-change="handleSelectionChange">
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column type="index" width="55" label="行号" align="center" fixed="left"/>
- <el-table-column
- v-for="(item, index) in getRowList"
- :key="index"
- :label="item.name"
- :width="item.width"
- :prop="item.label"
- align="center"
- :fixed="item.fixed"
- :show-overflow-tooltip="true"
- sortable
- >
- <template slot-scope="scope">
- <span v-if="item.label == 'fNo'">{{scope.row.fNo}}</span>
- <span v-if="item.label == 'pidName'">{{scope.row.pidName}}</span>
- <span v-if="item.label == 'portofloadidName'">{{scope.row.portofloadidName}}</span>
- <span v-if="item.label == 'portofdischargeidName'">{{scope.row.portofdischargeidName}}</span>
- <span v-if="item.label == 'distinationidName'">{{scope.row.distinationidName}}</span>
- <span v-if="item.label == 'portoftransshipmentName'">{{scope.row.portoftransshipmentName}}</span>
- <span v-if="item.label == 'fEtd'">{{scope.row.fEtd}}</span>
- <span v-if="item.label == 'fAtd'">{{scope.row.fAtd}}</span>
- <span v-if="item.label == 'fEta'">{{scope.row.fEta}}</span>
- <span v-if="item.label == 'fAta'">{{scope.row.fAta}}</span>
- <span v-if="item.label == 'manageidName'">{{scope.row.manageidName}}</span>
- <span v-if="item.label == 'fTel'">{{scope.row.fTel}}</span>
- <span v-if="item.label == 'fDays'">{{scope.row.fDays}}</span>
- <span v-if="item.label == 'fStatus'">{{scope.row.fStatus}}</span>
- <span v-if="item.label == 'remark'">{{scope.row.remark}}</span>
- <span v-if="item.label == 'createBy'">{{scope.row.createBy}}</span>
- <span v-if="item.label == 'createTime'">{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
- <span v-if="item.label == 'updateBy'">{{scope.row.updateBy}}</span>
- <span v-if="item.label == 'updateTime'">{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column label="航次" align="center" prop="fNo" width="100px"/>-->
- <!-- <el-table-column :show-overflow-tooltip="true" label="装货港" align="center" prop="portofloadidName" width="100px"/>-->
- <!-- <el-table-column :show-overflow-tooltip="true" label="卸货港" align="center" width="100px" prop="portofdischargeidName" />-->
- <!-- <el-table-column :show-overflow-tooltip="true" label="目的地" align="center" prop="distinationidName" />-->
- <!-- <el-table-column :show-overflow-tooltip="true" label="中转港" align="center" prop="portoftransshipmentName" />-->
- <!-- <el-table-column label="预计开船日期" align="center" prop="fEtd" />-->
- <!-- <el-table-column label="开船日期" align="center" prop="fAtd" />-->
- <!-- <el-table-column label="预计到达日期" align="center" prop="fEta" />-->
- <!-- <el-table-column label="到港日" align="center" prop="fAta" />-->
- <!-- <el-table-column label="船管人" align="center" prop="manageidName" />-->
- <!-- <el-table-column label="联系方式" align="center" prop="fTel" />-->
- <!-- <el-table-column label="航期" align="center" prop="fDays" />-->
- <!-- <el-table-column label="状态" align="center" prop="fStatus" />-->
- <!-- <el-table-column label="备注" align="center" prop="remark" />-->
- <!-- <el-table-column label="录入人" align="center" prop="createBy" />-->
- <!-- <el-table-column label="录入时间" align="center" prop="createTime" width="100">-->
- <!-- <template slot-scope="scope">-->
- <!-- <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column label="最新修改人" align="center" prop="updateBy" width="100px"/>-->
- <!-- <el-table-column label="最新修改时间" align="center" prop="updateTime" width="100px">-->
- <!-- <template slot-scope="scope">-->
- <!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" width="120px">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['shipping:voyage:edit']"
- >查看</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- v-hasPermi="['shipping:voyage:remove']"
- @click="handleDelete(scope.row)"
- >移除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改客户详情对话框 -->
- <el-dialog
- v-dialogDrag
- :fullscreen="dialogFull"
- :title="title"
- :visible.sync="open"
- close-on-click-modal="false"
- width="60%"
- :close-on-click-modal="false"
- append-to-body>
- <template slot="title">
- <div class="avue-crud__dialog__header">
- <span class="el-dialog__title">
- <span style="display:inline-block;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
- </span>
- <div class="avue-crud__dialog__menu enlarge" @click="full">
- <i style="cursor: pointer;display: block;width:12px;height:12px;border:1px solid #909399;border-top:3px solid #909399;margin-top: -3px;"></i>
- </div>
- </div>
- </template>
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="航次" prop="fNo" label-width="110px">
- <el-input
- v-model="form.fNo"
- style="width: 80%"
- placeholder="请输入编号"
- :disabled="doNot"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="船名" prop="fPid" label-width="110px">
- <el-select
- v-model="form.fPid"
- style="width: 80%"
- clearable
- placeholder="请输入船名"
- :disabled="doNot"
- :remote-method="vesselRemoteMethod"
- >
- <el-option
- v-for="item in this.vesselOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="装货港" prop="fPortofloadid" label-width="110px">
- <el-select
- v-model="form.fPortofloadid"
- style="width: 80%"
- clearable
- placeholder="请输入装货港名称"
- :disabled="doNot"
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="卸货港" prop="fPortofdischargeid" label-width="110px">
- <el-select
- v-model="form.fPortofdischargeid"
- style="width: 80%"
- clearable
- placeholder="请输入卸货港"
- :disabled="doNot"
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="目的地" prop="fDistinationid" label-width="110px">
- <el-select
- v-model="form.fDistinationid"
- style="width: 80%"
- clearable
- placeholder="请输入目的地"
- :disabled="doNot"
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="中转港" prop="fPortoftransshipment" label-width="110px">
- <el-select
- v-model="form.fPortoftransshipment"
- style="width: 80%"
- clearable
- placeholder="请输入中转港"
- :disabled="doNot"
- :remote-method="portRemoteMethod"
- >
- <el-option
- v-for="item in this.portOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="预计开船日期" prop="fEtd" label-width="110px">
- <el-date-picker
- v-model="form.fEtd"
- style="width: 80%"
- type="date"
- :disabled="doNot"
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="开船日期" prop="fAtd" label-width="110px">
- <el-date-picker
- v-model="form.fAtd"
- type="date"
- :disabled="doNot"
- value-format="yyyy-MM-dd"
- style="width: 80%"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="预计到达日期" prop="fEta" label-width="110px">
- <el-date-picker
- v-model="form.fEta"
- type="date"
- :disabled="doNot"
- value-format="yyyy-MM-dd"
- style="width: 80%"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="到港日" prop="fAta" label-width="110px">
- <el-date-picker
- v-model="form.fAta"
- type="date"
- :disabled="doNot"
- value-format="yyyy-MM-dd"
- style="width: 80%"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="船管人" prop="fManageid" label-width="110px">
- <el-select
- v-model="form.fManageid"
- style="width: 80%"
- clearable
- placeholder="请输入船管人"
- :disabled="doNot"
- :remote-method="manageRemoteMethod"
- >
- <el-option
- v-for="item in this.getManageOptions"
- :key="item.userId"
- :label="item.userName"
- :value="item.userId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="联系方式" prop="fTel" label-width="110px">
- <el-input
- v-model="form.fTel"
- style="width: 80%"
- placeholder="请输入手机号"
- :disabled="doNot"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="截单日期" prop="fDucomentrayoffdate" label-width="110px">
- <el-date-picker
- v-model="form.fDucomentrayoffdate"
- type="date"
- value-format="yyyy-MM-dd"
- style="width: 80%"
- :disabled="doNot"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="截港日期" prop="fCutoffdate" label-width="110px">
- <el-date-picker
- v-model="form.fCutoffdate"
- type="date"
- :disabled="doNot"
- value-format="yyyy-MM-dd"
- style="width: 80%"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="航期" prop="fDays" label-width="110px">
- <el-input
- v-model="form.fDays"
- style="width: 80%"
- placeholder=""
- :disabled="doNot"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="总teu" prop="fTeu" label-width="110px">
- <el-input style="width: 80%" size="small" v-model="form.fTeu" :disabled="doNot"/>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="状态" prop="fStatus" label-width="110px">
- <el-select v-model="form.fStatus" style="width: 80%" :disabled="doNot" placeholder="请输入状态" >
- <el-option label="正常" value='T'></el-option>
- <el-option label="停用" value='F'></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="备注" prop="remark" label-width="110px">
- <el-input
- v-model="form.remark"
- style="width: 100%" placeholder=""
- :disabled="doNot"
- type="textarea"
- :autosize="{ minRows: 2}"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="info" round @click="doNot = false">修 改</el-button>
- <el-button type="success" round @click="submitForm" :disabled="doNot">保 存</el-button>
- <el-button @click="cancel" round>关 闭</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { getvessel,listCorps, getCorps, delCorps, addyard,getport, getManage, changeCorpsStatus,exportCorps } from "@/api/kaihe/shipDynamics/vesselDetail";
- import draggable from "vuedraggable";
- import Vue from 'vue'
- import Cookies from 'js-cookie'
- import { addSet, resetModule, select } from '@/api/system/set'
- Vue.directive('dialogDrag', {
- bind(el, binding, vnode, oldVnode) {
- const dialogHeaderEl = el.querySelector('.el-dialog__header')
- const dragDom = el.querySelector('.el-dialog')
- const enlarge = el.querySelector('.enlarge')
- dialogHeaderEl.style.cursor = 'move'
- // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
- const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
- if(enlarge){
- enlarge.onclick = (e) => {
- dragDom.style.top = '0px'
- dragDom.style.left = '0px'
- }
- }
- dialogHeaderEl.onmousedown = (e) => {
- // 鼠标按下,计算当前元素距离可视区的距离
- const disX = e.clientX - dialogHeaderEl.offsetLeft
- const disY = e.clientY - dialogHeaderEl.offsetTop
- // 获取到的值带px 正则匹配替换
- let styL, styT
- // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
- if (sty.left.includes('%')) {
- styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
- styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
- } else {
- styL = +sty.left.replace(/\px/g, '')
- styT = +sty.top.replace(/\px/g, '')
- }
- document.onmousemove = function(e) {
- // 通过事件委托,计算移动的距离
- const l = e.clientX - disX
- const t = e.clientY - disY
- // 移动当前元素
- if ((t + styT) >= 0){
- dragDom.style.top = `${t + styT}px`
- }
- dragDom.style.left = `${l + styL}px`
- // 将此时的位置传出去
- // binding.value({x:e.pageX,y:e.pageY})
- }
- document.onmouseup = function(e) {
- document.onmousemove = null
- document.onmouseup = null
- }
- }
- }
- })
- export default {
- name: "yard",
- components: {
- draggable
- },
- data() {
- return {
- setRowList: [],
- getRowList: [],
- tableDate: [
- {
- surface: "1",
- label: "fNo",
- name: "航次",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "2",
- label: "pidName",
- name: "船名",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "3",
- label: "portofloadidName",
- name: "装货港",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "4",
- label: "portofdischargeidName",
- name: "卸货港",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "5",
- label: "distinationidName",
- name: "目的地",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "6",
- label: "portoftransshipmentName",
- name: "中转港",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "7",
- label: "fEtd",
- name: "预计开船日期",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "8",
- label: "fAtd",
- name: "开船日期",
- checked: 0,
- width: 120,
- },
- {
- surface: "9",
- label: "fEta",
- name: "预计到达日期",
- checked: 0,
- width: 120,
- },
- {
- surface: "10",
- label: "fAta",
- name: "到港日",
- checked: 0,
- width: 120,
- },
- {
- surface: "11",
- label: "manageidName",
- name: "船管人",
- checked: 0,
- width: 120,
- },
- {
- surface: "12",
- label: "fTel",
- name: "联系方式",
- checked: 0,
- width: 120,
- },
- {
- surface: "13",
- label: "fDays",
- name: "航期",
- checked: 0,
- width: 120,
- },
- {
- surface: "14",
- label: "fStatus",
- name: "状态",
- checked: 0,
- width: 120,
- },
- {
- surface: "15",
- label: "remark",
- name: "备注",
- checked: 0,
- width: 120,
- },
- {
- surface: "16",
- label: "createBy",
- name: "录入人",
- checked: 0,
- width: 120,
- },
- {
- surface: "17",
- label: "createTime",
- name: "录入时间",
- checked: 0,
- width: 120,
- },
- {
- surface: "18",
- label: "updateBy",
- name: "最新修改人",
- checked: 0,
- width: 120,
- },
- {
- surface: "19",
- label: "updateTime",
- name: "最新修改时间",
- checked: 0,
- width: 120,
- },
- ],
- //自定义列宽
- allCheck: false,
- showSetting:false,
- //船管人
- getManageOptions:[],
- //船名下拉搜索
- vesselOptions:[],
- //港口下拉搜索
- portOptions:[],
- //默认显示第一行
- queryParamsHidden:false,
- //查看置灰
- doNot:true,
- //模糊查询港口名称
- portNameOptions:[],
- //港口类型字典表
- fTypesOptions:[],
- //模糊查询堆场名称
- yardOptions:[],
- //全屏放大
- dialogFull:false,
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 客户详情表格数据
- corpsList: [],
- // 弹出层标题
- title: "",
- // 状态数据字典
- statusOptions: [],
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- fNo:null,
- fPortofloadid:null,
- fPortofdischargeid:null,
- fDistinationid:null,
- fPortoftransshipment:null,
- fEtd:null,
- fAtd:null,
- fAta:null,
- fManageid:null,
- fDays:null,
- fStatus:null,
- createBy:null,
- remark:null
- },
- // 表单参数
- form: {
- fNo:null,
- fPortofloadid:null,
- fPortofdischargeid:null,
- fDistinationid:null,
- fPortoftransshipment:null,
- fEtd:null,
- fAtd:null,
- fEta:null,
- fAta:null,
- fManageid:null,
- fTel:null,
- fDays:null,
- fStatus:'T',
- remark:null,
- fDucomentrayoffdate:null,
- fCutoffdate:null,
- fTeu:null
- },
- // 表单校验
- rules: {
- fNo: [{ required: true, message: "编号不能为空", trigger: "blur" }],
- fPortofloadid:[{ required: true, message: "装货港不能为空", trigger: "blur" }],
- fDistinationid:[{ required: true, message: "目的地不能为空", trigger: "blur" }],
- fEtd:[{ required: true, message: "预计开船日期不能为空", trigger: "blur" }],
- fEta:[{ required: true, message: "预计到达时间不能为空", trigger: "blur" }],
- fTel:[{ required: true, message: "手机号不能为空", trigger: "blur" }, { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }],
- fDucomentrayoffdate:[{ required: true, message: "截单日期不能为空", trigger: "blur" }]
- }
- };
- },
- activated() {
- this.getDicts("f_types").then(response => {
- this.fTypesOptions = response.data;
- });
- this.vesselRemoteMethod()
- this.portRemoteMethod()
- this.manageRemoteMethod()
- this.getList()
- },
- created() {
- this.setRowList = this.tableDate;
- this.getRowList = this.tableDate;
- this.getList();
- this.getDicts("f_types").then(response => {
- this.fTypesOptions = response.data;
- });
- this.vesselRemoteMethod()
- this.portRemoteMethod()
- this.manageRemoteMethod()
- this.getRow()
- },
- methods: {
- //重置列表
- delRow() {
- this.data = {
- tableName: "航次信息",
- userId: Cookies.get("userName"),
- };
- resetModule(this.data).then((res) => {
- if (res.code == 200) {
- this.showSetting = false;
- this.setRowList = this.tableDate;
- console.log(this.setRowList)
- this.getRowList = this.tableDate;
- }
- });
- },
- //列设置全选
- allChecked() {
- if (this.allCheck == true) {
- this.setRowList.map((e) => {
- return (e.checked = 0);
- });
- } else {
- this.setRowList.map((e) => {
- return (e.checked = 1);
- });
- }
- },
- //查询列数据
- getRow() {
- let that = this;
- this.data = {
- tableName: "航次信息",
- userId: Cookies.get("userName"),
- };
- select(this.data).then((res) => {
- if (res.data.length != 0) {
- this.getRowList = res.data.filter((e) => e.checked == 0);
- this.setRowList = res.data;
- this.setRowList = this.setRowList.reduce((res, item) => {
- res.push({
- surface: item.surface,
- label: item.label,
- name: item.name,
- checked: item.checked,
- width: item.width,
- fixed: item.fixed
- });
- return res;
- }, []);
- }
- });
- console.log(this.getRowList)
- },
- //保存列设置
- save() {
- this.showSetting = false;
- this.data = {
- tableName: "航次信息",
- userId: Cookies.get("userName"),
- sysTableSetList: this.setRowList,
- };
- addSet(this.data).then((res) => {
- this.getRowList = this.setRowList.filter((e) => e.checked == 0);
- });
- },
- //开始拖拽事件
- onStart() {
- this.drag = true;
- },
- //拖拽结束事件
- onEnd() {
- this.drag = false;
- },
- //船管人下拉搜索
- manageRemoteMethod(){
- let queryParams = { pageNum: 1,};
- getManage(queryParams).then(response=>{
- console.log(response)
- this.getManageOptions = response.rows
- })
- },
- //船名下拉搜索
- vesselRemoteMethod(){
- let queryParams = { pageNum: 1,};
- getvessel(queryParams).then(response=>{
- console.log(response)
- this.vesselOptions = response.rows
- })
- },
- //模糊查询港口名称
- portRemoteMethod(){
- let queryParams = { pageNum: 1,};
- getport(queryParams).then((response) => {
- console.log(response)
- this.portOptions = response.rows;
- });
- },
- //模糊查询港口名称
- // portRemoteMethod(){
- // let queryParams = { pageNum: 1,};
- // getportinformation(queryParams).then(response =>{
- // this.portNameOptions = response.rows
- // })
- // },
- full(){
- this.dialogFull = !this.dialogFull
- },
- /** 查询客户详情列表 */
- getList() {
- this.loading = true;
- console.log((this.queryParams))
- listCorps(this.queryParams).then(response => {
- this.corpsList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- fNo:null,
- fPortofloadid:null,
- fPortofdischargeid:null,
- fDistinationid:null,
- fPortoftransshipment:null,
- fEtd:null,
- fAtd:null,
- fEta:null,
- fManageid:null,
- fTel:null,
- fDays:null,
- fStatus:'T',
- remark:null,
- fDucomentrayoffdate:null,
- fCutoffdate:null,
- fTeu:null
- };
- this.resetForm("form");
- },
- // 状态修改
- handleStatusChange(row) {
- let text = row.fStatus === "0" ? "启用" : "停用";
- this.$confirm('确认要"' + text + '""' + row.fName + '"吗?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return changeCorpsStatus(row.fId, row.fStatus);
- }).then(() => {
- this.msgSuccess(text + "成功");
- }).catch(function() {
- row.fStatus = row.fStatus === "0" ? "1" : "0";
- });
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.fId)
- this.single = selection.length!==1
- this.multiple = !selection.length
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.doNot = false
- this.reset();
- this.open = true;
- this.title = "添加客户详情";
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.doNot = true
- this.reset();
- const fId = row.fId || this.ids
- getCorps(fId).then(response => {
- this.form = response.data;
- this.open = true;
- this.title = "修改客户详情";
- });
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- addyard(this.form).then(response => {
- this.msgSuccess("操作成功");
- this.open = false;
- this.getList();
- })
- }
- })
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- const fIds = row.fId || this.ids;
- this.$confirm('是否确认删除客户详情编号为"' + fIds + '"的数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return delCorps(fIds);
- }).then(() => {
- this.getList();
- this.msgSuccess("删除成功");
- })
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$confirm('是否确认导出所有客户详情数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return exportCorps(queryParams);
- }).then(response => {
- this.download(response.msg);
- })
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .avue-crud__dialog__header {
- display: -webkit-box;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-align: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-box-pack: justify;
- -ms-flex-pack: justify;
- justify-content: space-between;
- }
- .el-dialog__title {
- color: rgba(0,0,0,.85);
- font-weight: 500;
- word-wrap: break-word;
- }
- .avue-crud__dialog__menu {
- padding-right: 20px;
- float: left;
- }
- .avue-crud__dialog__menu i {
- color: #909399;
- font-size: 15px;
- }
- .el-icon-full-screen{
- cursor: pointer;
- }
- .el-icon-full-screen:before {
- content: "\e719";
- }
- .tabSetting {
- display: flex;
- justify-content: flex-end;
- }
- .listStyle {
- display: flex;
- border-top: 1px solid #dcdfe6;
- border-left: 1px solid #dcdfe6;
- border-right: 1px solid #dcdfe6;
- }
- .listStyle:last-child {
- border-bottom: 1px solid #dcdfe6;
- }
- .progress {
- display: flex;
- align-items: center;
- padding: 2px;
- background-color: rgba(0, 0, 0, 0.05);
- height: 100%;
- }
- </style>
|