张同海 2 years ago
commit 017acd957c

@ -42,6 +42,7 @@
<goodsTable
:details="bookingDetails"
@changeDetail="changeDetailFun"
@changeTotal="changeTotalFun"
v-if="!inPageLoading"
></goodsTable>
</div>
@ -497,7 +498,11 @@ export default {
// console.log('isCopy', this.$route.query.isCopy)
if (this.$route.query.isCopy) {
res.data.mblno = ''
delete res.data.id
this.isAdd = true
res.data.ctnInputs.map((item, index) => {
delete item.id
})
}
if (res.data.hbList && res.data.hbList.length > 0) {
this.Showtabs = true
@ -741,6 +746,7 @@ export default {
delete item.id
})
}
this.bookingDetails.hbList = [data]
this.tabActiveKey = '2'
this.Showtabs = true
@ -859,6 +865,16 @@ export default {
}
return sum
},
changeTotalFun (data) {
const { type, val } = data
if (type === 'totalKgs') {
this.bookingDetails.kgs = val || this.bookingDetails.kgs
} else if (type === 'totalPkgs') {
this.bookingDetails.pkgs = val || this.bookingDetails.pkgs
} else if (type === 'totalCbm') {
this.bookingDetails.cbm = val || this.bookingDetails.cbm
}
}
}
}

