订舱详情页

dev
lilu 2 years ago
parent 2ab8e73081
commit 4895741ae0

@ -11,7 +11,7 @@
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
<% } %>
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_3756681_jsbrcia9ncm.css">
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_3756681_2z59jpzmild.css">
<!-- 1.8K仔百度收录 -->
<meta name="baidu-site-verification" content="code-QVfBYJ5laQ" />
</head>

@ -249,3 +249,193 @@ export function BookingOrderPage (parameter) {
params: parameter
})
}
/**
* 更新订舱
*/
export function BookingOrderUpdate (parameter) {
return axios({
url: '/BookingOrder/Update',
method: 'post',
data: parameter
})
}
/**
* 新增订舱
*/
export function BookingOrderAdd (parameter) {
return axios({
url: '/BookingOrder/Add',
method: 'post',
data: parameter
})
}
/**
* 增加订舱模板
*/
export function BookingTemplateAdd (parameter) {
return axios({
url: '/BookingTemplate/add',
method: 'post',
data: parameter
})
}
/**
* 签单方式
* @params name
*/
export function Codeissuetypelist (parameter) {
return axios({
url: '/commondb/codeissuetypelist',
method: 'get',
params: parameter
})
}
/**
* 引入场站数据
* @params bookingId
* @params isWeb
*/
export function GetYardData (parameter) {
return axios({
url: '/BookingOrder/GetYardData',
method: 'get',
params: parameter
})
}
/**
* 发送订舱截单EDI
*/
export function SendBookingOrClosingEDI (parameter) {
return axios({
url: '/BookingOrder/SendBookingOrClosingEDI',
method: 'post',
data: parameter
})
}
/**
* 发送下货纸
*/
export function SendXHZ (parameter) {
return axios({
url: '/BookingOrder/SendXHZ',
method: 'post',
data: parameter
})
}
/**
* 直发VGM
*/
export function VgmSend (parameter) {
return axios({
url: '/BookingOrder/VgmSend',
method: 'post',
data: parameter
})
}
/**
* 获取放舱信息
*/
export function LetterYard (parameter) {
return axios({
url: '/BookingOrder/LetterYard',
method: 'get',
params: parameter
})
}
/**
* 保存新增或修改放舱
*/
export function SaveBookingLetteryard (parameter) {
return axios({
url: '/BookingLetteryard/Save',
method: 'post',
data: parameter
})
}
/**
* 放舱发送
*/
export function SendLetterYard (parameter) {
return axios({
url: '/BookingLetteryard/SendLetterYard',
method: 'post',
data: parameter
})
}
/**
* 样单
*/
export function SampleBill (parameter) {
return axios({
url: '/BookingOrder/SampleBill',
method: 'get',
params: parameter
})
}
/**
* 保存新增或修改样单
*/
export function SaveBookingSampleBill (parameter) {
return axios({
url: '/BookingSampleBill/Save',
method: 'post',
data: parameter
})
}
/**
* 获取VGMVGM SI链接
*/
export function VgmLink (parameter) {
return axios({
url: '/BookingOrder/VgmLink',
method: 'get',
params: parameter
})
}
/**
* 获取样单pdf
*/
export function SampleBillPdf (parameter) {
return axios({
url: '/BookingOrder/SampleBillPdf',
method: 'get',
params: parameter
})
}
/**
* 获取提箱小票链接
*/
export function TxxpLink (parameter) {
return axios({
url: '/BookingOrder/TxxpLink',
method: 'get',
params: parameter
})
}
/**
* 校验
*/
export function ExcuteRulesOceanBooking (parameter) {
return axios({
url: '/RulesEngineClient/ExcuteRulesOceanBooking',
method: 'get',
params: parameter
})
}

@ -129,7 +129,11 @@ export default {
watch: {
details: {
handler (nval, oval) {
console.log('数据改变', nval)
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'ediMore'
})
},
deep: true
},

@ -0,0 +1,220 @@
<template>
<div class="booking-detail">
<a-row :gutter="24">
<a-col :span="5">
<div class="sed-order-list">
<div class="sed-order-title"><i class="iconfont icon-liebiao"></i> 分提单列表</div>
<div class="sec-order">
<div class="sed-order-label active"><i class="iconfont icon-dingdan"></i> 分单1: QE1234567</div>
<div class="sed-order-label" v-for="i in 10"><i class="iconfont icon-dingdan"></i> 1: QE1234567</div>
<div class="sed-order-btn"><i class="iconfont icon-jiahao2fill"></i>添加分单</div>
</div>
</div>
</a-col>
<a-col :span="19">
<template v-if="!inPageLoading">
<div class="order-title"><i class="iconfont icon-liebiao1"></i> 当前分单号 1234567</div>
<operationArea :details="secOrderetails" @refresh="refreshPage" @save="saveFun"></operationArea>
<a-tabs type="card">
<a-tab-pane key="1" tab="基础信息">
<div class="pane-box">
<!-- 基本信息 -->
<basicInfo :type="type" :details="secOrderetails" @changeDetail="changeDetailFun"></basicInfo>
<!-- 收发通信息 -->
<mailingInfo :details="secOrderetails" @changeDetail="changeDetailFun"></mailingInfo>
<!-- 货物信息 -->
<cargoInfo :details="secOrderetails" @changeDetail="changeDetailFun"></cargoInfo>
<!-- 签单信息 -->
<billInfo :details="secOrderetails" @changeDetail="changeDetailFun"></billInfo>
<!-- 备注信息 -->
<remarksInfo :details="secOrderetails" @changeDetail="changeDetailFun"></remarksInfo>
<!-- 箱型 -->
<goodsTable :details="secOrderetails" @changeDetail="changeDetailFun"></goodsTable>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="EDI补充信息">
<ediMore
class="pane-box"
:details="secOrderetails"
@changeDetail="changeDetailFun"
v-if="!inPageLoading"
></ediMore>
</a-tab-pane>
</a-tabs>
</template>
</a-col>
</a-row>
</div>
</template>
<script>
import operationArea from '../modules/operationArea'
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'
import basicItem from './basicItem'
import ediMore from './ediMore'
export default {
name: 'SedOrder',
props: {
secOrderetails: {
type: Object,
default: () => {
return {}
},
},
},
components: {
operationArea,
basicInfo,
mailingInfo,
cargoInfo,
billInfo,
remarksInfo,
goodsTable,
basicItem,
ediMore,
},
data() {
return {
type: this.$route.query.type,
id: this.$route.query.id,
inPageLoading: false
}
},
watch: { },
created() {
},
methods: {
changeDetailFun (data) {
const { detail, type } = data
// this.secOrderetails = detail
},
//
refreshPage() {
// this.init()
},
saveFun () {
// if (this.id) {
// this.bookingOrderUpdate()
// } else {
// this.bookingOrderAdd()
// }
}
},
}
</script>
<style lang="less">
@import url('../index.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;
}
}
.booking-detail {
padding-bottom: 60px;
}
.pane-box {
margin-top: -17px;
min-height: 200px;
// background: #ffffff;
}
.sed-order-list{
background: #fff;
box-shadow: 0 0 10px #eee;
padding: 10px 20px;
// height: 100%;
height: calc(100vh - 240px);
display: flex;
flex-direction: column;
.sed-order-title{
height: 50px;
line-height: 50px;
font-weight: 600;
font-size: 14px;
border-bottom: 1px solid #eee;
margin-bottom: 10px;
i{
font-size: 18px;
line-height: 50px;
display: inline-block;
vertical-align: top;
margin-right: 6px;
}
}
.sed-order-label{
height: 40px;
line-height: 40px;
color: #999;
font-size: 14px;
text-align: left;
overflow: hidden;
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
// display: flex;
}
.active{
color: @primary-color;
}
.sed-order-btn{
margin: 20px auto;
width: 80%;
height: 40px;
line-height: 40px;
border-radius: 4px;
border: 1px solid @primary-color;
color: @primary-color;
text-align: center;
cursor: pointer;
i{
margin-right: 10px;
font-size: 16px;
}
&:hover{
background: @primary-color;
color: #fff;
}
}
}
.sec-order{
flex: 1;
overflow: auto;
&::-webkit-scrollbar {
display: none;
}
}
.order-title{
height: 50px;
line-height: 50px;
font-size: 14px;
font-weight: 600;
color: #666;
padding: 0 20px;
margin-bottom: 10px;
background: #fff;
i{
margin-right: 4px;
display: inline-block;
vertical-align: top;
}
}
</style>

