szh_zidingyibiaoti
张同海 2 years ago
commit 9c5493cd79

@ -48,9 +48,9 @@ const booking = {
destinationidInitList: [],
placedeliveryidInitList: [],
payableatInitList: [],
shipperInitList: [], // 发货人 - 没有
consigneeInitList: [], // 收货人 - 没有
notifierInitList: [], // 通知人 - 没有
shippernameInitList: [], // 发货人 - 没有
consigneenameInitList: [], // 收货人 - 没有
notifypartynameInitList: [], // 通知人 - 没有
// 签单信息
issueplaceInitList: [],
prepardatInitList: [],
@ -268,6 +268,12 @@ const booking = {
case 'ck':
allData['warehouseInitList'] = $data
break
case 'dcdl':
allData['forwarderInitList'] = $data
break
case 'forwarder':
allData['shipagencyInitList'] = $data
break
case 'portload':
allData['placereceiptidInitList'] = $data
allData['portloadidInitList'] = $data
@ -282,30 +288,32 @@ const booking = {
allData['payableatInitList'] = $data
break
case 'user':
allData['saleInitList'] = $data
allData['opInitList'] = $data
allData['docInitList'] = $data
allData['custserviceInitList'] = $data
allData['routeInitList'] = $data
allData['saleInitList'] = $data.result
allData['opInitList'] = $data.result
allData['docInitList'] = $data.result
allData['custserviceInitList'] = $data.result
allData['routeInitList'] = $data.result
break
case 'contractno':
allData['goodsnameInitList'] = $data // 这里返回的是品名
allData['contractnoInitList'] = $data
break
case 'goodsName':
allData['goodsnameInitList'] = $data
break
case 'wtdw':
allData['customernameInitList'] = $data
break
case 'service':
allData['serviceInitList'] = $data
break
case 'sTemplate':
allData['shippernameInitList'] = $data
break
case 'fTemplate':
allData['consigneenameInitList'] = $data
break
case 'customer':
// 这里返回的数据应该为 委托单位,订舱代理,目前返回错误
const customernameList = []
const forwarderList = []
$data.map((customer, cindex) => {
console.log(customer.propString.includes('customername'), customer.propString.includes('forwarder'))
if (customer.propString.includes('customername')) {
customernameList.push(customer)
}
if (customer.propString.includes('forwarder')) {
forwarderList.push(customer)
}
})
allData['customernameInitList'] = customernameList
allData['forwarderInitList'] = forwarderList
case 'tTemplate':
allData['notifypartynameInitList'] = $data
break
}
})

@ -1,50 +1,61 @@
<template>
<div class="select-content">
<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)"
>
<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>
<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 ? '加载中...' : '暂无数据'"
v-clickDown="{ clickFun: () => {} , dblclickFun: this.dblclickFun }"
@focus="getSelectFirst"
@blur="getSelectBlur"
@select="selectOption"
@change="(value,option)=> debounce(this.handleChange, 200, option)"
@search="debounce(handleSearch, 300, $event)"
>
<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>
</template>
</a-select-option>
</a-select>
<div v-show="!open" class="select_overlap" @mouseup="openSelect"></div>
</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,
@ -60,6 +71,29 @@ import {
} 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: {
@ -372,6 +406,7 @@ export default {
}
},
getSelectFirst (e, canClick = true) {
// console.log('', e, this.value)
if (canClick) {
this.$refs.selectView.$refs.vcSelect.$refs.arrow.click()
} else {
@ -456,7 +491,8 @@ export default {
}
},
openSelect() {
openSelect(open) {
console.log('== 测试鼠标滑过 ==')
if (!this.open) {
this.getSelectFirst('', false)
} else {
@ -468,6 +504,27 @@ export default {
},
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)
}
}
}
@ -508,17 +565,31 @@ export default {
}
.select-content {
position: relative;
.select_overlap {
cursor: pointer;
height: 32px;
width: 300px;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0;
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: 30px;
text-align: center;
color: #bbb;
font-size: 13px;
&:hover{
color: @primary-color;
}
}
}
</style>

