临时提交 -- 订舱详情

dev
lilu 2 years ago
parent 708a196e23
commit 408d5de5ef

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1,69 @@
<template>
<div class="booking-detail">
<!-- 基本信息 -->
<basicInfo :type="type"></basicInfo>
<!-- 收发通信息 -->
<mailingInfo></mailingInfo>
<!-- 货物信息 -->
<cargoInfo></cargoInfo>
<!-- 签单信息 -->
<billInfo></billInfo>
<!-- 备注信息 -->
<remarksInfo></remarksInfo>
<!-- 箱型 -->
<goodsTable></goodsTable>
</div>
</template>
<script>
import basicInfo from '../modules/basicInfo'
import mailingInfo from '../modules/mailingInfo'
import cargoInfo from '../modules/cargoInfo'
import billInfo from '../modules/billInfo'
import remarksInfo from '../modules/remarksInfo'
import goodsTable from '../modules/goodsTable'
export default {
components: {
basicInfo,
mailingInfo,
cargoInfo,
billInfo,
remarksInfo,
goodsTable
},
props: {
type: {
type: String,
default: ''
}
},
data() {
return {
}
},
created() {},
methods: {
}
}
</script>
<style lang="less">
.base-tit {
font-size: 14px;
font-weight: 600;
color: #666;
position: relative;
&::before {
content: '';
position: absolute;
width: 3px;
height: 30px;
background: #ccc;
top: 0;
left: 0;
}
i {
margin-right: 10px;
margin-left: 10px;
}
}
</style>

@ -0,0 +1,145 @@
<template>
<div class="more-edi">
<a-form :form="moreEdiFrom">
<a-row :gutter="16">
<a-col :span="24">
<a-form-item
label="委托方"
:labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-textarea
placeholder="请输入委托方"
v-decorator="['code', { rules: [{ required: true, message: '请输入货代代码' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item
label="付款方"
:labelCol="{ xs: { span: 24 }, sm: { span: 3 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入付款方"
v-decorator="['code', { rules: [{ required: true, message: '请输入付款方' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="EDI联系人名称"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入EDI联系人名称"
v-decorator="['code', { rules: [{ required: true, message: '请输入EDI联系人名称' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="EDI联系人电话"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入EDI联系人电话"
v-decorator="['code', { rules: [{ required: true, message: '请输入EDI联系人电话' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="EDI联系人邮箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入EDI联系人邮箱"
v-decorator="['code', { rules: [{ required: true, message: '请输入EDI联系人邮箱' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="SCAC代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入SCAC代码"
v-decorator="['code', { rules: [{ required: true, message: '请输入SCAC代码' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="ITN编号"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入ITN编号"
v-decorator="['code', { rules: [{ required: true, message: '请输入ITN编号' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="SOC箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-select
default-value="1"
style="width: 120px"
v-decorator="['code', { rules: [{ required: true, message: '请选择' }] }]"
>
<a-select-option value="1"> </a-select-option>
<a-select-option value="0"> </a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</a-form>
<div class="bottom-btn">
<a-button class="btn" > 关闭 </a-button>
<a-button class="btn" type="primary"> 保存 </a-button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
//
moreEdiFrom: this.$form.createForm(this),
}
},
created() {},
methods: {},
}
</script>
<style lang="less">
.more-edi {
padding: 60px 20px;
background: #ffffff;
}
.bottom-btn{
text-align: right;
padding-right:20px;
.btn{
margin-left: 20px;
}
}
</style>

@ -0,0 +1,89 @@
<template>
<div class="more-edi">
<a-form :form="moreEdiFrom">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item
label="销售人员"
:labelCol="{ xs: { span: 24 }, sm: { span: 7 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入销售人员"
v-decorator="['code', { rules: [{ required: true, message: '请输入销售人员' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="操作人员"
:labelCol="{ xs: { span: 24 }, sm: { span: 7 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入操作人员"
v-decorator="['code', { rules: [{ required: true, message: '请输入操作人员' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="单证人员"
:labelCol="{ xs: { span: 24 }, sm: { span: 7 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入单证人员"
v-decorator="['code', { rules: [{ required: true, message: '请输入单证人员' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="客服人员"
:labelCol="{ xs: { span: 24 }, sm: { span: 7 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input
placeholder="请输入客服人员"
v-decorator="['code', { rules: [{ required: true, message: '请输入客服人员' }] }]"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
<div class="bottom-btn">
<a-button class="btn"> 关闭 </a-button>
<a-button class="btn" type="primary"> 保存 </a-button>
</div>
</div>
</template>
<script>
export default {
data() {
return {
//
moreEdiFrom: this.$form.createForm(this),
}
},
created() {},
methods: {},
}
</script>
<style lang="less">
.more-edi {
padding: 60px 20px;
background: #ffffff;
}
.bottom-btn {
text-align: right;
padding-right: 20px;
.btn {
margin-left: 20px;
}
}
</style>

