马士基订舱+船期维护

master
sunzehua 9 months ago
parent b35d85d615
commit d57e4ae42b

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="17px" height="17px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -365 -36 )">
<path d="M 9.817057291666668 4.349609375 C 9.883463541666668 4.416015625 9.916666666666668 4.500868055555554 9.916666666666668 4.604166666666667 L 9.916666666666668 9.5625 C 9.916666666666668 9.66579861111111 9.883463541666668 9.750651041666666 9.817057291666668 9.817057291666666 C 9.750651041666668 9.883463541666666 9.665798611111112 9.916666666666666 9.5625 9.916666666666666 L 6.020833333333334 9.916666666666666 C 5.917534722222223 9.916666666666666 5.832682291666666 9.883463541666666 5.766276041666666 9.817057291666666 C 5.699869791666666 9.750651041666666 5.666666666666666 9.66579861111111 5.666666666666666 9.5625 L 5.666666666666666 8.854166666666666 C 5.666666666666666 8.750868055555555 5.699869791666666 8.666015625 5.766276041666666 8.599609375 C 5.832682291666666 8.533203125 5.917534722222223 8.5 6.020833333333334 8.5 L 8.5 8.5 L 8.5 4.604166666666667 C 8.5 4.500868055555554 8.533203125 4.416015625 8.599609375 4.349609375 C 8.666015625000002 4.283203125 8.750868055555557 4.25 8.854166666666668 4.25 L 9.5625 4.25 C 9.665798611111112 4.25 9.750651041666668 4.283203125 9.817057291666668 4.349609375 Z M 13.712890625 11.521484375 C 14.251519097222223 10.599175347222221 14.520833333333332 9.59201388888889 14.520833333333332 8.5 C 14.520833333333332 7.407986111111111 14.251519097222223 6.400824652777778 13.712890625 5.478515625 C 13.174262152777779 4.5562065972222205 12.443793402777779 3.8257378472222205 11.521484375 3.287109375 C 10.599175347222223 2.7484809027777777 9.59201388888889 2.4791666666666674 8.5 2.4791666666666674 C 7.407986111111112 2.4791666666666674 6.400824652777779 2.7484809027777777 5.478515625 3.287109375 C 4.556206597222222 3.8257378472222205 3.8257378472222223 4.5562065972222205 3.287109375 5.478515625 C 2.748480902777778 6.400824652777778 2.479166666666667 7.407986111111111 2.479166666666667 8.5 C 2.479166666666667 9.59201388888889 2.748480902777778 10.599175347222221 3.287109375 11.521484375 C 3.8257378472222223 12.443793402777775 4.556206597222222 13.174262152777777 5.478515625 13.712890625 C 6.400824652777779 14.251519097222223 7.407986111111112 14.520833333333332 8.5 14.520833333333332 C 9.59201388888889 14.520833333333332 10.599175347222223 14.251519097222223 11.521484375 13.712890625 C 12.443793402777779 13.174262152777777 13.174262152777779 12.443793402777775 13.712890625 11.521484375 Z M 15.860026041666668 4.2333984375 C 16.620008680555554 5.5356987847222205 17 6.957899305555554 17 8.5 C 17 10.042100694444445 16.620008680555554 11.464301215277775 15.860026041666668 12.7666015625 C 15.100043402777779 14.068901909722223 14.068901909722223 15.100043402777777 12.7666015625 15.860026041666668 C 11.464301215277779 16.620008680555557 10.042100694444445 17 8.5 17 C 6.957899305555556 17 5.535698784722222 16.620008680555557 4.2333984375 15.860026041666668 C 2.931098090277778 15.100043402777777 1.8999565972222223 14.068901909722223 1.1399739583333335 12.7666015625 C 0.3799913194444444 11.464301215277775 0 10.042100694444445 0 8.5 C 0 6.957899305555554 0.3799913194444444 5.5356987847222205 1.1399739583333335 4.2333984375 C 1.8999565972222223 2.9310980902777777 2.931098090277778 1.8999565972222205 4.2333984375 1.1399739583333326 C 5.535698784722222 0.379991319444443 6.957899305555556 0 8.5 0 C 10.042100694444445 0 11.464301215277779 0.379991319444443 12.7666015625 1.1399739583333326 C 14.068901909722223 1.8999565972222205 15.100043402777779 2.9310980902777777 15.860026041666668 4.2333984375 Z " fill-rule="nonzero" fill="#63a103" stroke="none" transform="matrix(1 0 0 1 365 36 )" />
</g>
</svg>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="29px" xmlns="http://www.w3.org/2000/svg">
<defs>
<filter x="14px" y="32px" width="24px" height="29px" filterUnits="userSpaceOnUse" id="filter85">
<feOffset dx="1" dy="1" in="SourceAlpha" result="shadowOffsetInner" />
<feGaussianBlur stdDeviation="2.5" in="shadowOffsetInner" result="shadowGaussian" />
<feComposite in2="shadowGaussian" operator="atop" in="SourceAlpha" result="shadowComposite" />
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6980392156862745 0 " in="shadowComposite" />
</filter>
<g id="widget86">
<path d="M 25 54.0253083967845 C 22.4 49.650189782636616 18.5 47.025118614147885 18.5 42.65 C 18.5 40.36571428571428 19.8 36.5 25 36.5 C 30.2 36.5 31.5 40.36571428571428 31.5 42.65 C 31.5 47.025118614147885 27.6 49.650189782636616 25 54.0253083967845 Z " fill-rule="nonzero" fill="#00c2ff" stroke="none" />
<path d="M 25 55 C 22.2 50.25 18 47.4 18 42.65 C 18 40.18 19.4 36 25 36 C 30.6 36 32 40.18 32 42.65 C 32 47.4 27.799999999999997 50.25 25 55 Z M 25 53.050616793569006 C 27.4 49.05037956527323 31 46.65023722829577 31 42.65 C 31 40.55142857142857 29.8 37 25 37 C 20.2 37 19 40.55142857142857 19 42.65 C 19 46.65023722829577 22.6 49.05037956527323 25 53.050616793569006 Z " fill-rule="nonzero" fill="#ffffff" stroke="none" />
</g>
</defs>
<g transform="matrix(1 0 0 1 -14 -32 )">
<use xlink:href="#widget86" filter="url(#filter85)" />
<use xlink:href="#widget86" />
</g>
</svg>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="30px" height="10px" xmlns="http://www.w3.org/2000/svg">
<g transform="matrix(1 0 0 1 -115 -10 )">
<path d="M 29.826388888888886 4.668400520156046 C 29.942129629629633 4.755093194625054 30.000000000000007 4.854789770264412 30 4.967490247074123 C 30.000000000000007 5.088859991330732 29.942129629629633 5.19289120069354 29.826388888888886 5.279583875162549 L 23.15972222222222 9.88296488946684 C 22.974537037037038 10.004334633723449 22.77199074074074 10.030342436064153 22.552083333333336 9.960988296488946 C 22.332175925925927 9.88296488946684 22.22222222222222 9.757260511486779 22.22222222222222 9.583875162548765 L 22.22222222222222 6.671001300390117 L 0.5555555555555556 6.671001300390117 C 0.39351851851851855 6.671001300390117 0.2604166666666667 6.631989596879064 0.15625 6.553966189856957 C 0.05208333333333333 6.47594278283485 0 6.376246207195491 0 6.254876462938881 L 0 3.758127438231469 C 0 3.636757693974859 0.05208333333333333 3.5370611183355005 0.15625 3.4590377113133943 C 0.2604166666666667 3.3810143042912877 0.39351851851851855 3.342002600780234 0.5555555555555556 3.342002600780234 L 22.22222222222222 3.342002600780234 L 22.22222222222222 0.42912873862158696 C 22.22222222222222 0.24707412223667125 22.332175925925927 0.12136974425660974 22.552083333333336 0.05201560468140465 C 22.77199074074074 -0.01733853489380266 22.974537037037038 0.004334633723449555 23.15972222222222 0.11703511053316018 L 29.826388888888886 4.668400520156046 Z " fill-rule="nonzero" fill="#aaaaaa" stroke="none" transform="matrix(1 0 0 1 115 10 )" />
</g>
</svg>