@ -120,6 +120,7 @@
@changeDetail="changeDetailFun"
@rules="getRules"
@upDateRight="upDateRightFun"
@inGoodsSave="inGoodsSaveFun"
></rightContent>
</a-col>
</a-row>
@ -419,7 +420,8 @@ export default {
hasTableRules: false,
inAddSave: false,
hasHbList: false,
detailsLoadOver: false
detailsLoadOver: false,
inGoodsSave: false
}
},
computed: {
@ -1327,6 +1329,7 @@ export default {
// if (this.inPageLoading) {
// return false
// }
if (this.inGoodsSave) { return false }
const key = this.$route.fullPath
const lastPages = this.needSavePages
const $data = this.needSavePages[key] || {}
@ -1342,6 +1345,9 @@ export default {
this.$set(lastPages, key, $data)
this.setNeedSavePages(lastPages)
},
inGoodsSaveFun (data) {
this.inGoodsSave = data
},
//
calc(num1, num2, calcStr) {

@ -33,10 +33,10 @@
></selectView>
<span
class="customer-btn iconfont icon-touxiang"
@click="changeCustomer('select')"
@click.stop="changeCustomer('select')"
:style="{ paddingRight: '0px' }"
></span>
<span class="customer-btn iconfont icon-jiahao2fill" @click="changeCustomer('add')"></span>
<span class="customer-btn iconfont icon-jiahao2fill" @click.stop="changeCustomer('add')"></span>
</div>
</a-form-model-item>
</a-col>
@ -154,20 +154,23 @@
has-feedback
prop="contractno"
>
<template v-if="details.carrierid == 'PIL'">
<selectView
type="contractno"
:defaultVal="details.contractno"
searchApi="getContractno"
:searchQuery="{ queryItem: '', top: 50 }"
:showLabel="['contractNo']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
</template>
<template v-else>
<inputView type="contractno" :parentVal="details.contractno" @getInputChange="inputChange" />
</template>
<div class="copy-box">
<template v-if="details.carrierid == 'PIL'">
<selectView
class="copy-input"
type="contractno"
:defaultVal="details.contractno"
searchApi="getContractno"
:searchQuery="{ queryItem: '', top: 50 }"
:showLabel="['contractNo']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
</template>
<template v-else>
<inputView type="contractno" :parentVal="details.contractno" @getInputChange="inputChange" />
</template>
</div>
</a-form-model-item>
</a-col>
</template>
@ -197,15 +200,18 @@
has-feedback
prop="vessel"
>
<selectView
type="vessel"
:defaultVal="details.vessel"
searchApi="getVesselInfoService"
:searchQuery="{ KeyWord: '', CarrierID: this.details.carrierid || 'CMA', ETD: this.details.etd || '' }"
:showLabel="['vessel']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
<div class="copy-box">
<selectView
class="copy-input"
type="vessel"
:defaultVal="details.vessel"
searchApi="getVesselInfoService"
:searchQuery="{ KeyWord: '', CarrierID: this.details.carrierid || 'CMA', ETD: this.details.etd || '' }"
:showLabel="['vessel']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
</div>
</a-form-model-item>
</a-col>
<template v-if="details.carrierid === 'ESL'">
@ -559,6 +565,7 @@ import {
DjyCustomerContacts
} from '@/api/modular/main/BookingLedger'
import VueClipboard from 'vue-clipboard2'
let timer
export default {
name: 'BookingDetail',

@ -682,7 +682,11 @@ export default {
// })
this.$nextTick(() => {
this.booGoodsStatusItem = res.data
this.$emit('inGoodsSave', true)
this.details.goodsStatus = res.data
setTimeout(() => {
this.$emit('inGoodsSave', false)
}, 400)
})
this.$message.success('货物状态设置成功')
this.GoodsStatusVisible = false
@ -733,7 +737,11 @@ export default {
that.locaGoodsStatus.splice(index, 1)
that.details.goodsStatus.forEach((item, index2) => {
if (item.systemCode == data.systemCode) {
that.$emit('inGoodsSave', true)
that.details.goodsStatus.splice(index2, 1)
setTimeout(() => {
that.$emit('inGoodsSave', false)
}, 1200)
}
})
@ -765,7 +773,11 @@ export default {
.then(res => {
if (res.success) {
this.booGoodsStatusItem = res.data
this.$emit('inGoodsSave', true)
this.details.goodsStatus = res.data
setTimeout(() => {
this.$emit('inGoodsSave', false)
}, 400)
}
})
.catch(err => {

@ -51,7 +51,7 @@
}
}
.customer-box {
.customer-box{
display: flex;
margin-top: 2px;
.customer-input {
@ -66,6 +66,21 @@
margin-top: -4px;
}
}
.copy-box {
display: flex;
.copy-input{
flex: 1;
}
.copy-btn{
width: 30px;
color: #999;
text-align: center;
cursor: pointer;
&:hover{
color: @primary-color;
}
}
}
.my-dropdown2 {
border-radius: 4px;
border: 1px solid #dcdfe6;

@ -123,6 +123,11 @@
<a-icon class="CSMblnoCopy" type="copy" @click="FnCopy(row.mblno)" />
</div>
</template>
<template #pono="{ row }">
<div class="pono">
{{ row.pono }}
</div>
</template>
<template #vessel="{ row }">
<div class="vessel">{{ row.vessel }}</div>
</template>
@ -1778,6 +1783,7 @@ export default {
<style lang="less" scoped>
/*订舱表格内字体颜色 */
.mblno {
text-align: left;
color: @primary-color;
span {
margin-right: 0.5rem;
@ -2468,4 +2474,14 @@ export default {
font-size: 100px;
}
}
.pono{
text-align: left;
}
/deep/ .vxe-header--row th{
text-align: left !important;
}
/deep/ .vxe-cell--title{
width: 100%;
text-align: left;
}
</style>

@ -98,7 +98,7 @@ export default {
{ 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 },
{ 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' } },

Loading…
Cancel
Save