@ -1,21 +1,53 @@
<template>
<div class="booking-detail">
<a-tabs>
<a-tab-pane key="1" tab="主单信息">
</a-tab-pane>
<a-tab-pane key="2" tab="分单信息">
</a-tab-pane>
</a-tabs>
<a-row :gutter="24">
<a-col :span="18">
<!-- 按钮 -->
<operationArea></operationArea>
<!-- 基本信息 -->
<basicInfo></basicInfo>
<!-- 收发通信息 -->
<mailingInfo></mailingInfo>
<!-- 货物信息 -->
<cargoInfo></cargoInfo>
<!-- 签单信息 -->
<billInfo></billInfo>
<!-- 备注信息 -->
<remarksInfo></remarksInfo>
<!-- 箱型 -->
<goodsTable></goodsTable>
<operationArea @refresh="refreshPage" @openTab="openTabFun"></operationArea>
<a-tabs type="card" @change="callback">
<a-tab-pane key="1" tab="基础信息">
<div class="pane-box">
<!-- 基本信息 -->
<basicInfo :type="type"></basicInfo>
<!-- 收发通信息 -->
<mailingInfo></mailingInfo>
<!-- 货物信息 -->
<cargoInfo></cargoInfo>
<!-- 签单信息 -->
<billInfo></billInfo>
<!-- 备注信息 -->
<remarksInfo></remarksInfo>
<!-- 箱型 -->
<goodsTable></goodsTable>
</div>
<!-- <basicItem class="pane-box" :type="type"></basicItem> -->
</a-tab-pane>
<a-tab-pane key="2" tab="EDI补充信息">
<ediMore class="pane-box"></ediMore>
</a-tab-pane>
</a-tabs>
<!-- <a-tabs v-model="activeKey" hide-add type="editable-card" @edit="onEdit">
<a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title" :closable="pane.closable">
<div v-if="pane.key === '1'" class="pane-box">
<basicItem :type="type"></basicItem>
</div>
<div v-else-if="pane.type === 'menu'" class="pane-box">
<basicItem :type="type"></basicItem>
</div>
<div v-else-if="pane.type === 'ediMore'" class="pane-box">
<ediMore></ediMore>
</div>
<div v-else-if="pane.type === 'team'" class="pane-box">
<teamItem></teamItem>
</div>
</a-tab-pane>
</a-tabs> -->
</a-col>
<a-col :span="6">
<rightContent></rightContent>
@ -32,6 +64,10 @@ import billInfo from './modules/billInfo'
import remarksInfo from './modules/remarksInfo'
import goodsTable from './modules/goodsTable'
import rightContent from './modules/rightContent'
import basicItem from './components/basicItem'
import ediMore from './components/ediMore'
import teamItem from './components/teamItem'
export default {
name: 'BookingDetail',
components: {
@ -42,23 +78,100 @@ export default {
billInfo,
remarksInfo,
goodsTable,
rightContent
rightContent,
basicItem,
ediMore,
teamItem,
},
data() {
return {}
// const panes = [{ title: '', key: '1', type: 'basic', closable: false }]
return {
type: this.$route.query.type,
id: this.$route.query.id,
//
// activeKey: panes[0].key,
// panes,
// newTabIndex: 1,
}
},
created() {},
methods: {},
methods: {
init() {
this.getDetail()
},
getDetail() {},
//
refreshPage() {
this.init()
},
// openTabFun(data) {
// const { type } = data
// const panes = this.panes
// let activeKey = null
// let $menu = null
// if (type === 'sonMenu') {
// activeKey = `menu${this.newTabIndex++}`
// $menu = { title: '', key: activeKey, type: 'menu' }
// } else if (type === 'moreEdi') {
// activeKey = `edi${this.newTabIndex++}`
// $menu = { title: 'EDI', key: activeKey, type: 'ediMore' }
// } else if (type === 'team') {
// activeKey = `team${this.newTabIndex++}`
// $menu = { title: '', key: activeKey, type: 'team' }
// }
// panes.push($menu)
// this.panes = panes
// this.activeKey = activeKey
// console.log(this.panes, this.activeKey)
// },
// onEdit(targetKey, action) {
// this[action](targetKey)
// },
// add() {
// const panes = this.panes
// const activeKey = `newTab${this.newTabIndex++}`
// panes.push({
// title: `New Tab ${activeKey}`,
// content: `Content of new Tab ${activeKey}`,
// key: activeKey,
// })
// this.panes = panes
// this.activeKey = activeKey
// },
// remove(targetKey) {
// let activeKey = this.activeKey
// let lastIndex
// this.panes.forEach((pane, i) => {
// if (pane.key === targetKey) {
// lastIndex = i - 1
// }
// })
// const panes = this.panes.filter((pane) => pane.key !== targetKey)
// if (panes.length && activeKey === targetKey) {
// if (lastIndex >= 0) {
// activeKey = panes[lastIndex].key
// } else {
// activeKey = panes[0].key
// }
// }
// this.panes = panes
// this.activeKey = activeKey
// },
},
}
</script>
<style lang="less">
.base-tit{
.base-tit {
font-size: 14px;
font-weight: 600;
color: #666;
position: relative;
&::before{
content:'';
&::before {
content: '';
position: absolute;
width: 3px;
height: 30px;
@ -66,12 +179,17 @@ export default {
top: 0;
left: 0;
}
i{
i {
margin-right: 10px;
margin-left: 10px;
}
}
.booking-detail{
.booking-detail {
padding-bottom: 60px;
}
.pane-box {
margin-top: -17px;
min-height: 200px;
// background: #ffffff;
}
</style>

@ -85,12 +85,22 @@
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="约号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入约号!"
v-decorator="['code', { rules: [{ required: true, message: '请输入约号!' }] }]"
/>
</a-form-item>
<template v-if="type === 'CMA' || type === 'MSC'">
<a-form-item class="from-label" label="约号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入约号!"
v-decorator="['code', { rules: [{ required: true, message: '请输入约号!' }] }]"
/>
</a-form-item>
</template>
<template v-else-if="type === 'ESL'">
<a-form-item class="from-label" label="EP号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入EP号"
v-decorator="['code', { rules: [{ required: true, message: '请输入EP号' }] }]"
/>
</a-form-item>
</template>
</a-col>
</a-row>
</a-form>
@ -123,18 +133,36 @@
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
label="内部航次"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入内部航次!"
v-decorator="['code', { rules: [{ required: true, message: '请输入内部航次!' }] }]"
/>
</a-form-item>
<template v-if="type === 'CMA' || type === 'MSC'">
<a-form-item
class="from-label"
label="内部航次"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入内部航次!"
v-decorator="['code', { rules: [{ required: true, message: '请输入内部航次!' }] }]"
/>
</a-form-item>
</template>
<template v-else-if="type === 'ESL'">
<a-form-item class="from-label" label="EP号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-form-item
class="from-label"
label="航线代码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入航线代码!"
v-decorator="['code', { rules: [{ required: true, message: '请输入航线代码!' }] }]"
/>
</a-form-item>
</a-form-item>
</template>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
@ -144,11 +172,15 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-range-picker
format="YYYY-MM-DD HH:mm:ss"
:placeholder="['开始时间', '结束时间']"
v-decorator="['updataTime', { rules: [{ required: false }] }]"
/>
<div class="date-box">
<a-date-picker
class="date-picker"
format="YYYY-MM-DD HH:mm:ss"
placeholder="开船日期"
v-decorator="['updataTime', { rules: [{ required: false }] }]"
/>
<span class="week">W27</span>
</div>
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
@ -170,6 +202,14 @@
/>
</a-form-item>
</a-col>
<template v-if="type === 'ESL'">
<a-form-item class="from-label" label="约号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入约号!"
v-decorator="['code', { rules: [{ required: true, message: '请输入约号!' }] }]"
/>
</a-form-item>
</template>
</a-row>
</a-form>
</div>
@ -185,6 +225,12 @@ export default {
XCard,
AutoComplete,
},
props: {
type: {
type: String,
default: ''
}
},
data() {
return {
labelCol: {
@ -221,4 +267,23 @@ export default {
.from-box2{
padding-bottom: 10px;
}
.date-box{
display: flex;
.date-picker{
flex: 1;
}
.week{
display: inline-block;
padding: 0 6px;
background: #fcd017;
color: #fff;
height: 28px;
line-height: 28px;
border: 4px;
margin-top: 2px;
font-size: 12px;
margin-left: 8px;
border-radius: 2px;
}
}
</style>

@ -252,6 +252,8 @@ export default {
filterOption(input, option) {
return option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
},
handleChange() {
}
},
}
</script>

@ -2,34 +2,34 @@
<div class="operation-area">
<a-card :bordered="false" :bodyStyle="{ 'padding-bottom': '15px', 'margin-bottom': '10px' }">
<div class="btn-list more-view">
<button><span class="iconfont icon-shuaxin"></span>刷新</button>
<button @click="refreshPage"><span class="iconfont icon-shuaxin"></span>刷新</button>
<button><span class="iconfont icon-fuzhi1"></span>复制</button>
<button><span class="iconfont icon-icon_baocun"></span>保存</button>
<button><span class="iconfont icon-printing"></span>打印</button>
</div>
<div class="btn-list more-view-1">
<button><span class="iconfont icon-chuanbo"></span>订舱</button>
<button><span class="iconfont icon-daibanshixiang"></span>截单</button>
<button @click="openModel('bookingSpace')"><span class="iconfont icon-chuanbo"></span>订舱</button>
<button @click="openModel('cutOff')"><span class="iconfont icon-daibanshixiang"></span>截单</button>
<button><span class="iconfont icon-xiugai"></span>更改及退舱</button>
<button><span class="iconfont icon-dingdan"></span>VGM</button>
<button><span class="iconfont icon-zhizhishu"></span>下货纸</button>
<button @click="openModel('vgm')"><span class="iconfont icon-dingdan"></span>VGM</button>
<button @click="openModel('paper')"><span class="iconfont icon-zhizhishu"></span>下货纸</button>
</div>
<div class="btn-list more-view-2">
<button><span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span>放舱</button>
<button><span class="iconfont icon-zhcc_tidan"></span>提单确认</button>
<button><span class="iconfont icon-lianjie"></span>VGM链接</button>
<button @click="openModel('initCabin')"><span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span>放舱</button>
<button @click="openModel('ladingBill')"><span class="iconfont icon-zhcc_tidan"></span>提单确认</button>
<button @click="openModel('vgm')"><span class="iconfont icon-lianjie"></span>VGM链接</button>
<button><span class="iconfont icon-dayinxiaopiao"></span>提箱小票</button>
</div>
<div class="btn-list more-view-3">
<button><span class="iconfont icon-a-xiaopiaofapiao-01"></span>分票</button>
<button><span class="iconfont icon-wj-bccl"></span>EDI补充</button>
<!-- <button @click="openTab('sonMenu')"><span class="iconfont icon-a-xiaopiaofapiao-01"></span>分票</button>
<button @click="openTab('moreEdi')"><span class="iconfont icon-wj-bccl"></span>EDI补充</button> -->
<button><span class="iconfont icon-OCR"></span>OCR</button>
<button><span class="iconfont icon-tuandui"></span>团队</button>
<button @click="openTab('team')"><span class="iconfont icon-tuandui"></span>团队</button>
</div>
<div class="btn-list single-view">
<!-- <div class="btn-list single-view">
<button><span class="iconfont icon-shiyongwendang"></span>舱单</button>
<button><span class="iconfont icon-yunshu1"></span>派车</button>
</div>
</div> -->
<div class="btn-list single-view-4">
<button><span class="iconfont icon-jinggao"></span>提示</button>
</div>
@ -38,21 +38,359 @@
<button><span class="iconfont icon-xia"></span>下一票</button>
</div>
</a-card>
<!-- 弹窗部分 start -->
<a-modal
:title="emnuHeader(modelType)"
:width="1200"
:visible="bookingModelvisible"
:confirmLoading="bookingModelconfirm"
@ok="handleModelSubmit"
@cancel="handleModelCancel"
>
<template v-if="['bookingSpace', 'cutOff'].includes(modelType)">
<a-form :form="bookingModelFrom">
<a-row :gutter="16">
<a-col :span="12">
<a-form-item label="使用货代代码" :labelCol="{xs: { span: 24 }, sm: { span: 7 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入货代代码"
v-decorator="['code', { rules: [{ required: true, message: '请输入货代代码' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="货代称呼" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入货代称呼"
v-decorator="['code', { rules: [{ required: true, message: '请输入货代称呼' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="文件功能" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-radio-group v-decorator="['label']">
<a-radio :style="radioStyle" :value="1">
原始
</a-radio>
<a-radio :style="radioStyle" :value="2">
更新
</a-radio>
<a-radio :style="radioStyle" :value="3">
退舱
</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
</a-row>
</a-form>
<template slot="footer">
<a-button @click="handleModelCancel"></a-button>
<a-button type="primary" @click="handleModelSubmit">EDI</a-button>
<a-button type="primary" @click="handleModelUpLoad">EDT</a-button>
</template>
</template>
<template v-else-if="['initCabin', 'ladingBill', 'vgm'].includes(modelType)">
<a-form :form="initCabinFrom">
<a-row :gutter="16">
<div class="item-box">
<!-- to -->
<a-col :span="24">
<a-form-item label="TO" :labelCol="{xs: { span: 24 }, sm: { span: 2 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入内容"
v-decorator="['code', { rules: [{ required: true, message: '请输入内容' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="ATTN" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入ATTN"
v-decorator="['code', { rules: [{ required: true, message: '请输入ATTN' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="电话" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入电话"
v-decorator="['code', { rules: [{ required: true, message: '请输入电话' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="邮箱" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入邮箱"
v-decorator="['code', { rules: [{ required: true, message: '请输入邮箱' }] }]"
/>
</a-form-item>
</a-col>
<!-- from -->
<a-col :span="24">
<a-form-item label="FROM" :labelCol="{xs: { span: 24 }, sm: { span: 2 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入内容"
v-decorator="['code', { rules: [{ required: true, message: '请输入内容' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="ATTN" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入ATTN"
v-decorator="['code', { rules: [{ required: true, message: '请输入ATTN' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="电话" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入电话"
v-decorator="['code', { rules: [{ required: true, message: '请输入电话' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="邮箱" :labelCol="{xs: { span: 24 }, sm: { span: 5 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<a-input
placeholder="请输入邮箱"
v-decorator="['code', { rules: [{ required: true, message: '请输入邮箱' }] }]"
/>
</a-form-item>
</a-col>
</div>
<template v-if="modelType === 'initCabin'">
<div class="item-box">
<a-col :span="24">
<a-form-item label="提箱小票链接" :labelCol="{xs: { span: 24 }, sm: { span: 3 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<div class="box-flex">
<a-input
placeholder="请输入提箱小票链接"
v-decorator="['code', { rules: [{ required: true, message: '请输入提箱小票链接' }] }]"
/>
<span>复制</span>
</div>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="VGM链接" :labelCol="{xs: { span: 24 }, sm: { span: 3 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<div class="box-flex">
<a-input
placeholder="请输入VGM链接"
v-decorator="['code', { rules: [{ required: true, message: '请输入VGM链接' }] }]"
/>
<span>复制</span>
</div>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="SI&VGM链接" :labelCol="{xs: { span: 24 }, sm: { span: 3 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<div class="box-flex">
<a-input
placeholder="请输入SI&VGM链接"
v-decorator="['code', { rules: [{ required: true, message: '请输入SI&VGM链接' }] }]"
/>
<span>复制</span>
</div>
</a-form-item>
</a-col>
</div>
</template>
<template v-if="modelType === 'vgm'">
<div class="item-box">
<a-col :span="24">
<a-form-item label="VGM提交地址" :labelCol="{xs: { span: 24 }, sm: { span: 3 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<div class="box-flex">
<a-input
placeholder="请输入VGM提交地址"
v-decorator="['code', { rules: [{ required: true, message: '请输入VGM提交地址' }] }]"
/>
<span>复制</span>
</div>
</a-form-item>
</a-col>
</div>
<div class="item-box vgm-info">
<a-col :span="6">
<a-form-item label="主提单号" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="分提单号" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="船名航次" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="开船日期" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="截港时间" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="截单时间" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="截VGM时间" :labelCol="{xs: { span: 24 }, sm: { span: 4 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="装货港" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="卸货港" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="目的地" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="件重尺" :labelCol="{xs: { span: 24 }, sm: { span: 8 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
4234465464
</a-form-item>
</a-col>
</div>
<div class="item-box vgm-remarks">
<a-col :span="24">
<a-form-item label="备注" :labelCol="{xs: { span: 24 }, sm: { span: 3 }}" :wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }" has-feedback>
<div class="box-flex">
<a-input
placeholder="请输入备注"
v-decorator="['code', { rules: [{ required: true, message: '请输入备注' }] }]"
/>
</div>
</a-form-item>
</a-col>
</div>
</template>
</a-row>
</a-form>
<template slot="footer">
<a-button >保存</a-button>
<a-button type="primary">发送</a-button>
<a-button type="primary">删除</a-button>
</template>
</template>
</a-modal>
<!-- 弹窗部分 end -->
</div>
</template>
<script>
import { XCard } from '@/components'
export default {
components: {
XCard,
},
data() {
return {}
return {
modelType: '',
bookingModelvisible: false,
bookingModelconfirm: false,
//
bookingModelFrom: this.$form.createForm(this),
radioStyle: {
display: 'block',
height: '30px',
lineHeight: '30px'
},
//
initCabinFrom: this.$form.createForm(this)
}
},
methods: {
refreshPage () {
this.$emit('refresh')
},
openModel(type) {
if (['bookingSpace', 'cutOff', 'initCabin', 'ladingBill', 'vgm'].includes(type)) {
// /
this.modelType = type
this.bookingModelvisible = true
} else if (['vgm', 'paper'].includes(type)) {
this.openDialog(type)
}
},
emnuHeader(type) {
let title = ''
switch (type) {
case 'bookingSpace':
title = '订舱'
break
case 'cutOff':
title = '截单'
break
case 'initCabin':
title = '放舱'
break
case 'ladingBill':
title = '样单'
break
case 'vgm':
title = 'vgm链接'
break
}
return title
},
// /
handleModelSubmit () {
// EDI
this.handleModelCancel()
},
handleModelCancel () {
this.modelType = ''
this.bookingModelvisible = false
},
handleModelUpLoad () {
// EDI
this.handleModelCancel()
},
// vgm /
openDialog (type) {
let content = null
if (type === 'vgm') {
content = h => <div>确认发送VGM吗?</div>
} else if (type === 'paper') {
content = h => <div>确认发送下货纸吗?</div>
}
this.$confirm({
title: '温馨提示',
content: content,
onOk() {
console.log('OK');
},
onCancel() {
console.log('Cancel');
},
class: 'test'
});
},
// TAB
openTab (type) {
this.$emit('openTab', { type: type })
}
},
methods: {},
}
</script>
<style lang="less" scoped>
@import url('../index.less');
.operation-area {
width: 100%;
text-align: left;
@ -137,4 +475,29 @@ export default {
}
}
}
.box-flex{
display: flex;
padding-top: 8px;
span{
display: inline-block;
width: 60px;
text-align: right;
height: 32px;
line-height: 32px;
font-size: 13px;
color: @primary-color;
cursor: pointer;
}
}
.item-box{
margin-bottom: 20px;
padding-bottom: 20px;
padding-top: 20px;
overflow: hidden;
border-bottom: 1px dashed #ccc;
&:nth-last-of-type(1){
border: none;
margin-bottom: 0;
}
}
</style>

@ -18,7 +18,7 @@
<template v-for="(formLabel, findex) in formData">
<a-col :md="6" :sm="24" :key="findex" v-if="(findex<2 && !advanced) || advanced">
<a-form-item :label="formLabel.title">
<formLabel :labelData="formLabel" @change="formChange"></formLabel>
<formLabel :labelData="formLabel" @change="formChange" :formRes="formRes"></formLabel>
</a-form-item>
</a-col>
</template>
@ -51,12 +51,15 @@
<span class="tab-btn" @click="tableRefresh">
<a-icon type="redo" :style="{ fontSize: '16px' }" /> 刷新
</span>
<a-popover placement="bottom" v-model="setVisible" trigger="click">
<span class="tab-btn" @click="tableHeaderEdit">
<a-icon type="setting" :style="{ fontSize: '16px' }" /> 设置
</span>
<!-- <a-popover placement="bottom" v-model="setVisible" trigger="click">
<template #content>
<columnSetting :columns="showColumns" @columnChange="columnChange"></columnSetting>
</template>
<span class="tab-btn"> <a-icon type="setting" :style="{ fontSize: '16px' }" /> 设置 </span>
</a-popover>
</a-popover> -->
</div>
</template>
</vxe-toolbar>
@ -72,10 +75,10 @@
<a-modal title="新增船公司" :width="300" :visible="addVisible" @ok="addSubmit" @cancel="addCancel">
<a-radio-group v-model="carrierRadio">
<a-radio :style="radioStyle" value="CMA"> CMA </a-radio>
<a-radio :style="radioStyle" value="ONE"> ONE </a-radio>
<a-radio :style="radioStyle" value="ESL"> ESL </a-radio>
<a-radio :style="radioStyle" value="MAC"> MAC </a-radio>
<a-radio :style="radioStyle" value="CMA"> <img class="radio-logo" src="@/assets/cma.png" /> CMA </a-radio>
<a-radio :style="radioStyle" value="ONE"> <img class="radio-logo" src="@/assets/cma.png" /> ONE </a-radio>
<a-radio :style="radioStyle" value="ESL"> <img class="radio-logo" src="@/assets/cma.png" /> ESL </a-radio>
<a-radio :style="radioStyle" value="MAC"> <img class="radio-logo" src="@/assets/cma.png" /> MAC </a-radio>
</a-radio-group>
</a-modal>
@ -86,6 +89,8 @@
</a-modal>
<setFormModel ref="setForm" :formData="formData" :formAllData="formMoreData" @ok="submitForm" v-if="formMoreData"></setFormModel>
<setFormModel ref="setTableForm" :formData="formTableData" :formAllData="formMoreTableData" @ok="submitTableForm" v-if="formMoreTableData"></setFormModel>
</div>
</template>
<script>
@ -96,7 +101,7 @@ import formLabel from './modules/formLabel'
import initData from './modules/initData'
import {
DjyUserConfigGet,
DjyUserConfigPage,
// DjyUserConfigPage,
DjyUserConfigAdd
} from '@/api/modular/main/DjyUserConfig'
@ -156,6 +161,9 @@ export default {
parentField: 'parentId',
},
},
//
formTableData: JSON.parse(JSON.stringify(initData.columns)),
formMoreTableData: null,
//
addVisible: false,
carrierRadio: '',
@ -174,6 +182,7 @@ export default {
this.formAllData = JSON.parse(JSON.stringify(initData.condAllData))
this.getList()
this.getFormData()
this.getTableList()
},
methods: {
init(queryParam = {}) {
@ -186,6 +195,7 @@ export default {
this.gridOptions.data = []
this.getList(queryParam)
this.getFormData()
this.getTableList()
},
getFormData() {
@ -219,8 +229,25 @@ export default {
this.$set(this.formRes, item.label, '')
})
console.log('=== 当前数据 ===', this.formRes, this.formData, this.formMoreData)
this.formBtnCol = 24 - (this.formData.length % 4 * 6)
const len = this.formData.length % 4
if (len > 2) {
this.formBtnCol = 24
} else {
this.formBtnCol = 24 - (len * 6)
}
})
},
getTableList () {
const nowTableArr = this.formTableData.map((item, index) => {
return item.field
})
const moreTableArr = []
this.formAllData.map((item, index) => {
if (!nowTableArr.includes(item.label)) {
moreTableArr.push(item)
}
})
this.formMoreTableData = moreTableArr
},
handlePageChange({ currentPage, pageSize }) {
console.log(currentPage, pageSize)
@ -237,16 +264,13 @@ export default {
this.init(this.formRes)
},
tableMoreRefresh() {
const {
form: { validateFields },
} = this
validateFields((err, values) => {
if (!err) {
const arr = values.MBLNO.split(',')
console.log(arr)
this.moreNumVal = arr
}
const arr = this.formRes.MBLNO.split(/-||,|[.]/)
let val = ``
arr.map((item, index) => {
val += `${item}
`
})
this.moreNumVal = val
this.moreNumVisible = !this.moreNumVisible
},
@ -286,7 +310,6 @@ export default {
type: 'booking_list_cond',
configJson: JSON.stringify(arr)
}).then(res => {
console.log(res)
this.$message.success('保存成功')
this.$refs.setForm.handleCancel()
this.init()
@ -305,10 +328,24 @@ export default {
//
}
console.log(this.formRes)
this.$forceUpdate()
},
// table
///
tableHeaderEdit () {
this.$refs.setTableForm.open()
},
submitTableForm (data) {
this.formTableData = data
const arr = data.map((item, index) => {
return item.label
})
console.log(arr)
debugger
},
columnChange(data) {
const arr = []
data.map((item, index) => {
@ -371,7 +408,8 @@ export default {
//
moreNumSubmit() {
console.log('刷新')
this.formRes.MBLNO = this.moreNumVal.replace(/\n|\r/g, ',')
this.$forceUpdate()
this.moreNumCancel()
},
moreNumCancel() {
@ -493,4 +531,10 @@ export default {
.table {
margin: 8px auto 20px;
}
.radio-logo{
width: 16px;
height: 16px;
display: inline-block;
}
</style>

@ -2,6 +2,7 @@
<div class="from-label">
<template v-if="labelData.type == 'input'">
<a-input
v-model="value"
:placeholder="`请输入${labelData.title}`"
@change="changeInput"
/>
@ -38,14 +39,31 @@ export default {
props: {
labelData: {
type: Object,
required: true,
required: true
},
// eslint-disable-next-line vue/require-default-prop
fromRes: {
type: Object,
required: false
}
},
watch: {
fromRes: {
handler(nval, oval) {
console.log('编辑结果发生变化', nval, oval)
if (Object.keys(nval).length > 0 && nval && oval) {
this.value = nval[this.labelData.type]
debugger
}
},
deep: true
}
},
data() {
return {
value: '',
}
},
watch: {},
mounted() {},
methods: {
changeInput(e) {

@ -1,226 +0,0 @@
<template>
<a-modal
title="表单自定义"
:width="900"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel">
<a-spin :spinning="formLoading">
<div class="basic-from">
<div class="title">
<span class="left"></span>
<span class="right">我的数据列</span>
<span class="tip">拖动数据列进行排序</span>
</div>
<div class="label-box">
<draggable
v-model="fromLabel"
animation="300"
dragClass="dragClass"
ghostClass="ghostClass"
chosenClass="chosenClass"
@start="onStart"
@end="emitFromChange"
>
<transition-group>
<div class="label" v-for="(item, index) in fromLabel" :key="index">
<span>{{ item.title }}</span>
<i class="iconfont icon-shanchu1" @click="removeFrom(item,index)"></i>
</div>
</transition-group>
</draggable>
<div class="no-data" v-if="fromLabel.length == 0">
<i class="iconfont icon-wushuju"></i>
<div class="no-text">请添加数据列</div>
</div>
</div>
</div>
<div class="basic-from">
<div class="title">
<span class="left"></span>
<span class="right">全部数据列</span>
</div>
<div class="label-box all-label">
<div class="label" v-for="(item, index) in fromAllLabel" :key="index">
<span>{{ item.title }}</span>
<i class="iconfont icon-icon_tianjia" @click="addFrom(item, index)"></i>
</div>
<div class="no-data" v-if="fromAllLabel.length == 0">
<i class="iconfont icon-meiyoudingdan"></i>
<div class="no-text">没有更多数据了</div>
</div>
</div>
</div>
</a-spin>
</a-modal>
</template>
<script>
import draggable from 'vuedraggable'
export default {
props: {
fromData: {
type: Array,
default: () => {
return []
}
},
fromAllData: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
visible: false,
confirmLoading: false,
formLoading: true,
fromLabel: [],
fromAllLabel: []
}
},
components: {
draggable
},
watch: {},
mounted() {
this.fromLabel = JSON.parse(JSON.stringify(this.fromData))
this.fromAllLabel = JSON.parse(JSON.stringify(this.fromAllData))
},
methods: {
open() {
this.visible = true
this.formLoading = false
},
handleSubmit() {
this.confirmLoading = true
setTimeout(() => {
this.confirmLoading = false
this.$emit('ok', this.fromLabel)
}, 1000)
},
handleCancel() {
this.visible = false
},
addFrom (item, index) {
this.fromLabel.push(item)
this.fromAllLabel.splice(index, 1)
},
removeFrom (item, index) {
this.fromAllLabel.push(item)
this.fromLabel.splice(index, 1)
},
emitFromChange() {
console.log('拖动结束', this.fromLabel)
},
onStart() {}
}
}
</script>
<style lang="less" scoped>
.basic-from {
margin-bottom: 24px;
.title {
height: 50px;
line-height: 40px;
// border-bottom: 1px solid #eee;
margin-bottom: 14px;
.left {
display: inline-block;
width: 4px;
height: 24px;
background: #409eff;
margin-top: 10px;
margin-right: 10px;
vertical-align: top;
}
.right {
vertical-align: top;
font-weight: 600;
font-size: 18px;
}
.tip{
margin-left: 15px;
font-size: 13px;
color: #999;
margin-top: 2px;
display: inline-block;
vertical-align: top;
}
}
.label-box {
padding-left: 10px;
// max-height: 300px;
// overflow: auto;
.label {
display: inline-block;
padding-left: 14px;
height: 32px;
line-height: 30px;
border-radius: 4px;
border: 1px dashed #ccc;
margin-right: 10px;
margin-bottom: 10px;
cursor: pointer;
&:hover {
box-shadow: 0 0 6px #ccc;
}
span {
display: inline-block;
vertical-align: top;
max-width: 150px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
i {
display: inline-block;
vertical-align: top;
height: 30px;
line-height: 30px;
width: 30px;
text-align: center;
cursor: pointer;
margin-left: 8px;
margin-right: 4px;
}
}
.no-data{
text-align: center;
color: #999;
.iconfont{
font-size: 60px;
line-height: 90px;
}
.no-text{
font-size: 16px;
line-height: 32px;
}
}
.ghostClass {
// background-color: blue !important;
}
.chosenClass {
// background-color: red !important;
// opacity: 1 !important;
}
.dragClass {
// background-color: blueviolet !important;
// opacity: 1 !important;
// box-shadow: none !important;
// outline: none !important;
// background-image: none !important;
}
}
.all-label {
.label {
border: 1px solid #f4f4f4;
background: #f4f4f4;
}
}
}
</style>
Loading…
Cancel
Save