szh_zidingyibiaoti
lilu 2 years ago
commit a0e8ddcf7d

@ -772,6 +772,15 @@ export function DeleteBookingOrder(parameter) {
method: 'post'
})
}
//恢复删除
export function RecoverDeleteOrder(parameter) {
return axios({
url: '/BookingOrder/RecoverDelete?Ids=' + parameter,
method: 'post'
})
}
// 获取货物状态
export function BookingOrderGetGoodsStatusList(parameter) {
return axios({

@ -72,6 +72,18 @@ export function BookingTruckCancel(parameter) {
params: parameter
})
}
/**
* 批量撤销派车
*
* @author Myshipping
*/
export function BookingTruckCancelBatch(parameter) {
return axios({
url: '/BookingTruck/CancelBatch',
method: 'post',
data: parameter
})
}
/**
* 提交派车
*
@ -84,6 +96,18 @@ export function BookingTruckSubmit(parameter) {
data: parameter
})
}
/**
* 批量提交派车
*
* @author Myshipping
*/
export function BookingTruckSubmitBatch(parameter) {
return axios({
url: '/BookingTruck/SubmitBatch',
method: 'post',
data: parameter
})
}
/**
* 删除派车
*

@ -105,8 +105,9 @@
<vxe-toolbar>
<template #buttons>
<div class="nav-box">
<div class="nav" @click="TabsAdd"><i class="iconfont icon-jiahao2fill"></i>新增派车</div>
<!-- <div class="nav" @click="TabsAdd"><i class="iconfont icon-jiahao2fill"></i>撤销派车</div> -->
<!-- <div class="nav" @click="TabsAdd"><i class="iconfont icon-jiahao2fill"></i>新增派车</div> -->
<div class="nav" @click="FnSubmit"><i class="iconfont icon-jiahao2fill"></i>提交派车</div>
<div class="nav" @click="FnCancel"><i class="iconfont icon-jiahao2fill"></i>撤销派车</div>
</div>
</template>
<template #tools>
@ -121,6 +122,7 @@
</template>
</vxe-toolbar>
<vxe-table
ref="XTable"
:column-config="{ resizable: true }"
@cell-dblclick="cellDBLClickEvent"
:data="loadData"
@ -132,6 +134,7 @@
empty-text="没有更多数据了!"
v-if="!TableType"
>
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
<vxe-column
v-for="item in TableColumns"
@ -198,7 +201,9 @@ import {
DjyCustomerGet,
DjyUserConfigAdd,
BookingTruckDelete,
DjyCustomerQuerytDjyCustomerInfo
DjyCustomerQuerytDjyCustomerInfo,
BookingTruckSubmitBatch,
BookingTruckCancelBatch
} from '@/api/modular/main/SendCar'
import columnSetting from '@/components/tableColumnSetting'
const columns = [
@ -212,7 +217,7 @@ const columns = [
title: '任务流水号',
align: 'center',
width: '120',
dataIndex: 'TaskNo'
dataIndex: 'taskNo'
},
{
title: '状态',
@ -461,6 +466,34 @@ export default {
}
})
},
FnCancel() {
let ApiArr = []
let select = this.$refs.XTable.getCheckboxRecords()
select.forEach(item => {
ApiArr.push(item.id)
})
BookingTruckCancelBatch(ApiArr).then(res => {
if (res.data.succ) {
this.$message.success('撤销成功')
} else {
this.$message.error(`撤销失败,${res.data.msg}`)
}
})
},
FnSubmit() {
let ApiArr = []
let select = this.$refs.XTable.getCheckboxRecords()
select.forEach(item => {
ApiArr.push(item.id)
})
BookingTruckSubmitBatch(ApiArr).then(res => {
if (res.data.succ) {
this.$message.success('提交成功')
} else {
this.$message.error(`提交失败,${res.data.msg}`)
}
})
},
TabsAdd() {
this.$router.push({
name: 'SendCarAdd',

File diff suppressed because it is too large Load Diff

@ -0,0 +1,200 @@
<template>
<div class="auto-input-content">
<auto-complete
class="auto-input"
size="small"
:allowClear="true"
v-model="value"
optionLabelProp="label"
:dropdown-match-select-width="false"
:defaultActiveFirstOption="false"
:dropdown-style="dropdownStyle"
:backfill="false"
@select="handleSelect"
@change="debounce(handleChange, 0, $event)"
@focus="handleChangeFirst"
@blur="getSelectBlur"
>
<template slot="dataSource">
<a-select-option v-for="(item, index) in dataSourceList" :key="index" :value="index + '-' + item[showLabel[0]]" :label="item[showLabel[0]]">
<div class="contractno-label" v-if="type === 'contractno'">
<div class="title"> {{ item.contractNo }} / {{ item.contractName || '--' }} </div>
<div class="note"><span>{{ item.contractNote || '--' }}</span></div>
</div>
<div class="title" v-else>
<template v-for="(label, lindex) in showLabel">
{{ item[label] }}
<template v-if="lindex != showLabel.length - 1"> / </template>
</template>
</div>
</a-select-option>
</template>
</auto-complete>
</div>
</template>
<script>
import {
getContractno
} from '@/api/modular/main/BookingLedger'
import { AutoComplete } from 'ant-design-vue'
import { mapGetters } from 'vuex'
let timer
export default {
name: '',
components: {
AutoComplete
},
props: {
defaultVal: {
type: String,
default: ''
},
type: {
type: String,
default: ''
},
dropdownStyle: {
type: Object,
default: () => {
return {}
}
},
searchApi: {
type: String,
default: ''
},
searchQuery: {
type: Object,
default: () => {
return {}
}
},
//
showLabel: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
value: this.defaultVal || '',
dataSourceList: [],
inEdit: false
}
},
computed: {
...mapGetters(['bookingInitData'])
},
watch: {
defaultVal(nval, oval) {
if (this.inEdit) { return false }
this.value = nval
}
},
mounted() {
this.value = this.defaultVal
},
methods: {
debounce(func, wait, ...args) {
if (timer) clearTimeout(timer)
timer = setTimeout(() => {
func.apply(this, args)
}, wait)
},
getFromSelectData(func, ...args) {
return new Promise((resolve, reject) => {
func(...args).then((res) => {
if (res.code === 200) {
resolve(res.data);
} else {
reject(res)
}
})
});
},
emnuCompleteApi (type) {
switch (type) {
case 'getContractno':
return getContractno
}
},
handleSelect (e) {
const num = Number(e.split('-')[0])
const data = this.dataSourceList[num]
this.value = data[this.showLabel[0]]
this.$emit('select', {
type: this.type,
res: data
})
setTimeout(() => {
this.handleChange(this.value)
}, 600)
},
handleChange (e) {
this.inEdit = true
setTimeout(() => {
this.inEdit = false
}, 800)
if (e) {
Object.keys(this.searchQuery).map((item, index) => {
if (['queryItem'].includes(item)) {
this.searchQuery[item] = e
}
})
} else {
Object.keys(this.searchQuery).map((item, index) => {
if (['queryItem'].includes(item)) {
this.searchQuery[item] = ''
}
})
}
this.getFromSelectData(this.emnuCompleteApi(this.searchApi), this.searchQuery).then((data) => {
if (data.rows) {
this.dataSourceList = data.rows
} else {
this.dataSourceList = data
}
})
},
handleChangeFirst (e) {
if (this.value && this.dataSourceList.length !== 0) {
return false
}
if (this.bookingInitData[`${this.type}InitList`].length > 0) {
this.dataSourceList = this.bookingInitData[`${this.type}InitList`]
return false
}
this.handleChange(e)
},
getSelectBlur (e) {
if (this.type === 'contractno') {
this.$emit('select', {
type: this.type,
res: {
contractNo: this.value
}
})
}
}
}
}
</script>
<style lang="less">
.contractno-label{
.title{
height: 28px;
line-height: 28px;
font-size: 14px;
font-weight:600;
color: #666;
}
.note{
height: 22px;
line-height: 22px;
font-size: 12px;
color: #999;
}
}
</style>

@ -0,0 +1,86 @@
<template>
<div class="date-content">
<a-date-picker
size="small"
ref="dateInput"
style="min-width:100px"
:class="`date-picker-${type}`"
:format="format"
v-model="value"
:open="open"
:show-time="showTime"
@change="changeDate"
@openChange="handleOpenChange"
@focus="onFocus">
<a-icon slot="suffixIcon" type="time" style="display: none" />
</a-date-picker>
</div>
</template>
<script>
export default {
name: '',
props: {
parentVal: {
type: [String, Number],
default: ''
},
type: {
type: String,
default: ''
},
format: {
type: String,
default: 'YYYY-MM-DD'
},
showTime: {
type: Boolean,
default: false
}
},
data() {
return {
value: this.parentVal !== 0 && !this.parentVal ? '' : this.parentVal,
open: false,
over: false
}
},
watch: {
parentVal(nval, oval) {
this.value = nval
}
},
mounted() {
},
methods: {
changeDate (date, dateString) {
if (!dateString) {
this.value = null
} else {
this.value = dateString
}
this.$emit('dateChange', {
type: this.type,
value: this.value
})
},
handleOpenChange (open) {
this.open = open;
if (!this.open) {
this.over = true
this.$refs.dateInput.$refs.picker.$refs.input.focus()
setTimeout(() => {
this.over = false
}, 1200)
}
},
onFocus () {
if (!this.open && !this.over) {
this.open = true
}
}
}
}
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,114 @@
<template>
<div class="input-content">
<input
class="ant-input input-box"
:class="`input-${type}`"
size="small"
:type="inputType"
v-model="value"
:disabled="ishd"
:placeholder="placeholder"
@blur="inputBlur"
@change="inputChange"
/>
<a-icon type="close-circle" theme="filled" class="ant-input-suffix input-icon" @click="clearInput" v-if="value"/>
</div>
</template>
<script>
export default {
name: '',
props: {
parentVal: {
type: [String, Number],
default: ''
},
type: {
type: String,
default: ''
},
ishd: {
type: Boolean,
default: false
},
inputType: {
type: String,
default: 'text'
},
placeholder: {
type: String,
default: ''
}
},
data() {
return {
// value: this.parentVal || '',
value: this.parentVal !== 0 && !this.parentVal ? '' : this.parentVal
}
},
watch: {
parentVal(nval, oval) {
this.value = nval
},
},
mounted() {
},
methods: {
inputBlur() {
this.$emit('getInputChange', {
type: this.type,
value: this.value
})
},
inputChange(e) {
if (e.type === 'click' && !this.value) {
this.$emit('getInputChange', {
type: this.type,
value: this.value
})
}
},
clearInput () {
this.value = ''
this.$emit('getInputChange', {
type: this.type,
value: this.value
})
}
}
}
</script>
<style lang="less" scoped>
.input-content{
position: relative;
overflow: hidden;
width: 100%;
height: 100%;
.input-box {
width: 100%;
height: 24px;
line-height: 24px;
}
.input-icon{
position: absolute;
top: 50%;
z-index: 2;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: rgba(0, 0, 0, 0.25);
line-height: 0;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
opacity: 0;
right: 10px;
}
&:hover{
.input-icon{
opacity: 1;
}
}
}
</style>

@ -0,0 +1,592 @@
<template>
<div class="select-content">
<div class="select-input">
<a-select
size="small"
ref="selectView"
:class="`select-input-${type}`"
v-model="value"
show-search
:allowClear="true"
:filter-option="!this.openSearch ? filterOption : false"
:dropdownMatchSelectWidth="false"
:showArrow="!this.openSearch ? true : true"
:open="open"
optionLabelProp="label"
:notFoundContent="inLoading ? '加载中...' : '暂无数据'"
@focus="getSelectFirst"
@blur="getSelectBlur"
@select="selectOption"
@change="(value,option)=> debounce(this.handleChange, 200, option)"
@search="debounce(handleSearch, 300, $event)"
>
<!-- v-clickDown="{ clickFun: () => {} , dblclickFun: this.dblclickFun }" -->
<a-select-option v-for="(item, index) in selectList" :key="index" :value="item[showLabel[0]] + index" :label="item[showLabel[0]]">
<template v-if="type === 'contractno'">
<div class="contractno-label">
<div class="title"> {{ item.contractNo }} / {{ item.contractName || '--' }} </div>
<div class="note"><span>{{ item.contractNote || '--' }}</span></div>
</div>
</template>
<template v-if="type === 'vessel'">
<div class="vessel-label">
<div class="title"> {{ item.vessel }} </div>
<div class="voyno">航次 <span>{{ item.voyno || '--' }}</span></div>
<div class="etd">ETD: <span>{{ item.etd || '--' }}</span></div>
</div>
</template>
<template v-else>
<template v-for="(label, lindex) in showLabel">
{{ item[label] }}
<template v-if="lindex != showLabel.length - 1"> / </template>
</template>
</template>
</a-select-option>
</a-select>
<div v-show="!open" class="select_overlap" @mouseup="openSelect"></div>
</div>
<div class="copy-btn iconfont icon-fuzhi11" @click="dblclickFun"></div>
<!-- <div
v-show="!open"
class="select_overlap"
v-clickDown="{ clickFun: this.openSelect, dblclickFun: this.dblclickFun }"
>
</div> -->
</div>
</template>
<script>
import Vue from 'vue'
import {
GetPortloadlist,
GetPortlist,
BookingTemplate,
DjyCustomerpage,
DjyCustomerSuggest,
getContractno,
getVesselInfoService,
GetForwarderlist,
GetSysUserPage,
GetService,
getGoodsname
} from '@/api/modular/main/BookingLedger'
import { mapGetters, mapActions } from 'vuex'
let timer
Vue.directive('clickDown', {
inserted(el, binding, vnode) {
let clickTimer = null
el.addEventListener('click', () => {
if (clickTimer) {
window.clearTimeout(clickTimer);
clickTimer = null;
}
clickTimer = setTimeout(() => {
binding.value.clickFun()
}, 300);
})
el.addEventListener('dblclick', () => {
if (clickTimer) {
window.clearTimeout(clickTimer);
clickTimer = null;
}
binding.value.dblclickFun()
})
}
});
export default {
name: '',
props: {
defaultVal: {
type: String,
default: ''
},
type: {
type: String,
default: ''
},
searchApi: {
type: String,
default: ''
},
searchQuery: {
type: Object,
default: () => {
return {}
}
},
openSearch: {
type: Boolean,
default: false
},
showLabel: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
value: this.defaultVal || '',
selectList: [],
inEdit: false,
inLoading: false,
init: false,
open: false,
clickHandle: null,
inInit: false
}
},
computed: {
...mapGetters(['carrierList', 'yardList', 'packageList', 'issuetypeList', 'blfrtList', 'lineList', 'bookingInitData'])
},
watch: {
defaultVal(nval, oval) {
if (this.inEdit) { return false }
this.value = nval
},
value (nval, oval) {
if (nval !== oval) {
this.handleValueChange(nval)
}
}
},
created() {
this.inInit = true
setTimeout(() => {
this.inInit = false
}, 800)
},
mounted() {
this.clickHandle = (e) => {
if (e.target && 'className' in e.target && this.open) {
const className = e.target.className;
if (className.indexOf('select_overlap') === -1) {
this.open = false
}
} else {
this.open = false
}
}
document.body.addEventListener('click', this.clickHandle)
},
beforeDestroy() {
if (this.clickHandle) {
document.body.removeEventListener('click', this.clickHandle)
this.clickHandle = null
}
},
methods: {
...mapActions(['setLineList']),
debounce(func, wait, ...args) {
if (timer) clearTimeout(timer)
timer = setTimeout(() => {
func.apply(this, args)
}, wait)
},
getFromSelectData(func, ...args) {
return new Promise((resolve, reject) => {
func(...args).then((res) => {
if (res.code === 200) {
resolve(res.data);
} else {
reject(res)
}
})
});
},
emnuSelectApi (type) {
switch (type) {
case 'GetPortloadlist':
return GetPortloadlist
case 'GetPortlist':
return GetPortlist
case 'BookingTemplate':
return BookingTemplate
case 'DjyCustomerpage':
return DjyCustomerpage
case 'DjyCustomerSuggest':
return DjyCustomerSuggest
case 'getContractno':
return getContractno
case 'getVesselInfoService':
//
return getVesselInfoService
case 'GetForwarderlist':
return GetForwarderlist
case 'GetSysUserPage':
return GetSysUserPage
case 'GetService':
return GetService
case 'getGoodsname':
return getGoodsname
}
},
emnuData (type) {
switch (type) {
case 'cargoid':
return [
{
name: 'S 普通货',
code: 'S'
},
{
name: 'R 冻柜',
code: 'R'
},
{
name: 'D 危险品',
code: 'D'
},
{
name: 'O 超限箱',
code: 'O'
}
]
case 'nobill':
return [
{
name: 'ONE',
code: 'ONE'
},
{
name: 'TWO',
code: 'TWO'
},
{
name: 'THREE',
code: 'THREE'
},
{
name: 'FOUR',
code: 'FOUR'
},
{
name: 'FIVE',
code: 'FIVE'
},
{
name: 'SIX',
code: 'SIX'
},
{
name: 'SEVEN',
code: 'SEVEN'
},
{
name: 'EIGHT',
code: 'EIGHT'
},
{
name: 'NINE',
code: 'NINE'
},
{
name: 'TEN',
code: 'TEN'
}
]
case 'copynobill':
return [
{
name: 'ONE',
code: 'ONE'
},
{
name: 'TWO',
code: 'TWO'
},
{
name: 'THREE',
code: 'THREE'
},
{
name: 'FOUR',
code: 'FOUR'
},
{
name: 'FIVE',
code: 'FIVE'
},
{
name: 'SIX',
code: 'SIX'
},
{
name: 'SEVEN',
code: 'SEVEN'
},
{
name: 'EIGHT',
code: 'EIGHT'
},
{
name: 'NINE',
code: 'NINE'
},
{
name: 'TEN',
code: 'TEN'
}
]
case 'masterBolIndicator':
return [
{ ID: '1', NAME: 'Carrier filing HBL | 船公司发HBL' },
{ ID: '2', NAME: 'Self filing HBL | 自己发' },
{ ID: '3', NAME: 'Not Applicable/Straight bl | 无HBL' }
]
case 'salerCode':
return [
{ ID: 'CN087', NAME: 'CN087 | GRACE SUN' },
{ ID: 'CN096', NAME: 'CN096 | LEON LIANG' },
{ ID: 'CN097', NAME: 'CN097 | CHARLES GAO' },
{ ID: 'CN098', NAME: 'CN098 | TERESA LIU SHAN' },
{ ID: 'CN106', NAME: 'CN106 | HOKI YU' },
{ ID: 'CN107', NAME: 'CN107 | WILLIAM YANG JING YU' },
{ ID: 'CN099', NAME: 'CN099 | HELEN ZHANG' },
{ ID: 'CN100', NAME: 'CN100 | LEOREN' }
]
case 'yard':
return this.yardList
case 'kindpkgs':
return this.packageList
case 'carrierid':
return this.carrierList
case 'issuetype':
return this.issuetypeList
case 'blfrt':
return this.blfrtList
case 'lineName':
return this.lineList
case 'shippingMethod':
const arr = this.$options.filters['dictData']('ShippingMethod') || []
return arr
}
},
filterOption(input, option) {
if (this.openSearch) {
return true
} else {
return option.componentOptions.children[1].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
},
handleValueChange(val) {
if (this.inInit) { return false }
this.inEdit = true
setTimeout(() => {
this.inEdit = false
}, 300)
this.selectList.map((item, index) => {
if (`${item[this.showLabel[0]]}${index}` === val) {
this.value = item[this.showLabel[0]]
this.$emit('change', {
type: this.type,
res: this.selectList[index]
})
}
})
},
handleChange (op) {
// this.selectOpen = !this.selectOpen
this.inEdit = true
setTimeout(() => {
this.inEdit = false
}, 800)
if (!op) {
this.$emit('change', {
type: this.type,
res: {}
})
} else {
const num = op.data.key
this.value = this.selectList[num][this.showLabel[0]]
this.$emit('change', {
type: this.type,
res: this.selectList[num]
})
}
},
getSelectFirst (e, canClick = true) {
if (canClick) {
this.$refs.selectView.$refs.vcSelect.$refs.arrow.click()
} else {
this.$refs.selectView.$refs.vcSelect.focus()
}
this.open = true
if (['cargoid', 'nobill', 'copynobill', 'carrierid', 'yard', 'kindpkgs', 'issuetype', 'blfrt', 'masterBolIndicator', 'salerCode', 'shippingMethod'].includes(this.type)) {
this.selectList = this.emnuData(this.type)
this.inLoading = false
return false
}
// 线lineName,
if (['lineName'].includes(this.type)) {
this.selectList = this.emnuData(this.type)
this.inLoading = false
this.setLineList()
return false
}
if (!e) {
if (!['vessel', 'lineName'].includes(this.type) && this.bookingInitData[`${this.type}InitList`].length > 0) {
console.log(this.bookingInitData[`${this.type}InitList`])
this.selectList = this.bookingInitData[`${this.type}InitList`]
return false
}
if (this.openSearch && this.value && this.selectList.length > 0) {
return false
} else if (this.openSearch && this.value && this.selectList.length === 0) {
// - -
// Object.keys(this.searchQuery).map((item, index) => {
// if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword'].includes(item)) {
// this.searchQuery[item] = this.value
// }
// })
}
this.inLoading = true
this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then((data) => {
if (data.rows) {
this.selectList = data.rows
} else {
this.selectList = data
}
this.inLoading = false
})
}
},
handleSearch (e) {
if (this.openSearch) {
this.inEdit = true
setTimeout(() => {
this.inEdit = false
}, 800)
if (e) {
/* *
* 字段值
* Title 收发通模板
* KeyWord 港口信息
* SearchValue 报关行仓库车队 国外代理
* name 包装
* */
Object.keys(this.searchQuery).map((item, index) => {
if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword', 'queryItem'].includes(item)) {
this.searchQuery[item] = e
}
})
} else {
Object.keys(this.searchQuery).map((item, index) => {
if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword', 'queryItem'].includes(item)) {
this.searchQuery[item] = ''
}
})
}
this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then((data) => {
if (data.rows) {
this.selectList = data.rows
} else {
this.selectList = data
}
})
}
},
openSelect(open) {
if (!this.open) {
this.getSelectFirst('', false)
} else {
this.open = !this.open
}
},
selectOption() {
this.open = false
},
getSelectBlur (e) {
this.open = false
},
dblclickFun () {
if (!this.value) {
this.$message.error('暂无可复制内容')
return false
}
this.copy(this.value)
},
copy(textValue) {
const textarea = document.createElement('textarea')
textarea.readOnly = 'readonly'
textarea.style.position = 'absolute'
textarea.style.left = '-9999px'
textarea.value = textValue
document.body.appendChild(textarea)
textarea.select()
const result = document.execCommand('Copy')
if (result) {
this.$message.success('复制成功')
}
document.body.removeChild(textarea)
}
}
}
</script>
<style lang="less" scoped>
.contractno-label{
.title{
height: 28px;
line-height: 28px;
font-size: 14px;
font-weight:600;
color: #666;
}
.note{
height: 22px;
line-height: 22px;
font-size: 12px;
color: #999;
}
}
.vessel-label{
.title{
height: 28px;
line-height: 28px;
font-size: 14px;
font-weight:600;
color: #666;
border-bottom:1px dashed #ddd;
margin-bottom: 4px;
}
.voyno, .etd {
height: 22px;
line-height: 22px;
font-size: 12px;
color: #999;
}
}
.select-content {
display: flex;
.select-input{
flex: 1;
position: relative;
overflow: hidden;
.select_overlap {
cursor: pointer;
height: 32px;
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
}
}
.copy-btn{
width: 24px;
text-align: center;
color: #bbb;
font-size: 13px;
&:hover{
color: @primary-color;
}
}
}
</style>

