修改问题

master
sunzehua 1 year ago
parent 7918df7b1b
commit 545004a58e

@ -2,5 +2,6 @@ NODE_ENV=production
VUE_APP_PREVIEW=true
//VUE_APP_API_BASE_URL=http://192.168.1.205:25800
//VUE_APP_API_BASE_URL=http://127.0.0.1:5000
VUE_APP_API_BASE_URL=http://60.209.125.238:35220
# VUE_APP_API_BASE_URL=http://60.209.125.238:35220
# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api
VUE_APP_API_BASE_URL=http://localhost:5020

@ -1,8 +1,9 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=http://60.209.125.238:35220
VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35220
# VUE_APP_API_BASE_URL=http://60.209.125.238:35220
# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35220
VUE_APP_API_BASE_URL=http://localhost:5020
VUE_APP_SOCKET_BASE_URL=http://localhost:5020
# process.env.VUE_APP_API_BASE_URL
# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api

@ -1,7 +1,9 @@
NODE_ENV=production
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=http://60.209.125.238:35220
VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35220
# VUE_APP_API_BASE_URL=http://60.209.125.238:35220
# VUE_APP_SOCKET_BASE_URL=http://60.209.125.238:35220
VUE_APP_API_BASE_URL=http://localhost:5020
VUE_APP_SOCKET_BASE_URL=http://localhost:5020
# VUE_APP_API_BASE_URL=http://47.104.85.216:12345/api
# VUE_APP_SOCKET_BASE_URL=http://47.104.85.216:12345/api

@ -1028,3 +1028,19 @@ export function BookingCustomerOrderDelete (parameter) {
params: parameter
})
}
export function BookingCustomerOrderSubmit (parameter) {
return axios({
url: 'BookingCustomerOrder/Submit',
method: 'post',
data: parameter
})
}
export function BookingCustomerOrderCancelSubmit (parameter) {
return axios({
url: 'BookingCustomerOrder/CancelSubmit',
method: 'post',
data: parameter
})
}