@ -4,8 +4,13 @@
<div slot="content" style="margin-top: -5px;">
<a-form style="margin-bottom:10px;">
<a-row class="from-box" :gutter="10">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="客户" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="12">
<a-form-item
class="from-label"
label="客户"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback>
<div class="customer-box">
<auto-complete
:allowClear="true"
@ -28,6 +33,11 @@
</div>
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="12">
<a-form-item class="from-label" label="提单号" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input :allowClear="true" v-model="details.mblno" :disabled="ishd" />
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="船公司" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<!-- <auto-complete
@ -77,11 +87,7 @@
<a-input :allowClear="true" v-model="details.pono" />
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item class="from-label" label="提单号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input :allowClear="true" v-model="details.mblno" :disabled="ishd" />
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
@ -136,17 +142,6 @@
/>
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
label="海关航次"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input :allowClear="true" v-model="details.voyno" />
</a-form-item>
</a-col>
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
@ -183,6 +178,18 @@
</a-form-item>
</a-col>
</template>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
label="海关航次"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input :allowClear="true" v-model="details.voyno" />
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="6">
<a-form-item
class="from-label"
@ -504,6 +511,16 @@ export default {
sm: { span: 15 },
md: { span: 13 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 8 },
md: { span: 5 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 15 },
md: { span: 18 }
},
form: this.$form.createForm(this),
dataSource: ['Burns Bay Road', 'Downing Street', 'Wall Street'],
customerData: [], //
@ -945,7 +962,7 @@ export default {
customerChange(value) {
// this.getCustomer(value)
if (!value) {
this.details.customername = ''
this.details.customername = this.details.customername ? this.details.customername : ''
}
this.getDjyCustomerpage(value, 'customer', 'consignor')
},
@ -958,7 +975,7 @@ export default {
forwarderChange(value) {
console.log('订舱代理发生变化', value)
if (!value) {
this.details.forwarder = ''
this.details.forwarder = this.details.forwarder ? this.details.forwarder : ''
}
this.getDjyCustomerpage(value, 'forwarder', 'booking_agent')
},
@ -1030,7 +1047,7 @@ export default {
},
shipagencyChange(value) {
if (!value) {
this.details.shipagency = ''
this.details.shipagency = this.details.shipagency ? this.details.shipagency : ''
}
this.getForwarderlist(value)
},
@ -1058,7 +1075,7 @@ export default {
},
vesselChange(value) {
if (!value) {
this.details.vessel = ''
this.details.vessel = this.details.vessel ? this.details.vessel : ''
}
this.getVessel(value)
},
@ -1073,7 +1090,7 @@ export default {
},
voynoinnerChange(value) {
if (!value) {
this.details.voynoinner = ''
this.details.voynoinner = this.details.voynoinner ? this.details.voynoinner : ''
}
this.getVoynoinner(value)
},
@ -1091,7 +1108,7 @@ export default {
},
lanenameChange(value) {
if (!value) {
this.details.lanename = ''
this.details.lanename = this.details.lanename ? this.details.lanename : ''
}
this.getLanename(value)
},
@ -1129,7 +1146,7 @@ export default {
},
saleChange(value) {
if (!value) {
this.details.sale = ''
this.details.sale = this.details.sale ? this.details.sale : ''
}
this.getUserList(value, 'sale')
},
@ -1142,7 +1159,7 @@ export default {
},
opChange(value) {
if (!value) {
this.details.op = ''
this.details.op = this.details.op ? this.details.op : ''
}
this.getUserList(value, 'op')
},
@ -1155,7 +1172,7 @@ export default {
},
docChange(value) {
if (!value) {
this.details.doc = ''
this.details.doc = this.details.doc ? this.details.doc : ''
}
this.getUserList(value, 'doc')
},
@ -1168,7 +1185,7 @@ export default {
},
custserviceChange(value) {
if (!value) {
this.details.custservice = ''
this.details.custservice = this.details.custservice ? this.details.custservice : ''
}
this.getUserList(value, 'custservice')
},

@ -554,7 +554,7 @@ export default {
},
issueplaceChange(value) {
if (!value) {
this.details.issueplace = ''
this.details.issueplace = this.details.issueplace ? this.details.issueplace : ''
}
this.getPortloadlist(value, 'issueplace')
},
@ -568,7 +568,7 @@ export default {
},
prepardatChange(value) {
if (!value) {
this.details.prepardat = ''
this.details.prepardat = this.details.prepardat ? this.details.prepardat : ''
}
this.getPortloadlist(value, 'prepardat')
},
@ -596,7 +596,7 @@ export default {
},
payableatChange(value) {
if (!value) {
this.details.payableat = ''
this.details.payableat = this.details.payableat ? this.details.payableat : ''
}
this.getPortlist(value, 'payableat')
},
@ -622,7 +622,7 @@ export default {
},
blfrtChange(value) {
if (!value) {
this.details.blfrt = ''
this.details.blfrt = this.details.blfrt ? this.details.blfrt : ''
}
this.getFrt(value)
},
@ -648,7 +648,7 @@ export default {
},
serviceChange(value) {
if (!value) {
this.details.service = ''
this.details.service = this.details.service ? this.details.service : ''
}
this.getService(value)
},

@ -12,7 +12,14 @@
<div>Marks & Nos.(标记与号码)</div>
</div>
<div class="bottom">
<a-textarea class="input-box" v-model="details.marks" />
<a-textarea class="input-box" v-model="details.marks" @change="valueChange('marks')"/>
<div
class="line-count"
id="shipper-scroll-right"
v-if="Object.keys(details).length > 1 && details.marks.length > 1"
>
<div v-for="(num, index) in details.marks.split('\n')" :key="index">{{ num.length }}</div>
</div>
</div>
</a-col>
<a-col :span="16">
@ -35,7 +42,14 @@
</div>
</div>
<div class="bottom">
<a-textarea class="input-box" v-model="details.description" />
<a-textarea class="input-box" v-model="details.description" @change="valueChange('description')"/>
<div
class="line-count"
id="shipper-scroll-right"
v-if="Object.keys(details).length > 1 && details.description.length > 1"
>
<div v-for="(num, index) in details.description.split('\n')" :key="index">{{ num.length }}</div>
</div>
</div>
</a-col>
<a-col class="num-box" :span="24">
@ -97,6 +111,27 @@ export default {
methods: {
handleChange(value) {
this.details.cargoid = value
},
valueChange (type) {
if (type === 'marks') {
this.details.marks = this.ToCDB(this.details.marks).toUpperCase()
console.log(this.details.marks)
} else {
this.details.description = this.ToCDB(this.details.description).toUpperCase()
console.log(this.details.description)
}
},
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));
}
}
return tmp
}
}
}
@ -186,4 +221,32 @@ export default {
.ant-collapse-item {
border-bottom: none;
}
.bottom {
display: flex;
.input-box {
margin-top: 10px;
flex: 1;
font-size: 12px;
line-height: 20px;
}
.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;
}
}
}
</style>

