|
@@ -1,6 +1,12 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ label-width="68px"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label-width="100px" label="船名" prop="fVslid">
|
|
@@ -33,7 +39,8 @@
|
|
|
v-for="item in voyageOptions"
|
|
|
:key="item.fId"
|
|
|
:label="item.fNo"
|
|
|
- :value="item.fId"/>
|
|
|
+ :value="item.fId"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -41,8 +48,14 @@
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" style="padding-bottom: 10px">
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button type="primary" size="mini" :disabled="single" @click="departureShipment">离港出运</el-button>
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="departureShipment"
|
|
|
+ >离港出运</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-date-picker
|
|
@@ -55,7 +68,13 @@
|
|
|
></el-date-picker>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" size="mini" :disabled="single" @click="unloading">到港卸船</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="unloading"
|
|
|
+ >到港卸船</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-date-picker
|
|
@@ -66,14 +85,24 @@
|
|
|
size="mini"
|
|
|
v-model="arrival"
|
|
|
></el-date-picker>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="1.5">
|
|
|
- <el-button type="primary" size="mini" @click="shipInventoryExport">导出装卸船清单</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="shipInventoryExport"
|
|
|
+ >导出装卸船清单</el-button
|
|
|
+ >
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col style="position: absolute;left:70%" :span="5" >
|
|
|
- <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 style="position: absolute; left: 70%" :span="5">
|
|
|
+ <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">
|
|
@@ -92,12 +121,26 @@
|
|
|
</div>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-dialog title="提示" :visible.sync="showSetting" width="700px" v-dialogDrag>
|
|
|
+ <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>
|
|
|
+ <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>
|
|
@@ -130,7 +173,7 @@
|
|
|
v-model="item.checked"
|
|
|
:true-label="0"
|
|
|
:false-label="1"
|
|
|
- >{{ item.name }}
|
|
|
+ >{{ item.name }}
|
|
|
</el-checkbox>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -152,8 +195,7 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-table :data="singleShipList" style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" fixed="left" align="center"></el-table-column>
|
|
|
+ <el-table :data="singleShipList" style="width: 100%">
|
|
|
<el-table-column type="expand" fixed="left">
|
|
|
<slot slot-scope="props">
|
|
|
<el-form label-position="left" inline id="demo-table-expand">
|
|
@@ -162,15 +204,28 @@
|
|
|
:key="index"
|
|
|
label="提单号"
|
|
|
>
|
|
|
- <el-tooltip class="item" effect="dark" content="点击查看详情" placement="top">
|
|
|
- <span class="blNo" v-text="item.fMblno" @click="$refs.blNo.openDialog(item)"></span>
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="点击查看详情"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="blNo"
|
|
|
+ v-text="item.fMblno"
|
|
|
+ @click="$refs.blNo.openDialog(item)"
|
|
|
+ ></span>
|
|
|
</el-tooltip>
|
|
|
-
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</slot>
|
|
|
</el-table-column>
|
|
|
- <el-table-column type="index" fixed="left" align="center" label="行号"></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ fixed="left"
|
|
|
+ align="center"
|
|
|
+ label="行号"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
v-for="(item, index) in getRowList"
|
|
|
:key="index"
|
|
@@ -183,42 +238,11 @@
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="vslName"-->
|
|
|
-<!-- label="船名"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- ></el-table-column>-->
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="voyNo"-->
|
|
|
-<!-- label="航次"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- ></el-table-column>-->
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="fAtd"-->
|
|
|
-<!-- label="开始日期"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- ></el-table-column>-->
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="fAta"-->
|
|
|
-<!-- label="到港日期"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- ></el-table-column>-->
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="fName"-->
|
|
|
-<!-- label="航线"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- ></el-table-column>-->
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="loadportName"-->
|
|
|
-<!-- label="装港"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- ></el-table-column>-->
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="destportName"-->
|
|
|
-<!-- label="卸港"-->
|
|
|
-<!-- align="center"-->
|
|
|
-<!-- ></el-table-column>-->
|
|
|
+ <el-table-column fixed="right" label="操作" width="80" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="openItem(scope.row)" type="text" size="small">操作</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
@@ -230,25 +254,33 @@
|
|
|
/>
|
|
|
|
|
|
<blno ref="blNo"></blno>
|
|
|
+ <index-item ref="indexItem" @refresh="refresh"></index-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import blno from "./BLNo";
|
|
|
-import { getVesselName } from '@/api/finance/applyForInvoice/chargeInvoice';
|
|
|
-import { getVoyageName } from '@/api/finance/applyForInvoice/feeDetail';
|
|
|
+import indexItem from "./indexItem";
|
|
|
+import { getVesselName } from "@/api/finance/applyForInvoice/chargeInvoice";
|
|
|
+import { getVoyageName } from "@/api/finance/applyForInvoice/feeDetail";
|
|
|
import { download } from "../../../utils/ruoyi";
|
|
|
-import { listSingleVoyageByShip, listBLNo, cargoStatus, shipInventoryExport } from '@/api/kaihe/singleVoyageShip/index';
|
|
|
+import {
|
|
|
+ listSingleVoyageByShip,
|
|
|
+ listBLNo,
|
|
|
+ cargoStatus,
|
|
|
+ shipInventoryExport,
|
|
|
+} from "@/api/kaihe/singleVoyageShip/index";
|
|
|
import moment from "moment";
|
|
|
import draggable from "vuedraggable";
|
|
|
-import { addSet, resetModule, select } from '@/api/system/set';
|
|
|
-import Cookies from 'js-cookie';
|
|
|
+import { addSet, resetModule, select } from "@/api/system/set";
|
|
|
+import Cookies from "js-cookie";
|
|
|
|
|
|
export default {
|
|
|
name: "index",
|
|
|
components: {
|
|
|
blno,
|
|
|
draggable,
|
|
|
+ indexItem
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -307,9 +339,9 @@ export default {
|
|
|
],
|
|
|
singleShipList: [],
|
|
|
// 航次
|
|
|
- voyageOptions:[],
|
|
|
+ voyageOptions: [],
|
|
|
// 船名
|
|
|
- vesselOptions:[],
|
|
|
+ vesselOptions: [],
|
|
|
// 离港时间
|
|
|
departure: null,
|
|
|
// 到港时间
|
|
@@ -338,9 +370,9 @@ export default {
|
|
|
showSearch: true,
|
|
|
//自定义列宽
|
|
|
allCheck: false,
|
|
|
- showSetting:false,
|
|
|
+ showSetting: false,
|
|
|
drag: false,
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
created() {
|
|
|
// this.getList();
|
|
@@ -353,95 +385,103 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ refresh(){
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
async getList() {
|
|
|
this.loading = false;
|
|
|
- await listSingleVoyageByShip(this.queryParams).then(response => {
|
|
|
- console.log(response.rows)
|
|
|
+ await listSingleVoyageByShip(this.queryParams).then((response) => {
|
|
|
+ console.log(response.rows);
|
|
|
this.singleShipList = response.rows;
|
|
|
this.singleShipList.forEach((item, index) => {
|
|
|
let blNo = {
|
|
|
fCargoPlanning: 0,
|
|
|
+ fArrivalStatus:3,
|
|
|
fVslid: item.fVslid,
|
|
|
fVoyid: item.fVoyid,
|
|
|
- }
|
|
|
- listBLNo(blNo).then(res => {
|
|
|
- this.singleShipList[index].children = res.rows
|
|
|
- })
|
|
|
- })
|
|
|
+ };
|
|
|
+ listBLNo(blNo).then((res) => {
|
|
|
+ this.singleShipList[index].children = res.rows;
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
handleQuery() {
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.queryParams.pageSize = 10;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ openItem(row){
|
|
|
+ this.$refs.indexItem.init(row)
|
|
|
+ },
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
this.departure = null;
|
|
|
this.arrival = null;
|
|
|
- this.queryParams = {
|
|
|
+ (this.queryParams = {
|
|
|
vslName: null,
|
|
|
voyNo: null,
|
|
|
- },
|
|
|
+ }),
|
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
//获取船名
|
|
|
vessleRemthod() {
|
|
|
- getVesselName().then(response => {
|
|
|
+ getVesselName().then((response) => {
|
|
|
this.vesselOptions = response.rows;
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 获取航次
|
|
|
- voyageRemthods(){
|
|
|
- getVoyageName().then(response=>{
|
|
|
+ voyageRemthods() {
|
|
|
+ getVoyageName().then((response) => {
|
|
|
this.voyageOptions = response.rows;
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
+ console.log(selection);
|
|
|
this.ship = selection;
|
|
|
// this.ids = selection.map(item => item.fId)
|
|
|
- this.single = selection.length!==1;
|
|
|
+ this.single = selection.length !== 1;
|
|
|
// this.multiple = !selection.length
|
|
|
},
|
|
|
// 离港出运
|
|
|
departureShipment() {
|
|
|
// if (this.ship[0].fArrivalStatus === 0) {
|
|
|
- if (this.departure === null) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '离港时间未选择',
|
|
|
- type: 'warning'
|
|
|
+ if (this.departure === null) {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: "离港时间未选择",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const data = {
|
|
|
+ fVsl: this.ship[0].vslName,
|
|
|
+ fVoy: this.ship[0].voyNo,
|
|
|
+ fVslid: this.ship[0].fVslid,
|
|
|
+ fVoyid: this.ship[0].fVoyid,
|
|
|
+ fUpdatetime: this.departure,
|
|
|
+ updateStatus: "1",
|
|
|
+ };
|
|
|
+ cargoStatus(data).then((response) => {
|
|
|
+ this.$alert("离港操作成功", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ type: "success",
|
|
|
+ callback: (action) => {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
});
|
|
|
- } else {
|
|
|
- const data = {
|
|
|
- fVsl: this.ship[0].vslName,
|
|
|
- fVoy: this.ship[0].voyNo,
|
|
|
- fVslid: this.ship[0].fVslid,
|
|
|
- fVoyid: this.ship[0].fVoyid,
|
|
|
- fUpdatetime: this.departure,
|
|
|
- updateStatus: '1',
|
|
|
- }
|
|
|
- cargoStatus(data).then(response => {
|
|
|
- this.$alert('离港操作成功', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- type: 'success',
|
|
|
- callback: action => {
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- })
|
|
|
- // this.$message({
|
|
|
- // showClose: true,
|
|
|
- // message: '出港操作成功',
|
|
|
- // type: 'success'
|
|
|
- // });
|
|
|
- // this.getList();
|
|
|
- })
|
|
|
- }
|
|
|
+ // this.$message({
|
|
|
+ // showClose: true,
|
|
|
+ // message: '出港操作成功',
|
|
|
+ // type: 'success'
|
|
|
+ // });
|
|
|
+ // this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
// }
|
|
|
// else {
|
|
|
// this.$message({
|
|
@@ -454,38 +494,37 @@ export default {
|
|
|
// 到港卸船
|
|
|
unloading() {
|
|
|
// if (this.ship[0].fArrivalStatus === 1) {
|
|
|
- if (this.arrival === null) {
|
|
|
-
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '到港时间未选择',
|
|
|
- type: 'warning'
|
|
|
+ if (this.arrival === null) {
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: "到港时间未选择",
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const data = {
|
|
|
+ fVsl: this.ship[0].vslName,
|
|
|
+ fVoy: this.ship[0].voyNo,
|
|
|
+ fVslid: this.ship[0].fVslid,
|
|
|
+ fVoyid: this.ship[0].fVoyid,
|
|
|
+ fUpdatetime: this.arrival,
|
|
|
+ updateStatus: "2",
|
|
|
+ };
|
|
|
+ cargoStatus(data).then((response) => {
|
|
|
+ this.$alert("到港操作成功", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ type: "success",
|
|
|
+ callback: (action) => {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
});
|
|
|
- } else {
|
|
|
- const data = {
|
|
|
- fVsl: this.ship[0].vslName,
|
|
|
- fVoy: this.ship[0].voyNo,
|
|
|
- fVslid: this.ship[0].fVslid,
|
|
|
- fVoyid: this.ship[0].fVoyid,
|
|
|
- fUpdatetime: this.arrival,
|
|
|
- updateStatus: '2',
|
|
|
- }
|
|
|
- cargoStatus(data).then(response => {
|
|
|
- this.$alert('到港操作成功', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- type: 'success',
|
|
|
- callback: action => {
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- })
|
|
|
- // this.$message({
|
|
|
- // showClose: true,
|
|
|
- // message: '到港操作成功',
|
|
|
- // type: 'success'
|
|
|
- // });
|
|
|
- // this.getList();
|
|
|
- })
|
|
|
- }
|
|
|
+ // this.$message({
|
|
|
+ // showClose: true,
|
|
|
+ // message: '到港操作成功',
|
|
|
+ // type: 'success'
|
|
|
+ // });
|
|
|
+ // this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
// } else {
|
|
|
// this.$message({
|
|
|
// showClose: true,
|
|
@@ -496,9 +535,9 @@ export default {
|
|
|
},
|
|
|
// 导出清单
|
|
|
shipInventoryExport() {
|
|
|
- shipInventoryExport(this.queryParams).then(response => {
|
|
|
- this.download(response.msg)
|
|
|
- })
|
|
|
+ shipInventoryExport(this.queryParams).then((response) => {
|
|
|
+ this.download(response.msg);
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
//列设置全选
|
|
@@ -531,7 +570,7 @@ export default {
|
|
|
if (res.code == 200) {
|
|
|
this.showSetting = false;
|
|
|
this.setRowList = this.tableDate;
|
|
|
- console.log(this.setRowList)
|
|
|
+ console.log(this.setRowList);
|
|
|
this.getRowList = this.tableDate;
|
|
|
}
|
|
|
});
|
|
@@ -548,8 +587,8 @@ export default {
|
|
|
this.getRowList = this.setRowList.filter((e) => e.checked == 0);
|
|
|
});
|
|
|
},
|
|
|
- }
|
|
|
-}
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|