szh_zidingyibiaoti
张同海 2 years ago
commit 9c5493cd79

@ -48,9 +48,9 @@ const booking = {
destinationidInitList: [], destinationidInitList: [],
placedeliveryidInitList: [], placedeliveryidInitList: [],
payableatInitList: [], payableatInitList: [],
shipperInitList: [], // 发货人 - 没有 shippernameInitList: [], // 发货人 - 没有
consigneeInitList: [], // 收货人 - 没有 consigneenameInitList: [], // 收货人 - 没有
notifierInitList: [], // 通知人 - 没有 notifypartynameInitList: [], // 通知人 - 没有
// 签单信息 // 签单信息
issueplaceInitList: [], issueplaceInitList: [],
prepardatInitList: [], prepardatInitList: [],
@ -268,6 +268,12 @@ const booking = {
case 'ck': case 'ck':
allData['warehouseInitList'] = $data allData['warehouseInitList'] = $data
break break
case 'dcdl':
allData['forwarderInitList'] = $data
break
case 'forwarder':
allData['shipagencyInitList'] = $data
break
case 'portload': case 'portload':
allData['placereceiptidInitList'] = $data allData['placereceiptidInitList'] = $data
allData['portloadidInitList'] = $data allData['portloadidInitList'] = $data
@ -282,30 +288,32 @@ const booking = {
allData['payableatInitList'] = $data allData['payableatInitList'] = $data
break break
case 'user': case 'user':
allData['saleInitList'] = $data allData['saleInitList'] = $data.result
allData['opInitList'] = $data allData['opInitList'] = $data.result
allData['docInitList'] = $data allData['docInitList'] = $data.result
allData['custserviceInitList'] = $data allData['custserviceInitList'] = $data.result
allData['routeInitList'] = $data allData['routeInitList'] = $data.result
break break
case 'contractno': 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 break
case 'customer': case 'tTemplate':
// 这里返回的数据应该为 委托单位,订舱代理,目前返回错误 allData['notifypartynameInitList'] = $data
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
break break
} }
}) })