File diff suppressed because one or more lines are too long

@ -50,9 +50,9 @@
</a-layout-content>
<!-- layout footer -->
<a-layout-footer>
<!-- <a-layout-footer>
<global-footer />
</a-layout-footer>
</a-layout-footer> -->
</a-layout>
</a-layout>
</template>

@ -120,7 +120,7 @@
ref="iframe"
@load="handleIframeLoad"
style="width: 100%;height: 1400px;"
src="http://60.209.125.238:35103/#/index"
src="http://localhost:8080/#/index"
frameborder="0"></iframe>
</div>
</div>

@ -4,7 +4,6 @@
<a-card :bordered="false" :bodyStyle="{ padding: '10px 20px' }">
<div class="from-line" >
<div class="left" v-if="!isLockBooking">
<a-button class="btn btn-add" type="primary" @click="handleRefsh"></a-button>
<a-button class="btn btn-add" type="primary" @click="addboxLine"></a-button>
<a-button class="btn btn-delete" @click="removeLine" :style="{ marginRight: '20px' }">删除</a-button>
<a-button class="btn btn-more-name" type="primary" @click="openDialog" :disabled="tableData.length === 0">
@ -22,6 +21,7 @@
<a-button class="btn btn-weight" type="primary" @click="arrowsWeight">
<a-icon type="arrows-alt" />展开箱量
</a-button>
<a-button class="btn btn-add" type="primary" @click="handleRefsh"></a-button>
</div>
<div v-if="details.autoYardImport && !details.autoYardImport.isRead" style="display: inline-block;margin-left: 10px;padding-top: 5px;">
<a-icon v-if="details.autoYardImport && details.autoYardImport.status==''" @click="handleOpen" type="check-circle" theme="filled" style="color: green;font-size: 19px;cursor: pointer;" />

