12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151 |
- <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">
- <el-input
- v-model="queryParams.fNo"
- style="width:200px"
- placeholder="请输入编号"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item label="名称" prop="fName">
- <el-input
- v-model="queryParams.fName"
- style="width:200px"
- placeholder="请输入编号"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item label="状态" prop="fStatus">
- <el-select
- v-model="queryParams.fStatus"
- style="width: 200px"
- placeholder="请选择状态"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- >
- <el-option label="正常" value="T"/>
- <el-option label="停用" value="F"/>
- </el-select>
- </el-form-item>
- <el-form-item label="录入区间" prop="cLoadDate">
- <el-date-picker
- v-model="queryParams.cLoadDate"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- style="width: 250px"
- >
- </el-date-picker>
- </el-form-item>
- </el-row>
- <div v-show="queryParamsHidden">
- <el-row>
- <el-form-item label="录入人" prop="createBy">
- <el-input
- v-model="queryParams.createBy"
- style="width: 200px"
- placeholder="请输入录入人"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="国家代码" prop="fNationality">
- <el-input
- v-model="queryParams.fNationality"
- style="width: 200px"
- placeholder="请输入录入人"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="船舶呼号" prop="fImo">
- <el-input
- v-model="queryParams.fImo"
- style="width: 200px"
- placeholder="请输入录入人"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="备注" prop="remark">
- <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:items: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:items: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:items:remove']"
- >删除</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['shipping:items: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:items: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:70%" :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 == 'fName'">{{scope.row.fName}}</span>-->
- <!-- <span v-if="item.label == 'fEname'">{{scope.row.fEname}}</span>-->
- <!-- <span v-if="item.label == 'fNationality'">{{scope.row.fNationality}}</span>-->
- <!-- <span v-if="item.label == 'fImo'">{{scope.row.fImo}}</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="fPortofloadid" width="100px"/>
- <el-table-column :show-overflow-tooltip="true" label="目的港" align="center" width="100px" prop="fDistinationid" />
- <el-table-column :show-overflow-tooltip="true" label="中转港" align="center" prop="fPortoftransshipment" />
- <el-table-column :show-overflow-tooltip="true" label="预计开船日期" align="center" prop="fEtd" />
- <el-table-column :show-overflow-tooltip="true" label="预计到达日期" align="center" prop="fEta" />
- <el-table-column :show-overflow-tooltip="true" label="航期" align="center" prop="fDays" />
- <el-table-column :show-overflow-tooltip="true" label="有效期起" align="center" prop="fBegindate" />
- <el-table-column :show-overflow-tooltip="true" label="有效期至" align="center" prop="fEnd" />
- <el-table-column :show-overflow-tooltip="true" label="总teu" align="center" prop="fTeu" />
- <el-table-column :show-overflow-tooltip="true" label="航期" align="center" prop="fDates" />
- <el-table-column :show-overflow-tooltip="true" label="单价" align="center" prop="fPrice" />
- <el-table-column :show-overflow-tooltip="true" label="集装箱" align="center" prop="fCntrid" />
- <el-table-column :show-overflow-tooltip="true" label="状态" align="center" prop="fStatus" />
- <el-table-column :show-overflow-tooltip="true" 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"
- v-hasPermi="['shipping:items:edit']"
- @click="handleUpdate(scope.row)"
- >查看</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- v-hasPermi="['shipping:items: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="80%"
- :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="8">
- <el-form-item label="装货港" prop="fPortofloadid" label-width="110px">
- <el-select
- v-model="form.fPortofloadid"
- style="width: 80%"
- clearable
- filterable
- 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-col>
- <el-col :span="8">
- <el-form-item label="目的港" prop="fDistinationid" label-width="110px">
- <el-select
- v-model="form.fDistinationid"
- placeholder="请输入模糊查找"
- clearable
- filterable
- style="width: 80%"
- :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="8">
- <el-form-item label="中转港" prop="fPortoftransshipment" label-width="110px">
- <el-select
- v-model="form.fPortoftransshipment"
- style="width: 80%"
- clearable
- filterable
- 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-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="预计开船日期" prop="fEtd" label-width="110px">
- <el-date-picker
- v-model="form.fEtd"
- type="date"
- value-format="yyyy-MM-dd"
- style="width: 80%"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="预计到达日期" prop="fEta" label-width="110px">
- <el-date-picker
- v-model="form.fEta"
- type="date"
- value-format="yyyy-MM-dd"
- style="width: 80%"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item prop="fDays" label="航期" label-width="110px">
- <el-input
- v-model="form.fDays"
- style="width: 80%"
- value-format="yyyy-MM-dd"
- placeholder="请输入"
- >
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item prop="fBegindate" label="有效期起" label-width="110px">
- <el-date-picker
- v-model="form.fBegindate"
- type="date"
- style="width: 80%"
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="有效期至" prop="fEnd" label-width="110px">
- <el-date-picker
- v-model="form.fEnd"
- type="date"
- style="width: 80%"
- value-format="yyyy-MM-dd"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="总teu" prop="fTeu" label-width="110px">
- <el-input
- v-model="form.fTeu"
- style="width: 80%"
- placeholder="请输入"
- >
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="8">
- <el-form-item label="航期" prop="fDates" label-width="110px">
- <el-input
- v-model="form.fDates"
- style="width: 80%"
- />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="状态" prop="fStatus" label-width="110px">
- <el-select
- v-model="form.fStatus"
- style="width: 80%"
- placeholder="请选择状态"
- clearable
- size="small"
- >
- <el-option label="正常" value="T"/>
- <el-option label="停用" value="F"/>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <el-collapse v-model="activeNames">
- <el-collapse-item name="1">
- <template slot="title" >
- <i class="el-icon-s-home"></i>海运运价
- </template>
- <div>
- <el-button
- type="primary"
- @click.prevent="addRelevant()"
- size="small"
- >新行
- </el-button>
- </div>
- <el-table
- :data="dataList"
- tooltip-effect="dark"
- ref="checkout"
- border
- stripe
- @selection-change="Selectinventory"
- >
- <el-table-column type="selection" width="55" align="center" />
- <el-table-column label="序号" type="index" width="80" />
- <el-table-column prop="fPid" header-align="center" align="center" width="150px" label="船名">
- <template slot-scope="scope">
- <el-select v-model="scope.row.fPid" filterable>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="fCntrid" header-align="center" align="center" width="140px" label="集装箱">
- <template slot-scope="scope">
- <el-select v-model="scope.row.fCntrid">
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fPrice"
- header-align="center"
- align="center"
- width="140px"
- label="单价"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fPrice"
- size="small">
- </el-input>
- </template>
- </el-table-column>
- <el-table-column
- prop="remark"
- header-align="center"
- width="140px"
- align="center"
- label="备注"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.remark"
- size="small"
- placeholder=""
- >
- </el-input>
- </template>
- </el-table-column>
- <el-table-column
- prop="fStatus"
- header-align="center"
- align="center"
- width="140px"
- label="状态"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fStatus"
- >
- <el-option label="正常" value="T" />
- <el-option label="停用" value="F" />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- label="操作"
- width="130PX"
- >
- <template slot-scope="scope">
- <el-button
- @click.native.prevent="wDeleteRow(scope.$index, dataList)"
- size="small"
- >移除</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </el-collapse-item>
- </el-collapse>
- <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 { getyard,listCorps, getCorps, delCorps, addyard,getport,getyardNo, getyardName, changeCorpsStatus,exportCorps } from "@/api/kaihe/shipDynamics/oceanFreightRate";
- import Vue from 'vue'
- import draggable from "vuedraggable";
- import { getportinformation } from '@/api/kaihe/basicdata/portinformation'
- 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: "vessel",
- components: {
- draggable
- },
- data() {
- return {
- portOptions:[],
- dataList: [],
- activeNames: ['1'],
- setRowList: [],
- getRowList: [],
- tableDate: [
- {
- surface: "1",
- label: "fNo",
- name: "编号",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "2",
- label: "fName",
- name: "名称",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "3",
- label: "fEname",
- name: "英文全称",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "4",
- label: "fNationality",
- name: "国家代码",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "5",
- label: "fImo",
- name: "船舶呼号",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "6",
- label: "fStatus",
- name: "状态",
- fixed:"left",
- checked: 0,
- width: 120,
- },
- {
- surface: "7",
- label: "remark",
- name: "备注",
- checked: 0,
- width: 120,
- },
- {
- surface: "8",
- label: "createBy",
- name: "录入人",
- checked: 0,
- width: 120,
- },
- {
- surface: "9",
- label: "createTime",
- name: "录入时间",
- checked: 0,
- width: 120,
- },
- {
- surface: "10",
- label: "updateBy",
- name: "最新修改人",
- checked: 0,
- width: 120,
- },
- {
- surface: "11",
- label: "updateTime",
- name: "最新修改时间",
- checked: 0,
- width: 120,
- },
- ],
- //自定义列宽
- allCheck: false,
- showSetting:false,
- //默认显示第一行
- 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,
- fName:null,
- fStatus:null,
- cLoadDate:null,
- createBy:null,
- fNationality:null,
- fImo:null,
- remark:null
- },
- // 表单参数
- form: {
- fPortofloadid:null,
- fDistinationid:null,
- fPortoftransshipment:null,
- fEtd:null,
- fEta:null,
- fDays:null,
- fBegindate:null,
- fEnd:null,
- fTeu:null,
- fDates:null,
- fStatus:'T',
- },
- // 表单校验
- rules: {
- fTypeid: [
- { required: true, message: "客户类别不能为空", trigger: "blur" }
- ],
- fNo: [
- { required: true, message: "编号不能为空", trigger: "blur" }
- ],
- fName: [
- { required: true, message: "名称不能为空", trigger: "blur" }
- ],
- fCname:[
- { required: true, message: "简称不能为空", trigger: "blur" }
- ],
- fStatus: [
- { required: true, message: "状态默认 T ,正常T 停用F 下拉选择不能为空", trigger: "blur" }
- ],
- }
- };
- },
- created() {
- this.setRowList = this.tableDate;
- this.getRowList = this.tableDate;
- this.getList();
- this.getDicts("f_types").then(response => {
- this.fTypesOptions = response.data;
- });
- this.portRemoteMethod()
- this.getRow()
- },
- methods: {
- wDeleteRow(index, rows) {
- rows.splice(index, 1);
- },
- addRelevant(){
- this.dataList.push({
- fPid:null,
- fCntrid:null,
- fPrice:null,
- remarks:null,
- fStatus:null
- })
- },
- Selectinventory(selection) {
- console.log(selection)
- },
- //重置列表
- delRow() {
- this.data = {
- tableName: "船舶信息",
- userId: Cookies.get("userName"),
- };
- resetModule(this.data).then((res) => {
- if (res.code == 200) {
- this.showSetting = false;
- this.setRowList = this.tableDate;
- 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;
- }, []);
- }
- });
- },
- //保存列设置
- 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;
- },
- //模糊查询港口名称
- portRemoteMethod(){
- let queryParams = { pageNum: 1,};
- getport(queryParams).then(response =>{
- this.portOptions = response.rows
- })
- },
- full(){
- this.dialogFull = !this.dialogFull
- },
- /** 查询客户详情列表 */
- getList() {
- this.loading = true;
- 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 = {
- fPortofloadid:null,
- fDistinationid:null,
- fPortoftransshipment:null,
- fEtd:null,
- fEta:null,
- fDays:null,
- fBegindate:null,
- fEnd:null,
- fTeu:null,
- fDates:null,
- fStatus:'T',
- };
- 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.queryParams = {
- fNo:null,
- fName:null,
- fStatus:null,
- cLoadDate:null,
- createBy:null,
- fNationality:null,
- fImo:null,
- remark:null
- },
- 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) {
- console.log(this.form)
- 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" >
- .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%;
- }
- .el-collapse-item__header {
- font-size: 16px;
- font-weight: bolder;
- padding-left: 5px;
- }
- </style>
|