@ -1,16 +1,16 @@
<template>
<div class="main">
<div class="btn-list">
<a-input
style="display: inline-block;width: 160px;"
v-if="details.bookingno"
disabled
v-model="details.bookingno" />
<span v-if="details.bookingno">{{ details.bookingno }}</span>
<a-button type="primary" @click="handleSave"></a-button>
<a-button type="primary" @click="handleCopy"></a-button>
<a-button type="primary">存为模板</a-button>
<a-button type="danger" @click="handleDelete"></a-button>
<a-button type="primary">发送订舱</a-button>
<a-button type="danger" v-if="details.bsstatus == '已录入'" @click="handleDelete"></a-button>
<a-button
type="primary"
@click="handleSubimt"
v-if="details.bsstatus == '已录入' || details.bsstatus == '已驳回'">发送订舱</a-button>
<a-button type="danger" @click="handleCancle" v-if="details.bsstatus == '已提交'"></a-button>
</div>
<a-spin :spinning="loading">
<div class="box">
@ -726,7 +726,10 @@ import datePickerView from '../../BookingLedger/detail/components/datePickerView
import autoView from '../../BookingLedger/detail/components/autoView'
import textareaView from '../../BookingLedger/detail/components/textareaView'
import { UploadTempFile, BookingCustomerOrderGetFile } from '@/api/modular/system/fileManage'
import { BookingCustomerOrderSave, BookingTemplateAdd, BookingCustomerOrderGet, BookingCustomerOrderDelete } from '@/api/modular/main/BookingLedger'
import {
BookingCustomerOrderSave, BookingTemplateAdd, BookingCustomerOrderGet,
BookingCustomerOrderDelete, BookingCustomerOrderSubmit, BookingCustomerOrderCancelSubmit
} from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex'
export default {
components: {
@ -748,6 +751,7 @@ export default {
const hisData = {
bookingDetails: this.details,
isCopy: this.isCopy,
fileList: this.fileList,
id: this.id
}
if (Object.keys(this.$refs).includes('sedOrder')) {
@ -759,6 +763,7 @@ export default {
const hisData = {
bookingDetails: this.details,
isCopy: this.isCopy,
fileList: this.fileList,
id: this.id
}
this.$set(this.historyData, this.id, hisData)
@ -773,6 +778,7 @@ export default {
if (this.isCopy) {
const hisData = {
bookingDetails: this.details,
fileList: this.fileList,
isCopy: this.isCopy,
id: this.id
}
@ -785,6 +791,7 @@ export default {
const hisData = {
bookingDetails: this.details,
isCopy: this.isCopy,
fileList: this.fileList,
id: this.id
}
this.$set(this.historyData, this.id, hisData)
@ -853,6 +860,7 @@ export default {
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
this.details = $data.bookingDetails
this.fileList = $data.fileList
this.id = this.$route.query.id
this.isCopy = this.$route.query.isCopy
this.$forceUpdate()
@ -861,11 +869,13 @@ export default {
this.isCopy = this.$route.query.isCopy
const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
this.details = $data.bookingDetails
this.fileList = $data.fileList
if (this.isCopy && !$data.isCopy) {
$data.bookingDetails.copyId = this.$route.query.id
$data.bookingDetails.id = 0
$data.bookingDetails.bookingno = ''
$data.bookingDetails.files = {}
this.fileList = []
$data.bookingDetails.tempFileNames = []
this.details = $data.bookingDetails
} else {
@ -885,23 +895,18 @@ export default {
item.label = item.name
item.value = item.code
})
// const shipperScroll = document.getElementById('shipper-scroll')
// if (shipperScroll) {
// shipperScroll.addEventListener('scroll', () => {
// document.getElementById('shipper-scroll-right').scrollTop = shipperScroll.scrollTop
// })
// }
// const consigneeScroll = document.getElementById('consignee-scroll')
// consigneeScroll.addEventListener('scroll', () => {
// document.getElementById('consignee-scroll-right').scrollTop = consigneeScroll.scrollTop
// })
// const notifypartyScroll = document.getElementById('notifyparty-scroll')
// notifypartyScroll.addEventListener('scroll', () => {
// document.getElementById('notifyparty-scroll-right').scrollTop = notifypartyScroll.scrollTop
// })
if (this.id) {
if (this.$route.query.id) {
this.isAdd = false
this.getDetail()
} else {
this.details = {
shipper: '',
serviceList: [],
notifyparty: '',
consignee: '',
ctnList: []
}
this.fileList = []
}
},
handleCopy() {
@ -910,6 +915,32 @@ export default {
query: { id: this.id, isCopy: true }
})
},
handleSubimt() {
this.loading = true
BookingCustomerOrderSubmit([this.details.id]).then(res => {
if (res.success) {
this.loading = false
this.$message.success('提交成功')
this.getDetail()
} else {
this.$message.error(res.message)
this.loading = false
}
})
},
handleCancle() {
this.loading = true
BookingCustomerOrderCancelSubmit([this.details.id]).then(res => {
if (res.success) {
this.loading = false
this.$message.success('撤销成功')
this.getDetail()
} else {
this.$message.error(res.message)
this.loading = false
}
})
},
getDetail() {
const data = {
id: this.id
@ -993,21 +1024,29 @@ export default {
}
})
}
if (Object.values(data.files).length === 0) {
if (data.files && Object.values(data.files).length === 0) {
delete data.files
}
if (!data.id && !this.isCopy) {
data.id = this.id
}
this.loading = true
BookingCustomerOrderSave(data).then(res => {
if (res.success) {
this.$message.success('操作成功')
this.loading = false
this.getDetail()
this.id = res.data.id
if (this.isCopy) {
this.isCopy = false
this.id = res.data.id
}
this.$router.replace({
name: 'BookingCustomerDetail',
query: {
id: res.data.id
}
})
} else {
this.loading = false
this.$message.error(res.message)
@ -1367,6 +1406,7 @@ export default {
.main {
padding-bottom: 60px;
position: sticky;
.box {
background: white;
padding: 10px;
@ -1380,6 +1420,7 @@ export default {
margin-bottom: 15px;
position: sticky;
top: 0;
button {
margin: 0 7px;
}

@ -36,9 +36,6 @@
<a-button size="small" type="primary" @click="tableRefresh"></a-button>
<a-button size="small" class="reset" @click="tableReset"></a-button>
<template v-if="screenWidth > 1600">
<a-button size="small" class="more-search" @click="tableMoreRefresh">
多提单号查询<a-icon type="search" />
</a-button>
<span class="tab-btn" @click="formSetting">
<a-icon type="setting" :style="{ marginLeft: '0px' }" />
</span>
@ -82,7 +79,7 @@
@cancel="cancelRemove">
<div class="nav"><i class="iconfont icon-shanchu2"></i>删除</div>
</a-popconfirm>
<div class="nav" @click="copyBooking"><i class="iconfont icon-fuzhi"></i>发送订舱</div>
<div class="nav" @click="handleSubimt"><i class="iconfont icon-fuzhi"></i>发送订舱</div>
</div>
</template>
<template #tools>
@ -144,7 +141,7 @@
</div>
</template>
<template #bsstatusname="{ row }">
<div :style="{ backgroundColor: row.bsstatusnameColor }"> {{ row.bsstatus }}</div>
<div @click="handleOpenStatus(row)" style="cursor: pointer;" class="mblno"> {{ row.bsstatus }}</div>
</template>
<template #vessel="{ row }">
<div class="vessel">{{ row.vessel }}</div>
@ -340,14 +337,22 @@
</a-modal>
<a-modal
title="多提单号查询"
title="状态历史"
:maskClosable="false"
:width="400"
:visible="moreNumVisible"
@ok="moreNumSubmit"
@cancel="moreNumCancel">
:width="800"
:visible="statusFlag"
@cancel="statusFlag=false">
<div>
<a-textarea v-model="moreNumVal" style="height: 200px" />
<vxe-table border ref="xTable" :data="statusList">
<vxe-column field="status" title="业务状态">
</vxe-column>
<vxe-column field="opTime" title="状态时间">
</vxe-column>
<vxe-column field="remark" title="备注">
</vxe-column>
<vxe-column field="createdUserName" title="创建者">
</vxe-column>
</vxe-table>
</div>
</a-modal>
@ -436,7 +441,9 @@ import {
downloadDraft,
checkUpdateManifestNo,
singleBCFileRead,
RefreshBillTrace
RefreshBillTrace,
BookingCustomerOrderGet,
BookingCustomerOrderSubmit
} from '@/api/modular/main/BookingLedger'
import initData from './modules/initData'
@ -466,6 +473,8 @@ export default {
spinning: false,
isUpload: false,
refshYZloading: false,
statusFlag: false,
statusLoading: false,
copyMoreForm: this.$form.createForm(this, { number: '' }),
copyMoreFlag: false,
percent: 0,
@ -518,6 +527,7 @@ export default {
height: '50px',
lineHeight: '50px'
},
statusList: [],
moreNumVisible: false,
moreNumVal: '',
tableOrderLabel: '',
@ -647,6 +657,28 @@ export default {
this.screenWidth = document.body.clientWidth
}
},
handleSubimt() {
const select = this.$refs.xGrid.getCheckboxRecords()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0) {
this.$message.warning('请先选择')
} else {
BookingCustomerOrderSubmit(pkIdArr).then(res => {
this.spinning = true
if (res.success) {
this.spinning = false
this.$message.success('提交成功')
this.getDetail()
} else {
this.$message.error(res.message)
this.spinning = false
}
})
}
console.log(pkIdArr)
},
upDate() {
if (Object.keys(this.gridOptions).length > 0) {
if (Object.keys(this.bookingGridOptions).length === 0) {
@ -1421,7 +1453,8 @@ export default {
},
addBooking() {
this.addVisible = !this.addVisible
this.addNum = Math.round(Math.random() * 1000)
this.$router.push({ name: 'BookingCustomerDetail', query: { addNum: this.addNum } })
},
copyBooking() {
const select = this.$refs.xGrid.getCheckboxRecords()
@ -1569,7 +1602,6 @@ export default {
this.remarkData = null
},
goodStatusclick(e, data) {
console.log('是否已展示', this.goodStatusShow)
if (!this.goodStatusShow) {
this.goodStatusHover(e, data)
} else {
@ -1881,6 +1913,29 @@ export default {
console.log(err)
this.spinning = false
})
},
handleOpenStatus(row) {
const data = {
id: row.id
}
this.statusLoading = true
BookingCustomerOrderGet(data).then(res => {
if (res.success) {
this.statusLoading = false
res.data.logList.forEach(item => {
const arr = item.status.split('')
item.status = arr[0]
if (arr.length > 1) {
item.remark = arr[1].slice(5, arr[1].length)
}
})
this.statusList = res.data.logList
this.statusFlag = true
} else {
this.$message.error(res.message)
this.statusLoading = false
}
})
}
}
}

@ -202,7 +202,7 @@ export default {
case 'GetPortlist':
return GetPortlist
case 'BookingTemplate':
return GetTemplateShare
return BookingTemplate
case 'DjyCustomerpage':
return DjyCustomerpage
case 'DjyCustomerSuggest':

@ -655,7 +655,6 @@ export default {
this.mainOrderActiveKey = $data.mainOrderActiveKey
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
console.log(this.bookingDetails, 12312323)
if (this.isCopy && !$data.isCopy) {
this.bookingDetails.mblno = ''
}
@ -1210,156 +1209,18 @@ export default {
this.bookingOrderUpdate()
},
bookingOrderUpdate() {
let basicFrom = true
let basicObject = true
this.$refs.basicInfo.$refs.basicFrom.validate((valid, object) => {
basicFrom = valid
basicObject = object
})
let mailingFrom = true
this.$refs.mailingInfo.$refs.mailingFrom.validate(valid => {
mailingFrom = valid
})
let cargoFrom = true
this.$refs.cargoInfo.$refs.cargoFrom.validate(valid => {
cargoFrom = valid
})
let billFrom = true
this.$refs.billInfo.$refs.billFrom.validate(valid => {
billFrom = valid
})
let remarksFrom = true
this.$refs.remarksInfo.$refs.remarkFrom.validate(valid => {
remarksFrom = valid
})
if (!basicFrom && mailingFrom && cargoFrom && billFrom && remarksFrom) {
if (Object.keys(basicObject).length === 1 &&
Object.keys(basicObject)[0] === 'zhanCangFlag') {
this.$message.error('保存失败,是否占舱未填写')
return false
}
}
if (!basicFrom || !mailingFrom || !cargoFrom || !billFrom || !remarksFrom) {
this.$message.error('保存失败,请检查必填项')
return false
}
if (this.$refs.ediMore) {
let ediFrom = true
this.$refs.ediMore.$refs.ediFrom.validate(valid => {
ediFrom = valid
})
if (!ediFrom) {
this.mainOrderActiveKey = '2-2'
this.$message.error('保存失败请检查EDI必填项')
return false
}
} else {
Object.keys(this.ediRules).map((item, index) => {
if (this.checkFrom.includes(item) && !this.bookingDetails[item.split('.')[0]][item.split('.')[1]]) {
this.hasEdiRules = true
}
})
if (this.hasEdiRules) {
this.mainOrderActiveKey = '2-2'
this.$message.error('保存失败请检查EDI必填项')
return false
}
}
if (this.hasTableRules && this.bookingDetails.shippingMethod !== '拼箱' && this.bookingDetails.carrierid !== 'GGPX') {
if (this.bookingDetails.ctnInputs.length === 0) {
this.$message.error('保存失败,箱信息未填写')
return false
}
let tableErrTip = ''
this.bookingDetails.ctnInputs.map((item, index) => {
Object.keys(item).map((label, lindex) => {
if (this.tableRules[label] && this.tableRules[label].required && !item[label]) {
tableErrTip = `${tableErrTip} 序号${index + 1}${this.tableRules[label].title}未填写,`
}
})
})
if (tableErrTip !== '') {
this.$message.error(`保存失败, 箱信息错误: ${tableErrTip.substr(0, tableErrTip.length - 1)}`, 3)
return false
}
}
const FnOk = () => {
const _data = JSON.parse(JSON.stringify(that.bookingDetails))
delete _data.hbList
this.setInBookingDetailsSave(true)
console.log('=== 保存,当前订舱列表 ===', this.needSavePages)
if (this.isCopy) {
delete _data.bookingno
_data.ctnInputs.map((item, index) => {
delete item.id
})
}
this.$message.loading({ content: '保存中, 请勿切换页面...' })
console.log('== vuex 开始保存==', this.inBookingDetailsSave)
BookingOrderSave(_data)
.then(res => {
if (res.success) {
this.$message.destroy()
that.$message.success('保存成功')
if (that.isAdd || this.isCopy) {
this.isCopy = false
this.isAdd = false
this.inAddSave = true
this.id = res.data.id
const newBookingList = JSON.parse(JSON.stringify(this.bookingList))
const newBookingGridOptions = JSON.parse(JSON.stringify(this.bookingGridOptions))
newBookingGridOptions.data = [...[res.data], ...newBookingGridOptions.data]
this.$set(newBookingList, res.data.id, res.data)
this.setBookingList(newBookingList)
this.setBookingGridOptions(newBookingGridOptions)
that.$router.replace({
name: 'BookingDetail',
query: {
id: res.data.id,
type: res.data.carrierid,
noOpenTab: true,
mblno: res.data.mblno
}
})
this.setDeatilsFun(res, true)
setTimeout(() => {
this.inAddSave = false
this.getRightAll()
this.$refs.rightContent.init()
}, 2000)
} else if (that.$route.query.mblno === that.bookingDetails.mblno) {
that.isCopy = false
that.isAdd = false
this.setDeatilsFun(res, true)
that.checkSaveFun({ type: 'hbList', hasChange: false })
that.checkSaveFun({ type: 'details', hasChange: false })
const newBookingList = JSON.parse(JSON.stringify(this.bookingList))
const newBookingGridOptions = JSON.parse(JSON.stringify(this.bookingGridOptions))
this.$set(newBookingList, res.data.id, res.data)
const arr = newBookingGridOptions.data.map((item, index) => {
return item.id
})
const index = arr.indexOf(res.data.id)
newBookingGridOptions.data.splice(index, 1, res.data)
this.setBookingList(newBookingList)
this.setBookingGridOptions(newBookingGridOptions)
} else {
that.isCopy = false
that.isAdd = false
this.inAddSave = true
this.id = res.data.id
this.setDeatilsFun(res, true)
const newBookingList = JSON.parse(JSON.stringify(this.bookingList))
const newBookingGridOptions = JSON.parse(JSON.stringify(this.bookingGridOptions))
this.$set(newBookingList, res.data.id, res.data)
const arr = newBookingGridOptions.data.map((item, index) => {
return item.id
})
const index = arr.indexOf(res.data.id)
newBookingGridOptions.data.splice(index, 1, res.data)
this.setBookingList(newBookingList)
this.setBookingGridOptions(newBookingGridOptions)
that.$router.replace({
name: 'BookingDetail',
query: {
@ -1369,10 +1230,8 @@ export default {
mblno: res.data.mblno
}
})
}
that.setInBookingDetailsSave(false)
console.log('== vuex 结束保存==', this.inBookingDetailsSave)
that.$forceUpdate()
} else {
that.setInBookingDetailsSave(false)
console.log('== vuex 结束保存==', this.inBookingDetailsSave)

Loading…
Cancel
Save