@ -0,0 +1,113 @@
<template>
<textarea
class="ant-input"
v-model="value"
:style="`width:100%;display:inline-block;height: ${height}px`"
@input="debounce(textareaChange, 300, $event)"
@blur="textareaBlur"
></textarea>
<!-- -->
</template>
<script>
let timer
export default {
name: '',
props: {
parentVal: {
type: String,
default: ''
},
type: {
type: String,
default: ''
},
height: {
type: Number,
default: 120
},
openToCDB: {
type: Boolean,
default: false
}
},
data() {
return {
value: this.parentVal || '',
inEdit: false
}
},
watch: {
parentVal(nval, oval) {
if (this.inEdit) {
return false
}
this.value = nval
}
},
mounted() {},
methods: {
debounce(func, wait, ...args) {
if (timer) clearTimeout(timer)
timer = setTimeout(() => {
func.apply(this, args)
}, wait)
},
textareaBlur() {
if (this.openToCDB) {
this.value = this.ToCDB(this.value).toUpperCase()
this.$emit('getTextareaChange', {
type: this.type,
value: this.value
})
}
},
textareaChange(e) {
this.inEdit = true
setTimeout(() => {
this.inEdit = false
}, 800)
this.$emit('getTextareaChange', {
type: this.type,
value: this.value
})
},
ToCDB(str) {
var tmp = ''
for (var i = 0; i < str.length; i++) {
if (str.charCodeAt(i) > 65248 && str.charCodeAt(i) < 65375) {
tmp += String.fromCharCode(str.charCodeAt(i) - 65248)
} else {
tmp += String.fromCharCode(str.charCodeAt(i))
}
}
tmp = tmp.replace(//gi, ',')
tmp = tmp.replace(/。/gi, '.')
tmp = tmp.replace(//gi, ';')
tmp = tmp.replace(//gi, ':')
tmp = tmp.replace(//gi, '?')
tmp = tmp.replace(//gi, '!')
tmp = tmp.replace(/《/gi, '<<')
tmp = tmp.replace(/》/gi, '>>')
tmp = tmp.replace(//gi, "'")
tmp = tmp.replace(//gi, "'")
tmp = tmp.replace(/、/gi, ',')
// tab
tmp = tmp.replace(/\t/gi, ' ')
//
if (/[\u4E00-\u9FA5]+/g.test(tmp) && ['description', 'marks'].includes(this.type)) {
tmp = tmp.replace(/[\u4E00-\u9FA5]+/g, '')
this.$message.error(`${this.getTypeName(this.type)}中,不支持中文字符`)
}
return tmp
},
getTypeName(type) {
switch (type) {
case 'marks':
return '封志号 / 标记与号码'
case 'description':
return '包装种类与货名'
}
}
}
}
</script>

@ -0,0 +1,376 @@
<template>
<div class="from-label">
<template v-if="labelData.type == 'input'">
<inputView ref="inputView" :type="labelData.label" :parentVal="value" @getInputChange="inputChange" />
</template>
<template v-else-if="labelData.type == 'date'">
<datePickerView
ref="datePickerView"
class="date-picker"
:parentVal="value"
type="etd"
format="YYYY-MM-DD"
@dateChange="dateChangeFun"
></datePickerView>
</template>
<template v-else-if="labelData.type == 'dateRange'">
<div class="picker-box" style="display:flex;padding-right: 2px;">
<a-date-picker
style="min-width:30px; flex: 1;"
v-model="startValue"
:disabled-date="disabledStartDate"
format="YYYY-MM-DD"
suffixIcon=" "
placeholder="开始时间"
@openChange="handleStartOpenChange"
/>
<span style="margin:0 4px;">-</span>
<a-date-picker
style="min-width:30px;flex: 1;"
v-model="endValue"
:disabled-date="disabledEndDate"
format="YYYY-MM-DD"
placeholder="结束时间"
suffixIcon=" "
:open="endOpen"
@openChange="handleEndOpenChange"
/>
</div>
</template>
<template v-else-if="labelData.type == 'select'">
<a-select
size="small"
style="margin-top:7px;"
v-model="value"
show-search
:dropdownMatchSelectWidth="false"
:filter-option="filterOption"
@change="debounce(handleSelectChange, 300, $event)"
@focus="getSelectFirst"
>
<template v-if="['CARRIER', 'YARDID', 'ISSUETYPE', 'CARGOID'].includes(labelData.label)">
<a-select-option v-for="(sitem,sindex) in dataList" :key="sindex">
{{ sitem[labelData.showLabel2] }}/ {{ sitem[labelData.showLabel] }}
</a-select-option>
</template>
<template v-else>
<a-select-option v-for="(sitem,sindex) in dataList" :key="sindex">{{ sitem[labelData.showLabel] }}</a-select-option>
</template>
</a-select>
</template>
<template v-else-if="labelData.type == 'complete'">
<auto-complete
size="small"
:allowClear="true"
class="customer-input"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px' }"
v-model="value"
option-label-prop="label"
@select="completeSelect"
@focus="completeChangeFirst"
@change="debounce(completeChange, 300, $event)"
>
<!-- <template slot="dataSource" v-if="labelData.label === 'VESSEL'">
<a-select-option v-for="(item, index) in dataSourceList" :key="index" :value="item[labelData.showLabel]">
<div class="vessel-label">
<div class="title"> 船名{{ item[labelData.showLabel] }} </div>
<div class="msg"> 航次{{ item[labelData.showLabel2] || '--' }} </div>
</div>
</a-select-option>
</template>-->
<template slot="dataSource">
<a-select-option v-for="(item, index) in dataSourceList" :key="`${index}-${item[labelData.showLabel]}`" :value="`${index}-${item[labelData.showLabel]}`" :label="item[labelData.showLabel]">
<div>
<div class="title"> {{ item[labelData.showLabel] }} </div>
</div>
</a-select-option>
</template>
</auto-complete>
</template>
</div>
</template>
<script>
import { AutoComplete } from 'ant-design-vue'
import inputView from '../components/inputView'
import datePickerView from '../components/datePickerView'
import { mapGetters } from 'vuex'
let timer;
export default {
components: {
AutoComplete,
inputView,
datePickerView
},
props: {
labelData: {
type: Object,
required: true
},
// eslint-disable-next-line vue/require-default-prop
formRes: {
type: Object,
required: false
},
resetType: {
type: Boolean,
default: true
},
formIndex: {
type: Number,
default: null
}
// eslint-disable-next-line vue/require-default-prop
// dataSourceList: {
// type: Array,
// required: false
// }
},
watch: {
resetType (nval, oval) {
if (!nval) {
this.value = ''
this.dateVal = []
this.startValue = ''
this.endValue = ''
if (this.labelData.type === 'input') {
this.$refs.inputView.$data.value = ''
} else if (this.labelData.type === 'date') {
this.$refs.datePickerView.$data.value = ''
}
}
},
startValue(val) {
if (!this.resetType) { return false }
this.getDateRangeRes()
},
endValue(val) {
if (!this.resetType) { return false }
this.getDateRangeRes()
}
},
data() {
return {
value: '',
dateVal: [],
startValue: null,
endValue: null,
endOpen: false,
dataList: this.labelData.dataList || [],
dataSourceList: []
}
},
computed: {
...mapGetters(['carrierList', 'ctnallList', 'yardList', 'packageList', 'issuetypeList', 'blfrtList', 'lineList', 'bookingInitData'])
},
mounted() { },
methods: {
debounce (func, wait, ...args) {
if (timer) clearTimeout(timer);
timer = setTimeout(() => {
func.apply(this, args);
}, wait);
},
changeInput(data) {
this.$emit('change', {
form: this.labelData,
value: data.value
})
},
changeDate(data) {
this.$emit('change', {
form: this.labelData,
value: data.value
})
},
disabledStartDate(startValue) {
const endValue = this.endValue;
if (!startValue || !endValue) {
return false;
}
return startValue.valueOf() > endValue.valueOf();
},
disabledEndDate(endValue) {
const startValue = this.startValue;
if (!endValue || !startValue) {
return false;
}
return startValue.valueOf() >= endValue.valueOf();
},
handleStartOpenChange(open) {
if (!open) {
this.endOpen = true;
}
},
handleEndOpenChange(open) {
this.endOpen = open;
},
getDateRangeRes () {
const start = this.startValue ? this.formatDate(this.startValue._d).substr(0, 10) : ''
const end = this.endValue ? this.formatDate(this.endValue._d).substr(0, 10) : ''
const date = [start, end]
this.$emit('change', {
form: this.labelData,
value: date
})
},
formatDate (now) {
var date = new Date(now)
var y = date.getFullYear()
var m = date.getMonth() + 1
if (m < 10) {
m = '0' + m;
}
var d = date.getDate()
if (d < 10) {
d = '0' + d;
}
var h = date.getHours()
if (h < 10) {
h = '0' + h;
}
var min = date.getMinutes()
if (min < 10) {
min = '0' + min;
}
var s = date.getSeconds()
if (s < 10) {
s = '0' + s;
}
return y + '-' + m + '-' + d + ' ' + h + ':' + min + ':' + s
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handleSelectChange (e) {
this.$emit('change', {
form: this.labelData,
value: this.dataList[e][this.labelData.showLabel]
})
},
getSelectFirst (e) {
if (!e) {
if (['LINENAME', 'CNTRTOTAL', 'KINDPKGS', 'ISSUETYPE', 'YARDID', 'CARRIER', 'NOBILL', 'CARGOID'].includes(this.labelData.label)) {
this.dataList = this.emnuData(this.labelData.label)
} else {
this.$emit('selectFirst', {
form: this.labelData,
index: this.formIndex,
value: ''
})
}
}
},
emnuData (type) {
switch (type) {
case 'LINENAME':
return this.lineList
case 'CNTRTOTAL':
return this.ctnallList
case 'KINDPKGS':
return this.packageList
case 'ISSUETYPE':
return this.issuetypeList
case 'YARDID':
return this.yardList
case 'CARRIER':
return this.carrierList
case 'NOBILL':
return this.labelData.data
case 'CARGOID':
return this.labelData.data
}
},
completeSelect (value) {
const val = value.split('-')[1]
this.$emit('change', {
form: this.labelData,
value: val || ''
})
},
completeChange (value) {
const val = value ? value.split('-')[1] : ''
let res = val || value || ''
this.$emit('change', {
form: this.labelData,
value: val || value || ''
})
this.$emit('getCompleteList', {
form: this.labelData,
value: value.includes('-') ? val || '' : value || ''
})
},
completeChangeFirst (value) {
if (this.value) { return false }
let label, arr;
if (['CUSTOMERNAME', 'FORWARDER', 'SALE', 'CUSTSERVICE', 'OP', 'DOC', 'ROUTE', 'PAYABLEAT', 'ISSUEPLACE', 'PREPARDAT', 'SERVICE', 'TRUCKER', 'SHIPAGENCY', 'CUSTOMSER'].includes(this.labelData.label)) {
label = this.labelData.label.toLowerCase()
arr = this.bookingInitData[`${label}InitList`]
} else if (['PORTDISCHARGE', 'PORTLOAD', 'PLACERECEIPT', 'DESTINATION', 'PLACEDELIVERY'].includes(this.labelData.label)) {
label = this.labelData.label.toLowerCase() + 'id'
arr = this.bookingInitData[`${label}InitList`]
} else if (['PLACERECEIPT', 'DESTINATION', 'PLACEDELIVERY'].includes(this.labelData.label)) {
label = this.labelData.label.toLowerCase() + 'name'
arr = this.bookingInitData[`${label}InitList`]
} else if (this.labelData.label === 'AGENTID') {
label = 'agentname'
arr = this.bookingInitData[`${label}InitList`]
} else {
label = ''
arr = []
}
if (arr.length > 0) {
this.dataSourceList = arr
} else {
this.$emit('getCompleteList', {
form: this.labelData,
value: value || ''
})
}
},
inputChange (data) {
this.changeInput(data)
},
dateChangeFun (data) {
this.changeDate(data)
}
}
}
</script>
<style lang="less" scoped>
.aa{
transform: scaleY(.8);
}
/deep/ .ant-select-selection__clear{
margin-top: 0;
}
.vessel-label{
// border-bottom:1px solid #eee;
.title{
height: 28px;
line-height: 28px;
font-size: 14px;
font-weight:600;
color: #666;
border-bottom:1px dashed #ddd;
margin-bottom: 4px;
}
.voyno, .etd {
height: 22px;
line-height: 22px;
font-size: 12px;
color: #999;
}
}
/deep/.ant-calendar-picker-input{
overflow: hidden;
}
/deep/.ant-calendar-range-picker-input{
height: 24px !important;
line-height: 24px !important;
}
/deep/ .ant-input{
height: 24px !important;
}
</style>

@ -0,0 +1,597 @@
export default {
// ==== 表格部分 ====
columns: [
{ type: 'checkbox', width: 60, noDraggable: true },
{ field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true },
{ field: 'yard', label: 'YARD', width: 120, title: '场站', showHeaderOverflow: true, sortable: true },
{
field: 'mblno',
label: 'MBLNO',
width: 160,
title: '主提单号',
showHeaderOverflow: true,
showOverflow: false,
sortable: true,
slots: { default: 'mblno' }
},
{ field: 'vessel', label: 'VESSEL', width: 120, title: '船名', showHeaderOverflow: true, sortable: true },
{
field: 'etd',
label: 'ETD',
width: 110,
title: '开船日期',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'etd' }
},
{ field: 'voyno', label: 'VOYNO', width: 120, title: '海关航次', showHeaderOverflow: true },
// { field: 'bookingStatus', label: 'BOOKINGSTATUS', width: 120, title: '订舱状态', showHeaderOverflow: true },
// { field: 'vgm', label: 'VGM', width: 120, title: 'VGM', showHeaderOverflow: true },
// { field: 'billStatus', label: 'BILLSTATUS', width: 120, title: '提单状态', showHeaderOverflow: true },
{
field: 'portdischarge',
label: 'PORTDISCHARGE',
width: 120,
title: '卸货港',
showHeaderOverflow: true,
sortable: true
},
{
field: 'createdUserName',
label: 'CREATEDUSERNAME',
width: 120,
title: '创建人',
showHeaderOverflow: true,
sortable: true
},
{
field: 'createdTime',
label: 'CREATEDTIME',
width: 160,
title: '创建日期',
showHeaderOverflow: true,
sortable: true
},
{
field: 'cntrtotal',
label: 'CNTRTOTAL',
width: 120,
title: '箱型*箱量',
showHeaderOverflow: true,
sortable: true
},
{
field: 'operate',
title: '操作',
width: 110,
noDraggable: true,
slots: { default: 'operate' },
fixed: 'right',
resizable: false
}
],
columnsAllData: [
{
field: 'mblno',
label: 'MBLNO',
width: 160,
title: '主提单号',
showHeaderOverflow: true,
showOverflow: false,
sortable: true,
slots: { default: 'mblno' }
},
{ field: 'hblno', label: 'HBLNO', width: 120, title: '分提单号', showHeaderOverflow: true, sortable: true },
{
field: 'customername',
label: 'CUSTOMERNAME',
width: 120,
title: '委托单位',
showHeaderOverflow: true,
sortable: true
}, // 客户
{ field: 'consignee', label: 'CONSIGNEE', width: 120, title: '收货人', showHeaderOverflow: true, sortable: true },
{
field: 'notifyparty',
label: 'NOTIFYPARTY',
width: 120,
title: '通知人',
showHeaderOverflow: true,
sortable: true
},
{ field: 'yard', label: 'YARD', width: 120, title: '场站', showHeaderOverflow: true, sortable: true },
{ field: 'vessel', label: 'VESSEL', width: 120, title: '船名', showHeaderOverflow: true, sortable: true },
{
field: 'voynoinner',
label: 'VOYNOINNER',
width: 120,
title: '内部航次',
showHeaderOverflow: true,
sortable: true
}, // 内部航次 / 海关航次 暂时放内部航次
{
field: 'etd',
label: 'ETD',
width: 110,
title: '开船日期',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'etd' }
},
{
field: 'atd',
label: 'ATD',
width: 160,
title: '实际开船日期',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'atd' }
},
{ field: 'blfrt', label: 'BLFRT', width: 120, title: '付费方式', showHeaderOverflow: true, sortable: true },
{ field: 'payableat', label: 'PAYABLEAT', width: 120, title: '到付地点', showHeaderOverflow: true, sortable: true },
{ field: 'pkgs', label: 'PKGS', width: 120, title: '件数', showHeaderOverflow: true, sortable: true },
{ field: 'kindpkgs', label: 'KINDPKGS', width: 120, title: '包装', showHeaderOverflow: true, sortable: true },
{ field: 'kgs', label: 'KGS', width: 120, title: '重量', showHeaderOverflow: true, sortable: true },
{ field: 'cbm', label: 'CBM', width: 90, title: '尺码', showHeaderOverflow: true, sortable: true },
{
field: 'cntrtotal',
label: 'CNTRTOTAL',
width: 120,
title: '箱型*箱量',
showHeaderOverflow: true,
sortable: true
},
{
field: 'custservice',
label: 'CUSTSERVICE',
width: 120,
title: '客服员',
showHeaderOverflow: true,
sortable: true
},
{
field: 'createdUserName',
label: 'CREATEDUSERNAME',
width: 120,
title: '创建人',
showHeaderOverflow: true,
sortable: true
},
{
field: 'createdTime',
label: 'CREATEDTIME',
width: 160,
title: '创建日期',
showHeaderOverflow: true,
sortable: true
},
{ field: 'op', label: 'OP', width: 120, title: '操作员', showHeaderOverflow: true, sortable: true },
{ field: 'doc', label: 'DOC', width: 120, title: '单证员', showHeaderOverflow: true, sortable: true },
{ field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true },
{ field: 'customser', label: 'CUSTOMSER', width: 120, title: '报关行', showHeaderOverflow: true, sortable: true },
{ field: 'hscode', label: 'HSCODE', width: 120, title: 'HS编码', showHeaderOverflow: true, sortable: true },
{ field: 'issuetype', label: 'ISSUETYPE', width: 120, title: '签单方式', showHeaderOverflow: true, sortable: true },
{
field: 'issueplace',
label: 'ISSUEPLACE',
width: 120,
title: '签单地点',
showHeaderOverflow: true,
sortable: true
},
{
field: 'placedelivery',
label: 'PLACEDELIVERY',
width: 120,
title: '交货地点',
showHeaderOverflow: true,
sortable: true
},
{ field: 'nobill', label: 'NOBILL', width: 120, title: '提单份数', showHeaderOverflow: true, sortable: true },
{
field: 'portdischarge',
label: 'PORTDISCHARGE',
width: 120,
title: '卸货港',
showHeaderOverflow: true,
sortable: true
},
{
field: 'bookremark',
label: 'BOOKREMARK',
width: 120,
title: '备注',
className: 'book-remark-box',
showOverflow: false,
slots: { default: 'bookremark' }
}, // 标题 合同号备注 改为 备注
// { field: 'remarks', label: 'REMARKS', width: 120, title: '其他备注', showHeaderOverflow: true, showOverflow: false, sortable: true, slots: { default: 'remarks' } }, // 暂时写为so备注 + si备注 数据量太大,不要了
{
field: 'bookstatus',
label: 'BOOKSTATUS',
minWidth: 140,
title: '运踪',
showHeaderOverflow: true,
slots: { default: 'bookstatus' }
},
{
field: 'closingdate',
label: 'CLOSINGDATE',
width: 160,
title: '截港日期',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'closingdate' }
},
{ field: 'eta', label: 'ETA', width: 160, title: '预计到港日期', showHeaderOverflow: true, sortable: true },
{ field: 'portload', label: 'PORTLOAD', width: 160, title: '装货港', showHeaderOverflow: true, sortable: true },
{ field: 'shipper', label: 'SHIPPER', width: 160, title: '发货人', showHeaderOverflow: true, sortable: true },
{
field: 'destination',
label: 'DESTINATION',
width: 160,
title: '目的地',
showHeaderOverflow: true,
sortable: true
},
{
field: 'issuedate',
label: 'ISSUEDATE',
width: 160,
title: '签单日期',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'issuedate' }
},
{ field: 'prepardat', label: 'PREPARDAT', width: 160, title: '预付地点', showHeaderOverflow: true, sortable: true },
{ field: 'service', label: 'SERVICE', width: 160, title: '运输条款', showHeaderOverflow: true, sortable: true },
{ field: 'sale', label: 'SALE', width: 160, title: '揽货人', showHeaderOverflow: true, sortable: true }, // 销售
{ field: 'lanename', label: 'LANENAME', width: 160, title: '船司航线', showHeaderOverflow: true, sortable: true },
// { field: 'servicecontractno', label: 'SERVICECONTRACTNO', width: 160, title: '客户合同号', showHeaderOverflow: true, sortable: true }, // 没有设置该字段的地方 - 暂时去掉
{
field: 'bsstatusname',
label: 'BSSTATUSNAME',
width: 160,
title: '业务状态',
showHeaderOverflow: true,
sortable: true
},
{ field: 'bookingno', label: 'BOOKINGNO', width: 160, title: '业务编号', showHeaderOverflow: true, sortable: true },
{ field: 'agentid', label: 'AGENTID', width: 160, title: '国外代理', showHeaderOverflow: true, sortable: true },
{ field: 'trucker', label: 'TRUCKER', width: 160, title: '车队', showHeaderOverflow: true, sortable: true },
{ field: 'tempset', label: 'TEMPSET', width: 160, title: '设置温度', showHeaderOverflow: true, sortable: true },
{ field: 'reeferf', label: 'REEFERF', width: 160, title: '通风度', showHeaderOverflow: true, sortable: true },
{ field: 'shipagency', label: 'SHIPAGENCY', width: 160, title: '船代', showHeaderOverflow: true, sortable: true },
{ field: 'custno', label: 'CUSTNO', width: 160, title: '订舱编号', showHeaderOverflow: true, sortable: true },
// { field: 'vgm', label: 'VGM', width: 120, title: 'VGM', showHeaderOverflow: true },
{ field: 'forwarder', label: 'FORWARDER', width: 120, title: '订舱代理', showHeaderOverflow: true, sortable: true },
// { field: 'bookingStatus', label: 'BOOKINGSTATUS', width: 120, title: '订舱状态', showHeaderOverflow: true },
{
field: 'freightpayer',
label: 'FREIGHTPAYER',
width: 120,
title: '付款方',
showHeaderOverflow: true,
sortable: true
},
{ field: 'voyno', label: 'VOYNO', width: 120, title: '海关航次', showHeaderOverflow: true },
{ field: 'cargoid', label: 'CARGOID', width: 120, title: '货物标识', showHeaderOverflow: true, sortable: true },
{ field: 'marks', label: 'MARKS', width: 120, title: '唛头', showHeaderOverflow: true, sortable: true },
// { field: 'billStatus', label: 'BILLSTATUS', width: 120, title: '提单状态', showHeaderOverflow: true },
{ field: 'dunno', label: 'DUNNO', width: 120, title: '危险品编号', showHeaderOverflow: true, sortable: true },
{ field: 'contractno', label: 'CONTRACTNO', width: 120, title: '合约号', showHeaderOverflow: true, sortable: true },
{ field: 'route', label: 'ROUTE', width: 120, title: '航线操作', showHeaderOverflow: true, sortable: true },
// { field: 'lanecode', label: 'LANECODE', width: 120, title: '航线代码', showHeaderOverflow: true, sortable: true },
{
field: 'shipperid',
label: 'SHIPPERID',
width: 120,
title: '发货人代码',
showHeaderOverflow: true,
sortable: true
}, // 台账无字段
{
field: 'notifypartyid',
label: 'NOTIFYPARTYID',
width: 120,
title: '通知人代码',
showHeaderOverflow: true,
sortable: true
}, // 台账无字段
{
field: 'notifypartY2',
label: 'NOTIFYPARTY2',
width: 120,
title: '第二通知人',
showHeaderOverflow: true,
sortable: true
}, // 台账无,详情有
{
field: 'consigneeid',
label: 'CONSIGNEEID',
width: 120,
title: '收货人代码',
showHeaderOverflow: true,
sortable: true
}, // 台账无字段
{
field: 'closedocdate',
label: 'CLOSEDOCDATE',
width: 120,
title: '截单日期',
showHeaderOverflow: true,
sortable: true
},
{ field: 'bsdate', label: 'BSDATE', width: 120, title: '业务日期', showHeaderOverflow: true, sortable: true }, // 台账无字段
{ field: 'vesselid', label: 'VESSELID', width: 120, title: '船舶呼号', showHeaderOverflow: true, sortable: true }, // 台账无字段
{
field: 'closevgmdate',
label: 'CLOSEVGMDATE',
width: 120,
title: '截VGM时间',
showHeaderOverflow: true,
sortable: true
},
{
field: 'placereceipt',
label: 'PLACERECEIPT',
width: 120,
title: '收货地',
showHeaderOverflow: true,
sortable: true
},
{
field: 'placereceiptid',
label: 'PLACERECEIPTID',
width: 120,
title: '收货地代码',
showHeaderOverflow: true,
sortable: true
},
{
field: 'destinationid',
label: 'DESTINATIONID',
width: 120,
title: '目的地代码',
showHeaderOverflow: true,
sortable: true
},
{
field: 'placedeliveryid',
label: 'PLACEDELIVERYID',
width: 120,
title: '交货地代码',
showHeaderOverflow: true,
sortable: true
},
{
field: 'portloadid',
label: 'PORTLOADID',
width: 120,
title: '装货港代码',
showHeaderOverflow: true,
sortable: true
},
{
field: 'portdischargeid',
label: 'PORTDISCHARGEID',
width: 120,
title: '卸货港代码',
showHeaderOverflow: true,
sortable: true
},
{
field: 'pono',
label: 'PONO',
width: 120,
title: 'PO NO',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'pono' }
},
// 以下为新增字段
{
field: 'dzRemark',
label: 'DZREMARK',
width: 160,
title: '单证备注',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'dzRemark' }
},
{
field: 'czRemark',
label: 'CZREMARK',
width: 160,
title: '操作备注',
showHeaderOverflow: true,
sortable: true,
slots: { default: 'czRemark' }
},
{
field: 'goodsStatusList',
label: 'GOODSSTATUSLIST',
minWidth: 160,
title: '货物状态',
showHeaderOverflow: true,
slots: { default: 'goodsStatusList' }
},
{ field: 'tmblno', label: 'TMBLNO', width: 120, title: '真提单号', showHeaderOverflow: true, sortable: true },
{ field: 'linename', label: 'LINENAME', width: 120, title: '航线', showHeaderOverflow: true, sortable: true },
{
field: 'lstShipOrderCompareRlt',
label: 'LSTSHIPORDERCOMPARERLT',
minWidth: 92,
title: '下货纸比对',
showHeaderOverflow: true,
slots: { default: 'lstShipOrderCompareRlt' }
}
],
// ==== 表单部分 ====
condAllData: [
{ title: '委托单位', align: 'center', width: 160, label: 'CUSTOMERNAME', type: 'complete', showLabel: 'shortName' }, // 客户
{ title: '主提单号', align: 'center', width: 160, label: 'MBLNO', type: 'input' },
{ title: '分提单号', align: 'center', width: 160, label: 'HBLNO', type: 'input' },
{
title: '船公司',
align: 'center',
width: 120,
label: 'CARRIER',
type: 'select',
showLabel: 'enName',
showLabel2: 'cnName'
},
{ title: '订舱代理', align: 'center', width: 120, label: 'FORWARDER', type: 'complete', showLabel: 'shortName' },
{
title: '场站',
align: 'center',
width: 120,
label: 'YARDID',
type: 'select',
showLabel: 'code',
showLabel2: 'name'
}, // 场站显示 name , yardid 取字段 code
// { title: '船名/航次', align: 'center', width: 120, label: 'VESSEL', type: 'complete', showLabel: 'vessel', showLabel2: 'voyno' }, // 船名航次换接口 船名 vessel 航次 voyno
{ title: '船名', align: 'center', width: 120, label: 'VESSEL', type: 'complete', showLabel: 'name' }, // 船名航次换接口 船名 vessel 航次 voyno
{ title: '开船日期', align: 'center', width: 160, label: 'ETD', type: 'dateRange', resLabel: ['BETD', 'EETD'] },
{ title: '实际开船日期', align: 'center', width: 160, label: 'ATD', type: 'dateRange', resLabel: ['BATD', 'EATD'] },
{ title: '预计到港日期', align: 'center', width: 160, label: 'ETA', type: 'dateRange', resLabel: ['BETA', 'EETA'] },
{ title: '卸货港', align: 'center', width: 120, label: 'PORTDISCHARGE', type: 'complete', showLabel: 'enName' },
{ title: '装货港', align: 'center', width: 120, label: 'PORTLOAD', type: 'complete', showLabel: 'enName' },
{ title: '揽货人', align: 'center', width: 120, label: 'SALE', type: 'complete', showLabel: 'name' }, // 销售
{ title: '客服员', align: 'center', width: 120, label: 'CUSTSERVICE', type: 'complete', showLabel: 'name' },
{ title: '操作员', align: 'center', width: 120, label: 'OP', type: 'complete', showLabel: 'name' },
{ title: '单证员', align: 'center', width: 120, label: 'DOC', type: 'complete', showLabel: 'name' },
{ title: '报关行', align: 'center', width: 120, label: 'CUSTOMSER', type: 'complete', showLabel: 'shortName' },
{ title: '订舱编号', align: 'center', width: 120, label: 'CUSTNO', type: 'input' },
{ title: '业务编号', align: 'center', width: 120, label: 'BOOKINGNO', type: 'input' },
{ title: '业务状态', align: 'center', width: 120, label: 'BSSTATUS', type: 'input' },
// { title: '客户合同号', align: 'center', width: 120, label: 'SERVICECONTRACTNO', type: 'input' }, // 暂时去掉
// { title: '航线代码', align: 'center', width: 120, label: 'LANECODE', type: 'input' },
{ title: '内部航次', align: 'center', width: 120, label: 'VOYNOINNER', type: 'input' },
{ title: '海关航次', align: 'center', width: 120, label: 'VOYNO', type: 'input' },
{ title: '发货人', align: 'center', width: 120, label: 'SHIPPER', type: 'input' },
{ title: '发货人代码', align: 'center', width: 120, label: 'SHIPPERID', type: 'input' },
{ title: '通知人', align: 'center', width: 120, label: 'NOTIFYPARTY', type: 'input' },
{ title: '通知人代码', align: 'center', width: 120, label: 'NOTIFYPARTYID', type: 'input' },
{ title: '第二通知人', align: 'center', width: 120, label: 'NOTIFYPARTY2', type: 'input' },
{ title: '收货人', align: 'center', width: 120, label: 'CONSIGNEE', type: 'input' },
{ title: '收货人代码', align: 'center', width: 120, label: 'CONSIGNEEID', type: 'input' },
{
title: '截单日期',
align: 'center',
width: 160,
label: 'CLOSEDOCDATE',
type: 'dateRange',
resLabel: ['BCLOSEDOCDATE', 'ECLOSEDOCDATE']
},
{ title: '业务日期', align: 'center', width: 120, label: 'BSDATE', type: 'date' },
{ title: '合约号', align: 'center', width: 120, label: 'CONTRACTNO', type: 'input' },
{ title: '船舶呼号', align: 'center', width: 120, label: 'VESSELID', type: 'input' },
{
title: '截港日期',
align: 'center',
width: 160,
label: 'CLOSINGDATE',
type: 'dateRange',
resLabel: ['BCLOSINGDATE', 'ECLOSINGDATE']
},
{
title: '截VGM时间',
align: 'center',
width: 160,
label: 'CLOSEVGMDATE',
type: 'dateRange',
resLabel: ['BCLOSEVGMDATE', 'ECLOSEVGMDATE']
},
{ title: '收货地', align: 'center', width: 120, label: 'PLACERECEIPT', type: 'complete', showLabel: 'enName' },
{ title: '目的地', align: 'center', width: 120, label: 'DESTINATION', type: 'complete', showLabel: 'enName' },
{ title: '交货地', align: 'center', width: 120, label: 'PLACEDELIVERY', type: 'complete', showLabel: 'enName' },
{ title: '收货地代码', align: 'center', width: 120, label: 'PLACERECEIPTID', type: 'input' },
{ title: '目的地代码', align: 'center', width: 120, label: 'DESTINATIONID', type: 'input' },
{ title: '交货地代码', align: 'center', width: 120, label: 'PLACEDELIVERYID', type: 'input' },
{ title: '装货港代码', align: 'center', width: 120, label: 'PORTLOADID', type: 'input' },
{ title: '卸货港代码', align: 'center', width: 120, label: 'PORTDISCHARGEID', type: 'input' },
{ title: '航线操作', align: 'center', width: 120, label: 'ROUTE', type: 'complete', showLabel: 'name' },
{ title: 'PO NO', align: 'center', width: 120, label: 'PONO', type: 'input' },
{ title: '件数', align: 'center', width: 160, label: 'PKGS', type: 'input' },
{ title: '重量', align: 'center', width: 160, label: 'KGS', type: 'input' },
{ title: '尺码', align: 'center', width: 160, label: 'CBM', type: 'input' },
{ title: 'HS编码', align: 'center', width: 160, label: 'HSCODE', type: 'input' },
{ title: '船司航线', align: 'center', width: 160, label: 'LANENAME', type: 'input' },
{ title: '设置温度', align: 'center', width: 160, label: 'TEMPSET', type: 'input' },
{ title: '通风度', align: 'center', width: 160, label: 'REEFERF', type: 'input' },
{ title: '付款方', align: 'center', width: 160, label: 'FREIGHTPAYER', type: 'input' },
{ title: '唛头', align: 'center', width: 160, label: 'MARKS', type: 'input' },
{ title: '危险品编号', align: 'center', width: 160, label: 'DUNNO', type: 'input' },
{ title: '箱号', align: 'center', width: 160, label: 'CNTRNO', type: 'input' },
{ title: '封号', align: 'center', width: 160, label: 'SEALNO', type: 'input' },
{ title: '创建人', align: 'center', width: 160, label: 'CreatedUserName', type: 'input' },
{ title: '单证备注', align: 'center', width: 160, label: 'DZREMARK', type: 'input' },
{ title: '操作备注', align: 'center', width: 160, label: 'CZREMARK', type: 'input' },
{ title: '到付地点', align: 'center', width: 160, label: 'PAYABLEAT', type: 'complete', showLabel: 'enName' },
{ title: '付费方式', align: 'center', width: 160, label: 'BLFRT', type: 'complete', showLabel: 'enName' },
{ title: '签单地点', align: 'center', width: 160, label: 'ISSUEPLACE', type: 'complete', showLabel: 'enName' },
{ title: '预付地点', align: 'center', width: 160, label: 'PREPARDAT', type: 'complete', showLabel: 'enName' },
{ title: '运输条款', align: 'center', width: 160, label: 'SERVICE', type: 'complete', showLabel: 'name' },
{ title: '国外代理', align: 'center', width: 160, label: 'AGENTID', type: 'complete', showLabel: 'shortName' },
{ title: '车队', align: 'center', width: 160, label: 'TRUCKER', type: 'complete', showLabel: 'shortName' },
{ title: '船代', align: 'center', width: 160, label: 'SHIPAGENCY', type: 'complete', showLabel: 'name' },
{ title: '箱型', align: 'center', width: 120, label: 'CNTRTOTAL', type: 'select', showLabel: 'name' },
{ title: '包装', align: 'center', width: 120, label: 'KINDPKGS', type: 'select', showLabel: 'name' },
{
title: '签单方式',
align: 'center',
width: 160,
label: 'ISSUETYPE',
type: 'select',
showLabel: 'enName',
showLabel2: 'cnName'
},
{ title: '航线', align: 'center', width: 160, label: 'LINENAME', type: 'select', showLabel: 'name' },
{
title: '提单份数',
align: 'center',
width: 160,
label: 'NOBILL',
type: 'select',
showLabel: 'name',
data: [
{ name: 'ONE' },
{ name: 'TWO' },
{ name: 'THREE' },
{ name: 'FOUR' },
{ name: 'FIVE' },
{ name: 'SIX' },
{ name: 'SEVEN' },
{ name: 'EIGHT' },
{ name: 'NINE' },
{ name: 'TEN' }
]
},
{
title: '货物标识',
align: 'center',
width: 160,
label: 'CARGOID',
type: 'select',
showLabel: 'code',
showLabel2: 'name',
data: [
{ code: 'S', name: '普通货' },
{ code: 'R', name: '冻柜' },
{ code: 'D', name: '危险品' },
{ code: 'O', name: '超限箱' }
]
},
{
title: '签单日期',
align: 'center',
width: 160,
label: 'ISSUEDATE',
type: 'dateRange',
resLabel: ['BISSUEDATE', 'EISSUEDATE']
},
{ title: '真提单号', align: 'center', width: 160, label: 'TMBLNO', type: 'input' }
]
}

@ -68,6 +68,12 @@
</a-upload>
<a-button v-if="hasPerm('sysUser:export')" icon="down-circle" @click="sysUserExport()"> </a-button>
</template>
<span slot="sysEmpInfo" slot-scope="text">
{{ departmentFilter(text) }}
</span>
<span slot="sex" slot-scope="text">
{{ sexFilter(text) }}
</span>
@ -169,6 +175,13 @@ export default {
title: '姓名',
dataIndex: 'name'
},
{
title: '部门',
dataIndex: 'sysEmpInfo',
scopedSlots: {
customRender: 'sysEmpInfo'
}
},
{
title: '性别',
dataIndex: 'sex',
@ -243,6 +256,10 @@ export default {
}
},
methods: {
departmentFilter(sysEmpInfo) {
// console.log('sysEmpInfo===>>',sysEmpInfo)
return sysEmpInfo.orgName
},
sexFilter(sex) {
// eslint-disable-next-line eqeqeq
const values = this.sexDictTypeDropDown.filter(item => item.code == sex)

Loading…
Cancel
Save