修改bug

master
sunzehua 6 months ago
parent 8374150b80
commit 676690e298

@ -7,12 +7,12 @@ VUE_APP_TYPE = 'hechuan'
# 打包部署的三个端 客户端customer 和川端hechuan 运营端djy
# 和川大简云正式
VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api
VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345
# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api
# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345
# 和川大简云测试
# VUE_APP_API_BASE_URL=http://60.209.125.238:35100
# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100
VUE_APP_API_BASE_URL=http://60.209.125.238:35100
VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35100
# 客户端测试
# VUE_APP_API_BASE_URL=http://60.209.125.238:30813

@ -78,9 +78,8 @@ export function BookingSlotDetail(parameter) {
export function BookingSlotDelete(parameter) {
return axios({
url: '/BookingSlot/delete',
method: 'post',
params: parameter
url: '/BookingSlot/delete?ids=' + parameter,
method: 'post'
})
}
@ -185,3 +184,19 @@ export function BookingLabelBind(parameter) {
data: parameter
})
}
export function SaveDataInList(parameter) {
return axios({
url: 'BookingSlot/SaveDataInList',
method: 'post',
data: parameter
})
}
export function PrintOrder(parameter) {
return axios({
url: 'BookingSlot/PrintOrder',
method: 'post',
data: parameter
})
}