@ -1,50 +1,61 @@
<template> <template>
<div class="select-content"> <div class="select-content">
<a-select <div class="select-input">
size="small" <a-select
ref="selectView" size="small"
:class="`select-input-${type}`" ref="selectView"
v-model="value" :class="`select-input-${type}`"
show-search v-model="value"
:allowClear="true" show-search
:filter-option="!this.openSearch ? filterOption : false" :allowClear="true"
:dropdownMatchSelectWidth="false" :filter-option="!this.openSearch ? filterOption : false"
:showArrow="!this.openSearch ? true : true" :dropdownMatchSelectWidth="false"
:open="open" :showArrow="!this.openSearch ? true : true"
optionLabelProp="label" :open="open"
:notFoundContent="inLoading ? '加载中...' : '暂无数据'" optionLabelProp="label"
@focus="getSelectFirst" :notFoundContent="inLoading ? '加载中...' : '暂无数据'"
@blur="getSelectBlur" v-clickDown="{ clickFun: () => {} , dblclickFun: this.dblclickFun }"
@select="selectOption" @focus="getSelectFirst"
@change="(value,option)=> debounce(this.handleChange, 200, option)" @blur="getSelectBlur"
@search="debounce(handleSearch, 300, $event)" @select="selectOption"
> @change="(value,option)=> debounce(this.handleChange, 200, option)"
<a-select-option v-for="(item, index) in selectList" :key="index" :value="item[showLabel[0]] + index" :label="item[showLabel[0]]"> @search="debounce(handleSearch, 300, $event)"
<template v-if="type === 'contractno'"> >
<div class="contractno-label"> <a-select-option v-for="(item, index) in selectList" :key="index" :value="item[showLabel[0]] + index" :label="item[showLabel[0]]">
<div class="title"> {{ item.contractNo }} / {{ item.contractName || '--' }} </div> <template v-if="type === 'contractno'">
<div class="note"><span>{{ item.contractNote || '--' }}</span></div> <div class="contractno-label">
</div> <div class="title"> {{ item.contractNo }} / {{ item.contractName || '--' }} </div>
</template> <div class="note"><span>{{ item.contractNote || '--' }}</span></div>
<template v-if="type === 'vessel'"> </div>
<div class="vessel-label"> </template>
<div class="title"> {{ item.vessel }} </div> <template v-if="type === 'vessel'">
<div class="voyno">航次 <span>{{ item.voyno || '--' }}</span></div> <div class="vessel-label">
<div class="etd">ETD: <span>{{ item.etd || '--' }}</span></div> <div class="title"> {{ item.vessel }} </div>
</div> <div class="voyno">航次 <span>{{ item.voyno || '--' }}</span></div>
</template> <div class="etd">ETD: <span>{{ item.etd || '--' }}</span></div>
<template v-else> </div>
<template v-for="(label, lindex) in showLabel"> </template>
{{ item[label] }} <template v-else>
<template v-if="lindex != showLabel.length - 1"> / </template> <template v-for="(label, lindex) in showLabel">
{{ item[label] }}
<template v-if="lindex != showLabel.length - 1"> / </template>
</template>
</template> </template>
</template> </a-select-option>
</a-select-option> </a-select>
</a-select> <div v-show="!open" class="select_overlap" @mouseup="openSelect"></div>
<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> </div>
</template> </template>
<script> <script>
import Vue from 'vue'
import { import {
GetPortloadlist, GetPortloadlist,
GetPortlist, GetPortlist,
@ -60,6 +71,29 @@ import {
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
import { mapGetters, mapActions } from 'vuex' import { mapGetters, mapActions } from 'vuex'
let timer 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 { export default {
name: '', name: '',
props: { props: {
@ -372,6 +406,7 @@ export default {
} }
}, },
getSelectFirst (e, canClick = true) { getSelectFirst (e, canClick = true) {
// console.log('', e, this.value)
if (canClick) { if (canClick) {
this.$refs.selectView.$refs.vcSelect.$refs.arrow.click() this.$refs.selectView.$refs.vcSelect.$refs.arrow.click()
} else { } else {
@ -456,7 +491,8 @@ export default {
} }
}, },
openSelect() { openSelect(open) {
console.log('== 测试鼠标滑过 ==')
if (!this.open) { if (!this.open) {
this.getSelectFirst('', false) this.getSelectFirst('', false)
} else { } else {
@ -468,6 +504,27 @@ export default {
}, },
getSelectBlur (e) { getSelectBlur (e) {
this.open = false 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 { .select-content {
position: relative; display: flex;
.select_overlap { .select-input{
cursor: pointer; flex: 1;
height: 32px; position: relative;
width: 300px; overflow: hidden;
position: absolute; .select_overlap {
top: 0; cursor: pointer;
left: 0; height: 32px;
right: 0; width: 100%;
bottom: 0; position: absolute;
opacity: 0; 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> </style>

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

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

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

@ -51,7 +51,7 @@
} }
} }
.customer-box { .customer-box{
display: flex; display: flex;
margin-top: 2px; margin-top: 2px;
.customer-input { .customer-input {
@ -66,6 +66,21 @@
margin-top: -4px; 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 { .my-dropdown2 {
border-radius: 4px; border-radius: 4px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;

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

@ -98,7 +98,7 @@ export default {
{ field: 'placedeliveryid', label: 'PLACEDELIVERYID', 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: 'portloadid', label: 'PORTLOADID', width: 120, title: '装货港代码', showHeaderOverflow: true, sortable: true },
{ field: 'portdischargeid', label: 'PORTDISCHARGEID', 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: '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: 'czRemark', label: 'CZREMARK', width: 160, title: '操作备注', showHeaderOverflow: true, sortable: true, slots: { default: 'czRemark' } },

Loading…
Cancel
Save