@ -256,14 +256,14 @@
</template>
<div class="cargo-info">
<div class="info-header">
<span style="width: 35%;display: inline-block;">修改人</span>
<span style="width: 35%;display: inline-block;">修改时间</span>
<span style="width: 30%;display: inline-block;">功能模块</span>
<span style="width: 20%;display: inline-block;">修改人</span>
<span style="width: 42%;display: inline-block;">修改时间</span>
<span style="width: 38%;display: inline-block;">功能模块</span>
</div>
<div v-for="(log, lindex) in details.log" :key="lindex">
<div class="list">
<span class="btn">{{ log.createdUserName }}</span>
<span class="btn" :title="log.createdTime">
<span class="btn" style="width: 20%;">{{ log.createdUserName }}</span>
<span class="btn" style="width: 42%;text-align: left;" :title="log.createdTime">
{{ log.createdTime }}
<i
class="iconfont icon-xia more"
@ -271,7 +271,7 @@
:class="!log.showMore ? 'hide' : 'show'"
@click="showLogMore(lindex)"></i>
</span>
<span :title="log.fromFunc" class="btn">{{ log.fromFunc }}</span>
<span style="display: flex;width: 38%;word-wrap: break-word;justify-content: center;align-items: center;" :title="log.fromFunc" class="btn">{{ log.fromFunc }}</span>
</div>
<div class="more-detail" v-if="log.details.length > 0 && log.showMore">
<div class="detail-single" v-for="(child, cindex) in log.details" :key="cindex">