@ -147,14 +147,14 @@
</a-col>
<a-col :span="8">
<a-form-item label="卖价" :label-col="formItemLayout.labelCol2" :wrapper-col="formItemLayout.wrapperCol2">
<a-input-number style="width: 100%;" :precision="2" v-model="CreateData.GOODSNAME"></a-input-number>
<a-input-number style="width: 100%;" :precision="2" v-model="CreateData.sellinG_PRICE"></a-input-number>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="type==='B'">
<a-col :span="8">
<a-form-item label="销售日期" :label-col="formItemLayout.labelCol2" :wrapper-col="formItemLayout.wrapperCol2">
<a-date-picker style="width: 100%;" v-model="CreateData.SALE_TIME" />
<a-date-picker style="width: 100%;" v-model="CreateData.SALE_TIME" />
</a-form-item>
</a-col>
</a-row>
@ -253,6 +253,22 @@
</a-form-item>
</a-col>
</a-row>
<a-row v-if="type==='B'">
<a-col :span="16">
<a-form-item label="可用箱信息" :label-col="formItemLayout.labelCol3" :wrapper-col="formItemLayout.wrapperCol3">
<div class="tear-list">
<div class="item" v-for="item in CreateData.CtnList" :key="item.gid">
<span class="item-left">{{ item.ctnall }}</span>
<a-input-number style="width:50px;" :max="item.maxnum" v-model="item.ctnnum" :min="0"> </a-input-number>
</div>
</div>
<div style="line-height: 15px">
<span style="color:rgb(114, 184, 9);">已选箱型{{ boxTotal }}</span>
剩余箱型{{ boxRemaining }}
</div>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
@ -272,9 +288,43 @@ export default {
render: (h, ctx) => ctx.props.vnodes
}
},
watch: {
'CreateData.CtnList': {
handler(nval, oval) {
if (nval && nval.length > 0) {
let str = ''
let str1 = ''
nval.forEach(item => {
if (item.ctnnum > 0) {
str += item.ctnall + '*' + ' ' + item.ctnnum + ' '
}
})
this.ctnListCopy.forEach(ite => {
nval.forEach(item => {
if (item.ctnall === ite.ctnall) {
if (item.ctnnum < ite.ctnnum) {
const num = ite.ctnnum - item.ctnnum
str1 += item.ctnall + '*' + ' ' + num + ' '
}
}
})
})
this.boxTotal = str
this.boxRemaining = str1
} else {
this.boxTotal = ''
this.boxRemaining = ''
}
},
deep: true
}
},
data() {
return {
SlotVisible: false,
boxTotal: '',
boxRemaining: '',
ctnListCopy: [],
formItemLayout: {
labelCol1: { span: 6 },
wrapperCol1: { span: 18 },
@ -293,7 +343,8 @@ export default {
saleId: '',
opId: '',
docId: '',
custserviceId: ''
custserviceId: '',
CtnList: []
},
CustomerList: [],
UserList: [],
@ -347,6 +398,21 @@ export default {
projectList.push(item.serviceProjectCode)
}
})
if (this.CreateData.CtnList.length > 0) {
const arr = []
this.CreateData.CtnList.forEach(item => {
if (item.ctnnum > 0) {
arr.push(1)
}
})
if (arr.length === 0) {
this.$message.error('至少选择1个箱子')
return false
}
} else {
this.$message.error('至少选择1个箱子')
return false
}
const ApiData = {
slotId: this.slotEdit.id,
projectList,
@ -396,6 +462,17 @@ export default {
getAvailableCtnsBySlot({ slotId: row.id }).then(res => {
if (res.success) {
this.slotEdit = row
if (res.data.length > 0) {
res.data.forEach(item => {
item.maxnum = item.ctnnum
})
this.$set(this.CreateData, 'CtnList', res.data)
this.ctnListCopy = JSON.parse(JSON.stringify(res.data))
} else {
this.$message.error('可用箱子为空,请选择其它舱位生成订舱')
this.$set(this.CreateData, 'CtnList', [])
}
this.$forceUpdate()
} else {
this.$message.error(res.message)
}
@ -654,4 +731,26 @@ export default {
/deep/ .ant-form-item {
margin-bottom: 0px !important;
}
.tear-list {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
.item {
margin-right: 20px;
margin-bottom: 10px;
display: flex;
align-items: flex-start;
.item-left {
background: #f59a23;
color: white;
text-align: center;
height: 31px;
line-height: 31px;
display: inline-block;
padding: 0 5px;
}
}
}
</style>

@ -305,7 +305,7 @@ const userAccount = [
pid: 0,
id: 183191,
meta: {
title: 'rollingNomination',
title: 'RollingNomination',
show: false
},
component: 'rollingNomination'

@ -523,7 +523,11 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
this.$set(this.historyData, `copy-${this.id}`, hisData)
if (!this.$route.query.copyId) {
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else {
this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData)
}
} else if (this.$route.query.addNum) {
const hisData = {
bookingDetails: this.bookingDetails,
@ -748,8 +752,7 @@ export default {
getRouterHis() {
this.inChildLoading = true
const newId = this.$route.query.id ? this.$route.query.id.toString() : ''
if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) &&
this.$route.query.isCopy === 'true') {
if ((Object.keys(this.historyData).includes(`copy-${newId}`)) && this.$route.query.isCopy === 'true' && !this.$route.query.copyId) {
if (!this.$route.query.copyId) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
this.bookingDetails = $data.bookingDetails
@ -759,15 +762,6 @@ export default {
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
} else {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
}
this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy
@ -802,6 +796,48 @@ export default {
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if (this.$route.query.isCopy === 'true' && this.$route.query.copyId && Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
setTimeout(() => {
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}
} else {
this.Showtabs = false
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init([])
}
}
if (Object.keys(this.$refs).includes('goodsTable')) {
this.$refs.goodsTable.init()
}
}, 200)
setTimeout(() => {
const key = this.$route.fullPath
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
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
}, 500)
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if (
Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) &&
this.$route.query.addNum
@ -956,6 +992,7 @@ export default {
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
this.$refs.cargoInfo.$refs.cargoFrom.clearValidate()
console.log(this.historyData)
},
init() {
this.bookingDetails = JSON.parse(JSON.stringify(initDetail))

@ -341,11 +341,14 @@
type="vesselGangjie"
:disabled="BookingLockOrder['vessel'] && isLockBooking"
:defaultVal="details.vessel"
searchApi="GetVessellist"
searchApi="getVesselInfoService"
:searchQuery="{
KeyWord: '',
PortDischargeId: this.details.portdischargeid || '',
CarrierID: this.details.carrierid || 'CMA',
ETD: this.details.etd || ''
}"
:showLabel="['name']"
:showLabel="['vessel']"
v-if="!vesselFrom"
:openSearch="true"
@change="getSelectViewRes"></selectView>

@ -2430,14 +2430,6 @@ export default {
const moreData = []
arr.map((item, index) => {
this.formAllData.map((fitem, findex) => {
if (fitem.label === 'VESSEL') {
if (this.vesselFrom) {
fitem.type = 'select'
} else {
fitem.type = 'complete'
fitem.showLabel = 'name'
}
}
if (fitem.label === item) {
nowData.push(fitem)
}
@ -2463,6 +2455,14 @@ export default {
this.formMoreData = moreData
}
this.formData.map((item, index) => {
if (item.label === 'VESSEL') {
if (this.vesselFrom) {
item.type = 'select'
} else {
item.type = 'complete'
item.showLabel = 'name'
}
}
this.$set(this.formRes, item.label, this.formRes[item.label] || '')
// select
if (item.type === 'select') {

@ -524,11 +524,7 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
if (!this.$route.query.copyId) {
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else {
this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData)
}
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else if (this.$route.query.addNum) {
const hisData = {
bookingDetails: this.bookingDetails,
@ -602,7 +598,7 @@ export default {
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else {
this.$set(this.historyData, `copy-${this.id}-${this.$route.query.copyId}`, hisData)
console.log(this.historyData,this.$route.query.copyId)
console.log(this.historyData, this.$route.query.copyId)
}
} else if (this.$route.query.addNum) {
const hisData = {
@ -751,7 +747,8 @@ export default {
getRouterHis() {
this.inChildLoading = true
const newId = this.$route.query.id ? this.$route.query.id.toString() : ''
if ((Object.keys(this.historyData).includes(`copy-${newId}`)) && this.$route.query.isCopy === 'true' && !this.$route.query.copyId) {
if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) &&
this.$route.query.isCopy === 'true') {
if (!this.$route.query.copyId) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
this.bookingDetails = $data.bookingDetails
@ -761,6 +758,15 @@ export default {
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
} else {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
}
this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy
@ -795,48 +801,6 @@ export default {
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if (this.$route.query.isCopy === 'true' && this.$route.query.copyId && Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
setTimeout(() => {
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}
} else {
this.Showtabs = false
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init([])
}
}
if (Object.keys(this.$refs).includes('goodsTable')) {
this.$refs.goodsTable.init()
}
}, 200)
setTimeout(() => {
const key = this.$route.fullPath
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
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
}, 500)
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if (
Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) &&
this.$route.query.addNum
@ -991,7 +955,6 @@ export default {
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
this.$refs.cargoInfo.$refs.cargoFrom.clearValidate()
console.log(this.historyData)
},
init() {
this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
@ -1513,6 +1476,15 @@ export default {
this.bookingDetails.etd = slots[0].etd
this.bookingDetails.cntrtotal = slots[0].ctN_STAT
this.bookingDetails.startETA = slots[0].eta
this.bookingDetails.contractno = slots[0].contracT_NO
this.bookingDetails.closingdate = slots[0].cY_CUT_DATE
this.bookingDetails.closedocdate = slots[0].manifesT_CUT_DATE
this.bookingDetails.closevgmdate = slots[0].vgM_SUBMISSION_CUT_DATE
this.bookingDetails.portloadid = slots[0].portloadid
this.bookingDetails.portload = slots[0].portload
this.bookingDetails.portdischargeid = slots[0].portdischargeid
this.bookingDetails.portdischarge = slots[0].portdischarge
this.$forceUpdate()
this.$refs.goodsTable.refsh()
},

@ -558,25 +558,6 @@
</a-col>
</a-row>
<a-row :gutter="10">
<a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="4">
<a-form-model-item
class="from-label"
label="分单操作"
:labelCol="{span:8}"
:wrapperCol="{span:16}"
has-feedback
prop="subOp">
<selectView
type="subOp"
:defaultVal="details.subOp"
searchApi="GetSysUserPage"
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes">
</selectView>
</a-form-model-item>
</a-col>
<a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="7">
<a-form-model-item
class="from-label"
@ -622,6 +603,25 @@
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="4">
<a-form-model-item
class="from-label"
label="分单操作"
:labelCol="{span:8}"
:wrapperCol="{span:16}"
has-feedback
prop="subOp">
<selectView
type="subOp"
:defaultVal="details.subOp"
searchApi="GetSysUserPage"
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes">
</selectView>
</a-form-model-item>
</a-col>
</a-row>
</div>
</a-form-model>

@ -2246,7 +2246,6 @@ export default {
}
});
}
this.cabinSpaceFlag = false
},
handlePushBC() {

@ -26,18 +26,7 @@
</a-col>
<a-col :span="4">
<a-form-item label="装货港">
<a-select
v-model="form.PORTLOADID"
show-search
:filter-option="false"
style="width: 100%"
@focus="getSelectFirst"
placeholder="请选择装货港"
@search="handleSearch">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portloadidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
<a-input v-model="form.PORTLOAD" allow-clear placeholder="请输入装货港" />
</a-form-item>
</a-col>
<a-col :span="4">
@ -54,8 +43,8 @@
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="箱型箱量">
<a-select mode="multiple" v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型箱量">
<a-form-item label="箱型">
<a-select mode="multiple" v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型">
<a-select-option v-for="(item, index) in ctnallList" :key="index" :value="item.code">{{ item.name
}}</a-select-option>
</a-select>
@ -73,19 +62,7 @@
</a-col>
<a-col :span="4">
<a-form-item label="卸货港">
<a-select
v-model="form.PORTDISCHARGEID"
show-search
:filter-option="false"
:not-found-content="fetching ? undefined : null"
style="width: 100%"
@focus="getSelectFirst"
placeholder="请选择卸货港"
@search="handleSearch1">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portdischargeidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
<a-input v-model="form.PORTDISCHARGE" allow-clear placeholder="请输入卸货港" />
</a-form-item>
</a-col>
<a-col :span="4">
@ -260,19 +237,19 @@ export default {
title: '交货地',
align: 'center',
width: '100',
field: 'portload'
field: 'placedelivery'
},
{
title: '装货港',
align: 'center',
width: '100',
field: 'portdischarge'
field: 'portload'
},
{
title: '卸货港',
align: 'center',
width: '100',
field: 'placedelivery'
field: 'portdischarge'
},
{
title: '卸货港国家',
@ -280,12 +257,6 @@ export default {
width: '100',
field: 'portdischargE_COUNTRY'
},
{
title: 'WEEK',
align: 'center',
width: '150',
field: 'weeK_AT'
},
{
title: '航线',
align: 'center',
@ -388,19 +359,19 @@ export default {
title: '交货地',
align: 'center',
width: '100',
field: 'portload'
field: 'placedelivery'
},
{
title: '装货港',
align: 'center',
width: '100',
field: 'portdischarge'
field: 'portload'
},
{
title: '卸货港',
align: 'center',
width: '100',
field: 'placedelivery'
field: 'portdischarge'
},
{
title: '卸货港国家',
@ -408,12 +379,6 @@ export default {
width: '100',
field: 'portdischargE_COUNTRY'
},
{
title: 'WEEK',
align: 'center',
width: '150',
field: 'weeK_AT'
},
{
title: '航线',
align: 'center',

@ -12,7 +12,7 @@
</a-popconfirm>
</div>
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol">
<div class="title" v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length > 0"></div>
<div class="title" v-if="type === 'Edit' && form.bookingSlotSaleInfoList.length && form.bookingSlotSaleInfoList.length > 0"></div>
<div v-if="type === 'Edit'">
<div
:class="{ 'line-bootm': index != form.bookingSlotSaleInfoList.length - 1 }"
@ -94,7 +94,7 @@
</a-col>
<a-col :span="6">
<a-form-model-item label="卖价">
<a-input-number :precision="2" v-model="item.sellinG_PRICE" size="small" />
<a-input-number style="width: 90%" :precision="2" v-model="item.sellinG_PRICE" size="small" />
</a-form-model-item>
</a-col>
<a-col :span="6">
@ -260,7 +260,7 @@
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="weeKAT">
<a-form-model-item label="WEEK">
<a-input-number style="width: 100%;" :precision="0" v-model="form.weeK_AT" />
</a-form-model-item>
</a-col>
@ -275,6 +275,43 @@
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="6">
<a-form-model-item label="装货港">
<a-select
v-model="form.PORTLOADID"
show-search
:filter-option="false"
style="width: 100%"
@focus="getSelectFirst"
placeholder="请选择装货港"
@change="handleChange1"
@search="handleSearch">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portloadidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item label="卸货港">
<a-select
v-model="form.PORTDISCHARGEID"
show-search
:filter-option="false"
:not-found-content="fetching ? undefined : null"
style="width: 100%"
@change="handleChange2"
@focus="getSelectFirst"
placeholder="请选择卸货港"
@search="handleSearch1">
<a-spin v-if="fetching" slot="notFoundContent" size="small" />
<a-select-option v-for="(item, index) in portdischargeidInitList" :key="index" :value="item.ediCode">{{
item.enName }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<div class="title">截止时间</div>
<a-row>
<a-col :span="8">
@ -395,28 +432,27 @@
</div>
</div>
</a-card>
<a-collapse class="collapse-box" :bordered="false" expandIconPosition="right" v-model="showKey">
<a-collapse-panel key="1">
<template slot="header">
<div class="title"><i class="iconfont icon-rizhi" style="margin-right: 10px;"></i><span>日志</span></div>
<div class="title"><i class="iconfont icon-rizhi"></i><span>日志</span></div>
</template>
<div class="cargo-info">
<div class="info-header">
<span>修改人</span>
<span>修改时间</span>
<span style="width: 40%; display: inline-block">修改人</span>
<span style="width: 60%; display: inline-block">修改时间</span>
</div>
<div v-for="(log, lindex) in form.logList" :key="lindex">
<div class="list">
<span class="btn">{{ log.createdUserName }}</span>
<span class="btn">
<span class="btn" style="width: 40%">{{ log.createdUserName }}</span>
<span class="btn" style="width: 60%; text-align: left" :title="log.createdTime">
{{ log.createdTime }}
<!-- <span class="more"> -->
<i
class="iconfont icon-xia more"
v-if="log.details.length > 0"
:class="!log.showMore ? 'hide' : 'show'"
@click="showLogMore(lindex)"></i>
<!-- </span> -->
</span>
</div>
<div class="more-detail" v-if="log.details.length > 0 && log.showMore">
@ -465,7 +501,7 @@ import { mapGetters } from 'vuex'
import events from '@/components/MultiTab/events'
import { AutoComplete } from 'ant-design-vue'
import {
getVesselInfoService, BookingOrderDownload, DjyCustomerSuggest, GetSysUserPage
getVesselInfoService, BookingOrderDownload, DjyCustomerSuggest, GetSysUserPage, GetPortloadlist, GetPortlist
} from '@/api/modular/main/BookingLedger'
import {
BookingSlotSave, BookingSlotDetail, BookingSlotDelete, BookingSlotGetFile
@ -503,6 +539,7 @@ export default {
boxList: [],
CustomerList: [],
type: '',
fetching: false,
UserList1: [],
UserList: [],
id: 0,
@ -714,6 +751,13 @@ export default {
return ''
}
},
handleSearch(e) {
this.fetching = true
GetPortloadlist({ KeyWord: e }).then(res => {
this.portloadidInitList = res.data
this.fetching = false
})
},
SearchCustomer(e) {
DjyCustomerSuggest({ keyword: e }).then(res => {
this.CustomerList = res.data.rows
@ -784,7 +828,7 @@ export default {
},
handleDelete() {
this.loading = true
BookingSlotDelete({ id: this.id }).then(res => {
BookingSlotDelete(this.id).then(res => {
if (res.success) {
this.$router.push({
name: 'CabinManagement'
@ -796,6 +840,13 @@ export default {
this.loading = false
})
},
getSelectFirst() {
if (!this.firstFlag) {
this.portloadidInitList = this.bookingInitData.portloadidInitList
this.portdischargeidInitList = this.bookingInitData.portdischargeidInitList
this.firstFlag = true
}
},
ChangeUser(e, Tname, type, index) {
if (e) {
if (type === 0) {
@ -822,6 +873,20 @@ export default {
}
this.$forceUpdate()
},
handleChange1(val) {
this.portloadidInitList.forEach(item => {
if (item.ediCode === val) {
this.form.PORTLOAD = item.enName
}
})
},
handleChange2(val) {
this.portdischargeidInitList.forEach(item => {
if (item.ediCode === val) {
this.form.PORTDISCHARGE = item.enName
}
})
},
handleSave() {
if (this.form.bookinG_SLOT_TYPE === 'CONTRACT_ORDER') {
this.form.bookinG_SLOT_TYPE_NAME = '合约订舱'
@ -844,11 +909,13 @@ export default {
}
this.form.ctN_STAT = this.boxTotal
this.loading = true
for (let i = 0; i < this.form.bookingSlotSaleInfoList.length; i++) {
this.form.bookingSlotSaleInfoList[i].updateFlag = false
const change = this.compareObjects(this.form.bookingSlotSaleInfoList[i], this.oldBook[i])
if (Object.keys(change).length > 0) {
this.form.bookingSlotSaleInfoList[i].updateFlag = true
if (this.form.bookingSlotSaleInfoList && this.form.bookingSlotSaleInfoList.length > 0) {
for (let i = 0; i < this.form.bookingSlotSaleInfoList.length; i++) {
this.form.bookingSlotSaleInfoList[i].updateFlag = false
const change = this.compareObjects(this.form.bookingSlotSaleInfoList[i], this.oldBook[i])
if (Object.keys(change).length > 0) {
this.form.bookingSlotSaleInfoList[i].updateFlag = true
}
}
}
BookingSlotSave(this.form).then(res => {
@ -920,6 +987,19 @@ export default {
}
return differences;
},
handleSearch1(e) {
this.fetching = true
GetPortlist({ KeyWord: e }).then(res => {
const uniqueArray = res.data.reduce((accumulator, currentValue) => {
if (accumulator.findIndex(obj => obj.ediCode === currentValue.ediCode) === -1) {
accumulator.push(currentValue);
}
return accumulator;
}, []);
this.portdischargeidInitList = uniqueArray
this.fetching = false
})
},
getWeek(dateTime) {
// eslint-disable-next-line camelcase
const temp_ms = new Date(dateTime).getTime()
@ -1187,121 +1267,170 @@ export default {
}
.collapse-box {
background: #fff;
padding-top: 0;
padding-bottom: 0;
border: none;
.title {
background: #fff;
padding-top: 0;
padding-bottom: 0;
border: none;
}
.cargo-info {
max-height: 800px;
overflow: scroll;
.info-header {
display: flex;
background: #f4f4f4;
height: 40px;
line-height: 40px;
text-align: center;
span {
display: inline-block;
border: 1px solid #eee;
flex: 1;
&:nth-of-type(1) {
border-right: none;
.title {
border: none;
}
.cargo-info {
max-height: 1015px;
overflow-x: scroll;
.info-header {
display: flex;
background: #f4f4f4;
height: 40px;
line-height: 40px;
text-align: center;
span {
display: inline-block;
border: 1px solid #eee;
&:nth-of-type(1) {
border-right: none;
}
}
}
}
.list {
display: flex;
background: #fff;
height: 40px;
line-height: 40px;
text-align: center;
.btn {
display: inline-block;
flex: 1;
border: 1px solid #eee;
border-top: none;
padding: 0 8px;
overflow: hidden;
&:nth-of-type(1) {
padding: 0 19px;
border-right: none;
.list {
display: flex;
background: #fff;
min-height: 30px;
// line-height: 40px;
text-align: center;
.btn {
display: inline-block;
// flex: 1;
border: 1px solid #eee;
border-top: none;
padding: 0 8px;
font-size: 12px;
overflow: hidden;
&:nth-of-type(1) {
padding: 0 2px;
border-right: none;
line-height: 30px;
}
&:nth-of-type(2) {
padding-right: 5px;
position: relative;
line-height: 30px;
}
}
&:nth-of-type(2) {
padding-right: 30px;
position: relative;
.more {
width: 30px;
text-align: center;
transition: 0.5s all;
position: absolute;
top: 0;
right: 4px;
color: #999;
&.show {
transform: rotate(180deg);
}
}
}
.more {
width: 30px;
text-align: center;
transition: 0.5s all;
position: absolute;
top: 0;
right: 4px;
color: #999;
&.show {
transform: rotate(180deg);
.more-detail {
border-left: 1px solid #eee;
border-right: 1px solid #eee;
border-bottom: 1px solid #eee;
background: #f4f4f4;
padding: 0 14px;
.detail-single {
border-bottom: 1px dashed #ccc;
font-size: 12px;
color: #999;
padding: 4px 0;
&:nth-last-of-type(1) {
border: none;
}
.old {
// height: 26px;
line-height: 26px;
color: #666;
}
.new {
// height: 26px;
line-height: 26px;
color: #f9a629;
}
.o-title {
font-size: 12px;
font-weight: 600;
margin-right: 8px;
}
.line {
height: 26px;
line-height: 26px;
}
}
}
}
}
/*日志加滚动条 */
::-webkit-scrollbar {
width: 5px;
height: 10px;
}
// ::-webkit-scrollbar:hover {
// width: 6px;
// height: 10px;
// }
.more-detail {
border-left: 1px solid #eee;
border-right: 1px solid #eee;
border-bottom: 1px solid #eee;
background: #f4f4f4;
padding: 0 14px;
//
::-webkit-scrollbar-button {
display: none;
background-color: transparent;
width: 100px;
height: 10px;
}
.detail-single {
border-bottom: 1px dashed #ccc;
font-size: 12px;
color: #999;
padding: 4px 0;
//
::-webkit-scrollbar-thumb {
background: #aaa;
border: 0px none #ffffff;
border-radius: 50px;
}
&:nth-last-of-type(1) {
border: none;
}
// hover
.old {
// height: 26px;
line-height: 26px;
color: #666;
}
// ::-webkit-scrollbar-thumb:hover {
// background: #2b6cb0;
// }
.new {
// height: 26px;
line-height: 26px;
color: #f9a629;
}
//
::-webkit-scrollbar-thumb:active {
background: #aaa;
}
.o-title {
font-size: 12px;
font-weight: 600;
margin-right: 8px;
}
//
::-webkit-scrollbar-track {
background: transparent;
border: 0px none #ffffff;
border-radius: 50px;
}
.line {
height: 26px;
line-height: 26px;
}
}
}
// ::-webkit-scrollbar-track:hover {
// background: #666666;
// }
::-webkit-scrollbar-track:active {
background: #fff;
}
// -
::-webkit-scrollbar-track-piece {
background: transparent;
}
//
::-webkit-scrollbar-corner {
background: transparent;
}
//
::-webkit-resizer {
background-color: transparent;
}
}
.line-bootm {
border-bottom: 1px dashed #cccbcb;

@ -155,8 +155,8 @@
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="箱型箱量">
<a-select mode="multiple" allowClear v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型箱量">
<a-form-item label="箱型">
<a-select mode="multiple" allowClear v-model="form.ctN_STAT" style="width: 100%" placeholder="请选择箱型">
<a-select-option v-for="(item, index) in ctnallList" :key="index" :value="item.code">{{ item.name
}}</a-select-option>
</a-select>
@ -164,12 +164,7 @@
</a-col>
<a-col :span="4">
<a-form-item label="标签">
<a-select
mode="multiple"
style="width: 100%"
:filter-option="filterOption"
v-model="form.labelIdArray"
>
<a-select mode="multiple" style="width: 100%" :filter-option="filterOption" v-model="form.labelIdArray">
<a-select-option v-for="(item, i) in labelList" :key="i" :value="item.id">
{{ item.name }}
</a-select-option>
@ -184,16 +179,18 @@
<div style="margin-bottom: 10px;display: flex;justify-content: space-between;">
<div>
<a-button type="primary" @click="handleAdd"></a-button>
<a-button type="danger" @click="handleDeleteAll"></a-button>
<a-button type="primary" style="margin-left: 50px;" @click="handleLabel"></a-button>
<a-upload
:customRequest="customRequest"
:multiple="false"
style="margin-left: 50px;"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
:showUploadList="false"
name="file">
<a-button type="primary">导入</a-button>
</a-upload>
<a-button type="danger">作废</a-button>
<a-button type="primary" style="margin-left: 100px;" @click="handleLabel"></a-button>
<a-button type="danger" @click="handleSuport" :loading="loadingExport">导出</a-button>
<!-- <a-button type="primary" @click="handleSendAll"></a-button> -->
</div>
<div>
@ -244,6 +241,24 @@
<template #eta="{ row }">
<span>{{ row.eta ? row.eta.substring(0, 10) : '' }}</span>
</template>
<template #remark="{ row }">
<a-spin :spinning="row.dzmarkLoading">
<div style="display: flex; align-items: center">
<a-input
@blur="getBlurMark(row, 'isRemark')"
@focus="getFocusMark(row, 'isRemark')"
style="margin-top: 0px"
v-model="row.remark">
</a-input>
<a-icon
v-show="row.isRemark"
style="cursor: pointer; margin-left: 5px; color: #36cfc9"
@mousedown.native="handleSaveMark(row, 1)"
type="check-circle"
theme="filled" />
</div>
</a-spin>
</template>
<template #iS_CANCELLATION="{ row }">
<a-icon
type="bulb"
@ -272,12 +287,7 @@
</a-card>
<a-modal width="800px" @ok="handleSubmitLabel" v-model="visible" title="分配标签" @cancel="visible = false">
<a-spin :spinning="labelLoad">
<a-select
mode="multiple"
style="width: 100%"
:filter-option="filterOption"
v-model="labelIdArray"
>
<a-select mode="multiple" style="width: 80%" :filter-option="filterOption" v-model="labelIdArray">
<a-select-option v-for="(item, i) in labelList" :key="i" :value="item.id">
{{ item.name }}
</a-select-option>
@ -295,7 +305,9 @@ import {
CreateBooking0rder,
slotSendEmail,
BookingLabelList,
BookingLabelBind
BookingLabelBind,
SaveDataInList,
PrintOrder
} from '@/api/modular/main/CompanySiteaccount'
import { mapGetters } from 'vuex'
import {
@ -327,6 +339,7 @@ export default {
},
loading: false,
labelList: [],
loadingExport: false,
setVisible: false,
labelIdArray: [],
CreateData: {
@ -421,7 +434,6 @@ export default {
align: 'center',
width: '100',
field: 'etd',
sortable: true,
slots: { default: 'etd' }
},
{
@ -429,7 +441,6 @@ export default {
align: 'center',
width: '100',
field: 'eta',
sortable: true,
slots: { default: 'eta' }
},
{
@ -482,13 +493,13 @@ export default {
field: 'salE_TIME'
},
{
title: '货地',
title: '货地',
align: 'center',
width: '180',
field: 'placereceipt'
},
{
title: '货地',
title: '货地',
align: 'center',
width: '180',
field: 'placedelivery'
@ -505,6 +516,12 @@ export default {
width: '180',
field: 'portdischarge'
},
{
title: '卸货港国家',
align: 'center',
width: '180',
field: 'portdischargE_COUNTRY'
},
{
title: '箱型箱量',
align: 'center',
@ -521,21 +538,18 @@ export default {
title: '样单截止时间',
align: 'center',
width: '150',
sortable: true,
field: 'sI_CUT_DATE'
},
{
title: 'VGM截止时间',
align: 'center',
width: '150',
sortable: true,
field: 'vgM_SUBMISSION_CUT_DATE'
},
{
title: '截港时间',
align: 'center',
width: '150',
sortable: true,
field: 'cY_CUT_DATE'
},
{
@ -556,17 +570,9 @@ export default {
width: '100',
field: 'lanename'
},
{
title: '重量(KGS)',
align: 'center',
width: '120',
sortable: true,
field: 'WEIGHKGS'
},
{
title: '创建日期',
align: 'center',
sortable: true,
width: '150',
field: 'createdTime'
},
@ -580,7 +586,6 @@ export default {
title: '更新日期',
align: 'center',
width: '150',
sortable: true,
field: 'updatedTime'
},
{
@ -653,7 +658,8 @@ export default {
title: '备注',
align: 'center',
width: '100',
field: 'remark'
field: 'remark',
slots: { default: 'remark' }
},
{
title: '计费时间',
@ -671,7 +677,7 @@ export default {
}
],
columnsAll: [
columnsAll: [
{
type: 'checkbox',
width: 60,
@ -726,7 +732,6 @@ export default {
align: 'center',
width: '100',
field: 'etd',
sortable: true,
slots: { default: 'etd' }
},
{
@ -734,7 +739,6 @@ export default {
align: 'center',
width: '100',
field: 'eta',
sortable: true,
slots: { default: 'eta' }
},
{
@ -787,13 +791,13 @@ export default {
field: 'salE_TIME'
},
{
title: '货地',
title: '货地',
align: 'center',
width: '180',
field: 'placereceipt'
},
{
title: '货地',
title: '货地',
align: 'center',
width: '180',
field: 'placedelivery'
@ -810,6 +814,12 @@ export default {
width: '180',
field: 'portdischarge'
},
{
title: '卸货港国家',
align: 'center',
width: '180',
field: 'portdischargE_COUNTRY'
},
{
title: '箱型箱量',
align: 'center',
@ -826,21 +836,18 @@ export default {
title: '样单截止时间',
align: 'center',
width: '150',
sortable: true,
field: 'sI_CUT_DATE'
},
{
title: 'VGM截止时间',
align: 'center',
width: '150',
sortable: true,
field: 'vgM_SUBMISSION_CUT_DATE'
},
{
title: '截港时间',
align: 'center',
width: '150',
sortable: true,
field: 'cY_CUT_DATE'
},
{
@ -861,17 +868,9 @@ export default {
width: '100',
field: 'lanename'
},
{
title: '重量(KGS)',
align: 'center',
width: '120',
sortable: true,
field: 'WEIGHKGS'
},
{
title: '创建日期',
align: 'center',
sortable: true,
width: '150',
field: 'createdTime'
},
@ -885,7 +884,6 @@ export default {
title: '更新日期',
align: 'center',
width: '150',
sortable: true,
field: 'updatedTime'
},
{
@ -958,7 +956,8 @@ export default {
title: '备注',
align: 'center',
width: '100',
field: 'remark'
field: 'remark',
slots: { default: 'remark' }
},
{
title: '计费时间',
@ -995,8 +994,8 @@ export default {
mounted() {
this.getConfigStart()
BookingLabelList({ scope: 1 }).then(res => {
this.labelList = res.data
})
this.labelList = res.data
})
},
methods: {
FnTurnD(data) {
@ -1008,6 +1007,23 @@ export default {
})
return Rdata
},
handleSuport() {
if (this.form.ctN_STAT) {
this.form.ctN_STAT = this.form.ctN_STAT.join(',')
}
this.loadingExport = true
PrintOrder(this.form).then(res => {
if (res.success) {
window.open(
` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/downloadPrint?filename=${res.data}`,
'_blank'
)
} else {
this.$message.error(res.message)
}
this.loadingExport = false
})
},
expandVisibleMethod({ row }) {
if (row.bookingSlotSaleInfoList && row.bookingSlotSaleInfoList.length > 0) {
return true
@ -1041,12 +1057,26 @@ export default {
formData.append('file', data.file)
this.loading = true
ImportSlotFromFile(formData, (percent) => this.setUploadProcess(percent)).then((res) => {
if (res.data.succ) {
this.$message.success('上传成功')
this.$notification.open({
message: '批量导入',
description: (
<div>
{res.data.ext.map((item) => {
if (item.isSuccess) {
return <div>{item.slotBookingNo} 成功 </div>
} else {
return (
<div style={{ color: 'red' }} >
{item.slotBookingNo} 失败 {item.failReason}
</div>
)
}
})}
</div>
),
duration: 5
})
this.getList()
} else {
this.$message.error('上传失败:' + res.data.msg)
}
})
},
checkboxChangeEvent() {
@ -1063,7 +1093,7 @@ export default {
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length == 0) {
if (pkIdArr.length === 0) {
this.$message.error('请选择要发送的记录')
return false
}
@ -1075,26 +1105,61 @@ export default {
}
})
},
handleDeleteAll() {
const select = this.$refs.table.getCheckboxRecords()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0) {
this.$message.error('请选择要删除的记录')
return false
}
BookingSlotDelete(pkIdArr.join(',')).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.message)
}
})
},
spanMethod({ row, _rowIndex, column, visibleData }) {
const arr = ['salE_TIME', 'sellinG_PRICE', 'goodsname', 'shipper', 'sale', 'custservice', 'customername']
const fields = [];
const cellValue = row[column.property];
if ((!arr.includes(column.property)) || column.type === 'checkbox' || column.field === 'caozuo') {
const prevRow = visibleData[_rowIndex - 1];
let nextRow = visibleData[_rowIndex + 1];
if (prevRow && prevRow.id === row.id) {
return { rowspan: 0, colspan: 0 };
return { rowspan: 0, colspan: 0 };
} else {
let countRowspan = 1;
while (nextRow && nextRow.id === row.id) {
nextRow = visibleData[++countRowspan + _rowIndex];
}
if (countRowspan > 1) {
return { rowspan: countRowspan, colspan: 1 };
return { rowspan: countRowspan, colspan: 1 };
}
}
}
},
handleSaveMark(row, type) {
const data = {
slotBase: {
Id: row.id
}
}
if (type === 1) {
row.dzmarkLoading = true
data.slotBase.Remark = row.remark
}
SaveDataInList(data).then((res) => {
if (res.success) {
this.$message.success('修改成功')
} else {
this.$message.error(res.message)
}
row.dzmarkLoading = false
})
},
handleOpenSlot(row) {
this.$refs.generation.init(row)
},
@ -1121,6 +1186,7 @@ export default {
return false
}
this.visible = true
this.labelIdArray = []
this.labelLoad = true
BookingLabelList({ scope: 1 }).then(res => {
this.labelList = res.data
@ -1168,12 +1234,16 @@ export default {
arr[i].bookingSlotSaleInfoList.forEach(ite => {
const data = JSON.parse(JSON.stringify(arr[i]))
delete data.bookingSlotSaleInfoList
data.isRemark = true
data.dzmarkLoading = false
arr.push({
...ite, ...data
})
})
arr.splice(i, 1)
}
arr[i].isRemark = true
arr[i].dzmarkLoading = false
}
this.loadData = arr
console.log(arr)
@ -1194,7 +1264,7 @@ export default {
this.DjyWebsiteAccountConfigDeleteTenant(data)
},
DjyWebsiteAccountConfigDeleteTenant(record) {
BookingSlotDelete(record).then(res => {
BookingSlotDelete(record.id).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.getList()
@ -1210,6 +1280,12 @@ export default {
}
})
},
getFocusMark(row, file) {
row[file] = true
},
getBlurMark(row, file) {
row[file] = false
},
handleOk1() {
const projectList = []
this.bookingServiceItem.forEach(item => {

@ -55,7 +55,7 @@
</div>
<div class="main-title">
<img src="../../../../assets/icons/u1224.svg" alt="">Rolling Plan
<span style="margin-left: 30px;background: yellow;padding: 0 5px;">before {{ confirmDeadLine }}</span>
<span style="margin-left: 30px;background: yellow;padding: 0 5px;">Before {{ confirmDeadLine }}</span>
</div>
<div class="plan">
<div v-for="(item, index) in rollingPlanList" :key="index" style="margin-bottom: 5px;">
@ -923,9 +923,11 @@ export default {
Promise.all([request1, request2])
.then(([res1, res2]) => {
if (res1.success) {
this.tempList = res1.data;
if (res1.data.length > 0) {
this.templateId = res1.data[0].id;
this.tempList = res1.data;
} else {
this.tempList = []
}
} else {
this.$message.error(res1.message);
@ -938,12 +940,13 @@ export default {
this.toShipPKId = res2.data.ext[0].toShipList[0].pkId;
}
} else {
this.sendShip = {};
this.sendShip = { fromShip: {}, toShipList: [] }
}
} else {
this.$message.error(res2.data.msg);
}
const data1 = {
if (this.templateId && this.sendShip.fromShip.pkId && this.toShipPKId) {
const data1 = {
taskId: this.$route.query.taskPKId,
templateId: this.templateId,
fromShipPKId: this.sendShip.fromShip.pkId,
@ -957,6 +960,9 @@ export default {
this.$message.error(res.data.msg)
}
})
} else {
this.sendLoad = false;
}
})
.catch(error => {
console.error('Error fetching data:', error);
@ -1305,7 +1311,7 @@ export default {
})
},
handleRefsh() {
RefreshBookingorder({ nominationId: this.$route.query.taskPKId }).then(res => {
RefreshBookingorder({ taskPkId: this.$route.query.taskPKId }).then(res => {
if (res.data.succ) {
this.$message.success('操作成功')
} else {

@ -392,6 +392,8 @@ export default {
portTransitId: record.portTransitId,
portDischargeId: record.portDischargeId,
portTransit: record.portTransit,
portLoadingId: '',
portLoading: '',
portDischarge: record.portDischarge,
etd: record.etd,
closingDate: record.closingDate,

@ -4,7 +4,6 @@
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
@ -227,6 +226,11 @@
</a-row>
</a-form>
</a-spin>
<template slot="footer">
<a-button type="danger" @click="handleCancel"></a-button>
<a-button type="primary" @click="handleCopySave"></a-button>
<a-button type="primary" @click="handleSubmit"></a-button>
</template>
</a-modal>
</template>
@ -304,6 +308,103 @@ export default {
console.log(this.form.getFieldsValue())
}, 100)
},
handleCopySave() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
for (const key in values) {
console.log(key, 1)
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
if (!values.carrier) {
values.carrier = this.data.carrier
}
values.id = this.data.id
if (this.portLoadingData.length) {
this.portLoadingData.forEach(item => {
if (item.code == values.portLoadingId) {
values.portLoading = item.enName
}
})
}
if (this.portTransitData.length) {
this.portTransitData.forEach(item => {
if (item.code == values.portTransitId) {
values.portTransit = item.enName
}
})
}
if (this.portDischargeData.length) {
this.portDischargeData.forEach(item => {
if (item.code == values.portDischargeId) {
values.portDischarge = item.enName
}
})
}
if (this.carrierData.length) {
this.carrierData.forEach(item => {
if (item.code == values.carrierid) {
values.carrier = item.cnName
}
})
}
if (this.yardData.length) {
this.yardData.forEach(item => {
if (item.code == values.yardCode) {
values.yard = item.name
}
})
}
DjyVesselInfoServiceAddOrUpdate(values)
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.editRow(values)
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
editRow(record) {
this.data = record
setTimeout(() => {
this.form.setFieldsValue({
vessel: record.vessel,
voyno: record.voyno,
portTransitId: record.portTransitId,
portDischargeId: record.portDischargeId,
portTransit: record.portTransit,
portLoadingId: '',
portLoading: '',
portDischarge: record.portDischarge,
etd: record.etd,
closingDate: record.closingDate,
eta: record.eta,
yard: record.yard,
ygtETD: record.ygtETD,
yardCode: record.yardCode,
atd: record.atd,
carrierid: record.carrierid,
voynoInside: record.voynoInside,
closeDocTime: record.closeDocTime
})
}, 100)
},
// tenantSearch(data) {
// SysTenantPage({ Name: data }).then(res => {
// this.tenantData = res.data.rows

Loading…
Cancel
Save