1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303 |
- <template>
- <div class="app-container">
- <el-menu
- :default-active="activeIndex"
- class="el-menu-demo"
- mode="horizontal"
- @select="handleSelect"
- text-color="#000"
- active-text-color="#ffd04b"
- >
- <el-menu-item index="0">全部</el-menu-item>
- <el-menu-item index="1">待审核</el-menu-item>
- <el-menu-item index="2">订舱审核通过</el-menu-item>
- <el-menu-item index="3">待配船</el-menu-item>
- <el-menu-item index="4">配船审核通过</el-menu-item>
- <!-- <el-menu-item index="5">已撤销</el-menu-item>-->
- <el-menu-item index="10">已驳回</el-menu-item>
- <el-menu-item index="12">运单变更</el-menu-item>
- </el-menu>
- <el-form
- :model="queryParams"
- ref="queryForm"
- :inline="true"
- v-show="showSearch"
- label-width="68px"
- style="margin-top: 20px"
- >
- <el-row>
- <el-col :span="6">
- <el-form-item label="船名" prop="fVslid">
- <el-select
- size="small"
- style="width: 240px"
- v-model="queryParams.fVslid"
- @change="vslidChange"
- clearable
- >
- <el-option
- v-for="item in vesselOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="航次" prop="fVoyid">
- <el-select
- v-model="queryParams.fVoyid"
- filterable
- clearable
- remote
- size="small"
- style="width: 240px"
- >
- <el-option
- v-for="item in voyageOptions"
- :key="item.fId"
- :label="item.fNo"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="订舱日期" prop="cLoadDate">
- <el-date-picker
- v-model="queryParams.cLoadDate"
- type="daterange"
- range-separator="至"
- style="width: 240px"
- value-format="yyyy-MM-dd HH:mm:ss"
- :default-time="['00:00:00', '23:59:59']"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- size="small"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="起运港口" prop="fLoadportid">
- <el-select
- v-model="queryParams.fLoadportid"
- filterable
- remote
- clearable
- size="small"
- style="width: 240px"
- class="elSelect"
- placeholder="请输入模糊查找目的港口"
- >
- <el-scrollbar>
- <el-option
- v-for="(dict, index) in fMblnoOptions"
- :key="index"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-scrollbar>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-collapse-transition>
- <div v-show="show">
- <el-row>
- <el-col :span="6">
- <el-form-item label="目的港口" prop="fDestportid">
- <el-select
- v-model="queryParams.fDestportid"
- filterable
- clearable
- remote
- size="small"
- style="width: 240px"
- class="elSelect"
- placeholder="请输入模糊查找目的港口"
- >
- <el-scrollbar>
- <el-option
- v-for="(dict, index) in fMblnoOptions"
- :key="index"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-scrollbar>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="提单号" prop="fMblno">
- <el-input
- size="small"
- style="width: 240px"
- clearable
- v-model="queryParams.fMblno"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="订舱单位" prop="fCorpid">
- <el-select
- v-model="queryParams.fCorpid"
- clearable
- filterable
- size="small"
- placeholder="请选择订舱单位"
- style="width: 240px"
- >
- <el-option
- v-for="(item, index) in fCorpid"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="货物状态" prop="fCaregoStatus">
- <el-select
- v-model="queryParams.fCaregoStatus"
- clearable
- filterable
- size="small"
- placeholder="请选择货物状态"
- style="width: 240px"
- >
- <el-option
- v-for="(item, index) in caregoList"
- :key="index.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="业务员" prop="createBy">
- <el-select
- v-model="queryParams.createBy"
- clearable
- filterable
- size="small"
- placeholder="请选择业务员"
- style="width: 240px"
- >
- <el-option
- v-for="(item, index) in createBy"
- :key="index.userId"
- :label="item.userName"
- :value="item.userId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="箱号" prop="fCntrno">
- <el-input
- size="small"
- style="width: 240px"
- clearable
- v-model="queryParams.fCntrno"
- placeholder="请输入箱号"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="开船日期" prop="timeInterval">
- <el-date-picker
- v-model="queryParams.timeInterval"
- type="daterange"
- range-separator="至"
- style="width: 240px"
- value-format="yyyy-MM-dd HH:mm:ss"
- :default-time="['00:00:00', '23:59:59']"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- size="small"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- </div>
- </el-collapse-transition>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <div style="float: left">
- <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-button
- v-show="show"
- @click="show = !show"
- icon="el-icon-arrow-up"
- size="mini"
- >展开</el-button
- >
- <el-button
- v-show="!show"
- @click="show = !show"
- icon="el-icon-arrow-down"
- size="mini"
- >展开</el-button
- >
- <el-button
- type="primary"
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- >导出</el-button
- >
- <el-button
- type="primary"
- icon="el-icon-download"
- size="mini"
- @click="handleExportItem"
- >导出明细</el-button
- >
- <el-button
- type="primary"
- plain
- icon="el-icon-search"
- size="mini"
- @click="matchingShip(false)"
- :disabled="
- selection.length == 0
- ? true
- : false ||
- selection.findIndex(function (item) {
- return item.vslName !== selection[0].vslName;
- }) === -1
- ? selection.findIndex(function (item) {
- return item.voyNo !== selection[0].voyNo;
- }) === -1
- ? false
- : true
- : true
- "
- >配船</el-button
- >
- <el-button
- type="info"
- plain
- icon="el-icon-search"
- size="mini"
- @click="cancelShip"
- :disabled="selection.length == 0 ? true : false"
- >取消配船</el-button
- >
- <el-button
- type="primary"
- plain
- icon="el-icon-search"
- size="mini"
- @click="inDetention(3)"
- :disabled="
- selection.length == 0
- ? true
- : false ||
- selection.findIndex(function (item) {
- return item.fCaregoStatus == '放货';
- }) === -1
- "
- >扣货</el-button
- >
- <el-button
- type="info"
- plain
- icon="el-icon-search"
- size="mini"
- @click="inDetention(2)"
- :disabled="
- selection.length == 0
- ? true
- : false ||
- selection.findIndex(function (item) {
- return item.fCaregoStatus == '扣货';
- }) === -1
- "
- >取消扣货</el-button
- >
- </div>
- <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"
- show-summary
- :summary-method="getSummaries"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="60" align="center" />
- <el-table-column label="行号" align="center" type="index" />
- <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'">{{
- scope.row.createTime.slice(0, 10)
- }}</span>
- <span v-else-if="item.label == 'fCargoPlanning'">{{
- scope.row.fCargoPlanning == "1" ? "否" : "是"
- }}</span>
- <span v-else-if="item.label == 'fCaregoStatus'">
- <p style="color: #67c23a" v-if="scope.row.fCaregoStatus == '放货'">
- {{ scope.row.fCaregoStatus }}
- </p>
- <p
- style="color: #f56c6c"
- v-else-if="scope.row.fCaregoStatus == '扣货'"
- >
- {{ scope.row.fCaregoStatus }}
- </p>
- <p v-else>{{ scope.row.fCaregoStatus }}</p>
- </span>
- <span v-else>{{ scope.row[item.label] }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column label="订舱号" align="center" prop="fBillno"/>-->
- <!-- <el-table-column label="运输条款" align="center" prop="fServiceitems" />-->
- <!-- <el-table-column label="收货人" align="center" prop="fConsigneername"/>-->
- <!-- <el-table-column label="航线" align="center" prop="fName"/>-->
- <!-- <el-table-column label="箱型" align="center" prop="fNo"/>-->
- <!-- <el-table-column label="箱量" align="center" prop="fCntrcount"/>-->
- <!-- <el-table-column label="装货时间" align="center" prop="fBsdate"/>-->
- <el-table-column
- label="操作"
- fixed="right"
- align="center"
- class-name="small-padding fixed-width"
- min-width="160px"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row, 1)"
- v-hasPermi="['warehouse:warehousebills:webVersionOrderDetails']"
- >查看
- </el-button>
- <!-- <el-button-->
- <!-- size="mini"-->
- <!-- type="text"-->
- <!-- icon="el-icon-delete"-->
- <!-- @click="handleDelete(scope.row)"-->
- <!-- >移除</el-button>-->
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- class-name="small-padding fixed-width"-->
- <!-- v-for="(item,index) in boxDistributionName"-->
- <!-- :key="item.index"-->
- <!-- :label="item"-->
- <!-- :value="item.index"-->
- <!-- :prop="item"-->
- <!-- >-->
- <!-- </el-table-column>-->
- </el-table>
- <pagination
- v-show="total > 0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <el-dialog title="配船" :visible.sync="shipAllocation" width="50%">
- <el-form :inline="true" :model="ship" class="demo-form-inline">
- <el-row>
- <el-col :span="12">
- <el-form-item label="船名">
- <el-select
- size="small"
- width="240px"
- v-model="ship.fVslid"
- @change="voyageRemthods"
- >
- <el-option
- v-for="item in vesselOptions"
- :key="item.fId"
- :label="item.fName"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="航次">
- <el-select
- v-model="ship.fVoyid"
- filterable
- remote
- size="small"
- style="width: 200px"
- >
- <el-option
- v-for="item in voyageOptions"
- :key="item.fId"
- :label="item.fNo"
- :value="item.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="shipAllocation = false">取 消</el-button>
- <el-button type="primary" @click="matchingShip(true)">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- bookingParty,
- selectUserByRole,
- listCorps,
- getcntrName,
- delCorps,
- changeCorpsStatus,
- exportInventory,
- cancelAllocation,
- confirmAllocation,
- exportItem,
- detention,
- } from "@/api/kaihe/domesticTrade/myOrder";
- import Cookies from "js-cookie";
- import { addSet, resetModule, select } from "@/api/system/set";
- import Vue from "vue";
- import draggable from "vuedraggable";
- import { getVesselName } from "@/api/finance/applyForInvoice/chargeInvoice";
- import { getVoyageName } from "@/api/finance/applyForInvoice/feeDetail";
- import { portInquiry } from "@/api/kaihe/domesticTrade/orderInformation";
- import { defaultDate } from "@/utils/date";
- 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: "myOrder",
- components: {
- draggable,
- },
- data() {
- return {
- voyageOptions: [],
- vesselOptions: [],
- show: false,
- activeIndex: "0",
- setRowList: [],
- getRowList: [],
- tableDate: [
- {
- surface: "1",
- label: "fBillno",
- name: "订舱号",
- checked: 0,
- width: 120,
- },
- {
- surface: "2",
- label: "fServiceitems",
- name: "运输条款",
- checked: 0,
- width: 140,
- },
- {
- surface: "3",
- label: "fConsigneername",
- name: "收货人",
- checked: 0,
- width: 120,
- },
- {
- surface: "4",
- label: "fName",
- name: "航线",
- checked: 0,
- width: 120,
- },
- {
- surface: "5",
- label: "fNo",
- name: "箱型",
- checked: 0,
- width: 120,
- },
- {
- surface: "6",
- label: "fCntrcount",
- name: "箱量",
- checked: 0,
- width: 120,
- },
- {
- surface: "7",
- label: "loadCntr",
- name: "返箱数",
- checked: 0,
- width: 120,
- },
- {
- surface: "8",
- label: "fBsdate",
- name: "装货时间",
- checked: 0,
- width: 120,
- },
- {
- surface: "9",
- label: "fAtd",
- name: "开船日期",
- checked: 0,
- width: 120,
- },
- {
- surface: "10",
- label: "fBillstatus",
- name: "状态",
- checked: 0,
- width: 120,
- },
- {
- surface: "11",
- label: "vslName",
- name: "船名",
- checked: 0,
- width: 120,
- },
- {
- surface: "12",
- label: "voyNo",
- name: "航次",
- checked: 0,
- width: 120,
- },
- {
- surface: "13",
- label: "fMblno",
- name: "提单号",
- checked: 0,
- width: 120,
- },
- {
- surface: "14",
- label: "corpName",
- name: "订舱单位",
- checked: 0,
- width: 120,
- },
- {
- surface: "15",
- label: "goodsName",
- 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: "loadportName",
- name: "起运港",
- checked: 0,
- width: 120,
- },
- {
- surface: "19",
- label: "destportName",
- name: "目的港",
- checked: 0,
- width: 120,
- },
- {
- surface: "20",
- label: "moneyStatus",
- name: "费用状态",
- checked: 0,
- width: 120,
- },
- {
- surface: "21",
- label: "fReceivable",
- name: "应收",
- checked: 0,
- width: 120,
- },
- {
- surface: "22",
- label: "fRecycle",
- name: "实收",
- checked: 0,
- width: 120,
- },
- {
- surface: "23",
- label: "fDue",
- name: "应付",
- checked: 0,
- width: 120,
- },
- {
- surface: "24",
- label: "fPay",
- name: "实付",
- checked: 0,
- width: 120,
- },
- {
- surface: "25",
- label: "fCaregoStatus",
- name: "货物状态",
- checked: 0,
- width: 120,
- },
- {
- surface: "26",
- label: "fCargoPlanning",
- name: "配船",
- checked: 0,
- width: 120,
- },
- {
- surface: "27",
- label: "remark",
- name: "备注",
- checked: 0,
- width: 120,
- },
- ],
- //自定义列宽
- allCheck: false,
- showSetting: false,
- shipAllocation: false,
- ship: {
- fVoyid: "",
- fVslid: "",
- },
- serviceitems: [],
- container: [],
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- selection: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 客户详情表格数据
- corpsList: [],
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- cLoadDate: defaultDate(),
- },
- fMblnoOptions: [],
- createBy: [],
- fCorpid: [],
- caregoList: [],
- };
- },
- created() {
- this.setRowList = this.tableDate;
- this.getRowList = this.tableDate;
- portInquiry().then((res) => {
- this.fMblnoOptions = res.rows;
- });
- selectUserByRole().then((res) => {
- this.createBy = res.rows;
- });
- bookingParty().then((res) => {
- this.fCorpid = res.rows;
- });
- this.getList();
- this.cntrRemoteMethod();
- this.vessleRemthod();
- this.voyageRemthods();
- this.getDicts("f_serviceitems").then((response) => {
- if (response.data) {
- this.serviceitems = response.data;
- }
- });
- this.getDicts("carego_status").then((response) => {
- if (response.data) {
- this.caregoList = response.data;
- }
- });
- this.getRow();
- },
- activated() {
- this.getList();
- // this.queryParams.timeInterval = this.queryParams.timeInterval
- // ? this.queryParams.timeInterval
- // : defaultDate();
- },
- methods: {
- voyageRemthods() {
- getVoyageName({ fPid: this.ship.fVslid }).then((response) => {
- this.voyageOptions = response.rows;
- if (this.ship.fVslid) this.ship.fVoyid = "";
- });
- },
- //获取船名
- vessleRemthod() {
- getVesselName().then((response) => {
- this.vesselOptions = response.rows;
- });
- },
- handleSelect(key, keyPath) {
- if (key === "0") {
- this.queryParams = {
- pageNum: 1,
- pageSize: 10,
- };
- } else if (key === "1") {
- this.queryParams.fBillstatus = 4;
- } else if (key === "2") {
- this.queryParams.fBillstatus = 6;
- } else if (key === "3") {
- this.queryParams.fBillstatus = 9;
- } else if (key === "4") {
- this.queryParams.fBillstatus = 11;
- } else if (key === "7") {
- this.queryParams.fBillstatus = 12;
- } else if (key === "10") {
- this.queryParams.fBillstatus = 10;
- } else if (key === "12") {
- this.queryParams.fBillstatus = 12;
- }
- listCorps(this.queryParams).then((response) => {
- this.corpsList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- //重置列表
- 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;
- },
- inDetention(type) {
- let ids = [];
- this.selection.forEach((e) => {
- ids.push(e.fId);
- });
- detention({ fCaregoStatus: type, orderList: ids }).then((res) => {
- if (res.code == 200) {
- this.getList();
- if (type == 3) {
- this.$message.success("扣货成功");
- } else {
- this.$message.success("取消扣货成功");
- }
- }
- });
- },
- //箱型下拉查询
- cntrRemoteMethod() {
- let queryParams = { pageNum: 1 };
- getcntrName(queryParams).then((response) => {
- this.container = response.rows;
- });
- },
- vslidChange() {
- getVoyageName({ fPid: this.queryParams.fVslid }).then((response) => {
- this.voyageOptions = response.rows;
- if (this.queryParams.fVoyid) {
- this.queryParams.fVoyid = "";
- }
- });
- },
- /** 删除按钮操作 */
- 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("删除成功");
- });
- },
- //查看跳转
- handleUpdate(row, num) {
- let res = {};
- res = {
- fId: row.fId,
- num: num,
- };
- this.$router.push({
- path: "/domesticTrade/orderInformation",
- query: { data: JSON.stringify(res) },
- });
- },
- //模糊查询地点
- addressMethod() {
- let queryParams = { pageNum: 1 };
- getaddress(queryParams).then((response) => {
- this.addressOptions = response.rows;
- });
- },
- /** 查询客户详情列表 */
- getList() {
- listCorps(this.queryParams).then((response) => {
- if (response.rows) {
- response.rows.forEach((e) => {
- e.fServiceitems = e.fServiceitems + "-" + e.fDestportMode;
- if(e.fAtd){
- e.fAtd=e.fAtd.slice(0,10)
- }
- });
- }
- this.corpsList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 从表重置
- 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";
- });
- },
- /** 配船按钮操作 */
- matchingShip(type) {
- if (type === false) {
- this.shipAllocation = true;
- this.ship.fVoyid = this.selection[0].fVoyid;
- this.ship.fVslid = this.selection[0].fVslid;
- // this.ship.fPid = this.selection[0].fVslid
- } else {
- this.ship.fCargoPlanning = 0;
- this.ship.orderId = [];
- this.selection.forEach((item) => this.ship.orderId.push(item.fId));
- confirmAllocation(this.ship).then((res) => {
- console.log(res);
- this.shipAllocation = false;
- this.getList();
- this.$message({
- showClose: true,
- message: "配船成功",
- type: "success",
- });
- });
- }
- },
- /** 取消配船按钮操作 */
- cancelShip() {
- let data = [];
- this.selection.forEach((item) => data.push(item.fId));
- cancelAllocation(data).then((res) => {
- this.$message({
- showClose: true,
- message: "取消配船成功",
- type: "success",
- });
- this.getList();
- });
- },
- /** 导出按钮操作 */
- handleExport() {
- // exportInventory(this.queryParams).then((response) => {
- // this.download(response.msg);
- // });
- const queryParams = this.queryParams;
- this.$confirm("是否选择船名航次?", "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(function () {
- return exportInventory(queryParams);
- })
- .then((response) => {
- this.download(response.msg);
- });
- },
- handleExportItem() {
- exportItem(this.queryParams).then((response) => {
- this.download(response.msg);
- });
- // const queryParams = this.queryParams;
- // this.$confirm("是否选择船名航次?", "警告", {
- // confirmButtonText: "确定",
- // cancelButtonText: "取消",
- // type: "warning",
- // })
- // .then(function () {
- // return exportItem(queryParams);
- // })
- // .then((response) => {
- // this.download(response.msg);
- // });
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.queryParams.pageSize = 10;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.queryParams = {
- fBillno: null,
- fServiceitems: null,
- fConsigneername: null,
- fCntrid: null,
- fCntrcount: null,
- cLoadDate: null,
- fCntrno: null,
- timeInterval: null,
- };
- this.resetForm("queryForm");
- this.handleQuery();
- getVoyageName({ fPid: this.queryParams.fVslid }).then((response) => {
- this.voyageOptions = response.rows;
- if (this.queryParams.fVoyid) {
- this.queryParams.fVoyid = "";
- }
- });
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.selection = selection;
- this.ids = selection.map((item) => item.fId);
- this.single = selection.length !== 1;
- this.multiple = !selection.length;
- },
- getSummaries(param) {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((item, index) => {
- if (index === 0) {
- sums[index] = "合计";
- return;
- }
- if (item.property == "fCntrcount" || item.property == "loadCntr") {
- let num1 = 0;
- let num2 = 0;
- data.forEach((e) => {
- num1 += e.fCntrcount;
- num2 += e.loadCntr;
- });
- if (item.property == "fCntrcount") {
- sums[index] = num1 ? num1 : "0";
- }
- if (item.property == "loadCntr") {
- sums[index] = num2 ? num2 : "0";
- }
- }
- });
- return sums;
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .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>
- <style lang="scss">
- .el-table {
- .el-table__body-wrapper {
- z-index: 2;
- }
- }
- </style>
|