@ -1,41 +1,41 @@
<template>
<div class="booking-detail">
<a-tabs size="small">
<a-tabs size="large" :tabBarStyle="tabBarStyle">
<a-tab-pane key="1" tab="主单信息">
<a-row :gutter="24">
<a-col :span="18">
<template v-if="!inPageLoading">
<operationArea @refresh="refreshPage"></operationArea>
<operationArea :details="bookingDetails" @refresh="refreshPage" @save="saveFun"></operationArea>
<a-tabs type="card">
<a-tab-pane key="1" tab="基础信息">
<div class="pane-box">
<!-- 基本信息 -->
<basicInfo :type="type" :details="bookingDetails"></basicInfo>
<basicInfo :type="type" :details="bookingDetails" @changeDetail="changeDetailFun"></basicInfo>
<!-- 收发通信息 -->
<mailingInfo :details="bookingDetails"></mailingInfo>
<mailingInfo :details="bookingDetails" @changeDetail="changeDetailFun"></mailingInfo>
<!-- 货物信息 -->
<cargoInfo :details="bookingDetails"></cargoInfo>
<cargoInfo :details="bookingDetails" @changeDetail="changeDetailFun"></cargoInfo>
<!-- 签单信息 -->
<billInfo :details="bookingDetails"></billInfo>
<billInfo :details="bookingDetails" @changeDetail="changeDetailFun"></billInfo>
<!-- 备注信息 -->
<remarksInfo :details="bookingDetails"></remarksInfo>
<remarksInfo :details="bookingDetails" @changeDetail="changeDetailFun"></remarksInfo>
<!-- 箱型 -->
<goodsTable :details="bookingDetails"></goodsTable>
<goodsTable :details="bookingDetails" @changeDetail="changeDetailFun"></goodsTable>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="EDI补充信息">
<ediMore class="pane-box" :details="bookingDetails" v-if="!inPageLoading"></ediMore>
<ediMore class="pane-box" :details="bookingDetails" @changeDetail="changeDetailFun" v-if="!inPageLoading"></ediMore>
</a-tab-pane>
</a-tabs>
</template>
</a-col>
<a-col :span="6">
<rightContent :id="id" :details="bookingDetails" v-if="!inPageLoading"></rightContent>
<rightContent :id="id" :details="bookingDetails" @changeDetail="changeDetailFun" v-if="!inPageLoading"></rightContent>
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="2" tab="分单信息">
<div class="content">分单信息</div>
<sedOrder :secOrderetails="bookingDetails"></sedOrder>
</a-tab-pane>
</a-tabs>
</div>
@ -51,9 +51,9 @@ 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'
import sedOrder from './components/sedOrder'
import { BookingOrderGet } from '@/api/modular/main/BookingLedger'
import { BookingOrderGet, BookingOrderUpdate, BookingOrderAdd } from '@/api/modular/main/BookingLedger'
export default {
name: 'BookingDetail',
@ -68,25 +68,40 @@ export default {
rightContent,
basicItem,
ediMore,
teamItem,
sedOrder
},
data() {
return {
type: this.$route.query.type,
id: this.$route.query.id,
inPageLoading: false,
bookingDetails: {}
bookingDetails: {},
tabBarStyle: {
background: '#fff',
padding: '0 20px'
}
}
},
watch: {
bookingDetails: {
handler (nval, oval) {
console.log('父级 -- 数据改变', nval)
},
deep: true
},
'$route': 'init'
},
created() {
this.init()
console.log(this.type)
},
methods: {
init() {
this.bookingDetails = {}
this.id = this.$route.query.id
if (this.id) {
this.getDetail()
} else {
this.bookingDetails = {}
}
},
@ -97,12 +112,10 @@ export default {
id: this.id
})
.then((res) => {
console.log(res)
this.inPageLoading = false
this.$message.destroy()
this.$message.success({ content: '加载完成' })
this.$set(this, 'bookingDetails', res.data)
console.log('获取详情', this.bookingDetails)
this.$forceUpdate()
})
.catch((err) => {
@ -110,9 +123,54 @@ export default {
})
},
changeDetailFun (data) {
const { detail, type } = data
this.bookingDetails = detail
},
bookingOrderUpdate () {
console.log('保存', this.bookingDetails)
BookingOrderUpdate(this.bookingDetails)
.then((res) => {
if (res.success) {
this.$message.success('保存成功')
this.init()
this.$forceUpdate()
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
bookingOrderAdd () {
BookingOrderAdd(this.bookingDetails)
.then((res) => {
if (res.success) {
this.$message.success('保存成功')
this.init()
this.$forceUpdate()
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
//
refreshPage() {
this.init()
},
saveFun () {
if (this.id) {
this.bookingOrderUpdate()
} else {
this.bookingOrderAdd()
}
}
}
}

@ -39,26 +39,17 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入订舱代理!"
v-model="details.forwarder"
/>
<a-input placeholder="请输入订舱代理!" v-model="details.forwarder" />
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="PO NO" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入PO NO"
v-model="details.pono"
/>
<a-input placeholder="请输入PO NO" v-model="details.pono" />
</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-model="details.mblno"
/>
<a-input placeholder="请输入提单号!" v-model="details.mblno" />
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
@ -69,10 +60,7 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入分提单号!"
v-model="details.hblno"
/>
<a-input placeholder="请输入分提单号!" v-model="details.hblno" />
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
@ -83,29 +71,20 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入订舱编号!"
v-model="details.bookingno"
/>
<a-input placeholder="请输入订舱编号!" v-model="details.bookingno" />
</a-form-item>
</a-col>
<template v-if="type === 'CMA' || type === 'MSC'">
<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-model="details.contractno"
/>
<a-input placeholder="请输入约号!" v-model="details.contractno" />
</a-form-item>
</a-col>
</template>
<template v-else-if="type === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="EP号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入EP号"
v-model="details.contractno"
/>
<a-input placeholder="请输入EP号" v-model="details.contractno" />
</a-form-item>
</a-col>
</template>
@ -132,10 +111,7 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
v-model="details.voyno"
placeholder="请输入海关航次!"
/>
<a-input v-model="details.voyno" placeholder="请输入海关航次!" />
</a-form-item>
</a-col>
<template v-if="type === 'CMA' || type === 'MSC'">
@ -167,10 +143,7 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入航线代码!"
v-model="details.lanecode"
/>
<a-input placeholder="请输入航线代码!" v-model="details.lanecode" />
</a-form-item>
</a-col>
</template>
@ -188,8 +161,9 @@
format="YYYY-MM-DD HH:mm:ss"
placeholder="开船日期"
v-model="details.etd"
@change="changeEtd"
/>
<span class="week">W27</span>
<span class="week">W{{ etdWeek || '--' }}</span>
</div>
</a-form-item>
</a-col>
@ -227,10 +201,7 @@
</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-model="details.shipagency"
/>
<a-input placeholder="请输入船代!" v-model="details.shipagency" />
</a-form-item>
</a-col>
<template v-if="type === 'ESL'">
@ -242,10 +213,7 @@
:wrapperCol="wrapperCol"
has-feedback
>
<a-input
placeholder="请输入约号!"
v-model="details.contractno"
/>
<a-input placeholder="请输入约号!" v-model="details.contractno" />
</a-form-item>
</a-col>
</template>
@ -374,8 +342,8 @@ export default {
type: Object,
default: () => {
return {}
}
}
},
},
},
data() {
return {
@ -435,84 +403,94 @@ export default {
title: '',
width: 50,
operationColumn: true,
align: 'center'
align: 'center',
},
{ field: 'col1', key: 'col1', title: '联系人', edit: true },
{ field: 'col2', key: 'col2', title: '邮箱', edit: true },
{ field: 'col3', key: 'col3', title: '电话', edit: true },
{ field: 'col4', key: 'col4', title: '备注', edit: true },
{ field: 'col5',
{
field: 'col5',
key: 'col5',
title: 'BC',
width: '7%',
renderBodyCell: ({ row, column, rowIndex }, h) => {
return (
<a-checkbox value={row['BC']} on-change={(val) => {
console.log(val)
}} />
<a-checkbox
value={row['BC']}
on-change={(val) => {
console.log(val)
}}
/>
)
}
},
},
{ field: 'col6',
{
field: 'col6',
key: 'col6',
title: '提单',
width: '7%',
renderBodyCell: ({ row, column, rowIndex }, h) => {
return (
<a-checkbox value={row['col6']} on-change={(val) => {
console.log(val)
}} />
<a-checkbox
value={row['col6']}
on-change={(val) => {
console.log(val)
}}
/>
)
}
},
},
{ field: 'col7',
{
field: 'col7',
key: 'col7',
title: '账单',
width: '7%',
renderBodyCell: ({ row, column, rowIndex }, h) => {
return (
<a-checkbox value={row['col7']} on-change={(val) => {
console.log(val)
}} />
<a-checkbox
value={row['col7']}
on-change={(val) => {
console.log(val)
}}
/>
)
}
}
},
},
],
tableData: []
tableData: [],
etdWeek: '',
// / - end
}
},
computed: {
customerDataArr () {
customerDataArr() {
if (this.customerData) {
const arr = []
this.customerData.map((item, index) => {
if (!arr.includes(item.fullName)) {
arr.push(item.fullName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
}
},
carrierDataArr () {
carrierDataArr() {
if (this.carrierData) {
const arr = []
this.carrierData.map((item, index) => {
if (!arr.includes(item.fullName)) {
arr.push(item.fullName)
if (!arr.includes(item.cnName)) {
arr.push(item.cnName)
}
})
console.log(arr)
return arr
} else {
return []
}
},
vesselDataArr () {
vesselDataArr() {
if (this.vesselData) {
const arr = []
this.vesselData.map((item, index) => {
@ -520,13 +498,12 @@ export default {
arr.push(item.fullName)
}
})
console.log(arr)
return arr
} else {
return []
}
},
voynoinnerDataArr () {
voynoinnerDataArr() {
if (this.voynoinnerData) {
const arr = []
this.voynoinnerData.map((item, index) => {
@ -534,13 +511,12 @@ export default {
arr.push(item.fullName)
}
})
console.log(arr)
return arr
} else {
return []
}
},
lanenameDataArr () {
lanenameDataArr() {
if (this.lanenameData) {
const arr = []
this.lanenameData.map((item, index) => {
@ -548,13 +524,12 @@ export default {
arr.push(item.fullName)
}
})
console.log(arr)
return arr
} else {
return []
}
},
saleUserListArr () {
saleUserListArr() {
if (this.saleUserList) {
const arr = []
this.saleUserList.map((item, index) => {
@ -562,13 +537,12 @@ export default {
arr.push(item.name)
}
})
console.log(arr)
return arr
} else {
return []
}
},
opUserListArr () {
opUserListArr() {
if (this.opUserList) {
const arr = []
this.opUserList.map((item, index) => {
@ -576,13 +550,12 @@ export default {
arr.push(item.name)
}
})
console.log(arr)
return arr
} else {
return []
}
},
docUserListArr () {
docUserListArr() {
if (this.docUserList) {
const arr = []
this.docUserList.map((item, index) => {
@ -590,13 +563,12 @@ export default {
arr.push(item.name)
}
})
console.log(arr)
return arr
} else {
return []
}
},
custserviceUserListArr () {
custserviceUserListArr() {
if (this.custserviceUserList) {
const arr = []
this.custserviceUserList.map((item, index) => {
@ -604,27 +576,29 @@ export default {
arr.push(item.name)
}
})
console.log(arr)
return arr
} else {
return []
}
}
},
},
watch: {
details: {
handler (nval, oval) {
console.log('数据改变', nval)
handler(nval, oval) {
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'baseInfo',
})
},
deep: true
}
deep: true,
},
},
created() {
this.init()
},
methods: {
init () {
this.initTableData()
init() {
this.getCustomer()
this.getCarrier()
this.getVessel()
@ -635,29 +609,27 @@ export default {
this.getUserList('op')
this.getUserList('doc')
this.getUserList('custservice')
this.etdWeek = this.getWeek(this.details.etd)
},
// - start
getCustomer (name = '') {
getCustomer(name = '') {
DjyCustomerpage({
ShortName: name
})
.then((res) => {
if (res.code === 200) {
this.customerData = res.data.rows
console.log('==== 客户 ====', this.customerData, this.customerDataArr)
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
ShortName: name,
})
.then((res) => {
if (res.code === 200) {
this.customerData = res.data.rows
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
})
},
customerSelect (value) {
console.log('选择', value)
customerSelect(value) {
this.details.customername = value
},
customerChange(value) {
console.log('onChange', value);
this.getCustomer(value)
},
// - end
@ -665,25 +637,24 @@ export default {
// - start
getCarrier(name = '') {
GetCarrierlist({
CnName: name
})
.then((res) => {
if (res.code === 200) {
this.carrierData = res.data.rows
console.log('==== 船公司 ====', this.carrierData, this.carrierDataArr)
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
CnName: name,
})
.then((res) => {
if (res.code === 200) {
this.carrierData = res.data
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
})
},
carrierSelect (value) {
console.log('选择', value)
carrierSelect(value) {
const index = this.carrierDataArr.indexOf(value)
this.details.carrier = value
this.details.carrierid = this.carrierData[index].gid
},
carrierChange(value) {
console.log('onChange', value);
this.getCarrier(value)
},
// - end
@ -691,125 +662,119 @@ export default {
// - start
getVessel(name = '') {
GetVessellist({
Name: name
})
.then((res) => {
if (res.code === 200) {
this.vesselData = res.data.rows
console.log('==== 船名 ====', this.vesselData, this.vesselDataArr)
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
Name: name,
})
.then((res) => {
if (res.code === 200) {
this.vesselData = res.data
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
})
},
vesselSelect (value) {
console.log('选择', value)
vesselSelect(value) {
this.details.vessel = value
const index = this.vesselDataArr.indexOf(value)
this.details.vesselid = this.vesselData[index].gid
},
vesselChange (value) {
console.log('onChange', value);
vesselChange(value) {
this.getVessel(value)
},
// - end
// - start
getVoynoinner (name = '') {
getVoynoinner(name = '') {
console.log('暂无接口', name, this.voynoinnerData, this.voynoinnerDataArr)
},
voynoinnerSelect (value) {
console.log('选择', value)
voynoinnerSelect(value) {
this.details.voynoinner = value
},
voynoinnerChange (value) {
console.log('onChange', value);
voynoinnerChange(value) {
this.getVoynoinner(value)
},
// - end
// 线 - start
getLanename (name = '') {
getLanename(name = '') {
console.log('暂无接口', name, this.lanenameData, this.lanenameDataArr)
},
lanenameSelect (value) {
console.log('选择', value)
lanenameSelect(value) {
this.details.lanename = value
const index = this.lanenameDataArr.indexOf(value)
this.details.lanecode = this.lanenameData[index].code
},
lanenameChange (value) {
console.log('onChange', value);
lanenameChange(value) {
this.getLanename(value)
},
// 线 - end
// - start
getUserList (name = '', type) {
getUserList(name = '', type) {
GetSysUserPage({
SearchValue: name
SearchValue: name,
})
.then((res) => {
if (res.code === 200) {
console.log('获取团队成员', res)
if (type === 'sale') {
this.saleUserList = res.data.rows
} else if (type === 'op') {
this.opUserList = res.data.rows
} else if (type === 'doc') {
this.docUserList = res.data.rows
} else if (type === 'custservice') {
this.custserviceUserList = res.data.rows
.then((res) => {
if (res.code === 200) {
if (type === 'sale') {
this.saleUserList = res.data.rows
} else if (type === 'op') {
this.opUserList = res.data.rows
} else if (type === 'doc') {
this.docUserList = res.data.rows
} else if (type === 'custservice') {
this.custserviceUserList = res.data.rows
}
}
// console.log('==== ====', this.saleUserList, this.saleUserListArr)
}
})
.catch((err) => {
console.log(err)
})
})
.catch((err) => {
console.log(err)
})
},
//
saleSelect (value) {
console.log('选择', value)
saleSelect(value) {
this.details.sale = value
const index = this.saleUserListArr.indexOf(value)
this.details.saleid = this.saleUserList[index].id
},
saleChange (value) {
console.log('onChange', value);
saleChange(value) {
this.getUserList(value, 'sale')
},
//
opSelect (value) {
console.log('选择', value)
opSelect(value) {
this.details.op = value
const index = this.opUserListArr.indexOf(value)
this.details.opid = this.opUserList[index].id
},
opChange (value) {
console.log('onChange', value);
opChange(value) {
this.getUserList(value, 'op')
},
//
docSelect (value) {
console.log('选择', value)
docSelect(value) {
this.details.doc = value
const index = this.docUserListArr.indexOf(value)
this.details.docid = this.docUserList[index].id
},
docChange (value) {
console.log('onChange', value);
docChange(value) {
this.getUserList(value, 'doc')
},
//
custserviceSelect (value) {
console.log('选择', value)
custserviceSelect(value) {
this.details.custservice = value
const index = this.custserviceUserListArr.indexOf(value)
this.details.custserviceid = this.custserviceUserList[index].id
},
custserviceChange (value) {
console.log('onChange', value);
custserviceChange(value) {
this.getUserList(value, 'custservice')
},
// - end
// - start
@ -824,23 +789,51 @@ export default {
this.customerType = ''
this.customerVisible = false
},
initTableData() {
let data = []
for (let i = 0; i < 4; i++) {
data.push({
rowKey: i,
col1: `A${i + 1}`,
col2: `B${i + 1}`,
col3: `C${i + 1}`,
col4: `D${i + 1}`,
col5: `E${i + 1}`,
})
}
this.tableData = data
},
// - end
},
changeEtd(date, dateString) {
console.log(date, dateString)
this.etdWeek = this.getWeek(dateString)
},
getWeek(dateTime) {
// 1970
const temp_ms = new Date(dateTime).getTime()
const temptTime = new Date(temp_ms)
// 7
const weekday = temptTime.getDay() & 7
// 1+5=6,
//
temptTime.setDate(temptTime.getDate() - weekday + 1 + 5)
// /1/100(1) ~11(12)getDay
//
let firstDay = new Date(temptTime.getFullYear(), 0, 1)
const dayOfWeek = firstDay.getDay()
let spendDay = 1
//
if (dayOfWeek !== 0) {
spendDay = 7 - dayOfWeek + 1
}
const yearOfW = temptTime.getFullYear()
firstDay = new Date(yearOfW, 0, 1 + spendDay)
/*
1.Math.ceil 取大于等于所给值的最小整数
2.86400000是换算到天的基数js的时间差值为时间戳即毫秒数
1000毫秒 * 60 * 60分钟* 24小时 = 86400000
3.temptTime是当前日期firstDay是当年第一天周数计算公式就是当前日期-第一天天数/7 就是本年的第几周
4.d是差距天数res是周数
*/
const d = Math.ceil((temptTime.valueOf() - firstDay.valueOf()) / 86400000)
const res = Math.ceil(d / 7) + 1
// const weekOfNow = firstDay.getFullYear().toString() + res.toString()
const weekOfNow = res.toString()
return weekOfNow
},
processX(xdata) {
if (xdata.length === 5) {
xdata = xdata.slice(0, 4) + '0' + xdata.slice(4)
}
return xdata
}
}
}
</script>
<style lang="less">
@ -888,6 +881,7 @@ export default {
font-size: 12px;
margin-left: 8px;
border-radius: 2px;
width: 40px;
}
}

@ -216,7 +216,7 @@
</template>
<script>
import { AutoComplete } from 'ant-design-vue'
import { GetPortloadlist, GetPortlist, GetFrt, GetService } from '@/api/modular/main/BookingLedger'
import { GetPortloadlist, GetPortlist, GetFrt, GetService, Codeissuetypelist } from '@/api/modular/main/BookingLedger'
export default {
name: '',
@ -255,7 +255,11 @@ export default {
watch: {
details: {
handler (nval, oval) {
console.log('数据改变', nval)
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'billInfo'
})
},
deep: true
}
@ -265,12 +269,11 @@ export default {
if (this.issuetypeData) {
const arr = []
this.issuetypeData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -280,12 +283,10 @@ export default {
if (this.issueplaceData) {
const arr = []
this.issueplaceData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -295,12 +296,10 @@ export default {
if (this.prepardatData) {
const arr = []
this.prepardatData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -310,12 +309,10 @@ export default {
if (this.payableatData) {
const arr = []
this.payableatData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -325,12 +322,10 @@ export default {
if (this.blfrtData) {
const arr = []
this.blfrtData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -340,12 +335,10 @@ export default {
if (this.serviceData) {
const arr = []
this.serviceData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.name)) {
arr.push(item.name)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -366,16 +359,24 @@ export default {
},
// - start
getIssuetypeList (name = '') {
//
console.log('暂无接口')
Codeissuetypelist({
Name: name
})
.then((res) => {
if (res.code === 200) {
this.issuetypeData = res.data
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
})
},
issuetypeSelect (value) {
console.log('选择', value)
this.details.issuetype = value
},
issuetypeChange(value) {
console.log('onChange', value);
this.getIssuetypeList(value)
},
// - end
@ -387,8 +388,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this[`${type}Data`] = res.data.rows
console.log('==== 模板 ====', type, this[`${type}Data`], this[`${type}DataArr`])
this[`${type}Data`] = res.data
this.$forceUpdate()
}
})
@ -398,22 +398,22 @@ export default {
},
issueplaceSelect (value) {
console.log('选择', value)
this.details.issueplace = value
const index = this.issueplaceDataArr.indexOf(value)
this.details.issueplaceid = this.issueplaceData[index].ediCode
},
issueplaceChange(value) {
console.log('onChange', value);
this.getPortloadlist(value, 'issueplace')
},
// - end
// - start
prepardatSelect (value) {
console.log('选择', value)
this.details.prepardat = value
const index = this.prepardatDataArr.indexOf(value)
this.details.prepardatid = this.prepardatData[index].ediCode
},
prepardatChange(value) {
console.log('onChange', value);
this.getPortloadlist(value, 'prepardat')
},
// - end
@ -425,8 +425,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this[`${type}Data`] = res.data.rows
console.log('==== 模板 ====', type, this[`${type}Data`], this[`${type}DataArr`])
this[`${type}Data`] = res.data.splice(0, 500)
this.$forceUpdate()
}
})
@ -435,11 +434,11 @@ export default {
})
},
payableatSelect (value) {
console.log('选择', value)
this.details.payableat = value
const index = this.payableatDataArr.indexOf(value)
this.details.payableatid = this.payableatData[index].ediCode
},
payableatChange(value) {
console.log('onChange', value);
this.getPortlist(value, 'payableat')
},
// - end
@ -451,8 +450,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this.blfrtData = res.data.rows
console.log('==== 模板 ====', this.blfrtData, this.blfrtDataArr)
this.blfrtData = res.data
this.$forceUpdate()
}
})
@ -461,11 +459,9 @@ export default {
})
},
blfrtSelect (value) {
console.log('选择', value)
this.details.blfrt = value
},
blfrtChange(value) {
console.log('onChange', value);
this.getFrt(value)
},
// - end
@ -477,8 +473,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this.blfrtData = res.data.rows
console.log('==== 模板 ====', this.blfrtData, this.blfrtDataArr)
this.serviceData = res.data
this.$forceUpdate()
}
})
@ -487,11 +482,9 @@ export default {
})
},
serviceSelect (value) {
console.log('选择', value)
this.details.service = value
},
serviceChange(value) {
console.log('onChange', value);
this.getService(value)
},
// - end

@ -23,7 +23,7 @@
</div>
<div class="input">
<div>货物标志</div>
<a-select :default-value="details.cargoid || 'S'" style="width: 120px">
<a-select :default-value="details.cargoid || 'S'" style="width: 120px" @change="handleChange">
<a-select-option value="S"> S 普通货 </a-select-option>
<a-select-option value="R"> R 冻柜 </a-select-option>
<a-select-option value="D"> D 危险品 </a-select-option>
@ -66,13 +66,21 @@ export default {
watch: {
details: {
handler(nval, oval) {
console.log('数据改变', nval)
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'cargoInfo'
})
},
deep: true,
},
},
created() {},
methods: {},
methods: {
handleChange(value) {
this.details.cargoid = value
}
},
}
</script>
<style lang="less" scoped>

@ -6,7 +6,7 @@
<a-button class="btn" type="primary" @click="addboxLine"></a-button>
<a-button class="btn" @click="removeLine"></a-button>
<a-button class="btn" type="primary" @click="openDialog" :disabled="tableData.length===0">多品名</a-button>
<a-button class="btn" type="primary">引入场站数据</a-button>
<a-button class="btn" type="primary" @click="importYarn"></a-button>
<a-button class="btn" type="primary">引入箱皮重</a-button>
</div>
<div class="table-right">
@ -26,6 +26,7 @@
rowKeyFieldName="rowKey"
:rowStyleOption="rowStyleOption"
:checkbox-option="checkboxOption"
:clipboard-option="clipboardOption"
/>
<div class="table-no-data" v-if="tableData.length === 0">
暂无数据
@ -63,6 +64,7 @@
rowKeyFieldName="rowKey"
:rowStyleOption="rowStyleOption"
:checkbox-option="checkChildboxOption"
:clipboard-option="clipboardChildOption"
/>
<div class="table-no-data" v-if="childTableData.length === 0">
暂无数据
@ -76,7 +78,7 @@
</div>
</template>
<script>
import { GetCtn, GetPackage } from '@/api/modular/main/BookingLedger'
import { GetCtn, GetPackage, GetYardData } from '@/api/modular/main/BookingLedger'
export default {
name: '',
props: {
@ -89,6 +91,7 @@ export default {
},
data() {
return {
id: this.$route.query.id,
columns: [
{
field: '',
@ -130,7 +133,6 @@ export default {
this.tableData[rowIndex].ctnall = data.name
this.tableData[rowIndex].ctncode = data.code
row['ctnall'] = data.name
console.log(this.tableData[rowIndex])
this.$forceUpdate()
}}
>
@ -190,7 +192,6 @@ export default {
const data = this.packageList[val]
this.tableData[rowIndex].kindpkgs = data.name
row['kindpkgs'] = data.name
console.log(this.tableData[rowIndex])
this.$forceUpdate()
}}
>
@ -241,7 +242,6 @@ export default {
on-change={(val) => {
this.tableData[rowIndex].weightype = val
row['weightype'] = val
console.log(this.tableData[rowIndex])
this.$forceUpdate()
}}
>
@ -356,8 +356,6 @@ export default {
const data = this.packageList[val]
row['kindpkgs'] = data.name
this.childTableData[rowIndex].kindpkgs = data.name
{/* this.details.ctnInputs[this.childModelSelectIndex].ctnDetailInputs[rowIndex].kindpkgs = data.name */}
console.log(this.childTableData[rowIndex])
this.$forceUpdate()
}}
>
@ -410,10 +408,6 @@ export default {
tableData: [],
editOption: {
beforeCellValueChange: ({ row, column, changeValue }) => {
console.log('beforeCellValueChange')
console.log('row::', row)
console.log('column::', column)
console.log('changeValue::', changeValue)
if (['pkgs', 'kgs', 'cbm', 'tareweight'].includes(column.field) && !/^\d+$/.test(changeValue)) {
const height = document.body.clientHeight - 100
this.$message.config({
@ -430,10 +424,6 @@ export default {
}
},
afterCellValueChange: ({ row, column, changeValue }) => {
console.log('afterCellValueChange')
console.log('row::', row)
console.log('column::', column)
console.log('changeValue::', changeValue)
if (column.field === 'pkgs') {
let num = 0
this.tableData.map((item, index) => {
@ -465,7 +455,6 @@ export default {
// this.tableData[nowIndex]['weighkgs'] = Number(this.tableData[nowIndex].kgs) + Number(this.tableData[nowIndex].tareweight)
row['weighkgs'] = Number(row['kgs']) + Number(row['tareweight'])
}
console.log('---')
},
cellValueChange: ({ row, column }) => {
console.log('编辑', row, column)
@ -515,7 +504,6 @@ export default {
hideSelectAll: false,
//
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log('行选择', row, isSelected, selectedRowKeys)
this.selectArr = selectedRowKeys
},
//
@ -525,14 +513,12 @@ export default {
} else {
this.selectArr = []
}
console.log('全选', isSelected, selectedRowKeys)
},
},
checkChildboxOption: {
hideSelectAll: false,
//
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log('行选择', row, isSelected, selectedRowKeys)
this.selectChildArr = selectedRowKeys
},
//
@ -542,7 +528,83 @@ export default {
} else {
this.selectChildArr = []
}
console.log('全选', isSelected, selectedRowKeys)
},
},
//
clipboardOption: {
copy: true,
paste: true,
cut: true,
delete: true,
beforeCopy: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforeCopy');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterCopy: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterCopy');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
beforePaste: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforePaste');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterPaste: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterPaste');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
beforeCut: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforeCut');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterCut: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterCut');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
beforeDelete: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforeDelete');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterDelete: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterDelete');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
},
clipboardChildOption:{
copy: true,
paste: true,
cut: true,
delete: true,
beforeCopy: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforeCopy');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterCopy: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterCopy');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
beforePaste: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforePaste');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterPaste: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterPaste');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
beforeCut: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforeCut');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterCut: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterCut');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
beforeDelete: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('beforeDelete');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
afterDelete: ({ data, selectionRangeIndexes, selectionRangeKeys }) => {
console.log('afterDelete');
this.log({ data, selectionRangeIndexes, selectionRangeKeys });
},
},
tableLoaded: false,
@ -558,7 +620,6 @@ export default {
radioOption: {
//
selectedRowChange: ({ row }) => {
console.log(row);
this.childModelSelect = row
this.tableData.map((item, index) => {
if (item.rowKey === row.rowKey) {
@ -584,14 +645,18 @@ export default {
watch: {
details: {
handler(nval, oval) {
console.log('detail数据改变', nval)
// console.log('detail', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'goodsTable'
})
},
deep: true,
},
tableData: {
handler(nval, oval) {
this.details.ctnInputs = nval
console.log('table数据改变', nval)
// console.log('table', nval)
},
deep: true,
}
@ -602,28 +667,34 @@ export default {
},
methods: {
init (data) {
const arr = []
const totalCtnall = {}
this.details.ctnInputs.map((item, index) => {
arr.push({
...{ rowKey: index },
...item
})
if (!Object.keys(totalCtnall).includes(item.ctnall)) {
const cData = {
type: 'ctnall',
num: item.ctnnum
init () {
if (Object.keys(this.details).length > 0) {
const arr = []
const totalCtnall = {}
this.details.ctnInputs.map((item, index) => {
arr.push({
...{ rowKey: index },
...item
})
if (!Object.keys(totalCtnall).includes(item.ctnall)) {
const cData = {
type: 'ctnall',
num: item.ctnnum
}
this.$set(totalCtnall, item.ctnall, cData)
}
this.$set(totalCtnall, item.ctnall, cData)
}
this.totalPkgs += Number(item.pkgs)
this.totalKgs += Number(item.kgs)
this.totalCbm += Number(item.cbm)
})
this.tableData = arr
this.tableLoaded = true
this.totalCtnall = ''
this.totalPkgs += Number(item.pkgs)
this.totalKgs += Number(item.kgs)
this.totalCbm += Number(item.cbm)
})
this.tableData = arr
this.tableLoaded = true
this.totalCtnall = ''
} else {
this.tableData = []
this.tableLoaded = true
this.totalCtnall = ''
}
this.getCtn()
this.getPackage()
},
@ -736,7 +807,55 @@ export default {
}
this.details.ctnInputs[this.childModelSelectIndex].ctnDetailInputs = this.childTableData
this.$message.success('已保存')
}
},
//
importYarn () {
if (!this.id) {
this.$message.error('请先保存订舱信息')
return false
}
GetYardData({
bookingId: this.id,
isWeb: false
})
.then((res) => {
if (res.success) {
const data = JSON.parse(res.data)
const addTable = []
const lastNum = this.tableData.length > 0 ? Number(this.tableData[this.tableData.length - 1].rowKey) + 1 : 0
data.map((item, index) => {
const _data = {
rowKey: lastNum + index,
ctnall: item.CTNALL,
ctnnum: '',
cntrno: item.CNTRNO,
sealno: item.SEALNO,
pkgs: item.PKGS,
kindpkgs: item.KINDPKGS,
kgs: item.KGS,
cbm: item.CBM,
tareweight: item.TAREWEIGHT,
weightype: '',
weighkgs: ''
}
addTable.push(_data)
})
this.tableData = [...this.tableData, ...addTable]
this.$forceUpdate()
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
log({ data, selectionRangeIndexes, selectionRangeKeys }) {
console.log('data::', data);
console.log('selectionRangeIndexes::', selectionRangeIndexes);
console.log('selectionRangeKeys::', selectionRangeKeys);
},
},
}
</script>

@ -11,93 +11,93 @@
<div class="top">
<div class="name"><span class="iconfont icon-bianji"></span>发货人</div>
<auto-complete
v-model="details.shippername"
v-model="shippername"
class="customer-input"
:data-source="shipperDataArr"
placeholder="请输入发货人"
@select="shipperSelect"
@change="shipperChange"
/>
<a-button class="save-btn" type="link" size="small" icon="save">保存</a-button>
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('shipper')"></a-button>
<div class="right">
<span class="btn-circle">*</span>
<span class="btn" @click="changeCode(35)">35</span>
<span class="btn" @click="changeCode(40)">40</span>
<span class="btn" @click="changeCode(50)">50</span>
<span class="btn" @click="changeCode(35, 'shipper')">35</span>
<span class="btn" @click="changeCode(40, 'shipper')">40</span>
<span class="btn" @click="changeCode(50, 'shipper')">50</span>
</div>
</div>
<div class="bottom">
<a-textarea
v-model="details.shipperaddR1"
v-model="details.shipper"
placeholder="请输入内容"
:auto-size="{ minRows: 2, maxRows: 6 }"
style="height: 130px"
/>
<!-- <div class="line-count" v-if="Object.keys(details).length > 1 && details.shipperaddR1.length > 0">
<div v-for="(num, index) in details.shipperaddR1.split('\n')" :key="index">{{ num.length }}</div>
</div> -->
<div class="line-count" v-if="Object.keys(details).length > 1 && details.shipper.length > 0">
<div v-for="(num, index) in details.shipper.split('\n')" :key="index">{{ num.length }}</div>
</div>
</div>
</div>
<div class="consignee">
<div class="top">
<div class="name"><span class="iconfont icon-bianji"></span>收货人</div>
<auto-complete
v-model="details.consignee"
v-model="consigneename"
class="customer-input"
:data-source="consigneeDataArr"
placeholder="请输入收货人"
@select="consigneeSelect"
@change="consigneeChange"
/>
<a-button class="save-btn" type="link" size="small" icon="save">保存</a-button>
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('consignee')"></a-button>
<div class="right">
<span class="btn-circle">*</span>
<span class="btn" @click="changeCode(35)">35</span>
<span class="btn" @click="changeCode(40)">40</span>
<span class="btn" @click="changeCode(50)">50</span>
<span class="btn" @click="changeCode(35, 'consignee')">35</span>
<span class="btn" @click="changeCode(40, 'consignee')">40</span>
<span class="btn" @click="changeCode(50, 'consignee')">50</span>
</div>
</div>
<div class="bottom">
<a-textarea
v-model="details.consigneedooraddr"
v-model="details.consignee"
placeholder="请输入内容"
:auto-size="{ minRows: 2, maxRows: 6 }"
style="height: 130px"
/>
<!-- <div class="line-count" v-if="Object.keys(details).length > 1 && details.consigneedooraddr.length > 0">
<div v-for="(num, index) in details.consigneedooraddr.split('\n')" :key="index">{{ num.length }}</div>
</div> -->
<div class="line-count" v-if="Object.keys(details).length > 1 && details.consignee.length > 0">
<div v-for="(num, index) in details.consignee.split('\n')" :key="index">{{ num.length }}</div>
</div>
</div>
</div>
<div class="notifier">
<div class="top">
<div class="name"><span class="iconfont icon-bianji"></span>通知人</div>
<auto-complete
v-model="details.notifyparty"
v-model="notifypartyname"
class="customer-input"
:data-source="notifyDataArr"
placeholder="请输入通知人"
@select="notifySelect"
@change="notifyChange"
/>
<a-button class="save-btn" type="link" size="small" icon="save">保存</a-button>
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('notifyparty')"></a-button>
<div class="right">
<span class="btn-circle">*</span>
<span class="btn" @click="changeCode(35)">35</span>
<span class="btn" @click="changeCode(40)">40</span>
<span class="btn" @click="changeCode(50)">50</span>
<span class="btn" @click="changeCode(35, 'notifyparty')">35</span>
<span class="btn" @click="changeCode(40, 'notifyparty')">40</span>
<span class="btn" @click="changeCode(50, 'notifyparty')">50</span>
</div>
</div>
<div class="bottom">
<a-textarea
v-model="details.notifypartyaddR1"
v-model="details.notifyparty"
placeholder="请输入内容"
:auto-size="{ minRows: 2, maxRows: 6 }"
style="height: 130px"
/>
<!-- <div class="line-count" v-if="Object.keys(details).length > 1 && details.notifypartyaddR1.length > 0">
<div v-for="(num, index) in details.notifypartyaddR1.split('\n')" :key="index">{{ num.length }}</div>
</div> -->
<div class="line-count" v-if="Object.keys(details).length > 1 && details.notifyparty.length > 0">
<div v-for="(num, index) in details.notifyparty.split('\n')" :key="index">{{ num.length }}</div>
</div>
</div>
</div>
</a-col>
@ -485,6 +485,20 @@
</a-col>
</a-row>
</div>
<a-modal
title="保存模板"
:width="900"
:visible="modelVisible"
:confirmLoading="modelconfirm"
@ok="handleModelSubmit"
@cancel="handleModelCancel"
>
<div class="content">
<div class="label">模板名称</div>
<a-input placeholder="请输入模板名称" v-model="modelName"/>
</div>
</a-modal>
</a-collapse-panel>
</a-collapse>
</template>
@ -492,7 +506,7 @@
import { XCard } from '@/components'
import { AutoComplete } from 'ant-design-vue'
import { BookingTemplate, GetYardlist, GetPortloadlist, GetPortlist, GetPackage } from '@/api/modular/main/BookingLedger'
import { BookingTemplate, GetYardlist, GetPortloadlist, GetPortlist, GetPackage, BookingTemplateAdd } from '@/api/modular/main/BookingLedger'
export default {
components: {
XCard,
@ -531,12 +545,24 @@ export default {
destinationData: [], //
placedeliveryData: [], //
placereceiptData: [], //
kindpkgsData: [],
shippername: '',
consigneename: '',
notifypartyname: '',
modelVisible: false,
modelconfirm: false,
modelType: '',
modelName: ''
}
},
watch: {
details: {
handler (nval, oval) {
console.log('数据改变', nval)
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'mailingInfo'
})
},
deep: true
}
@ -549,9 +575,7 @@ export default {
if (!arr.includes(item.title)) {
arr.push(item.title)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -564,9 +588,7 @@ export default {
if (!arr.includes(item.title)) {
arr.push(item.title)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -579,9 +601,7 @@ export default {
if (!arr.includes(item.title)) {
arr.push(item.title)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -591,12 +611,10 @@ export default {
if (this.yardData) {
const arr = []
this.yardData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.name)) {
arr.push(item.name)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -606,12 +624,10 @@ export default {
if (this.portloadData) {
const arr = []
this.portloadData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -621,12 +637,10 @@ export default {
if (this.transportData) {
const arr = []
this.transportData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -636,12 +650,10 @@ export default {
if (this.portdischargeData) {
const arr = []
this.portdischargeData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -651,12 +663,10 @@ export default {
if (this.destinationData) {
const arr = []
this.destinationData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -666,12 +676,10 @@ export default {
if (this.placedeliveryData) {
const arr = []
this.placedeliveryData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -681,12 +689,10 @@ export default {
if (this.placereceiptData) {
const arr = []
this.placereceiptData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.enName)) {
arr.push(item.enName)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -696,12 +702,10 @@ export default {
if (this.kindpkgsData) {
const arr = []
this.kindpkgsData.map((item, index) => {
if (!arr.includes(item.title)) {
arr.push(item.title)
if (!arr.includes(item.name)) {
arr.push(item.name)
}
// return item.shortName
})
console.log(arr)
return arr
} else {
return []
@ -717,12 +721,12 @@ export default {
this.getTemplate('', 'consignee')
this.getTemplate('', 'notify')
this.getYardlist()
this.getPortloadlist('', 'portload')
this.getPortloadlist('', 'placereceipt')
this.getPortlist('', 'transport')
this.getPortlist('', 'portdischarge')
this.getPortlist('', 'destination')
this.getPortlist('', 'placedelivery')
// this.getPortloadlist('', 'portload')
// this.getPortloadlist('', 'placereceipt')
// this.getPortlist('', 'transport')
// this.getPortlist('', 'portdischarge')
// this.getPortlist('', 'destination')
// this.getPortlist('', 'placedelivery')
this.getPackage('')
},
// - start
@ -733,7 +737,6 @@ export default {
.then((res) => {
if (res.code === 200) {
this[`${type}Data`] = res.data.rows
console.log('==== 模板 ====', type, this[`${type}Data`], this[`${type}DataArr`])
this.$forceUpdate()
}
})
@ -743,35 +746,31 @@ export default {
},
shipperSelect (value) {
console.log('选择', value)
this.details.shippername = value
this.shippername = value
const index = this.shipperDataArr.indexOf(value)
this.details.shipperaddR1 = this.shipperData[index].content
this.details.shipper = this.shipperData[index].content
this.details.shipper = value
// debugger
},
shipperChange(value) {
console.log('onChange', value);
this.getTemplate(value, 'shipper')
},
consigneeSelect (value) {
console.log('选择', value)
this.details.consignee = value
this.consigneename = value
const index = this.consigneeDataArr.indexOf(value)
this.details.consigneedooraddr = this.consigneeData[index].content
this.details.consignee = this.consigneeData[index].content
},
consigneeChange(value) {
console.log('onChange', value);
this.getTemplate(value, 'consignee')
},
notifySelect (value) {
console.log('选择', value)
this.details.notifyparty = value
this.notifypartyname = value
const index = this.notifyDataArr.indexOf(value)
this.details.notifypartyaddR1 = this.notifyData[index].content
this.details.notifyparty = this.notifyData[index].content
},
notifyChange(value) {
console.log('onChange', value);
this.getTemplate(value, 'notify')
},
@ -784,8 +783,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this.yardData = res.data.rows
console.log('==== 模板 ====', this.yardData, this.yardDataArr)
this.yardData = res.data
this.$forceUpdate()
}
})
@ -795,11 +793,11 @@ export default {
},
yardSelect (value) {
console.log('选择', value)
this.details.yard = value
const index = this.yardDataArr.indexOf(value)
this.details.yardid = this.yardData[index].gid
},
yardChange(value) {
console.log('onChange', value);
this.getYardlist(value)
},
// - end
@ -811,8 +809,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this[`${type}Data`] = res.data.rows
console.log('==== 模板 ====', type, this[`${type}Data`], this[`${type}DataArr`])
this[`${type}Data`] = res.data
this.$forceUpdate()
}
})
@ -821,19 +818,19 @@ export default {
})
},
portloadSelect (value) {
console.log('选择', value)
this.details.portload = value
const index = this.portloadDataArr.indexOf(value)
this.details.portloadid = this.portloadData[index].ediCode
},
portloadChange(value) {
console.log('onChange', value);
this.getPortloadlist(value, 'portload')
},
placereceiptSelect (value) {
console.log('选择', value)
this.details.placereceipt = value
const index = this.placereceiptDataArr.indexOf(value)
this.details.placereceiptid = this.placereceiptData[index].ediCode
},
placereceiptChange(value) {
console.log('onChange', value);
this.getPortloadlist(value, 'placereceipt')
},
// ( / ) - end
@ -845,8 +842,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this[`${type}Data`] = res.data.rows
console.log('==== 模板 ====', type, this[`${type}Data`], this[`${type}DataArr`])
this[`${type}Data`] = res.data.splice(0, 500)
this.$forceUpdate()
}
})
@ -856,38 +852,38 @@ export default {
},
//
portdischargeSelect (value) {
console.log('选择', value)
this.details.portdischarge = value
const index = this.portdischargeDataArr.indexOf(value)
this.details.portdischargeid = this.portdischargeData[index].ediCode
},
portdischargeChange(value) {
console.log('onChange', value);
this.getPortlist(value, 'portdischarge')
},
//
destinationSelect (value) {
console.log('选择', value)
this.details.destination = value
const index = this.destinationDataArr.indexOf(value)
this.details.destinationid = this.destinationData[index].ediCode
},
destinationChange(value) {
console.log('onChange', value);
this.getPortlist(value, 'destination')
},
//
placedeliverySelect (value) {
console.log('选择', value)
this.details.placedelivery = value
const index = this.placedeliveryDataArr.indexOf(value)
this.details.placedeliveryid = this.placedeliveryData[index].ediCode
},
placedeliveryChange(value) {
console.log('onChange', value);
this.getPortlist(value, 'placedelivery')
},
//
transportSelect (value) {
console.log('选择', value)
this.details.transport = value
const index = this.transportDataArr.indexOf(value)
this.details.transportid = this.transportData[index].ediCode
},
transportChange(value) {
console.log('onChange', value);
this.getPortlist(value, 'transport')
},
// ( / / / ) - end
@ -899,8 +895,7 @@ export default {
})
.then((res) => {
if (res.code === 200) {
this.kindpkgsData = res.data.rows
console.log('==== 模板 ====', this.kindpkgsData, this.kindpkgsDataArr)
this.kindpkgsData = res.data
this.$forceUpdate()
}
})
@ -909,17 +904,57 @@ export default {
})
},
kindpkgsSelect (value) {
console.log('选择', value)
this.details.kindpkgs = value
},
kindpkgsChange(value) {
console.log('onChange', value);
this.getPackage(value)
},
// - end
changeCode(num) {
const newStr = this.senderInfo.replace(/\n|\r/g, '')
//
saveModel (type) {
this.modelVisible = true
this.modelType = type
this.modelContent = this.details[type]
},
handleModelSubmit () {
const type = this.enmuType(this.modelType)
BookingTemplateAdd({
title: this.modelName,
type: type,
content: this.modelContent,
remark: ''
})
.then((res) => {
if (res.success) {
this.$message.success('保存成功')
this.handleModelCancel()
this.$forceUpdate()
}
})
.catch((err) => {
console.log(err)
})
},
enmuType (val) {
switch (val) {
case 'shipper':
return 10
case 'consignee':
return 20
case 'notifypart':
return 30
}
},
handleModelCancel () {
this.modelVisible = false
this.modelType = ''
this.modelName = ''
},
changeCode(num, type) {
// const newStr = this.senderInfo.replace(/\n|\r/g, '')
const newStr = this.details[type].replace(/\n|\r/g, '')
console.log(newStr)
const indexs = []
let count = 0
@ -944,7 +979,7 @@ ${newStr.slice(split)}`
`
}
})
this.senderInfo = resStr
this.details[type] = resStr
},
findId(arr, id) {
const newarr = []

@ -13,7 +13,17 @@
<button><span class="iconfont icon-shuaxin"></span>刷新</button>
</a-popconfirm>
<button><span class="iconfont icon-fuzhi1"></span>复制</button>
<button><span class="iconfont icon-icon_baocun"></span>保存</button>
<a-popconfirm
placement="bottom"
title="是否保存当前数据?"
ok-text="是"
cancel-text="否"
@confirm="saveFun"
@cancel="cancelRefresh"
>
<button><span class="iconfont icon-icon_baocun"></span>保存</button>
</a-popconfirm>
<!-- <button @click="saveFun"><span class="iconfont icon-icon_baocun"></span>保存</button> -->
<button><span class="iconfont icon-printing"></span>打印</button>
</div>
<div class="btn-list more-view-1">
@ -24,10 +34,12 @@
<button @click="openModel('paper')"><span class="iconfont icon-zhizhishu"></span>下货纸</button>
</div>
<div class="btn-list more-view-2">
<button @click="openModel('initCabin')"><span class="iconfont icon-chuanfanguanli-chuanfanshenqing"></span>放舱</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>
<button @click="openModel('vgmlink')"><span class="iconfont icon-lianjie"></span>VGM链接</button>
<button @click="TxxpLink"><span class="iconfont icon-dayinxiaopiao"></span>提箱小票</button>
</div>
<!-- <div class="btn-list more-view-3">
<button @click="openTab('sonMenu')"><span class="iconfont icon-a-xiaopiaofapiao-01"></span>分票</button>
@ -40,7 +52,7 @@
</div> -->
<div class="btn-list single-view-4">
<button><span class="iconfont icon-OCR"></span>OCR</button>
<button><span class="iconfont icon-jinggao"></span>校验</button>
<button @click="checkFun"><span class="iconfont icon-jinggao"></span>校验</button>
</div>
<div class="btn-list single-view-1">
<button><span class="iconfont icon-shang"></span>上一票</button>
@ -58,36 +70,40 @@
@cancel="handleModelCancel"
>
<template v-if="['bookingSpace', 'cutOff'].includes(modelType)">
<a-form :form="bookingModelFrom">
<a-form>
<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-col :span="11" class="book-model-box">
<a-checkbox class="book-check" @change="bookingCheckChange" />
<a-form-item
label="使用货代代码"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入货代代码" v-model="bookingModelFrom.forwarderCode" />
</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
label="货代称呼"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入货代称呼" v-model="bookingModelFrom.forwarderName" />
</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-col :span="10">
<a-form-item
label="文件功能"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-radio-group v-model="bookingModelFrom.fileRole">
<a-radio :style="radioStyle" :value="9"> 原始 </a-radio>
<a-radio :style="radioStyle" :value="1"> 更新 </a-radio>
<a-radio :style="radioStyle" :value="5"> 退舱 </a-radio>
</a-radio-group>
</a-form-item>
</a-col>
@ -95,128 +111,142 @@
</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>
<a-button type="primary" @click="handleModelSubmit('save')">EDI</a-button>
<a-button type="primary" @click="handleModelSubmit('send')">EDT</a-button>
</template>
</template>
<template v-else-if="['initCabin', 'ladingBill', 'vgm'].includes(modelType)">
<a-form :form="initCabinFrom">
<template v-else-if="['initCabin', 'ladingBill', 'vgmlink'].includes(modelType)">
<a-form>
<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
label="TO"
:labelCol="{ xs: { span: 24 }, sm: { span: 2 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入内容" v-model="initCabinFrom.toName" />
</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
label="ATTN"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入ATTN" v-model="initCabinFrom.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
label="电话"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入电话" v-model="initCabinFrom.attnTel" />
</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
label="邮箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入邮箱" v-model="initCabinFrom.attnMail" />
</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
label="FROM"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入内容" v-model="initCabinFrom.fromName" />
</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
label="电话"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入电话" v-model="initCabinFrom.fromTel" />
</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
label="邮箱"
:labelCol="{ xs: { span: 24 }, sm: { span: 5 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-input placeholder="请输入邮箱" v-model="initCabinFrom.fromMail" />
</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>
<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>
<a-input placeholder="请输入提箱小票链接" v-model="initCabinFrom.orderUrl.urlTxxp" />
<span @click="copyFun(initCabinFrom.orderUrl.urlTxxp)"></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>
<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>
<a-input placeholder="请输入VGM链接" v-model="initCabinFrom.orderUrl.urlVgm" />
<span @click="copyFun(initCabinFrom.orderUrl.urlVgm)"></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>
<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>
<a-input placeholder="请输入SI&VGM链接" v-model="initCabinFrom.orderUrl.urlVgmSi" />
<span @click="copyFun(initCabinFrom.orderUrl.urlVgmSi)"></span>
</div>
</a-form-item>
</a-col>
</div>
</template>
<template v-if="modelType === 'vgm'">
<template v-if="modelType === 'vgmlink'">
<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>
<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提交地址' }] }]"
/>
<a-input placeholder="请输入VGM提交地址" v-model="initCabinFrom.orderUrl.urlVgm" />
<span>复制</span>
</div>
</a-form-item>
@ -224,120 +254,248 @@
</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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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: '请输入备注' }] }]"
/>
<a-input placeholder="请输入备注" v-model="initCabinFrom.remark" />
</div>
</a-form-item>
</a-col>
</div>
</template>
<template v-if="modelType === 'ladingBill'">
<iframe class="pdf-view" src="billPdf" width="100%" height="100%" v-if="hsaBillPdf"></iframe>
<div class="no-pdf" v-else>{{ billPdfTip }}</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>
<a-button @click="saveModel"></a-button>
<a-button type="primary" @click="sendModel"></a-button>
<a-button
type="primary"
@click="removeModel"
v-if="['initCabin', 'vgmlink'].includes(modelType)"
>
删除
</a-button>
</template>
</template>
</a-modal>
<!-- 弹窗部分 end -->
</div>
</template>
<script>
import {
SendBookingOrClosingEDI,
SendXHZ,
VgmSend,
LetterYard,
SampleBill,
VgmLink,
SendLetterYard,
SaveBookingLetteryard,
SaveBookingSampleBill,
SampleBillPdf,
TxxpLink,
ExcuteRulesOceanBooking
} from '@/api/modular/main/BookingLedger'
export default {
props: {
details: {
type: Object,
default: () => {
return {}
},
},
},
data() {
return {
id: this.$route.query.id,
modelType: '',
bookingModelvisible: false,
bookingModelconfirm: false,
//
bookingModelFrom: this.$form.createForm(this),
bookingModelFrom: {
id: this.$route.query.id,
orderNo: this.details.mblno,
useForwarderCode: false,
forwarderCode: '',
forwarderName: '',
fileRole: '',
sendType: 'B',
send: false,
},
radioStyle: {
display: 'block',
height: '30px',
lineHeight: '30px'
lineHeight: '30px',
},
//
initCabinFrom: this.$form.createForm(this)
initCabinFrom: {
toName: '',
attn: '',
attnTel: '',
attnMail: '',
fromName: '',
fromTel: '',
fromMail: '',
orderUrl: {
urlTxxp: '',
urlVgm: '',
urlVgmSi: '',
},
remark: '',
},
//
hsaBillPdf: false,
billPdf: '',
billPdfTip: ''
}
},
mounted() {
this.getLetterYard()
},
methods: {
refreshPage () {
refreshPage() {
this.$emit('refresh')
},
cancelRefresh() {
return false
},
openModel(type) {
if (['bookingSpace', 'cutOff', 'initCabin', 'ladingBill', 'vgm'].includes(type)) {
if (['bookingSpace', 'cutOff', 'initCabin', 'ladingBill', 'vgmlink'].includes(type)) {
// /
this.modelType = type
this.bookingModelvisible = true
} else if (['vgm', 'paper'].includes(type)) {
this.openDialog(type)
}
if (type === 'initCabin') {
this.getLetterYard()
} else if (type === 'ladingBill') {
this.getSampleBill()
this.sampleBillPdf()
} else if (type === 'vgmlink') {
this.getVgmLink()
}
},
emnuHeader(type) {
let title = ''
@ -354,49 +512,339 @@ export default {
case 'ladingBill':
title = '样单'
break
case 'vgm':
case 'vgmlink':
title = 'vgm链接'
break
}
}
return title
},
// /
handleModelSubmit () {
// EDI
this.handleModelCancel()
handleModelSubmit(type) {
if (this.modelType === 'bookingSpace') {
this.bookingModelFrom.sendType = 'B'
} else if (this.modelType === 'cutOff') {
this.bookingModelFrom.sendType = '' //
}
this.bookingModelFrom.send = type === 'send'
this.bookingModelFrom.orderNo = this.details.mblno
debugger
SendBookingOrClosingEDI(this.bookingModelFrom)
.then((res) => {
//
debugger
if (res.success) {
this.$message.success(`${type === 'send' ? '发送' : '保存'}成功`)
this.handleModelCancel()
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
handleModelCancel () {
handleModelCancel() {
this.modelType = ''
this.bookingModelvisible = false
},
handleModelUpLoad () {
// EDI
this.handleModelCancel()
this.bookingModelFrom = {
id: this.$route.query.id,
orderNo: this.details.mblno,
useForwarderCode: false,
forwarderCode: '',
forwarderName: '',
fileRole: '',
sendType: 'B',
send: false,
}
},
// vgm /
openDialog (type) {
openDialog(type) {
let content = null
const _this = this
if (type === 'vgm') {
content = h => <div>确认发送VGM吗?</div>
content = (h) => <div>确认发送VGM吗?</div>
} else if (type === 'paper') {
content = h => <div>确认发送下货纸吗?</div>
content = (h) => <div>确认发送下货纸吗?</div>
}
this.$confirm({
title: '温馨提示',
content: content,
onOk() {
console.log('OK');
console.log('OK')
debugger
if (type === 'vgm') {
_this.vgmSend()
} else if (type === 'paper') {
_this.sendXHZ()
}
},
onCancel() {
console.log('Cancel');
console.log('Cancel')
},
class: 'test'
});
class: 'test',
})
},
sendXHZ() {
SendXHZ({
bookingId: this.id,
})
.then((res) => {
debugger
if (res.success) {
this.$message.success(`下货纸发送成功`)
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
vgmSend() {
VgmSend({
bookingId: this.id,
})
.then((res) => {
debugger
if (res.success) {
this.$message.success(`VGM发送成功`)
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
//
getLetterYard() {
LetterYard({
bookingId: this.id,
})
.then((res) => {
console.log('== 放舱信息 ==', res.data)
if (res.success) {
this.initCabinFrom = res.data
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
//
getSampleBill() {
SampleBill({
bookingId: this.id,
})
.then((res) => {
console.log('== 样单信息 ==', res.data)
if (res.success) {
this.initCabinFrom = res.data
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
// VGM
getVgmLink() {
VgmLink({
bookingId: this.id,
})
.then((res) => {
console.log('== VGM信息 ==', res.data)
if (res.success) {
// this.initCabinFrom = res.data
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
sampleBillPdf () {
SampleBillPdf({
bookingId: this.id
})
.then((res) => {
if (res.success) {
this.hsaBillPdf = true
this.billPdf = res.data.description
} else {
this.hsaBillPdf = false
this.billPdfTip = res.message
}
})
.catch((err) => {
console.log(err)
})
},
copyFun(data) {
const copyInput = document.createElement('input')
document.body.appendChild(copyInput)
copyInput.setAttribute('value', data)
copyInput.select()
document.execCommand('Copy', false, null)
this.$message.success('复制成功')
copyInput.remove()
},
// TAB
openTab (type) {
openTab(type) {
this.$emit('openTab', { type: type })
},
//
saveFun() {
this.$emit('save')
},
bookingCheckChange(e) {
this.bookingModelFrom.useForwarderCode = e.target.checked
console.log(e.target.checked)
},
// vgm
saveModel() {
// /
if (this.modelType === 'initCabin') {
//
this.saveBookingLetteryard()
} else if (this.modelType === 'vgmlink') {
// VGM
console.log('暂无接口')
} else {
//
this.saveBookingSampleBill()
}
},
sendModel() {
if (this.modelType === 'initCabin') {
//
this.sendLetterYard()
} else if (this.modelType === 'vgmlink') {
// VGM
console.log('暂无接口')
} else {
//
console.log('暂无接口')
}
},
removeModel() {
if (this.modelType === 'initCabin') {
//
console.log('暂无接口')
} else if (this.modelType === 'vgmlink') {
// VGM
console.log('暂无接口')
}
},
//
saveBookingLetteryard() {
if (!this.id) {
this.initCabinFrom = {
...this.initCabinFrom,
...{
closeDocTime: this.details.closedocdate,
closingTime: this.details.closingdate,
vgmTime: this.details.closevgmdate
}
}
}
SaveBookingLetteryard(this.initCabinFrom)
.then((res) => {
debugger
if (res.success) {
this.$message.success('保存成功')
// this.initCabinFrom = res.data
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
// /
saveBookingSampleBill() {
SaveBookingSampleBill(this.initCabinFrom)
.then((res) => {
if (res.success) {
this.$message.success('保存成功')
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
//
sendLetterYard() {
SendLetterYard({
bookingId: this.id
})
.then((res) => {
debugger
if (res.success) {
this.$message.success('发送成功')
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
TxxpLink() {
TxxpLink({
bookingId: this.id
})
.then((res) => {
if (res.success) {
console.log(res.data)
this.copyFun(res.data)
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
},
checkFun () {
ExcuteRulesOceanBooking({
bookingId: this.id
})
.then((res) => {
debugger
if (res.success) {
} else {
this.$message.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
}
},
}
@ -487,10 +935,10 @@ export default {
}
}
}
.box-flex{
.box-flex {
display: flex;
padding-top: 8px;
span{
span {
display: inline-block;
width: 60px;
text-align: right;
@ -501,15 +949,34 @@ export default {
cursor: pointer;
}
}
.item-box{
.item-box {
margin-bottom: 20px;
padding-bottom: 20px;
padding-top: 20px;
overflow: hidden;
border-bottom: 1px dashed #ccc;
&:nth-last-of-type(1){
&:nth-last-of-type(1) {
border: none;
margin-bottom: 0;
}
}
.book-model-box {
position: relative;
padding-left: 50px;
.book-check {
position: absolute;
width: 50px;
height: 40px;
line-height: 40px;
top: 0;
left: 0;
}
}
.pdf-view{
height: 400px;
}
.no-pdf{
text-align: center;
margin: 20px 0;
}
</style>

@ -31,7 +31,11 @@ export default {
watch: {
details: {
handler(nval, oval) {
console.log('数据改变', nval)
// console.log('', nval)
this.$emit('changeDetail', {
detail: nval,
type: 'remarksInfo'
})
},
deep: true,
},

@ -65,10 +65,23 @@
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title"><i class="iconfont icon-lightning-full"></i><span>订单及货运动态</span></div>
<div class="content">
<!-- <div class="booking-log" v-for="(bookingLog, bindex) in bookingLogList" :key="bindex">
<span class="log"><i class="iconfont icon-dingdan"></i>{{ bookingLog.status }}</span>
</div> -->
<a-directory-tree multiple default-expand-all>
<div class="booking-log" v-for="(bookingLog, bindex) in bookingLogList" :key="bindex">
<div class="log" :class="{'hideline': bindex === bookingLogList.length-1 && bookingLog.detail.length === 0}" @click="bookingShow(bookingLog)">
<span class="log-time">{{ bookingLog.opTime }}</span>
<i class="iconfont icon-jian icon" v-if="bookingLog.detail.length > 0 && bookingLog.isChecked"></i>
<i class="iconfont icon-jia icon" v-else-if="bookingLog.detail.length > 0 && !bookingLog.isChecked"></i>
<i class="iconfont icon-tongzhi icon" v-else></i>
<span class="log-name">{{ bookingLog.status }}</span>
</div>
<div class="child-list" v-if="bookingLog.detail.length > 0 && bookingLog.isChecked">
<div class="child-log" v-for="(child, cindex) in bookingLog.detail" :key="cindex">
<span class="log-time">{{ child.opTime }}</span>
<i class="iconfont icon-yuanxuankuang2 icon"></i>
<span class="log-name">{{ child.status }}</span>
</div>
</div>
</div>
<!-- <a-directory-tree multiple default-expand-all>
<a-tree-node v-for="(bookingLog, bindex) in bookingLogList" :key="`0-${bindex}`" :title="bookingLog.status">
<template v-if="bookingLog.detail.length > 0">
<a-tree-node
@ -79,7 +92,7 @@
/>
</template>
</a-tree-node>
</a-directory-tree>
</a-directory-tree> -->
<div class="no-data" v-if="fileList.length === 0">
<i class="iconfont icon-wushuju"></i>
<div class="text">暂无附件</div>
@ -276,17 +289,17 @@ export default {
this.fileModelvisible = false
},
handleRemove(file) {
const index = this.upFileList.indexOf(file);
const newFileList = this.upFileList.slice();
newFileList.splice(index, 1);
this.upFileList = newFileList;
const index = this.upFileList.indexOf(file)
const newFileList = this.upFileList.slice()
newFileList.splice(index, 1)
this.upFileList = newFileList
},
beforeUpload(file) {
this.upFileList = [...this.upFileList, file];
return false;
this.upFileList = [...this.upFileList, file]
return false
},
handleUpload() {
const { upFileList, attachCode, attachName } = this;
const { upFileList, attachCode, attachName } = this
if (!upFileList) {
this.$message.error('请上传文件')
return false
@ -295,34 +308,35 @@ export default {
this.$message.error('请选择附件类型')
return false
}
const formData = new FormData();
const formData = new FormData()
formData.append('file', upFileList[0])
formData.append('BookingId', this.id)
formData.append('TypeCode', attachCode)
formData.append('TypeName', attachName)
console.log('formData', formData, formData.get('file'))
this.uploading = true;
this.uploading = true
const token = Vue.ls.get(ACCESS_TOKEN)
axios({
method: 'post',
url: process.env.VUE_APP_API_BASE_URL + '/BookingOrder/addFile',
headers: {
'Authorization': 'Bearer ' + token,
'Content-Type': 'multipart/form-data'
Authorization: 'Bearer ' + token,
'Content-Type': 'multipart/form-data',
},
data: formData
}).then((res) => {
this.uploading = false;
if (res.data.success) {
this.$message.success('上传成功')
this.getFile()
} else {
this.$message.error(res.data.message)
}
this.fileModelCancel()
}).catch((err) => {
console.log(err)
data: formData,
})
.then((res) => {
this.uploading = false
if (res.data.success) {
this.$message.success('上传成功')
this.getFile()
} else {
this.$message.error(res.data.message)
}
this.fileModelCancel()
})
.catch((err) => {
console.log(err)
})
},
// - end
@ -357,6 +371,10 @@ export default {
handleAttachChange(index) {
this.attachCode = this.bookingAttachType[index].code
this.attachName = this.bookingAttachType[index].name
},
bookingShow (data) {
data.isChecked = !data.isChecked
this.$forceUpdate()
}
},
}
@ -509,14 +527,117 @@ export default {
.booking-log {
padding: 10px 0;
.log {
height: 30px;
min-height: 30px;
line-height: 30px;
font-size: 14px;
color: #666;
display: flex;
position: relative;
&::before{
content: '';
position: absolute;
width: 1px;
height: 120%;
background: #ccc;
top: 0;left: 0;
top: 22px;
left: 77px;
}
// &:nth-last-child(1){
// &::before{
// display: none;
// }
// }
.log-time{
width: 70px;
text-align: left;
height: 50px;
line-height: 22px;
font-size: 12px;
color:#999;
padding-top: 4px;
margin-right: 30px;
}
.icon{
width: 30px;
color: @primary-color;
font-size: 16px;
text-align: left;
cursor: pointer;
position: absolute;
top: 0;
left: 69.5px;
}
.log-name{
flex: 1;
}
}
.child-log{
min-height: 30px;
line-height: 30px;
font-size: 14px;
color: #666;
i {
display: flex;
position: relative;
&::before{
content: '';
position: absolute;
width: 1px;
height: 120%;
// background: @primary-color;
background: #ccc;
top: 0;left: 0;
top: 22px;
left: 77px;
}
// &:nth-last-child(1){
// &::before{
// display: none;
// }
// }
.log-time{
width: 70px;
text-align: left;
height: 50px;
line-height: 22px;
font-size: 12px;
color:#999;
padding-top: 4px;
margin-right: 30px;
}
.icon{
width: 30px;
color: #999;
font-size: 16px;
margin-right: 8px;
text-align: left;
position: absolute;
top: 0;
left: 69.5px;
}
.log-name{
flex: 1;
}
}
.hideline{
&::before{
display: none;
}
}
&:nth-last-of-type(1){
.child-list{
.child-log{
&:nth-last-of-type(1){
&::before{
display: none;
}
}
&:nth-last-of-type(2){
&::before{
height: 110%;
top: 10px;
}
}
}
}
}
}
@ -629,10 +750,10 @@ export default {
}
}
}
.uplad-type{
.uplad-type {
display: flex;
margin-top: 20px;
.upload-label{
.upload-label {
height: 30px;
line-height: 30px;
font-size: 14px;

Loading…
Cancel
Save