szh_zidingyibiaoti
lilu 2 years ago
commit 925a091dcb

@ -7,9 +7,10 @@ import './index.less'
export default {
components: {
draggable, columnSetting
draggable,
columnSetting
},
data () {
data() {
return {
needTotalList: [],
@ -49,9 +50,9 @@ export default {
type: String,
default: 'middle'
},
scroll:{
type:Object,
default:() => ({ y: '50vh'})
scroll: {
type: Object,
default: () => ({ y: '50vh' })
},
alert: {
type: [Object, Boolean],
@ -85,12 +86,13 @@ export default {
},
extraTool: {
type: Array,
default: () => ([])
default: () => []
}
}),
watch: {
'localPagination.current' (val) {
this.pageURI && this.$router.push({
'localPagination.current'(val) {
this.pageURI &&
this.$router.push({
...this.$route,
name: this.$route.name,
params: Object.assign({}, this.$route.params, {
@ -98,26 +100,28 @@ export default {
})
})
},
pageNum (val) {
pageNum(val) {
Object.assign(this.localPagination, {
current: val
})
},
pageSize (val) {
pageSize(val) {
Object.assign(this.localPagination, {
pageSize: val
})
},
showSizeChanger (val) {
showSizeChanger(val) {
Object.assign(this.localPagination, {
showSizeChanger: val
})
}
},
created () {
created() {
const { pageNo } = this.$route.params
const localPageNum = this.pageURI && (pageNo && parseInt(pageNo)) || this.pageNum
this.localPagination = ['auto', true].includes(this.showPagination) && Object.assign({}, this.localPagination, {
const localPageNum = (this.pageURI && pageNo && parseInt(pageNo)) || this.pageNum
this.localPagination =
(['auto', true].includes(this.showPagination) &&
Object.assign({}, this.localPagination, {
current: localPageNum,
pageSize: this.pageSize,
showSizeChanger: this.showSizeChanger,
@ -125,31 +129,28 @@ export default {
showTotal: (total, range) => {
return range[0] + '-' + range[1] + '共' + total + '条'
}
}) || false
})) ||
false
this.needTotalList = this.initTotalList(this.columns)
this.loadData()
// this.columnsSetting = this.columns
//记录选择显示的列以当前路由为key
this.columnsSetting = []
let cacheColumns=this.$ls.get(this.$route.path);
if(cacheColumns && cacheColumns.length>0){
this.columnsSetting=cacheColumns;
let cacheColumns = this.$ls.get(this.$route.path)
if (cacheColumns && cacheColumns.length > 0) {
this.columnsSetting = cacheColumns
this.columns.forEach((item,index,arr)=>{
let temp=this.columnsSetting.find(m=>m.dataIndex==item.dataIndex);
this.columns.forEach((item, index, arr) => {
let temp = this.columnsSetting.find(m => m.dataIndex == item.dataIndex)
//如果存在
if(temp){
arr[index].checked=temp.checked;
if (temp) {
arr[index].checked = temp.checked
}
})
this.columnsSetting = this.columns
}
else{
} else {
this.columnsSetting = this.columns
}
},
@ -159,10 +160,15 @@ export default {
* 如果参数为 true, 则强制刷新到第一页
* @param Boolean bool
*/
refresh (bool = false) {
bool && (this.localPagination = Object.assign({}, {
current: 1, pageSize: this.pageSize
}))
refresh(bool = false) {
bool &&
(this.localPagination = Object.assign(
{},
{
current: 1,
pageSize: this.pageSize
}
))
this.loadData()
},
/**
@ -171,20 +177,28 @@ export default {
* @param {Object} filters 过滤条件
* @param {Object} sorter 排序条件
*/
loadData (pagination, filters, sorter) {
loadData(pagination, filters, sorter) {
this.localLoading = true
const parameter = Object.assign({
pageNo: (pagination && pagination.current) ||
this.showPagination && this.localPagination.current || this.pageNum,
pageSize: (pagination && pagination.pageSize) ||
this.showPagination && this.localPagination.pageSize || this.pageSize
},
(sorter && sorter.field && {
const parameter = Object.assign(
{
pageNo:
(pagination && pagination.current) || (this.showPagination && this.localPagination.current) || this.pageNum,
pageSize:
(pagination && pagination.pageSize) ||
(this.showPagination && this.localPagination.pageSize) ||
this.pageSize
},
(sorter &&
sorter.field && {
sortField: sorter.field
}) || {},
(sorter && sorter.order && {
}) ||
{},
(sorter &&
sorter.order && {
sortOrder: sorter.order
}) || {}, {
}) ||
{},
{
...filters
}
)
@ -197,13 +211,15 @@ export default {
this.localLoading = false
return
}
this.localPagination = this.showPagination && Object.assign({}, this.localPagination, {
this.localPagination =
(this.showPagination &&
Object.assign({}, this.localPagination, {
current: r.pageNo, // pageNo, // 返回结果中的当前分页数
total: r.totalRows, // totalCount, // 返回结果中的总记录数
showSizeChanger: this.showSizeChanger,
pageSize: (pagination && pagination.pageSize) ||
this.localPagination.pageSize
}) || false
pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize
})) ||
false
// 后端数据rows为null保存修复
if (r.rows == null) {
r.rows = []
@ -218,20 +234,25 @@ export default {
// 这里用于判断接口是否有返回 r.totalCount 且 this.showPagination = true 且 pageNo 和 pageSize 存在 且 totalCount 小于等于 pageNo * pageSize 的大小
// 当情况满足时,表示数据不满足分页大小,关闭 table 分页功能
try {
if ((['auto', true].includes(this.showPagination) && r.totalCount <= (r.totalPage * this.localPagination.pageSize))) {
if (
['auto', true].includes(this.showPagination) &&
r.totalCount <= r.totalPage * this.localPagination.pageSize
) {
this.localPagination.hideOnSinglePage = true
}
} catch (e) {
this.localPagination = false
}
this.localDataSource = this.showPagination? r.rows:r // 返回结果中的数组数据
this.localDataSource = this.showPagination ? r.rows : r // 返回结果中的数组数据
this.localLoading = false
})
}
},
initTotalList (columns) {
initTotalList(columns) {
const totalList = []
columns && columns instanceof Array && columns.forEach(column => {
columns &&
columns instanceof Array &&
columns.forEach(column => {
if (column.needTotal) {
totalList.push({
...column,
@ -246,7 +267,7 @@ export default {
* @param selectedRowKeys
* @param selectedRows
*/
updateSelect (selectedRowKeys, selectedRows) {
updateSelect(selectedRowKeys, selectedRows) {
this.selectedRows = selectedRows
this.selectedRowKeys = selectedRowKeys
const list = this.needTotalList
@ -263,7 +284,7 @@ export default {
/**
* 清空 table 已选中项
*/
clearSelected () {
clearSelected() {
if (this.rowSelection) {
this.rowSelection.onChange([], [])
this.updateSelect([], [])
@ -274,31 +295,40 @@ export default {
* @param callback
* @returns {*}
*/
renderClear (callback) {
renderClear(callback) {
if (this.selectedRowKeys.length <= 0) return null
return (
<a style="margin-left: 24px" onClick={() => {
<a
style="margin-left: 24px"
onClick={() => {
callback()
this.clearSelected()
}}>清空</a>
}}
>
清空
</a>
)
},
renderAlert () {
renderAlert() {
// 绘制统计列数据
// eslint-disable-next-line no-unused-vars
const needTotalItems = this.needTotalList.map((item) => {
return (<span style="margin-right: 12px">
{item.title}总计 <a style="font-weight: 600">{!item.customRender ? item.total : item.customRender(item.total)}</a>
</span>)
const needTotalItems = this.needTotalList.map(item => {
return (
<span style="margin-right: 12px">
{item.title}总计{' '}
<a style="font-weight: 600">{!item.customRender ? item.total : item.customRender(item.total)}</a>
</span>
)
})
// 绘制 清空 按钮
// eslint-disable-next-line no-unused-vars
const clearItem = (typeof this.alert.clear === 'boolean' && this.alert.clear) ? (
this.renderClear(this.clearSelected)
) : (this.alert !== null && typeof this.alert.clear === 'function') ? (
this.renderClear(this.alert.clear)
) : null
const clearItem =
typeof this.alert.clear === 'boolean' && this.alert.clear
? this.renderClear(this.clearSelected)
: this.alert !== null && typeof this.alert.clear === 'function'
? this.renderClear(this.alert.clear)
: null
// 绘制 alert 组件
// 统一先去除alert组件
@ -317,7 +347,7 @@ export default {
this.columnsSetting = val
this.$ls.set(this.$route.path, val)
},
renderHeader () {
renderHeader() {
let tools = [
{
icon: 'reload',
@ -342,8 +372,7 @@ export default {
</a-menu>
)
},
onClick: () => {
}
onClick: () => {}
},
{
icon: 'setting',
@ -353,8 +382,7 @@ export default {
//return <columnSetting slot="overlay" columns={this.columns} onColumnChange={this.columnChange} />
return <columnSetting slot="overlay" columns={this.columnsSetting} onColumnChange={this.columnChange} />
},
onClick: () => {
}
onClick: () => {}
}
]
if (this.extraTool.length) {
@ -363,19 +391,16 @@ export default {
return (
<div class="s-table-tool">
<div class="s-table-tool-left">
{this.$scopedSlots.operator && this.$scopedSlots.operator()}
</div>
<div class="s-table-tool-left">{this.$scopedSlots.operator && this.$scopedSlots.operator()}</div>
<div class="s-table-tool-right">
{
tools.map(tool => {
{tools.map(tool => {
if (tool.isDropdown) {
return (
<a-dropdown trigger={['click']}>
<a-tooltip title={tool.title} class="s-tool-item" onClick={tool.onClick}>
<a-icon type={tool.icon}/>
<a-icon type={tool.icon} />
</a-tooltip>
{ tool.menu() }
{tool.menu()}
</a-dropdown>
)
}
@ -384,8 +409,7 @@ export default {
<a-icon type={tool.icon} />
</a-tooltip>
)
})
}
})}
</div>
</div>
)
@ -401,10 +425,15 @@ export default {
}
},
render () {
render() {
let props = {}
const localKeys = Object.keys(this.$data)
const showAlert = (typeof this.alert === 'object' && this.alert !== null && this.alert.show) && typeof this.rowSelection.selectedRowKeys !== 'undefined' || this.alert
const showAlert =
(typeof this.alert === 'object' &&
this.alert !== null &&
this.alert.show &&
typeof this.rowSelection.selectedRowKeys !== 'undefined') ||
this.alert
Object.keys(T.props).forEach(k => {
const localKey = `local${k.substring(0, 1).toUpperCase()}${k.substring(1)}`
@ -441,16 +470,24 @@ export default {
return props[k]
})
const table = (
<a-table {...{ props, scopedSlots: { ...this.$scopedSlots } }} onChange={this.loadData} onExpand={ (expanded, record) => { this.$emit('expand', expanded, record) } }>
{ Object.keys(this.$slots).map(name => (<template slot={name}>{this.$slots[name]}</template>)) }
<a-table
{...{ props, scopedSlots: { ...this.$scopedSlots } }}
onChange={this.loadData}
onExpand={(expanded, record) => {
this.$emit('expand', expanded, record)
}}
>
{Object.keys(this.$slots).map(name => (
<template slot={name}>{this.$slots[name]}</template>
))}
</a-table>
)
return (
<div class="table-wrapper">
{ this.renderHeader() }
{ showAlert ? this.renderAlert() : null }
{ table }
{this.renderHeader()}
{showAlert ? this.renderAlert() : null}
{table}
</div>
)
}

@ -9,7 +9,7 @@
<!-- -->
</template>
<script>
let timer;
let timer
export default {
name: '',
props: {
@ -38,17 +38,19 @@ export default {
},
watch: {
parentVal(nval, oval) {
if (this.inEdit) { return false }
if (this.inEdit) {
return false
}
this.value = nval
}
},
mounted() {},
methods: {
debounce (func, wait, ...args) {
if (timer) clearTimeout(timer);
debounce(func, wait, ...args) {
if (timer) clearTimeout(timer)
timer = setTimeout(() => {
func.apply(this, args);
}, wait);
func.apply(this, args)
}, wait)
},
textareaBlur() {
if (this.openToCDB) {
@ -70,27 +72,27 @@ export default {
})
},
ToCDB(str) {
var tmp = '';
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);
tmp += String.fromCharCode(str.charCodeAt(i) - 65248)
} else {
tmp += String.fromCharCode(str.charCodeAt(i));
tmp += String.fromCharCode(str.charCodeAt(i))
}
}
tmp = tmp.replace(//ig, ',')
tmp = tmp.replace(/。/ig, '.')
tmp = tmp.replace(//ig, ';')
tmp = tmp.replace(//ig, ':')
tmp = tmp.replace(//ig, '?')
tmp = tmp.replace(//ig, '!')
tmp = tmp.replace(/《/ig, '<<')
tmp = tmp.replace(/》/ig, '>>')
tmp = tmp.replace(//ig, "'")
tmp = tmp.replace(//ig, "'")
tmp = tmp.replace(/、/ig, ',')
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/ig, ' ')
tmp = tmp.replace(/\t/gi, ' ')
//
if (/[\u4E00-\u9FA5]+/g.test(tmp) && ['description', 'marks'].includes(this.type)) {
tmp = tmp.replace(/[\u4E00-\u9FA5]+/g, '')
@ -98,7 +100,7 @@ export default {
}
return tmp
},
getTypeName (type) {
getTypeName(type) {
switch (type) {
case 'marks':
return '封志号 / 标记与号码'

@ -121,7 +121,12 @@
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="2" tab="分单信息" :forceRender="true" v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0">
<a-tab-pane
key="2"
tab="分单信息"
:forceRender="true"
v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0"
>
<sedOrder
ref="sedOrder"
:details="bookingDetails"
@ -405,8 +410,27 @@ export default {
defaultData: {}
}
},
watch: {
'bookingDetails.yardid': {
deep: true,
handler(nVal, oVal) {
console.log(nVal, oVal)
}
}
},
computed: {
...mapGetters(['bookingList', 'needSavePages', 'hasbookingDetail', 'bookingList', 'bookingGridOptions', 'carrierList', 'yardList', 'packageList', 'issuetypeList', 'blfrtList'])
...mapGetters([
'bookingList',
'needSavePages',
'hasbookingDetail',
'bookingList',
'bookingGridOptions',
'carrierList',
'yardList',
'packageList',
'issuetypeList',
'blfrtList'
])
},
created() {
this.init()
@ -583,7 +607,9 @@ export default {
}, 200)
setTimeout(() => {
const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
@ -627,7 +653,9 @@ export default {
setTimeout(() => {
const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
@ -688,7 +716,9 @@ export default {
setTimeout(() => {
const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
@ -709,7 +739,9 @@ export default {
setTimeout(() => {
const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key) ? !!this.needSavePages[key].details : false
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
@ -755,7 +787,8 @@ export default {
getDefaultVal() {
getDjyTenantConfig({
type: 'booking_default_value'
}).then(res => {
})
.then(res => {
const defaultData = JSON.parse(res.data.configJson)
this.defaultData = defaultData
defaultData.map((item, index) => {
@ -767,17 +800,57 @@ export default {
}
if (Object.keys(initDetail).includes(label)) {
initDetail[label] = item.code
this.bookingDetails[label] = this.bookingDetails[label] && this.bookingDetails[label] !== '' ? this.bookingDetails[label] : item.code
this.bookingDetails[label] =
this.bookingDetails[label] && this.bookingDetails[label] !== ''
? this.bookingDetails[label]
: item.code
}
} else if (field[0] === 'ctn') {
if (['CTNALL', 'CTNNUM', 'CNTRNO', 'SEALNO', 'PKGS', 'KINDPKGS', 'KGS', 'CBM', 'TAREWEIGHT', 'WEIGHTYPE', 'WEIGHKGS'].includes(field[1])) {
if (
[
'CTNALL',
'CTNNUM',
'CNTRNO',
'SEALNO',
'PKGS',
'KINDPKGS',
'KGS',
'CBM',
'TAREWEIGHT',
'WEIGHTYPE',
'WEIGHKGS'
].includes(field[1])
) {
this.ctnDefaultData[label] = item.code
this.bookingDetails.ctnInputs.map((citem, cindex) => {
this.bookingDetails.ctnInputs[cindex][label] = citem[label] && citem[label] !== '' ? citem[label] : item.code
this.bookingDetails.ctnInputs[cindex][label] =
citem[label] && citem[label] !== '' ? citem[label] : item.code
})
}
} else if (field[0] === 'edi') {
const typeArr1 = ['WeiTuoFang', 'SendCode', 'ReceiveCode', 'NotifyCdoe', 'SalerCode', 'MasterBolIndicator', 'EmanifestHbl', 'ConsigneeEdiCode', 'ShipperEdiCode', 'OpEName', 'OpTel', 'OpEmail', 'GoodsName', 'MasterBolIndicatorName', 'SalerCodeName', 'OrderRemark', 'ExRemark1', 'ExRemark2', 'ExRemark3', 'ExRemark4', 'KingTareweight']
const typeArr1 = [
'WeiTuoFang',
'SendCode',
'ReceiveCode',
'NotifyCdoe',
'SalerCode',
'MasterBolIndicator',
'EmanifestHbl',
'ConsigneeEdiCode',
'ShipperEdiCode',
'OpEName',
'OpTel',
'OpEmail',
'GoodsName',
'MasterBolIndicatorName',
'SalerCodeName',
'OrderRemark',
'ExRemark1',
'ExRemark2',
'ExRemark3',
'ExRemark4',
'KingTareweight'
]
const typeArr2 = ['EDIAttn', 'EDIAttnTel', 'EDIAttnMail', 'AMSConsignee', 'AMSNotifyParty']
const typeArr3 = ['ACIHBL', 'CKHI', 'CNCM', 'WNCM']
const typeArr4 = ['S0CC0C']
@ -790,15 +863,19 @@ export default {
}
initDetail.bookingEDIExt[label] = item.code
bookingEDIExt[label] = item.code
this.bookingDetails.bookingEDIExt[label] = this.bookingDetails.bookingEDIExt[label] && this.bookingDetails.bookingEDIExt[label] !== '' ? this.bookingDetails.bookingEDIExt[label] : item.code
this.bookingDetails.bookingEDIExt[label] =
this.bookingDetails.bookingEDIExt[label] && this.bookingDetails.bookingEDIExt[label] !== ''
? this.bookingDetails.bookingEDIExt[label]
: item.code
}
})
}).catch(err => {
})
.catch(err => {
console.log(err)
})
},
emnuDefaultLabel (field) {
emnuDefaultLabel(field) {
switch (field) {
case 'EPCODE':
return 'epCode'
@ -935,7 +1012,9 @@ export default {
if (res.data.ctnInputs.length > 0) {
res.data.ctnInputs.map((item, index) => {
if (item.weightype === '累加') {
item.weighkgs = item.weighkgs ? item.weighkgs : this.calc(Number(item['kgs']), Number(item['tareweight']), '+')
item.weighkgs = item.weighkgs
? item.weighkgs
: this.calc(Number(item['kgs']), Number(item['tareweight']), '+')
}
})
}
@ -1016,7 +1095,7 @@ export default {
this.$forceUpdate()
},
getRightAll () {
getRightAll() {
GetAllData({
bookingId: this.id
})
@ -1032,7 +1111,7 @@ export default {
})
},
upDateRightFun () {
upDateRightFun() {
this.getRightAll()
},
@ -1425,7 +1504,9 @@ export default {
},
checkSaveFun(data) {
console.log('== details 发生变化 - 保存 ==', data, this.inGoodsSave, this.detailsLoadOver)
if (this.inGoodsSave) { return false }
if (this.inGoodsSave) {
return false
}
const key = this.$route.fullPath
const lastPages = this.needSavePages
const $data = this.needSavePages[key] || {}
@ -1441,7 +1522,7 @@ export default {
this.setNeedSavePages(lastPages)
console.log('保存信息设置完成', this.needSavePages)
},
inGoodsSaveFun (data) {
inGoodsSaveFun(data) {
this.inGoodsSave = data
},
@ -1560,12 +1641,12 @@ export default {
this.tabActiveKey = '1'
}
},
changeCtnInfoFun ({ type, val }) {
changeCtnInfoFun({ type, val }) {
if (type === 'kindpkgs') {
this.bookingDetails.kindpkgs = val
}
},
removeOrderFun () {
removeOrderFun() {
DeleteBookingOrder([this.bookingDetails.id].toString())
.then(res => {
if (res.success) {
@ -1593,6 +1674,5 @@ export default {
/deep/ .ant-tabs-top-bar {
display: none !important;
}
}
}
</style>

@ -1,11 +1,14 @@
<template>
<a-collapse class="collapse-box" :bordered="false" v-model="showKey" >
<a-collapse class="collapse-box" :bordered="false" v-model="showKey">
<a-collapse-panel key="1" :showArrow="false">
<template slot="header">
<div class="base-tit"><i class="iconfont icon-a-fahuodaifahuo"></i>收发通信息 <span class="click-btn" @click.stop="tabStopFun"></span></div>
<div class="base-tit">
<i class="iconfont icon-a-fahuodaifahuo"></i>收发通信息
<span class="click-btn" @click.stop="tabStopFun"></span>
</div>
</template>
<template slot="extra">
<div class="tab-change"><i class="iconfont icon-xia" :class="{'active': !showKey.includes('1')}"></i></div>
<div class="tab-change"><i class="iconfont icon-xia" :class="{ active: !showKey.includes('1') }"></i></div>
</template>
<div class="mail-info">
<a-form-model :selfUpdate="true" ref="mailingFrom" :model="details" :rules="rules">
@ -69,7 +72,9 @@
@change="getSelectViewRes"
style="flex:1;"
></selectView>
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('consignee')"></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" @click="spliceMore('consignee')" :style="{ fontSize: '14px' }">*</span>
<span class="btn" @click="changeCode(35, 'consignee')">35</span>
@ -116,7 +121,9 @@
@change="getSelectViewRes"
style="flex:1;"
></selectView>
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('notifyparty')"></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" @click="spliceMore('notifyparty')" :style="{ fontSize: '14px' }">*</span>
<span class="btn" @click="changeCode(35, 'notifyparty')">35</span>
@ -145,7 +152,7 @@
</a-col>
<a-col class="right-content" :xs="24" :sm="24" :md="24" :lg="14" :xl="13">
<a-row :gutter="16">
<div class="right-content-top" >
<div class="right-content-top">
<a-col :span="12">
<a-form-model-item
class="from-label yarn-label"
@ -284,7 +291,7 @@
type="shippingMethod"
:defaultVal="details.shippingMethod"
searchApi="ShippingMethod"
:searchQuery="{ name: ''}"
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="false"
:isCopy="true"
@ -434,7 +441,12 @@
has-feedback
prop="placereceipt"
>
<inputView type="placereceipt" size="small" :parentVal="details.placereceipt" @getInputChange="inputChange"/>
<inputView
type="placereceipt"
size="small"
:parentVal="details.placereceipt"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -467,7 +479,12 @@
has-feedback
prop="portload"
>
<inputView type="portload" size="small" :parentVal="details.portload" @getInputChange="inputChange"/>
<inputView
type="portload"
size="small"
:parentVal="details.portload"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -499,7 +516,12 @@
has-feedback
prop="transport"
>
<inputView type="transport" size="small" :parentVal="details.transport" @getInputChange="inputChange"/>
<inputView
type="transport"
size="small"
:parentVal="details.transport"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -531,7 +553,12 @@
has-feedback
prop="portdischarge"
>
<inputView type="portdischarge" size="small" :parentVal="details.portdischarge" @getInputChange="inputChange"/>
<inputView
type="portdischarge"
size="small"
:parentVal="details.portdischarge"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -563,7 +590,12 @@
has-feedback
prop="destination"
>
<inputView type="destination" size="small" :parentVal="details.destination" @getInputChange="inputChange"/>
<inputView
type="destination"
size="small"
:parentVal="details.destination"
@getInputChange="inputChange"
/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -595,7 +627,12 @@
has-feedback
prop="placedelivery"
>
<inputView type="placedelivery" size="small" :parentVal="details.placedelivery" @getInputChange="inputChange"/>
<inputView
type="placedelivery"
size="small"
:parentVal="details.placedelivery"
@getInputChange="inputChange"
/>
<!-- <a-input :allowClear="true" v-model="details.placedelivery" /> -->
</a-form-model-item>
</a-col>
@ -610,7 +647,13 @@
>
<div class="line-box">
<!-- <inputView type="pkgs" :parentVal="details.pkgs" inputType="number" @getInputChange="inputChange"/> -->
<a-input :allowClear="true" size="small" v-model="details.pkgs" type="number" @change="changePkgs"/>
<a-input
:allowClear="true"
size="small"
v-model="details.pkgs"
type="number"
@change="changePkgs"
/>
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('pkgs')"></i>
</div>
</a-form-model-item>
@ -800,9 +843,7 @@ import inputView from '../components/inputView'
import textareaView from '../components/textareaView'
import selectView from '../components/selectView'
import datePickerView from '../components/datePickerView'
import {
BookingTemplateAdd
} from '@/api/modular/main/BookingLedger'
import { BookingTemplateAdd } from '@/api/modular/main/BookingLedger'
let timer
export default {
@ -904,7 +945,7 @@ export default {
}
}
},
created() { },
created() {},
mounted() {
const shipperScroll = document.getElementById('shipper-scroll')
if (shipperScroll) {
@ -957,7 +998,7 @@ export default {
this.yardVisible = false
this.yardType = ''
},
init() { },
init() {},
//
saveModel(type) {
@ -1439,23 +1480,29 @@ export default {
this.cbmtotalRes = cbm
},
// -
getSelectViewRes ({ type, res }) {
getSelectViewRes({ type, res }) {
console.log('选择数据: ', type, res)
if (['yard'].includes(type)) {
//
this.details[type] = res.name || ''
this.details[`${type}id`] = res.code || ''
} else if (['placereceiptid', 'portloadid', 'transportid', 'portdischargeid', 'destinationid', 'placedeliveryid'].includes(type)) {
} else if (
['placereceiptid', 'portloadid', 'transportid', 'portdischargeid', 'destinationid', 'placedeliveryid'].includes(
type
)
) {
//
this.details[type] = res['ediCode'] || ''
this.details[type.replace('id', '')] = res['enName'] || ''
if (type === 'portloadid') { //
if (type === 'portloadid') {
//
this.details.issueplace = res['enName'] || ''
this.details.issueplaceid = res['ediCode'] || ''
// this.details.prepardat = this.details.prepardat ? this.details.prepardat : res['enName'] || ''
this.details.placereceiptid = this.details.placereceiptid ? this.details.placereceiptid : res['ediCode'] || ''
this.details.placereceipt = this.details.placereceipt ? this.details.placereceipt : res['enName'] || ''
} else if (type === 'portdischargeid') { //
} else if (type === 'portdischargeid') {
//
// this.details.payableat = this.details.payableat ? this.details.payableat : res['enName'] || ''
// this.details.payableatid = this.details.payableatid ? this.details.payableatid : res['ediCode'] || ''
} else if (type === 'placereceiptid') {
@ -1463,14 +1510,26 @@ export default {
this.details.portload = this.details.portload ? this.details.portload : res['enName'] || ''
}
// 线
console.log(`用户航线设置: ${this.userHasLine}, 卸货港航线设置: ${this.portdischargeHasline}, 目的港航线设置: ${this.destinationidHasline}`)
if (['portdischargeid', 'destinationid'].includes(type)) { // ,
if (Object.keys(res).length === 0 || !res.lineName || res.lineName.length === 0 || !res.lineName[0]['cnName']) {
console.log(
`用户航线设置: ${this.userHasLine}, 卸货港航线设置: ${this.portdischargeHasline}, 目的港航线设置: ${this.destinationidHasline}`
)
if (['portdischargeid', 'destinationid'].includes(type)) {
// ,
if (
Object.keys(res).length === 0 ||
!res.lineName ||
res.lineName.length === 0 ||
!res.lineName[0]['cnName']
) {
this[`${type}Hasline`] = false
return false
}
if (res.lineName[0]['carrierCode'] && this.details.carrierid !== res.lineName[0]['carrierCode']) { return false }
if (type === 'destinationid' && this.portdischargeHasline) { return false }
if (res.lineName[0]['carrierCode'] && this.details.carrierid !== res.lineName[0]['carrierCode']) {
return false
}
if (type === 'destinationid' && this.portdischargeHasline) {
return false
}
this.details.lineName = this.userHasLine ? this.details.lineName : res.lineName[0]['cnName']
if (type === 'portdischargeid') {
this.portdischargeHasline = true
@ -1502,7 +1561,7 @@ export default {
this.details.shippingMethod = res['name'] || ''
}
},
dateChangeFun ({ type, value }) {
dateChangeFun({ type, value }) {
console.log(type, value)
if (['closingdate', 'closevgmdate', 'closedocdate'].includes(type)) {
this.details[type] = value + ':00'
@ -1511,12 +1570,11 @@ export default {
}
console.log('== 日期修改 ==', type, value, this.details[type])
},
tabStopFun () {
tabStopFun() {
return false
},
tabChangeFun () {
},
toNotifyparty () {
tabChangeFun() {},
toNotifyparty() {
this.details.notifyparty = this.details.consignee
this.$forceUpdate()
}

@ -9,7 +9,7 @@
<!-- -->
</template>
<script>
let timer;
let timer
export default {
name: '',
props: {
@ -38,17 +38,19 @@ export default {
},
watch: {
parentVal(nval, oval) {
if (this.inEdit) { return false }
if (this.inEdit) {
return false
}
this.value = nval
}
},
mounted() {},
methods: {
debounce (func, wait, ...args) {
if (timer) clearTimeout(timer);
debounce(func, wait, ...args) {
if (timer) clearTimeout(timer)
timer = setTimeout(() => {
func.apply(this, args);
}, wait);
func.apply(this, args)
}, wait)
},
textareaBlur() {
if (this.openToCDB) {
@ -70,27 +72,27 @@ export default {
})
},
ToCDB(str) {
var tmp = '';
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);
tmp += String.fromCharCode(str.charCodeAt(i) - 65248)
} else {
tmp += String.fromCharCode(str.charCodeAt(i));
tmp += String.fromCharCode(str.charCodeAt(i))
}
}
tmp = tmp.replace(//ig, ',')
tmp = tmp.replace(/。/ig, '.')
tmp = tmp.replace(//ig, ';')
tmp = tmp.replace(//ig, ':')
tmp = tmp.replace(//ig, '?')
tmp = tmp.replace(//ig, '!')
tmp = tmp.replace(/《/ig, '<<')
tmp = tmp.replace(/》/ig, '>>')
tmp = tmp.replace(//ig, "'")
tmp = tmp.replace(//ig, "'")
tmp = tmp.replace(/、/ig, ',')
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/ig, ' ')
tmp = tmp.replace(/\t/gi, ' ')
//
if (/[\u4E00-\u9FA5]+/g.test(tmp) && ['description', 'marks'].includes(this.type)) {
tmp = tmp.replace(/[\u4E00-\u9FA5]+/g, '')
@ -98,7 +100,7 @@ export default {
}
return tmp
},
getTypeName (type) {
getTypeName(type) {
switch (type) {
case 'marks':
return '封志号 / 标记与号码'

@ -266,7 +266,7 @@
title="下货纸比对(有差异)"
@cancel="TaskShippingOrderCompareHandleCancel"
:visible="TaskShippingOrderCompareVisible"
width="60%"
width="40%"
>
<template slot="footer">
<a-button key="back" @click="TaskShippingOrderCompareHandleCancel">
@ -300,10 +300,10 @@
>
<p>{{ item.fieldName }}:</p>
<p>{{ item.reqVal }}</p>
<p v-if="item.msg" :style="{ flex: 1 }">
<p v-if="item.msg">
<a-icon type="close" :style="{ color: 'red' }" />
</p>
<p v-else :style="{ flex: 1 }"><a-icon type="check" :style="{ color: 'green' }" /></p>
<p v-else><a-icon type="check" :style="{ color: 'green' }" /></p>
<p>{{ item.fieldName }}:</p>
<p v-if="!item.isDiff">{{ item.targetVal }}</p>
<p v-else v-html="item.mergeHtml"></p>
@ -329,10 +329,10 @@
>
<p>{{ item.fieldName }}:</p>
<p>{{ item.reqVal }}</p>
<p v-if="item.msg" :style="{ flex: 1 }">
<p v-if="item.msg">
<a-icon type="close" :style="{ color: 'red' }" />
</p>
<p v-else :style="{ flex: 1 }"><a-icon type="check" :style="{ color: 'green' }" /></p>
<p v-else><a-icon type="check" :style="{ color: 'green' }" /></p>
<p>{{ item.fieldName }}:</p>
<p v-if="!item.isDiff">{{ item.targetVal }}</p>
<p v-else v-html="item.mergeHtml"></p>
@ -2710,10 +2710,13 @@ export default {
&:nth-child(1) {
flex: 3;
}
&:nth-child(2) {
width: 46px;
}
&:nth-child(3) {
flex: 3;
}
flex: 1;
> p {
&:first-child {
font-weight: bolder;
@ -2736,6 +2739,10 @@ export default {
&:nth-child(1) {
flex: 1;
}
&:nth-child(3) {
flex: 0;
margin: 0 1rem;
}
&:nth-child(4) {
flex: 1;
}

Loading…
Cancel
Save