@ -119,6 +119,31 @@ export default {
edit: false,
renderBodyCell: ({ row, column, rowIndex }, h) => {
return (
// <a-auto-complete
// class="certain-category-search"
// dropdown-class-name="certain-category-search-dropdown"
// dropdown-match-select-width={false}
// size="large"
// style="width: 120px"
// option-label-prop="value"
// >
// {
// <template slot="dataSource">
// <a-select-opt-group>
// {
// this.ctnList.map((item, index) => {
// return <a-select-option>{ item.name }</a-select-option>
// })
// }
// </a-select-opt-group>
// </template>
// }
// {
// <a-input>
// <a-icon slot="suffix" type="search" class="certain-category-icon" />
// </a-input>
// }
// </a-auto-complete>
<a-select
value={row['ctnall']}
allow-clear={true}
@ -447,16 +472,16 @@ export default {
changeValue = changeValue + ''
const valIndex = changeValue.indexOf('.') + 1
const valCount = changeValue.length - valIndex
// 4
if (valCount > 4) {
// 5
if (valCount > 5) {
const height = document.body.clientHeight - 100
this.$message.config({
top: `${height}px`,
duration: 2,
maxCount: 3
})
this.$message.error('仅支持小数点后位')
row[column.field] = changeValue.substr(0, valIndex + 4)
this.$message.error('仅支持小数点后位')
row[column.field] = changeValue.substr(0, valIndex + 5)
setTimeout(() => {
this.$message.destroy()
this.$message.config({
@ -722,6 +747,24 @@ export default {
this.id = this.$route.query.id
this.init()
}
},
totalKgs () {
this.$emit('changeTotal', {
type: 'totalKgs',
val: this.totalKgs
})
},
totalPkgs () {
this.$emit('changeTotal', {
type: 'totalPkgs',
val: this.totalPkgs
})
},
totalCbm () {
this.$emit('changeTotal', {
type: 'totalCbm',
val: this.totalCbm
})
}
},

@ -1094,28 +1094,29 @@ export default {
})
},
portloadSelect(value) {
this.details.portload = value
this.details.issueplace = value
if (!this.details.prepardat) {
this.details.prepardat = value
}
const index = this.portloadDataArr.indexOf(value)
this.details.portloadid = this.portloadData[index].ediCode
this.details.portload = this.portloadData[index].enName
},
portloadChange(value) {
if (!value) {
this.details.portloadid = ''
this.details.portloadid = this.details.portloadid ? this.details.portloadid : ''
}
this.getPortloadlist(value, 'portload')
},
placereceiptSelect(value) {
this.details.placereceipt = value
const index = this.placereceiptDataArr.indexOf(value)
this.details.placereceiptid = this.placereceiptData[index].ediCode
this.details.placereceipt = this.placereceiptData[index].enName
},
placereceiptChange(value) {
if (!value) {
this.details.placereceiptid = ''
this.details.placereceiptid = this.details.placereceiptid ? this.details.placereceiptid : ''
}
this.getPortloadlist(value, 'placereceipt')
},
@ -1138,52 +1139,52 @@ export default {
},
//
portdischargeSelect(value) {
this.details.portdischarge = value
if (!this.details.payableat) {
this.details.payableat = value
}
const index = this.portdischargeDataArr.indexOf(value)
this.details.portdischargeid = this.portdischargeData[index].ediCode
this.details.portdischarge = this.portdischargeData[index].enName
},
portdischargeChange(value) {
if (!value) {
this.details.portdischargeid = ''
this.details.portdischargeid = this.details.portdischargeid ? this.details.portdischargeid : ''
}
this.getPortlist(value, 'portdischarge')
},
//
destinationSelect(value) {
this.details.destination = value
const index = this.destinationDataArr.indexOf(value)
this.details.destinationid = this.destinationData[index].ediCode
this.details.destination = this.destinationData[index].enName
},
destinationChange(value) {
if (!value) {
this.details.destinationid = ''
this.details.destinationid = this.details.destinationid ? this.details.destinationid : ''
}
this.getPortlist(value, 'destination')
},
//
placedeliverySelect(value) {
this.details.placedelivery = value
const index = this.placedeliveryDataArr.indexOf(value)
this.details.placedeliveryid = this.placedeliveryData[index].ediCode
this.details.placedelivery = this.placedeliveryData[index].enName
},
placedeliveryChange(value) {
if (!value) {
this.details.placedeliveryid = ''
this.details.placedeliveryid = this.details.placedeliveryid ? this.details.placedeliveryid : ''
}
this.getPortlist(value, 'placedelivery')
},
//
transportSelect(value) {
this.details.transport = value
const index = this.transportDataArr.indexOf(value)
this.details.transportid = this.transportData[index].ediCode
this.details.transport = this.transportData[index].enName
},
transportChange(value) {
if (!value) {
this.details.transportid = ''
this.details.transportid = this.details.transportid ? this.details.transportid : ''
}
this.getPortlist(value, 'transport')
},
@ -1209,7 +1210,7 @@ export default {
},
kindpkgsChange(value) {
if (!value) {
this.details.kindpkgs = ''
this.details.kindpkgs = this.details.kindpkgs ? this.details.kindpkgs : ''
}
this.getPackage(value)
},
@ -1236,7 +1237,7 @@ export default {
},
customserChange(value) {
if (!value) {
this.details.customser = ''
this.details.customser = this.details.customser ? this.details.customser : ''
}
this.getDjyCustomerpage(value, 'customser', 'customs_broker')
},
@ -1248,7 +1249,7 @@ export default {
},
truckerChange(value) {
if (!value) {
this.details.trucker = ''
this.details.trucker = this.details.trucker ? this.details.trucker : ''
}
this.getDjyCustomerpage(value, 'trucker', 'fleet')
},
@ -1260,7 +1261,7 @@ export default {
},
agentidChange(value) {
if (!value) {
this.details.agentid = ''
this.details.agentid = this.details.agentid ? this.details.agentid : ''
}
this.getDjyCustomerpage(value, 'agentid', 'out_agent')
},

@ -508,7 +508,7 @@
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-radio-group
<a-checkbox-group
class="trace-check"
v-model="traceValue"
name="checkboxgroup"
@ -648,7 +648,7 @@ export default {
{ label: '起运港', value: '1' },
{ label: '目的港', value: '2' }
],
traceValue: '',
traceValue: [],
traceModalVisible: false
}
},
@ -1370,32 +1370,34 @@ export default {
this.$message.error('请选择订阅内容')
return false
}
let query = {}
if (this.traceValue === '1') {
//
query = {
businessId: this.$route.query.id,
mblno: this.details.mblno,
yard: this.details.yard,
yardCode: this.details.yardid,
isBook: false
}
} else {
query = {
if (this.traceValue.includes('1') && (!this.details.yard || !this.details.yardid)) {
this.$message.error('请选择场站')
return false
}
if (this.traceValue.includes('2') && (!this.details.carrierid || !this.details.carrier)) {
this.$message.error('请选择传公司')
return false
}
const query = {
businessId: this.$route.query.id,
mblno: this.details.mblno,
carrierid: this.details.carrierid,
carrier: this.details.carrier,
isBook: true
yard: this.traceValue.includes('1') ? this.details.yard : '',
yardCode: this.traceValue.includes('1') ? this.details.yardid : '',
carrierid: this.traceValue.includes('2') ? this.details.carrierid : '',
carrier: this.traceValue.includes('2') ? this.details.carrier : '',
isBook: !!this.traceValue.includes('2')
}
}
SendTrace([query])
.then(res => {
if (res.success) {
const tip = `${this.traceValue === '1' ? '起运港' : '目的港'}订阅成功`
const tip = `订阅成功`
this.$message.success(tip)
this.traceModalVisible = false
this.traceValue = []
} else {
this.$message.success(res.message)
this.traceModalVisible = false
this.traceValue = []
}
})
.catch(err => {

@ -85,7 +85,7 @@
<div class="nav"><i class="iconfont icon-shujushangchuan-shixin"></i>批量VGM</div>
<div class="nav"><i class="iconfont icon-shishijifei"></i>定时订舱</div>
<div class="nav"><i class="iconfont icon-xiaopiaodayin"></i>小票状态</div>
<!-- <div class="nav" @click="openModel('trace')"> <i class="iconfont icon-yunshu1"></i>运踪订阅</div> -->
<div class="nav" @click="openTraceModel"> <i class="iconfont icon-yunshu1"></i>运踪订阅</div>
</div>
</template>
<template #tools>
@ -220,11 +220,40 @@
<div class="title">备注内容</div>
<div class="list" v-for="(remarkItem, rindex) in remarkData" :key="rindex"> <i class="iconfont icon-yuandian icon"></i> {{ remarkItem.remark }}</div>
</div>
<!-- 运踪弹窗 start -->
<a-modal width="50vw" :maskClosable="false" v-model="traceModalVisible" title="运踪订阅">
<div class="trace-box">
<a-form>
<a-row :gutter="16">
<a-col :span="24" class="book-model-box">
<a-form-item
label="请选择订阅内容"
:labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
<a-checkbox-group
class="trace-check"
v-model="traceValue"
name="checkboxgroup"
:options="traceOptions"
@change="onTraceChange"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</div>
<template slot="footer">
<a-button type="primary" @click="traceSend"></a-button>
</template>
</a-modal>
<!-- 运踪弹窗 end -->
</div>
</template>
<script>
import { XCard, setFormModel } from '@/components'
import { BookingOrderPage } from '@/api/modular/main/BookingLedger'
import { BookingOrderPage, SendTrace } from '@/api/modular/main/BookingLedger'
import columnSetting from '@/components/tableColumnSetting'
import formLabel from './modules/formLabel'
import initData from './modules/initData'
@ -312,7 +341,13 @@ export default {
remarkShow: false,
remarkScreenX: 0,
remarkScreenY: 0,
remarkData: null
remarkData: null,
traceModalVisible: false,
traceOptions: [
{ label: '起运港', value: '1' },
{ label: '目的港', value: '2' }
],
traceValue: []
}
},
created() {
@ -771,6 +806,58 @@ export default {
remarkLeave (e, data) {
this.remarkShow = false
this.remarkData = null
},
openTraceModel () {
const select = this.$refs.xGrid.getCheckboxRecords()
if (select.length === 0) {
this.$message.error('请选择操作订单')
return false
}
this.traceModalVisible = !this.traceModalVisible
},
onTraceChange (values) {
console.log(this.traceValue)
},
traceSend () {
if (!this.traceValue) {
this.$message.error('请选择订阅内容')
return false
}
const arr = []
const select = this.$refs.xGrid.getCheckboxRecords()
if (select.length === 0) {
this.$message.error('请选择操作订单')
return false
}
select.map((item, index) => {
console.log(item)
const query = {
businessId: item.id,
mblno: item.mblno,
yard: this.traceValue.includes('1') ? item.yard : '',
yardCode: this.traceValue.includes('1') ? item.yardid : '',
carrierid: this.traceValue.includes('2') ? item.carrierid : '',
carrier: this.traceValue.includes('2') ? item.carrier : '',
isBook: !!this.traceValue.includes('2')
}
arr.push(query)
})
SendTrace(arr)
.then(res => {
if (res.success) {
const tip = `订阅成功`
this.$message.success(tip)
this.traceModalVisible = false
this.traceValue = []
} else {
this.$message.error(res.message)
this.traceModalVisible = false
this.traceValue = []
}
})
.catch((err) => {
console.log(err)
})
}
}
}
@ -920,6 +1007,16 @@ export default {
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(8) {
.iconfont {
color: #1d8aff;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
}
}

Loading…
Cancel
Save