@ -483,23 +483,26 @@
.list {
display: flex;
background: #fff;
height: 40px;
line-height: 40px;
min-height: 30px;
// line-height: 40px;
text-align: center;
.btn {
display: inline-block;
flex: 1;
// flex: 1;
border: 1px solid #eee;
border-top: none;
padding: 0 8px;
font-size: 12px;
overflow: hidden;
&:nth-of-type(1) {
padding: 0 19px;
padding: 0 2px;
border-right: none;
line-height: 30px;
}
&:nth-of-type(2) {
padding-right: 30px;
padding-right: 5px;
position: relative;
line-height: 30px;
}
}
.more {

@ -0,0 +1,233 @@
<template>
<div class="main">
<div class="title">MSK 订舱</div>
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-row>
<a-col :span="6">
<a-form-model-item label="订舱产品代码">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="请求类别">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="订舱合同唯一ID">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="服务船公司">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="订舱公司名称">
BEST SHIPPING LINE CO LTD
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="订舱方ID">
BEST SHIPPING LINE CO LTD
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="联系人">
BEST SHIPPING LINE CO LTD
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="邮箱">
BEST SHIPPING LINE CO LTD
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="合约方名称">
BEST SHIPPING LINE CO LTD
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="合约方ID">
BEST SHIPPING LINE CO LTD
</a-form-model-item>
</a-col>
</a-row>
<div class="title">地点船期详情</div>
<a-row>
<a-col :span="6">
<a-form-model-item label="始发地">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="目的地">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="始发地服务模式">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="目的地运输条款">
<a-input v-model="form.name" />
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="预计离港日期">
<a-input style="width: 72%;" v-model="form.name" />
<span @click="handleOpenCQ" style="color: #02A7F0;cursor: pointer;margin-left: 5px;">检索船期</span>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<a-modal title="检索船期" :visible="visible" width="1000px" @cancel="visible = false">
<div style="display: flex;align-items: center;">
<a-row>
<a-form-model :model="searchForm" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
<a-col :span="6">
<a-form-model-item label="始发地">
<a-input style="width: 72%;" v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="目的地">
<a-input style="width: 72%;" v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="船名">
<a-input style="width: 72%;" v-model="form.name" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="航次号">
<a-input style="width: 72%;" v-model="form.name" />
</a-form-model-item>
</a-col>
</a-form-model>
</a-row>
<a-button type="primary">检索</a-button>
</div>
<div class="box">
<div class="left">
<div class="top">
<span class="top-text">Qingdao, China </span>
<img style="margin: 0 15px;" src="../../../assets/icons/u92.svg" alt="">
<span class="top-text">Belgrade, Serbia</span>
</div>
<div class="bottom">
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
<div class="item">
<div class="item-left"> <img src="../../../assets/icons/u90.svg" alt=""> </div>
<div class="item-right">
<div>离港</div>
<div>2024-02-24 06:00</div>
</div>
</div>
</div>
</div>
<div class="right"></div>
</div>
</a-modal>
</div>
</template>
<script>
export default {
data() {
return {
form: {},
searchForm: {},
visible: false,
labelCol: { span: 8 },
wrapperCol: { span: 14 }
}
},
mounted() {
},
methods: {
handleOpenCQ() {
this.visible = true
}
}
}
</script>
<style lang="less" scoped>
/deep/ .ant-form-item {
margin-bottom: 0px !important;
}
.main {
background-color: white;
padding: 5px;
padding-left: 20px;
.title {
font-weight: bold;
color: black;
padding-bottom: 5px;
border-bottom: 1px solid black;
padding-left: 10px;
margin-bottom: 20px;
margin-top: 15px;
}
}
.box {
border: 1px black dashed;
padding: 15px;
margin: 10px 0;
.top{
margin-bottom: 15px;
}
.top-text{
font-size: 15px;
}
.bottom{
display: flex;
}
.item{
display: flex;
.item-left{
margin-right: 10px;
}
}
}
</style>

@ -17,13 +17,11 @@
placeholder="请选择船公司"
v-model="queryParam.CARRIER"
show-search
@focus="carrierSearch"
@search="carrierSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:filter-option="filterOption"
:not-found-content="null">
<a-select-option v-for="item in carrierData" :key="item.cnName" :value="item.cnName">
<a-select-option v-for="item in carrierList" :key="item.cnName" :value="item.cnName">
{{ item.cnName }}
</a-select-option>
</a-select>
@ -32,21 +30,6 @@
<a-col :md="6" :sm="24">
<a-form-item label="船名:">
<a-input placeholder="请输入船名" v-model="queryParam.Vessel" />
<!-- <a-select
placeholder="请选择船名"
v-model="queryParam.Vessel"
show-search
@focus="vesselSearch"
@search="vesselSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in vesselData" :key="item.name" :value="item.name">
{{ item.name }}
</a-select-option>
</a-select> -->
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
@ -105,6 +88,7 @@
ref="table"
:columns="columns"
:loading="loading"
@cell-dblclick="handledbclick"
@sort-change="tableSortChange"
@resizable-change="resizableChange"
height="600px"
@ -142,12 +126,18 @@ import { DjyUserConfigMulti } from '@/api/modular/main/BookingLedger'
import addForm from './addForm.vue'
import tableSort from '@/components/tableSort'
import editForm from './editForm.vue'
import { mapGetters } from 'vuex'
export default {
components: {
addForm,
editForm,
tableSort
},
computed: {
...mapGetters([
'carrierList'
])
},
data() {
return {
vesselData: [],
@ -365,9 +355,15 @@ export default {
this.vesselData = res.data
})
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handledbclick(row) {
this.$refs.editForm.edit(row.row)
},
getConfigUser(isInit = false) {
const query = {
typeArr: ['vesselinfo_sort', 'vesselinfo_list_column']
typeArr: ['vesselinfo_sort', 'vesselinfo_list_column', 'vesselinfo_page']
}
this.loading = true
DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => {
@ -375,15 +371,13 @@ export default {
this.columns = JSON.parse(JSON.stringify(this.columnsAll))
this.FnGetData()
} else {
if (res.data.length === 1) {
if (res.data[0].type === 'vesselinfo_list_column') {
this.FnGetData()
}
}
res.data.forEach(item => {
if (item.type === 'vesselinfo_list_column') {
this.columns = JSON.parse(item.configJson)
}
if (item.type === 'vesselinfo_page') {
this.queryParam.PageSize = JSON.parse(item.configJson).pageSize
}
if (item.type === 'vesselinfo_sort') {
const data = JSON.parse(item.configJson)
setTimeout(() => {
@ -391,15 +385,27 @@ export default {
}, 200);
this.queryParam.sortField = data.sortField
this.queryParam.descSort = data.descSort
this.FnGetData()
}
})
setTimeout(() => {
this.FnGetData()
}, 200);
}
})
},
resizableChange(e) {
this.columns[e.columnIndex].width = e.resizeWidth
this.editColumnsSave(this.columns)
this.changeSetting('vesselinfo_list_column', this.columns)
},
changeSetting(key, value) {
const arr = localStorage.getItem('vesselinfoSetting') ? JSON.parse(localStorage.getItem('vesselinfoSetting')) : []
arr.forEach(item => {
if (item.type === key) {
item.configJson = JSON.stringify(value)
}
})
localStorage.setItem('vesselinfoSetting', JSON.stringify(arr))
},
tableSortChange(e) {
const { property, order } = e
@ -410,6 +416,7 @@ export default {
}
this.queryParam.sortField = data.sortField
this.queryParam.descSort = data.descSort
this.changeSetting('vesselinfo_sort', data)
this.FnGetData(this.queryParam)
DjyUserConfigAdd({
type: 'vesselinfo_sort',
@ -424,6 +431,7 @@ export default {
})
this.$forceUpdate()
this.editColumnsSave(this.columns)
this.changeSetting('vesselinfo_list_column', this.columns)
},
carrierSearch(data) {
GetCarrierlist({ KeyWord: data }).then(res => {
@ -438,6 +446,10 @@ export default {
})
},
handlePageChange1({ currentPage, pageSize }) {
if (this.queryParam.pageSize !== pageSize) {
this.editPageSizeSave(pageSize)
this.changeSetting('vesselinfo_page', { pageSize: pageSize })
}
this.queryParam.PageNo = currentPage
this.queryParam.PageSize = pageSize
this.FnGetData()
@ -445,6 +457,17 @@ export default {
confirm(e) {
this.FnDel(e)
},
editPageSizeSave(pageSize) {
const data = {
pageSize: pageSize
}
DjyUserConfigAdd({
type: 'vesselinfo_page',
configJson: JSON.stringify(data)
}).then(res => {
console.log('页码设置成功')
})
},
FnDel(data) {
DjyVesselInfoServiceDelete({ Ids: data.id }).then(res => {
this.$message.success('删除成功')
@ -457,10 +480,101 @@ export default {
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
GetCarrierlist().then(res => {
this.carrierData = res.data
})
this.getConfigUser()
// GetCarrierlist().then(res => {
// this.carrierData = res.data
// })
this.getConfigStart()
},
getConfigStart() {
const arr = localStorage.getItem('vesselinfoSetting') ? JSON.parse(localStorage.getItem('vesselinfoSetting')) : []
if (arr.length === 0) {
this.columns = JSON.parse(JSON.stringify(this.columnsAll))
const data = [
{
type: 'vesselinfo_list_column',
configJson: JSON.stringify(this.columns)
},
{
type: 'vesselinfo_page',
configJson: JSON.stringify({ pageSize: 10 })
},
{
type: 'vesselinfo_sort',
configJson: ''
}
]
localStorage.setItem('vesselinfoSetting', JSON.stringify(data))
this.FnGetData()
} else {
// arr.forEach(item => {
// if (item.type === 'vesselinfo_list_column') {
// this.columns = JSON.parse(item.configJson)
// }
// if (item.type === 'vesselinfo_page') {
// this.queryParam.PageSize = JSON.parse(item.configJson).pageSize
// }
// if (item.type === 'vesselinfo_sort') {
// const data = JSON.parse(item.configJson)
// setTimeout(() => {
// this.$refs.table.sort(data.sortField, data.descSort ? 'desc' : 'asc')
// }, 200);
// this.queryParam.sortField = data.sortField
// this.queryParam.descSort = data.descSort
// }
// })
const $data = {}
arr.map((item, index) => {
switch (item.type) {
case 'vesselinfo_list_column':
this.$set($data, 'vesselinfo_list_column', item)
break
case 'vesselinfo_page':
this.$set($data, 'vesselinfo_page', item)
break
case 'vesselinfo_sort':
this.$set($data, 'vesselinfo_sort', item)
break
}
})
console.log(JSON.parse($data.vesselinfo_list_column.configJson))
if (Object.keys($data).includes('vesselinfo_list_column')) {
this.columns = JSON.parse($data.vesselinfo_list_column.configJson)
} else {
arr.push({
type: 'vesselinfo_list_column',
configJson: JSON.stringify(this.columns)
})
localStorage.setItem('vesselinfoSetting', JSON.stringify(arr))
}
if (Object.keys($data).includes('vesselinfo_page')) {
this.queryParam.PageSize = JSON.parse($data.vesselinfo_page.configJson).pageSize
} else {
arr.push({
type: 'vesselinfo_page',
configJson: JSON.stringify({ pageSize: 10 })
})
localStorage.setItem('vesselinfoSetting', JSON.stringify(arr))
}
if (Object.keys($data).includes('vesselinfo_sort')) {
const data = $data.vesselinfo_sort.configJson ? JSON.parse($data.vesselinfo_sort.configJson) : null
if (data) {
setTimeout(() => {
this.$refs.table.sort(data.sortField, data.descSort ? 'desc' : 'asc')
}, 200);
this.queryParam.sortField = data.sortField
this.queryParam.descSort = data.descSort
}
} else {
arr.push({
type: 'vesselinfo_sort',
configJson: ''
})
localStorage.setItem('vesselinfoSetting', JSON.stringify(arr))
}
setTimeout(() => {
this.FnGetData()
}, 200);
}
},
FnGetData() {
this.loading = true

@ -348,50 +348,16 @@ export default {
//
this.dictTypeData().then(res => { })
const query = {
typeArr: ['booking_list_column']
typeArr: ['vesselinfo_sort', 'vesselinfo_list_column', 'vesselinfo_page', 'booking_list_cond']
}
DjyUserConfigMulti(this.$qs.stringify(query)).then(res => {
if (res.data.length > 0) {
const labelData = JSON.parse(res.data[0].configJson)
labelData.forEach(item => {
if (!item.slots && item.field === 'bsstatusname') {
item.slots = { default: 'bsstatusname' }
}
if (item.field === 'zhanCangFlag') {
item.width = 35
}
if (item.field === 'custno') {
item.slots = { default: 'custno' }
}
if (item.field === 'shenQingXiangShi') {
item.slots = { default: 'shenQingXiangShi' }
}
if (item.field === 'pono') {
item.slots = { default: 'pono' }
}
if (item.label === 'LINENAME') {
item.field = 'lineName'
}
if (item.label === 'ETA') {
item.title = '目的港ETA'
}
if (item.label === 'isVGM') {
item.title = 'VGM'
item.width = 60
}
if (item.label === 'IsZZFX') {
item.title = '装载'
item.width = 50
}
if (item.label === 'IsCanDan') {
item.title = '舱单'
item.width = 50
}
})
localStorage.setItem('formTableData', JSON.stringify(labelData));
} else {
localStorage.setItem('formTableData', JSON.stringify(initData.columns));
}
const vessArr = []
res.data.forEach(item => {
if (item.type.includes('vesselinfo')) {
vessArr.push(item)
}
})
localStorage.setItem('vesselinfoSetting', JSON.stringify(vessArr))
})
this.$store.dispatch('getVesselinfo')
},

Loading…
Cancel
Save