pull/1/head
张同海 2 years ago
commit c0b1dbe3d5

@ -265,7 +265,7 @@ export default {
yard: [{ required: false, message: '请输入场站', trigger: 'change' }],
customser: [{ required: false, message: '请输入报关行', trigger: 'change' }],
trucker: [{ required: false, message: '请输入车队', trigger: 'change' }],
agentid: [{ required: false, message: '请输入国外代理', trigger: 'change' }],
agentname: [{ required: false, message: '请输入国外代理', trigger: 'change' }],
eta: [{ required: false, message: '请选择预抵日期', trigger: 'change' }],
closingdate: [{ required: false, message: '请选择截港时间', trigger: 'change' }],
closedocdate: [{ required: false, message: '请选择截单时间', trigger: 'change' }],

@ -253,7 +253,7 @@ const initDetail = {
yard: '',
customser: '',
trucker: '',
agentid: '',
agentname: '',
eta: '',
closingdate: '',
closedocdate: '',
@ -395,7 +395,7 @@ export default {
yard: [{ required: false, message: '请输入场站', trigger: 'change' }],
customser: [{ required: false, message: '请输入报关行', trigger: 'change' }],
trucker: [{ required: false, message: '请输入车队', trigger: 'change' }],
agentid: [{ required: false, message: '请输入国外代理', trigger: 'change' }],
agentname: [{ required: false, message: '请输入国外代理', trigger: 'change' }],
eta: [{ required: false, message: '请选择预抵日期', trigger: 'change' }],
closingdate: [{ required: false, message: '请选择截港时间', trigger: 'change' }],
closedocdate: [{ required: false, message: '请选择截单时间', trigger: 'change' }],
@ -1061,6 +1061,7 @@ export default {
BookingOrderAddOrUpdate(_data)
.then(res => {
if (res.success) {
this.$message.destroy()
that.$message.success('保存成功')
if (that.isAdd) {
that.isCopy = false
@ -1078,7 +1079,7 @@ export default {
that.isCopy = false
that.isAdd = false
console.log('1.1 == 保存成功 - 不切换路由 ==', that.id)
// that.init()
that.init()
that.checkSaveFun({ type: 'hbList', hasChange: false })
that.checkSaveFun({ type: 'details', hasChange: false })
} else {
@ -1253,6 +1254,7 @@ export default {
BookingOrderAddOrUpdate(_data)
.then(res => {
if (res.success) {
this.$message.destroy()
that.$message.success('保存成功')
if (that.isAdd) {
that.isCopy = false
@ -1270,7 +1272,7 @@ export default {
that.isCopy = false
that.isAdd = false
console.log('1.1 == 保存成功 - 不切换路由 ==', that.id)
// that.init()
that.init()
that.checkSaveFun({ type: 'hbList', hasChange: false })
that.checkSaveFun({ type: 'details', hasChange: false })
} else {

@ -12,7 +12,6 @@
@focus="handleChangeFirst"
>
<template slot="dataSource">
<!-- :value="item[showLabel[0]]" -->
<a-select-option v-for="(item, index) in dataSourceList" :key="index" :value="index + ''" >
<div class="title">
<template v-for="(label, lindex) in showLabel">
@ -28,7 +27,9 @@
<script>
import {
GetPortloadlist,
GetPortlist
GetPortlist,
BookingTemplate,
DjyCustomerpage
} from '@/api/modular/main/BookingLedger'
import { AutoComplete } from 'ant-design-vue'
let timer
@ -110,12 +111,21 @@ export default {
return GetPortloadlist
case 'GetPortlist':
return GetPortlist
case 'BookingTemplate':
return BookingTemplate
case 'DjyCustomerpage':
return DjyCustomerpage
}
},
handleSelect (e) {
const num = Number(e)
console.log(num)
const data = this.dataSourceList[num]
// 0 - 9 BUG
// if (Number(data[this.showLabel[0]]) < 10) {
// debugger
// this.value = data[this.showLabel[0]]
// }
this.value = data[this.showLabel[0]]
this.$emit('select', {
type: this.type,
@ -133,21 +143,31 @@ export default {
}, 800)
//
if (e) {
/* *
* 字段值
* Title 收发通模板
* KeyWord 港口信息
* SearchValue 报关行仓库车队 国外代理
* */
Object.keys(this.searchQuery).map((item, index) => {
if (item === 'KeyWord' || item === 'name') {
if (['Title', 'KeyWord', 'SearchValue', 'name'].includes(item)) {
this.searchQuery[item] = e
}
})
} else {
Object.keys(this.searchQuery).map((item, index) => {
if (item === 'KeyWord' || item === 'name') {
if (['Title', 'KeyWord', 'SearchValue', 'name'].includes(item)) {
this.searchQuery[item] = ''
}
})
}
this.getFromSelectData(this.emnuCompleteApi(this.searchApi), this.searchQuery).then((data) => {
console.log(data)
if (data.rows) {
this.dataSourceList = data.rows
} else {
this.dataSourceList = data
}
})
},
handleChangeFirst (e) {

@ -1658,7 +1658,7 @@ export default {
// - end
inputChange ({ type, value }) {
this.details[type] = value
console.log(this.details[type])
console.log(type, this.details[type])
if (type === 'voyno' && this.details.carrierid === 'ESL') {
this.details.voynoinner = this.details[type]
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,128 @@
<template>
<div class="select-content">
<a-select
size="small"
class="customer-input"
v-model="value"
show-search
:filter-option="filterOption"
:dropdownMatchSelectWidth="false"
@change="debounce(handleChange, 0, $event)"
@focus="getSelectFirst"
>
<a-select-option v-for="(item, index) in selectList" :key="index" :value="index">
<template v-for="(label, lindex) in showLabel">
{{ item[label] }}
<template v-if="lindex != showLabel.length - 1"> / </template>
</template>
</a-select-option>
</a-select>
</div>
</template>
<script>
import {
GetYardlist
} from '@/api/modular/main/BookingLedger'
let timer
export default {
name: '',
props: {
defaultVal: {
type: String,
default: ''
},
type: {
type: String,
default: ''
},
searchApi: {
type: String,
default: ''
},
searchQuery: {
type: Object,
default: () => {
return {}
}
},
//
showLabel: {
type: Array,
default: () => {
return []
}
}
},
data() {
return {
value: this.defaultVal || '',
selectList: [],
inEdit: false
}
},
watch: {
defaultVal(nval, oval) {
if (this.inEdit) { return false }
console.log('select - 默认值发生变化', nval)
this.value = nval
}
},
mounted() {
},
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)
}
})
});
},
emnuSelectApi (type) {
switch (type) {
case 'GetYardlist':
return GetYardlist
}
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handleChange (e, index) {
this.inEdit = true
setTimeout(() => {
this.inEdit = false
}, 800)
this.value = this.selectList[e][this.showLabel[0]]
this.$emit('change', {
type: this.type,
res: this.selectList[e]
})
console.log(e, this.selectList[e])
},
getSelectFirst (e) {
console.log(' ==== select 首次获取焦点 ====', e)
if (!e) {
this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then((data) => {
if (data.rows) {
this.selectList = data.rows
} else {
this.selectList = data
}
})
}
}
}
}
</script>
<style lang="less">
</style>

@ -0,0 +1,482 @@
.collapse-box {
margin-bottom: 2px;
background: #fff;
}
.base-tit {
font-size: 14px;
font-weight: 600;
color: #666;
position: relative;
height: 34px;
line-height: 40px;
margin-top: -5px;
&::before {
content: '';
position: absolute;
width: 4px;
height: 20px;
background: @primary-color;
top: 9px;
left: 0px;
}
i {
margin-right: 7px;
font-weight: 500;
font-size: 18px;
color: @primary-color;
}
}
.left-sender-box{
padding-top: 4px;
}
.sender,
.consignee,
.notifier {
// margin-bottom: 10px;
.top {
margin-bottom: 4px;
height: 26px;
line-height: 26px;
overflow: hidden;
display: flex;
.name {
display: inline-block;
font-size: 13px;
margin-right: 10px;
color: #666;
.iconfont {
margin-right: 4px;
font-weight: 600;
}
}
.save-btn {
height: 24px;
line-height: 22px;
margin-left: 10px;
margin-right: 10px;
span {
margin-left: 4px !important;
}
}
.right {
float: right;
margin-top: 2px;
margin-right: 25px;
}
.customer-input {
flex: 1;
}
.btn {
width: 20px;
height: 20px;
display: inline-block;
// background: #c1e0ff;
color: @primary-color;
text-align: center;
line-height: 20px;
font-size: 12px;
margin-left: 4px;
cursor: pointer;
position: relative;
vertical-align: top;
margin-top: 0;
&::before {
content: '';
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
background: @primary-color;
opacity: 0.2;
z-index: 0;
}
}
.btn-circle {
border-radius: 50%;
width: 20px;
height: 20px;
display: inline-block;
// background: #c1e0ff;
color: @primary-color;
text-align: center;
line-height: 24px;
font-size: 12px;
margin-right: 4px;
cursor: pointer;
margin-top: 2px;
position: relative;
vertical-align: top;
margin-top: 0;
border-radius: 50%;
&::before {
content: '';
width: 100%;
height: 100%;
display: block;
position: absolute;
top: 0;
left: 0;
background: @primary-color;
opacity: 0.2;
z-index: 0;
border-radius: 50%;
}
}
}
.bottom {
display: flex;
.input-box {
margin-top: 10px;
flex: 1;
font-size: 12px;
line-height: 20px;
}
textarea {
line-height: 22px;
}
.line-count {
width: 24px;
padding-top: 3px;
height: 130px;
overflow: auto;
&::-webkit-scrollbar {
display: none;
}
// max-height: 192px;
// overflow-y: auto;
div {
text-align: right;
height: 22px;
line-height: 22px;
font-size: 12px;
color: #999;
}
}
}
}
.sender-label {
position: relative;
margin-bottom: 0px !important;
margin-top: 6px;
/deep/ .ant-form-item-children-icon{
position: absolute;
top: calc(100% + 15px);
left: 0;
}
/deep/ .ant-form-explain {
display: none;
padding-left: 33px;
margin-top: -15px;
margin-bottom: 10px;
}
}
.yard-box {
position: relative;
margin-top: 5px;
i {
color: @primary-color;
margin-top: -5px !important;
cursor: pointer;
}
}
.yarn-label {
position: relative;
/deep/ .ant-form-item-children-icon {
// position: absolute;
// top: 13px;
// right: 44px;
display: none;
}
.customer-input{
margin-right: 4px;
}
}
/deep/ .ant-form-item-children-icon .anticon-check-circle {
display: none;
}
.content {
.label {
margin-bottom: 10px;
font-size: 14px;
}
}
.feeself {
position: absolute;
transform: scale(0.8);
// 原始样式
// top: -3px;
// right: -63px;
// 双层样式
top: 8px;
// left: 104px;
right: -4px;
button{
line-height: 18px;
margin-top: 0px;
height: 20px;
font-size: 13px;
}
/deep/ .ant-btn-primary{
color: #fff !important;
}
}
.from-label {
margin-bottom: 0;
}
/*多余线条去掉 */
.ant-collapse-item {
border-bottom: none;
}
.line-box {
display: flex;
margin-top: 6px;
overflow: hidden;
span.unit {
font-size: 12px;
color: #999;
display: inline-block;
text-align: center;
line-height: 28px;
padding-left: 5px;
}
.edit-icon {
font-size: 14px;
line-height: 28px;
margin-left: 4px;
cursor: pointer;
}
}
.required {
padding-left: 10px;
position: relative;
&::before {
display: inline-block;
margin-right: 4px;
color: #f5222d;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
position: absolute;
top: 8px;
left: 0;
}
}
/deep/ .right-content .ant-form-explain {
display: none !important;
}
@media (max-width: 1800px) {
// .feeself {
// right: -75px !important;
// }
}
@media (max-width: 1700px) {
.yard-box {
i {
margin-top: -11px !important;
}
}
// .feeself {
// top: 6px !important;
// right: -43px !important;
// .ant-checkbox-wrapper{
// span{
// padding: 0 4px;
// }
// }
// }
.yarn-label {
position: relative;
/deep/ .ant-form-item-children-icon {
display: none;
}
}
}
@media (max-width: 1622px) {
// .feeself {
// top: 6px !important;
// right: -52px !important;
// }
}
@media (max-width: 1495px) {
// .feeself {
// top: 6px !important;
// right: -61px !important;
// }
}
.has-error {
.ant-input {
margin-right: 0 !important;
}
.ant-input-suffix {
padding-right: 0 !important;
}
.ant-select-selection__rendered {
margin-right: 0 !important;
line-height: 24px;
}
.ant-select-arrow {
right: 0 !important;
}
}
.has-success {
.ant-input {
margin-right: 0 !important;
}
.ant-input-suffix {
padding-right: 0 !important;
}
.ant-select-selection__rendered {
margin-right: 0 !important;
}
.ant-select-arrow {
right: 0 !important;
}
}
/deep/ .has-success .ant-select-selection-selected-value {
padding-right: 0 !important;
}
/deep/ .has-error .ant-select-selection-selected-value {
padding-right: 0 !important;
}
/deep/ .has-success .ant-select-arrow {
right: 8px !important;
}
/deep/ .has-error .ant-select-arrow {
right: 8px !important;
}
.text-entry-box {
.tit {
height: 40px;
line-height: 40px;
font-size: 14px;
color: #333;
margin-bottom: 6px;
}
.total {
font-weight: 600;
padding-left: 10px;
}
.text-res {
margin-top: 20px;
.kgs-label {
display: flex;
.left {
line-height: 28px;
display: block;
width: 68px;
text-align: left;
}
.unit {
display: block;
width: 60px;
margin-left: 10px;
text-align: left;
line-height: 28px;
}
}
}
}
/deep/ .ant-select-selection__clear {
right: 10px !important;
margin-top: -4px !important;
}
/deep/ form .has-feedback :not(.ant-input-group-addon) > .ant-select .ant-select-selection__clear {
right: 10px !important;
margin-top: -4px !important;
}
/deep/ form .has-feedback .ant-input-affix-wrapper .ant-input-suffix {
right: 0px !important;
padding-right: 10px;
}
/deep/ form .has-feedback .ant-calendar-picker-icon,
form .has-feedback .ant-time-picker-icon,
form .has-feedback .ant-calendar-picker-clear,
form .has-feedback .ant-time-picker-clear {
right: 10px !important;
}
// .has-error.has-feedback{
.pkgs-line-box {
/deep/ .ant-form-item-children-icon {
right: 18px !important;
}
}
.kgs-line-box {
/deep/ .ant-form-item-children-icon {
right: 44px !important;
}
}
.cbm-line-box {
/deep/ .ant-form-item-children-icon {
right: 48px !important;
}
}
.right-content-top {
padding-bottom:4px;
margin-bottom:4px;
overflow:hidden;
position: relative;
&::before{
content: '';
position: absolute;
bottom: 0;
right: 10px;
width: 92%;
height:2px;
border-bottom: 1px dashed #ddd;
}
}
/deep/ .ant-input-suffix {
color: rgba(0, 0, 0, 0.25);
// display: none;
}
/deep/ .ant-input-affix-wrapper:hover {
.ant-input-suffix {
display: block;
}
}
/deep/ .ant-calendar-picker-clear {
color: rgba(0, 0, 0, 0.25) !important;
}
/deep/ .ant-collapse-header{
padding: 4px 10px !important;
}
/deep/ .ant-collapse-content-box{
padding-top: 4px !important;
padding-block: 0 !important;
}
.right-content{
/deep/ .ant-form-item-label {
height:36px !important;
line-height: 36px !important;
// border: 1px solid #f00;
}
/deep/ .ant-form-item-control{
height:36px !important;
line-height: 36px !important;
}
}
Loading…
Cancel
Save