1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609 |
- <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 style="width: 200px" v-model="queryParams.fNo" placeholder="请输入箱号" clearable size="small">
- </el-input>
- </el-form-item>
- <el-form-item label="箱类型" prop="fTypeid">
- <el-select
- v-model="queryParams.fTypeid"
- style="width: 200px"
- placeholder="请输入名称"
- clearable
- size="small"
- filterable
- :remote-method="boxTypeMethod"
- >
- <el-option
- v-for="item in typeOptions"
- :key="item.fId"
- :label="item.fNo"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="箱状态" prop="fCntrstatus">
- <el-select
- v-model="queryParams.fCntrstatus"
- style="width: 200px"
- placeholder="请输入或选择"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- >
- <el-option
- v-for="dict in cntrstatusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="租贷公司" prop="fOwner">
- <el-select
- v-model="queryParams.fOwner"
- style="width: 200px"
- placeholder="请输入或选择"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- >
- <el-option
- v-for="dict in ownerOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </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="remark">
- <el-input
- style="width: 200px"
- type="textarea"
- clearable
- size="small"
- v-model="queryParams.remark"
- />
- </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="至"
- @change="timeMethods"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- style="width: 250px"
- >
- </el-date-picker>
- </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:cntrno: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:cntrno:updateTCntrno']"
- >修改
- </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:cntrno:remove']"
- >删除
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <!-- <el-button-->
- <!-- type="primary"-->
- <!-- icon="el-icon-download"-->
- <!-- size="mini"-->
- <!-- @click="handleExport"-->
- <!-- >导入</el-button>-->
- <el-button
- size="mini"
- icon="el-icon-download"
- type="primary"
- @click="dialogVisible = true"
- >导入
- </el-button
- >
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-download"
- size="mini"
- @click="downLoad"
- >下载模板
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- >导出
- </el-button>
- </el-col>
- <!-- <el-col :span="1.5">-->
- <!-- <el-button-->
- <!-- type="info"-->
- <!-- icon="el-icon-download"-->
- <!-- size="mini"-->
- <!-- @click="handleExport"-->
- <!-- >取消-->
- <!-- </el-button>-->
- <!-- </el-col>-->
- <el-col :span="1.5">
- <el-upload
- :action="uploadUrl"
- :auto-upload="true"
- accept=".xls,.xlsx"
- :on-success="(res, file) => { importBoxDynamics( res, file); }"
- :headers="headers"
- :show-file-list="false"
- >
- <el-button size="mini" type="primary" icon="el-icon-plus">导入箱动态</el-button>
- </el-upload>
- </el-col>
- <el-col :span="1.5">
- <el-button size="mini" type="primary" icon="el-icon-download" @click="downloadBoxTemplate">下载箱动态模板</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" align="center"/>
- <el-table-column type="index" 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 == 'createTime'">{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
- <span v-else-if="item.label == 'updateTime'">{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
- <span v-else>{{scope.row[item.label]}}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column label="箱号" sortable fixed align="center" prop="fNo" fixed width="120px"/>-->
- <!-- <el-table-column label="箱类型" align="center" sortable prop="typeidName" fixed width="100px"/>-->
- <!-- <el-table-column label="地点" align="center" sortable prop="addressName" fixed/>-->
- <!-- <el-table-column :show-overflow-tooltip="true" label="箱主" align="center" prop="ownerName" />-->
- <!-- <el-table-column :show-overflow-tooltip="true" label="箱来源" align="center" prop="sourceName" />-->
- <!-- <el-table-column label="箱状态" align="center" sortable prop="cntrstatusName" fixed width="100px"/>-->
- <!-- <el-table-column :show-overflow-tooltip="true" label="租赁方式" align="center" prop="rentName" />-->
- <!-- <el-table-column label="空重" align="center" sortable prop="updateEFName" fixed/>-->
- <!-- <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="100px">-->
- <!-- <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="120px">-->
- <!-- <template slot-scope="scope">-->
- <!-- <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column label="操作" align="center" min-width="120px" fixed="right">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- v-hasPermi="['shipping:cntrno:updateTCntrno']"
- @click="handleUpdate(scope.row)"
- >查看
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- v-hasPermi="['shipping:cntrno: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="100px">
- <el-row>
- <el-col :span="12">
- <el-form-item label="箱号" prop="fNo">
- <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="fTypeid">
- <el-select
- style="width: 80%"
- v-model="form.fTypeid"
- placeholder="请选择箱类型"
- clearable
- :disabled="doNot"
- filterable
- :remote-method="boxTypeMethod"
- >
- <el-option
- v-for="item in typeOptions"
- :key="item.fId"
- :label="item.fNo"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="最新地点" prop="fUpdateaddress">
- <el-select
- v-model="form.fUpdateaddress"
- style="width: 80%"
- placeholder="请输入最新地点"
- :disabled="doNot"
- filterable
- :remote-method="addressMethod"
- >
- <el-option
- v-for="item in this.addressOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- >
- <span style="float: left; color: #8492a6; font-size: 13px">{{ item.typesName }}</span>
- <span style="float: right;">{{ item.fName }}</span>
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="租贷公司" prop="fOwner">
- <el-select
- v-model="form.fOwner"
- style="width: 80%"
- :disabled="doNot"
- placeholder="请选择租贷公司"
- >
- <el-option
- v-for="dict in ownerOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="箱来源" prop="fSource">
- <el-select v-model="form.fSource" style="width: 80%" placeholder="请选择箱来源" :disabled="doNot">
- <el-option
- v-for="dict in sourceOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="箱状态" prop="fCntrstatus">
- <el-select v-model="form.fCntrstatus" style="width: 80%" placeholder="请选择箱状态" :disabled="doNot">
- <el-option
- v-for="dict in cntrstatusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="租赁方式" prop="fRent">
- <el-select v-model="form.fRent" style="width: 80%" placeholder="请选择租赁方式" :disabled="doNot">
- <el-option
- v-for="dict in fRentOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="空重" prop="fUpdateef">
- <el-select v-model="form.fUpdateef" style="width: 80%" placeholder="请选择空重" :disabled="doNot">
- <el-option
- v-for="dict in updateEFOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="造箱时间" prop="fBuildBoxTime">
- <el-date-picker
- style="width: 80%"
- v-model="form.fBuildBoxTime"
- type="date"
- value-format="yyyy-MM-dd"
- :disabled="doNot"
- placeholder="选择日期">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="箱龄(年)" prop="fBoxTurtleYear">
- <el-date-picker
- style="width: 80%"
- v-model="form.fBoxTurtleYear"
- type="year"
- :disabled="doNot"
- value-format="yyyy"
- placeholder="选择年">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="箱龄(月)" prop="fBoxTurtleMonth">
- <span>
- <el-select v-model="form.fBoxTurtleMonth" slot="prepend" style="width: 80%;" placeholder="请选择" :disabled="doNot">
- <el-option
- v-for="(item,index) in month"
- :key="index"
- :label="item.label"
- :value="item.value"></el-option>
- </el-select>
- </span>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="合同协议号" prop="fPactDealHorn">
- <el-input v-model="form.fPactDealHorn" style="width: 80%" placeholder="请输入合同协议号" :disabled="doNot"/>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="12">
- <el-form-item label="箱公司" prop="fBoxLord">
- <el-input v-model="form.fBoxLord" style="width: 80%" placeholder="请输入箱公司" :disabled="doNot"/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="备注" prop="remark">
- <el-input
- v-model="form.remark"
- style="width: 91%"
- 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>
- <el-dialog
- title="提示"
- :visible.sync="dialogVisible"
- width="30%"
- >
- <span>是否已下载模板文件?</span>
- <span slot="footer" class="dialog-footer" style="display: flex;justify-content: flex-end">
- <el-button @click="downloadTemplate" style="margin-right: 10px">否</el-button>
- <el-upload
- class="upload-demo"
- :action="uploadImgUrl"
- :auto-upload="true"
- :on-success="(res, file) => { handleSucces( res, file); }"
- :headers="headers"
- :show-file-list="false"
- >
- <el-button @click="dialogVisible = false" type="primary">是</el-button>
- </el-upload>
- </span>
- </el-dialog>
- <el-dialog
- title="导入想信息"
- :close-on-press-escape="false"
- :close-on-click-modal="false"
- :visible.sync="boxTable"
- width="75%"
- >
- <el-table
- :data="boxLeadIn"
- style="width: 100%"
- >
- <el-table-column prop="fNo" label="箱号" align="center">
- <template slot-scope="scope">
- <el-input v-model="scope.row.fNo" style="width: 80%" placeholder="请输入箱号"/>
- </template>
- </el-table-column>
- <el-table-column prop="fTypeid" label="箱类型" align="center">
- <template slot-scope="scope">
- <el-select
- style="width: 80%"
- v-model="scope.row.fTypeid"
- placeholder="请选择箱类型"
- clearable
- filterable
- :remote-method="boxTypeMethod"
- >
- <el-option
- v-for="item in typeOptions"
- :key="item.fId"
- :label="item.fNo"
- :value="item.fId"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="fUpdateaddress" label="最新地点" align="center">
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fUpdateaddress"
- style="width: 80%"
- placeholder="请输入最新地点"
- filterable
- :remote-method="addressMethod"
- >
- <el-option
- v-for="item in addressOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- >
- <span style="float: left; color: #8492a6; font-size: 13px">{{ item.typesName }}</span>
- <span style="float: right;">{{ item.fName }}</span>
- </el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="fOwner" label="租贷公司" align="center">
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fOwner"
- style="width: 80%"
- placeholder="请选择租贷公司"
- >
- <el-option
- v-for="dict in ownerOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="fSource" label="箱来源" align="center">
- <template slot-scope="scope">
- <el-select v-model="scope.row.fSource" style="width: 80%" placeholder="请选择箱来源">
- <el-option
- v-for="dict in sourceOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="fCntrstatus" label="箱状态" align="center">
- <template slot-scope="scope">
- <el-select v-model="scope.row.fCntrstatus" style="width: 80%" placeholder="请选择箱状态">
- <el-option
- v-for="dict in cntrstatusOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="fUpdateef" label="空重" align="center">
- <template slot-scope="scope">
- <el-select v-model="scope.row.fUpdateef" style="width: 80%" placeholder="请选择空重">
- <el-option
- v-for="dict in updateEFOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column label="操作" align="center">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="deleteRow(scope.$index, boxLeadIn)"
- >删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="boxTable = false">取 消</el-button>
- <el-button type="primary" @click="boxSubmission">提 交</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="导入箱动态"
- :visible.sync="importDynamicsopen"
- :show-close="false"
- width="80%">
- <el-table
- :data="tableData"
- style="width: 100%">
- <el-table-column
- prop="opctnstatusName"
- label="箱动态"
- :show-overflow-tooltip="true"
- align="center">
- </el-table-column>
- <el-table-column
- prop="fNo"
- align="center"
- :show-overflow-tooltip="true"
- label="箱号">
- </el-table-column>
- <el-table-column
- prop="updateEFName"
- align="center"
- :show-overflow-tooltip="true"
- label="空重">
- </el-table-column>
- <el-table-column
- prop="fUpdatetime"
- align="center"
- :show-overflow-tooltip="true"
- label="动态日期">
- </el-table-column>
- <el-table-column
- prop="fVsl"
- align="center"
- :show-overflow-tooltip="true"
- label="船名">
- </el-table-column>
- <el-table-column
- prop="fVoy"
- align="center"
- :show-overflow-tooltip="true"
- label="航次">
- </el-table-column>
- <el-table-column
- prop="fBoxWeight"
- align="center"
- :show-overflow-tooltip="true"
- label="重量">
- </el-table-column>
- <el-table-column
- prop="addressName"
- align="center"
- :show-overflow-tooltip="true"
- label="堆放地点">
- </el-table-column>
- <el-table-column
- prop="fMblno"
- align="center"
- :show-overflow-tooltip="true"
- label="提单号">
- </el-table-column>
- <el-table-column
- prop="fSealno"
- align="center"
- :show-overflow-tooltip="true"
- label="铅封号">
- </el-table-column>
- <el-table-column
- prop="cntrstatusName"
- align="center"
- :show-overflow-tooltip="true"
- label="是否箱损">
- </el-table-column>
- <el-table-column
- prop="remark"
- align="center"
- :show-overflow-tooltip="true"
- label="箱损描述">
- </el-table-column>
- <el-table-column
- prop="portName"
- align="center"
- :show-overflow-tooltip="true"
- label="地点类型">
- </el-table-column>
- </el-table>
- <span slot="footer" class="dialog-footer">
- <el-button @click="importDynamicsopen = false">取 消</el-button>
- <el-button type="primary" @click="confirmLeadingIn">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listCorps,
- getInforma,
- delCorps,
- addboxinformation,
- getType,
- getaddress,
- changeCorpsStatus,
- exportCorps,
- getImport,
- getDown,
- batch,
- downloadBox,
- leadingIn
- } from '@/api/kaihe/containerNews/boxInformation'
- import draggable from 'vuedraggable'
- import Vue from 'vue'
- import Cookies from 'js-cookie'
- import { addSet, resetModule, select } from '@/api/system/set'
- import { getToken } from '@/utils/auth'
- 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: 'boxInformation',
- components: {
- draggable
- },
- data() {
- return {
- boxLeadIn: [],
- importDynamicsopen:false,
- month:[
- {label:'一月',value:'1'},
- {label:'二月',value:'2'},
- {label:'三月',value:'3'},
- {label:'四月',value:'4'},
- {label:'五月',value:'5'},
- {label:'六月',value:'6'},
- {label:'七月',value:'7'},
- {label:'八月',value:'8'},
- {label:'九月',value:'9'},
- {label:'十月',value:'10'},
- {label:'十一月',value:'11'},
- {label:'十二月',value:'12'},
- ],
- dialogVisible: false,
- boxTable: false,
- headers: {
- Authorization: 'Bearer ' + getToken()
- },
- uploadImgUrl: process.env.VUE_APP_BASE_API + '/shipping/cntrno/importCreate', // 上传的图片服务器地址
- uploadUrl: process.env.VUE_APP_BASE_API + '/shipping/cntrno/importAirForceStation', // 导入箱动态服务器地址
- setRowList: [],
- getRowList: [],
- tableData: [],
- tableDate: [
- {
- surface: '1',
- label: 'fNo',
- name: '箱号',
- fixed: 'left',
- checked: 0,
- width: 120
- },
- {
- surface: '2',
- label: 'typeidName',
- name: '箱类型',
- fixed: 'left',
- checked: 0,
- width: 120
- },
- {
- surface: '3',
- label: 'addressName',
- name: '地点',
- fixed: 'left',
- checked: 0,
- width: 120
- },
- {
- surface: '4',
- label: 'ownerName',
- name: '租贷公司',
- fixed: 'left',
- checked: 0,
- width: 120
- },
- {
- surface: '5',
- label: 'sourceName',
- name: '箱来源',
- fixed: 'left',
- checked: 0,
- width: 120
- },
- {
- surface: '6',
- label: 'cntrstatusName',
- name: '箱状态',
- fixed: 'left',
- checked: 0,
- width: 120
- },
- {
- surface: '7',
- label: 'rentName',
- name: '租赁方式',
- checked: 0,
- width: 120
- },
- {
- surface: '8',
- label: 'updateEFName',
- name: '空重',
- checked: 0,
- width: 120
- },
- {
- surface: '9',
- label: 'remark',
- name: '备注',
- checked: 0,
- width: 120
- },
- {
- surface: '10',
- label: 'createBy',
- name: '录入人',
- checked: 0,
- width: 120
- },
- {
- surface: '11',
- label: 'createTime',
- name: '录入时间',
- checked: 0,
- width: 120
- },
- {
- surface: '12',
- label: 'updateBy',
- name: '最新修改人',
- checked: 0,
- width: 120
- },
- {
- surface: '13',
- label: 'updateTime',
- name: '最新修改时间',
- checked: 0,
- width: 120
- },{
- surface: '14',
- label: 'fBuildBoxTime',
- name: '造箱时间',
- checked: 0,
- width: 120
- },{
- surface: '15',
- label: 'fBoxTurtleYear',
- name: '箱龄(年)',
- checked: 0,
- width: 120
- },{
- surface: '16',
- label: 'fBoxTurtleMonth',
- name: '箱龄(月)',
- checked: 0,
- width: 120
- },{
- surface: '17',
- label: 'fPactDealHorn',
- name: '合同协议号',
- checked: 0,
- width: 120
- },{
- surface: '18',
- label: 'fBoxLord',
- name: '箱公司',
- checked: 0,
- width: 120
- }
- ],
- //自定义列宽
- allCheck: false,
- showSetting: false,
- //默认显示第一行
- queryParamsHidden: false,
- //字典表箱种类
- containerOptions: [],
- //集装箱主字典表
- ownerOptions: [],
- //箱来源字典表
- sourceOptions: [],
- //租赁方式字典表
- fRentOptions: [],
- //空重字典表
- updateEFOptions: [],
- //箱状态字典表
- cntrstatusOptions: [],
- //模糊查询箱类型
- typeOptions: [],
- //查看置灰
- doNot: true,
- //模糊下拉查询地点
- addressOptions: [],
- //全屏放大
- dialogFull: false,
- contactList: [],
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 客户详情表格数据
- corpsList: [],
- // 弹出层标题
- title: '',
- // 状态数据字典
- statusOptions: [],
- // 是否显示弹出层
- open: false,
- // 客户类别字典
- fTypeidOptions: [],
- // 结算表票结、月结字典
- fStltypeidOptions: [],
- // 删除状态字典
- delFlagOptions: [],
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- fNo: null,
- fTypeid: null,
- fCntrstatus: null,
- fOwner: null,
- createBy: null,
- cLoadDate: null,
- remark: null
- },
- // 表单参数
- form: {
- fTypeid: null,
- fUpdateaddress: null,
- fOwner: null,
- fNo: null,
- fSource: null,
- fRent: null,
- fUpdateef: null,
- fCntrstatus: null,
- remark: null
- },
- // 表单校验
- rules: {
- fTypeid: [
- { required: true, message: '', trigger: 'blur' }
- ],
- fNo: [
- { required: true, message: '箱号不能为空', trigger: 'blur' }
- ],
- fUpdateaddress: [
- { required: true, message: '最新地点不能为空', trigger: 'blur' }
- ],
- fOwner: [
- { required: true, message: '租贷公司不能为空', trigger: 'blur' }
- ],
- fUpdateef: [
- { required: true, message: '空重不能为空', trigger: 'blur' }
- ],
- fPactDealHorn: [
- { required: true, message: '合同协议号不能为空', trigger: 'blur' }
- ],
- fBoxLord: [
- { required: true, message: '箱公司不能为空', trigger: 'blur' }
- ],
- fCntrstatus: [
- { required: true, message: '箱状态不能为空', trigger: 'blur' }
- ]
- }
- }
- },
- created() {
- this.setRowList = this.tableDate
- this.getRowList = this.tableDate
- this.getList()
- this.getDicts('f_type').then(response => {
- this.containerOptions = response.data
- })
- this.getDicts('f_owner').then(response => {
- this.ownerOptions = response.data
- })
- this.getDicts('f_source').then(response => {
- this.sourceOptions = response.data
- })
- this.getDicts('f_rent').then(response => {
- this.fRentOptions = response.data
- })
- this.getDicts('f_updateEF').then(response => {
- this.updateEFOptions = response.data
- })
- this.getDicts('f_cntrstatus').then(response => {
- this.cntrstatusOptions = response.data
- })
- this.boxTypeMethod()
- this.addressMethod()
- this.getRow()
- },
- methods: {
- deleteRow(index, rows) {
- rows.splice(index, 1);
- },
- timeMethods() {
- this.queryParams.cLoadDate[0] = this.queryParams.cLoadDate[0] + ' 00:00:00'
- this.queryParams.cLoadDate[1] = this.queryParams.cLoadDate[1] + ' 23:59:59'
- },
- downloadTemplate() {
- this.dialogVisible = false
- this.$message({
- type: 'info',
- message: '请先下载模板文件'
- })
- },
- downLoad() {
- this.$confirm('是否下载模板文件?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(function() {
- return getDown()
- })
- .then((response) => {
- this.download(response.msg)
- this.$message({
- type: 'success',
- message: '操作成功!'
- })
- })
- .catch(() => {
- this.$message({
- type: 'error',
- message: '操作失败!'
- })
- })
- },
- //确认导入箱动态
- confirmLeadingIn(){
- leadingIn({tCntrno:this.tableData}).then(res=>{
- this.importDynamicsopen = false
- this.$message({
- type: 'success',
- message: '操作成功!'
- })
- })
- },
- importBoxDynamics(file, fileList){
- console.log(file)
- if (file.code === 200){
- this.importDynamicsopen = true
- this.tableData = file.data
- }else if (file.code === 500) {
- this.$message.error(file.msg);
- }
- },
- downloadBoxTemplate(){
- downloadBox().then(res=>{
- this.download(res.msg)
- })
- },
- //附件上传
- handleSucces(file, fileList) {
- console.log(fileList)
- console.log(file)
- if (file.code == 200) {
- this.boxTable = true
- this.boxLeadIn = file.data
- for (let item in this.boxLeadIn){
- if (this.boxLeadIn[item].fUpdateaddress){
- this.boxLeadIn[item].fUpdateaddress = Number(this.boxLeadIn[item].fUpdateaddress)
- }
- }
- } else {
- this.$message.error(file.msg)
- }
- },
- //箱信息提交
- boxSubmission() {
- for (let item in this.boxLeadIn) {
- let i = Number(item)+1
- if (!this.boxLeadIn[item].fNo) {
- return this.$message.error('第' + i + '行箱号不能为空')
- }
- if (!this.boxLeadIn[item].fTypeid) {
- return this.$message.error('第' + i + '行箱类型不能为空')
- }
- if (!this.boxLeadIn[item].fUpdateaddress) {
- return this.$message.error('第' + i + '行最新地点不能为空')
- }
- if (!this.boxLeadIn[item].fOwner) {
- return this.$message.error('第' + i + '行租贷公司不能为空')
- }
- if (!this.boxLeadIn[item].fSource) {
- return this.$message.error('第' + i + '行箱来源不能为空')
- }
- if (!this.boxLeadIn[item].fCntrstatus) {
- return this.$message.error('第' + i + '行箱状态不能为空')
- }
- if (!this.boxLeadIn[item].fUpdateef) {
- return this.$message.error('第' + i + '行空重不能为空')
- }
- for (let li in this.boxLeadIn){
- if (item != li){
- let i = Number(item)+1
- let e = Number(li)+1
- if (this.boxLeadIn[item].fNo == this.boxLeadIn[li].fNo){
- return this.$message.error('第' + i + '行和第' + e + '行箱号重复')
- }
- }
- }
- }
- this.boxTable = false
- let formDatae = new window.FormData()
- formDatae.append('tCntrno', JSON.stringify(this.boxLeadIn))
- batch(formDatae).then(res =>{
- console.log(res)
- if (res.code === 200){
- if(res.msg == '操作成功'){
- this.$message.success('提交成功');
- }else {
- this.$message.error(res.data);
- }
- }
- })
- },
- //重置列表
- 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
- },
- //模糊查询地点
- addressMethod() {
- let queryParams = { pageNum: 1 }
- getaddress(queryParams).then(response => {
- this.addressOptions = response.rows
- })
- },
- //模糊查询箱类型
- boxTypeMethod() {
- let queryParams = { pageNum: 1 }
- getType(queryParams).then(response => {
- this.typeOptions = 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
- })
- },
- // 客户类别字典翻译
- fTypeidFormat(row, column) {
- return this.selectDictLabel(this.fTypeidOptions, row.fTypeid)
- },
- // 结算表票结、月结字典翻译
- fStltypeidFormat(row, column) {
- return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid)
- },
- // 删除状态字典翻译
- delFlagFormat(row, column) {
- return this.selectDictLabel(this.delFlagOptions, row.delFlag)
- },
- // 取消按钮
- cancel() {
- this.open = false
- this.reset()
- },
- // 表单重置
- reset() {
- this.form = {
- fTypeid: null,
- fUpdateaddress: null,
- fOwner: null,
- fNo: null,
- fSource: null,
- fRent: null,
- fUpdateef: null,
- fCntrstatus: null,
- remark: null
- }
- this.resetForm('form')
- },
- // 从表重置
- contList() {
- this.contactList = []
- },
- // 状态修改
- 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,
- fTypeid: null,
- fCntrstatus: null,
- fOwner: null,
- createBy: null,
- cLoadDate: 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
- getInforma(fId).then(response => {
- this.form = response.data
- this.form.fUpdateaddress = response.data.addressName
- this.open = true
- this.title = '修改客户详情'
- })
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs['form'].validate(valid => {
- if (valid) {
- if (this.form.fId != null) {
- addboxinformation(this.form).then(response => {
- this.msgSuccess('修改成功')
- this.open = false
- this.getList()
- })
- } else {
- addboxinformation(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>
|