修改BUG

dev
lilu 2 years ago
parent 7c8066de5d
commit 164cecf1c2

@ -450,8 +450,7 @@ export function TxxpLink(parameter) {
export function ExcuteRulesOceanBooking(parameter) {
return axios({
url: '/RulesEngineClient/ExcuteRulesOceanBooking?bookingId=' + parameter,
method: 'get',
params: parameter
method: 'get'
})
}

@ -32,7 +32,7 @@ export default {
this.closeThat(val)
})
.$on('rename', ({ key, name }) => {
console.log('rename', key, name)
// console.log('rename', key, name)
try {
const item = this.pages.find(item => item.path === key)
item.meta.customTitle = name
@ -48,35 +48,41 @@ export default {
...mapActions(['setNeedSavePages']),
onEdit(targetKey, action) {
const _that = this
console.log(this.needSavePages[targetKey])
if (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList) {
this.$confirm({
title: '请确认无未保存数据!',
content: '当点击确定按钮时,此页面 将会关闭。',
cancelText: targetKey === _that.activeKey ? '取消' : '前往保存',
onOk() {
_that[action](targetKey)
const $data = _that.needSavePages
delete $data[targetKey]
_that.setNeedSavePages($data)
},
onCancel() {
_that.activeKey = targetKey
}
})
// console.log(this.needSavePages[targetKey])
if (targetKey.includes('BookingDetail')) {
if (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList) {
this.$confirm({
title: '请确认无未保存数据!',
content: '当点击确定按钮时,此页面 将会关闭。',
cancelText: targetKey === _that.activeKey ? '取消' : '前往保存',
onOk() {
_that[action](targetKey)
const $data = _that.needSavePages
delete $data[targetKey]
_that.setNeedSavePages($data)
},
onCancel() {
_that.activeKey = targetKey
}
})
} else {
this[action](targetKey)
const $data = this.needSavePages
delete $data[targetKey]
this.setNeedSavePages($data)
}
} else {
this[action](targetKey)
const $data = this.needSavePages
delete $data[targetKey]
this.setNeedSavePages($data)
}
console.log('关闭?', targetKey, action)
// console.log('', targetKey, action)
},
remove(targetKey) {
this.pages = this.pages.filter(page => page.fullPath !== targetKey)
this.fullPathList = this.fullPathList.filter(path => path !== targetKey)
console.log('== 关闭 ==')
//
if (!this.fullPathList.includes(this.activeKey)) {
console.log('=== 最后一个标签页 ===')
this.selectedLastPath()
}
},
@ -148,7 +154,7 @@ export default {
},
// render
renderTabPane(title, keyPath) {
console.log(title, keyPath)
// console.log(title, keyPath)
let name = title
let data = Object.fromEntries(new URLSearchParams(keyPath.split('?')[1]))
const menu = this.renderTabPaneMenu(keyPath)

@ -271,7 +271,34 @@ export default {
this.init()
},
beforeRouteUpdate(to, from, next) {
if (!Object.keys(this.historyData).includes(this.$route.query.id)) {
// console.log('fromId', from.query.id, '| toId', to.query.id)
// console.log('2.2 === beforeRouteUpdate ===', this.$route.query.id, this.isCopy)
// if (!Object.keys(this.historyData).includes(this.$route.query.id)) {
// const hisData = {
// bookingDetails: this.bookingDetails,
// excuteRules: this.excuteRules,
// excuteRulesType: this.excuteRulesType,
// isAdd: this.isAdd,
// tabActiveKey: this.tabActiveKey,
// type: this.type,
// isCopy: this.isCopy,
// id: this.$route.query.id
// }
// this.$set(this.historyData, this.$route.query.id, hisData)
// }
if (this.isCopy) {
const hisData = {
bookingDetails: this.bookingDetails,
excuteRules: this.excuteRules,
excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey,
type: this.type,
isCopy: this.isCopy,
id: this.id
}
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else {
const hisData = {
bookingDetails: this.bookingDetails,
excuteRules: this.excuteRules,
@ -280,15 +307,41 @@ export default {
tabActiveKey: this.tabActiveKey,
type: this.type,
isCopy: this.isCopy,
id: this.$route.query.id
id: this.id
}
this.$set(this.historyData, this.$route.query.id, hisData)
this.$set(this.historyData, this.id, hisData)
}
next()
this.getRouterHis()
},
beforeRouteLeave(to, from, next) {
if (!Object.keys(this.historyData).includes(this.id)) {
// console.log('2.1 === beforeRouteLeave ===', this.id, this.isCopy)
// if (!Object.keys(this.historyData).includes(this.id)) {
// const hisData = {
// bookingDetails: this.bookingDetails,
// excuteRules: this.excuteRules,
// excuteRulesType: this.excuteRulesType,
// isAdd: this.isAdd,
// tabActiveKey: this.tabActiveKey,
// type: this.type,
// isCopy: this.isCopy,
// id: this.id
// }
// this.$set(this.historyData, this.id, hisData)
// }
if (this.isCopy) {
const hisData = {
bookingDetails: this.bookingDetails,
excuteRules: this.excuteRules,
excuteRulesType: this.excuteRulesType,
isAdd: this.isAdd,
tabActiveKey: this.tabActiveKey,
type: this.type,
isCopy: this.isCopy,
id: this.id
}
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else {
const hisData = {
bookingDetails: this.bookingDetails,
excuteRules: this.excuteRules,
@ -311,16 +364,35 @@ export default {
methods: {
...mapActions(['setNeedSavePages']),
getRouterHis() {
// console.log('2.3 === beforeRouteEnter - getRouterHis ===', Object.keys(this.historyData), this.$route.query.id)
const newId = this.$route.query.id
if (Object.keys(this.historyData).includes(newId)) {
const $data = this.historyData[newId]
if (Object.keys(this.historyData).includes(`copy-${newId}`) && this.$route.query.isCopy === 'true') {
this.id = this.$route.query.id
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
this.bookingDetails = $data.bookingDetails
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.isCopy = $data.isCopy
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
// console.log('== ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
this.$forceUpdate()
} else if (Object.keys(this.historyData).includes(newId)) {
this.id = this.$route.query.id
const $data = JSON.parse(JSON.stringify(this.historyData[newId]))
this.bookingDetails = $data.bookingDetails
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
this.tabActiveKey = $data.tabActiveKey
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
// console.log('== ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
if (this.isCopy && !$data.isCopy) {
// console.log('== , ==')
this.bookingDetails.mblno = ''
}
this.$forceUpdate()
} else {
this.id = this.$route.query.id
@ -332,11 +404,11 @@ export default {
}
},
init() {
// this.bookingDetails = {}
this.bookingDetails = initDetail
this.excuteRules = []
this.excuteRulesType = ''
this.Showtabs = false
// console.log('3.1 == init ==', this.id)
if (this.id) {
this.isAdd = false
this.getDetail()
@ -377,6 +449,7 @@ export default {
}
this.inPageLoading = true
this.$message.loading({ content: '加载中...' });
// console.log('4.1 == ==', this.id)
BookingOrderGet({
id: this.id
})
@ -384,7 +457,8 @@ export default {
this.inPageLoading = false
this.$message.destroy()
this.$message.success({ content: '加载完成' })
if (this.isCopy) {
// console.log('isCopy', this.$route.query.isCopy)
if (this.$route.query.isCopy) {
res.data.mblno = ''
this.isAdd = true
}
@ -429,8 +503,10 @@ export default {
this.isAdd = false
this.$message.success('保存成功')
if (this.$route.query.mblno === this.bookingDetails.mblno) {
// console.log('1.1 == - ==', this.id)
this.init()
} else {
// console.log('1.2 == - ==', this.id)
this.$router.replace({
name: 'BookingDetail',
query: { id: this.id, type: this.bookingDetails.carrierid, noOpenTab: true, mblno: this.bookingDetails.mblno }

@ -10,12 +10,15 @@
<auto-complete
:allowClear="true"
class="customer-input"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
v-model="details.customername"
:data-source="customerDataArr"
@select="customerSelect"
@change="customerChange"
@focus="customerChange"
/>
>
</auto-complete>
<span
class="customer-btn iconfont icon-touxiang"
@click="changeCustomer('select')"
@ -58,6 +61,8 @@
<auto-complete
:allowClear="true"
class="customer-input"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
v-model="details.forwarder"
:data-source="forwarderDataArr"
@select="forwarderSelect"
@ -123,6 +128,8 @@
class="customer-input"
v-model="details.vessel"
:data-source="vesselDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="vesselSelect"
@change="vesselChange"
@focus="vesselChange"
@ -167,6 +174,8 @@
class="customer-input"
v-model="details.voynoinner"
:data-source="voynoinnerDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="voynoinnerSelect"
@change="voynoinnerChange"
@focus="voynoinnerChange"
@ -214,6 +223,8 @@
class="customer-input"
v-model="details.lanename"
:data-source="lanenameDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="lanenameSelect"
@change="lanenameChange"
@focus="lanenameChange"
@ -227,6 +238,8 @@
class="customer-input"
v-model="details.shipagency"
:data-source="shipagencyDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="shipagencySelect"
@change="shipagencyChange"
@focus="shipagencyChange"
@ -262,6 +275,8 @@
class="customer-input"
v-model="details.sale"
:data-source="saleUserListArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="saleSelect"
@change="saleChange"
@focus="saleChange"
@ -281,6 +296,8 @@
class="customer-input"
v-model="details.op"
:data-source="opUserListArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="opSelect"
@change="opChange"
@focus="opChange"
@ -300,6 +317,8 @@
class="customer-input"
v-model="details.doc"
:data-source="docUserListArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="docSelect"
@change="docChange"
@focus="docChange"
@ -319,6 +338,8 @@
class="customer-input"
v-model="details.custservice"
:data-source="custserviceUserListArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="custserviceSelect"
@change="custserviceChange"
@focus="custserviceChange"
@ -787,6 +808,7 @@ export default {
const { fullData } = $table.getTableData()
fullData.forEach(item => {
item.WroleCode = ''
item.bookingId = this.$route.query.id
if (item.roleCode) {
item.roleCode.forEach(e => {
this.ContactType.forEach(item2 => {
@ -807,7 +829,6 @@ export default {
item.roleCode = item.WroleCode
// }
})
debugger
BookingOrderContactSavebatch(this.$route.query.id, data).then(res => {
if (res.success) {
this.$message.success('保存成功')
@ -909,8 +930,8 @@ export default {
},
handleCarrierChange(data) {
this.carrierSelectData.forEach(item => {
if (item.code == data) {
this.details.carrier = item.cnName
if (item.code === data) {
this.details.carrier = item.enName
}
})
},
@ -1074,7 +1095,7 @@ export default {
console.log(res.data.contacts)
this.customerContactsData = res.data.contacts
})
BookingOrderContactPage({ id: this.details.customerid, pageSize: 999 }).then(res => {
BookingOrderContactPage({ id: this.details.customerid, BookingId: this.$route.query.id, pageSize: 999 }).then(res => {
res.data.rows.forEach(item => {
let WroleCode = []
if (item.roleCode) {

@ -59,6 +59,8 @@
<auto-complete
:allowClear="true"
:disabled="true"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
v-model="details.issueplace"
:data-source="issueplaceDataArr"
@select="issueplaceSelect"
@ -134,6 +136,8 @@
:allowClear="true"
v-model="details.prepardat"
:data-source="prepardatDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="prepardatSelect"
@change="prepardatChange"
@focus="prepardatChange"
@ -152,6 +156,8 @@
:allowClear="true"
v-model="details.payableat"
:data-source="payableatDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="payableatSelect"
@change="payableatChange"
@focus="payableatChange"
@ -170,6 +176,8 @@
:allowClear="true"
v-model="details.blfrt"
:data-source="blfrtDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="blfrtSelect"
@change="blfrtChange"
@focus="blfrtChange"
@ -199,6 +207,8 @@
:allowClear="true"
v-model="details.service"
:data-source="serviceDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="serviceSelect"
@change="serviceChange"
@focus="serviceChange"

@ -761,6 +761,23 @@ export default {
}
})
})
let kgs = 0
this.tableData.map((item, index) => {
kgs += Number(item.kgs)
})
this.totalKgs = kgs
let cbm = 0
this.tableData.map((item, index) => {
cbm += Number(item.cbm)
})
this.totalCbm = cbm
let pkgs = 0
this.tableData.map((item, index) => {
pkgs += Number(item.pkgs)
})
this.totalPkgs = pkgs
},
openDialog() {
if (this.tableData.length === 0) {

@ -6,7 +6,7 @@
</template>
<div class="mail-info">
<a-row :gutter="10">
<a-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<a-col :xs="24" :sm="24" :md="24" :lg="10" :xl="12">
<div class="sender">
<div class="top">
<div class="name"><span class="iconfont icon-bianji"></span>发货人</div>
@ -15,6 +15,8 @@
v-model="shippername"
class="customer-input"
:data-source="shipperDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="shipperSelect"
@change="shipperChange"
@focus="shipperChange"
@ -53,6 +55,8 @@
v-model="consigneename"
class="customer-input"
:data-source="consigneeDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="consigneeSelect"
@change="consigneeChange"
@focus="consigneeChange"
@ -122,7 +126,7 @@
</div>
</div>
</a-col>
<a-col :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
<a-col :xs="24" :sm="24" :md="24" :lg="14" :xl="12">
<a-form>
<a-row :gutter="16">
<a-col :span="12">
@ -179,6 +183,8 @@
v-model="details.customser"
class="customer-input"
:data-source="customserDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="customserSelect"
@change="customserChange"
@focus="customserChange"
@ -198,6 +204,8 @@
v-model="details.trucker"
class="customer-input"
:data-source="truckerDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="truckerSelect"
@change="truckerChange"
@focus="truckerChange"
@ -217,6 +225,8 @@
v-model="details.agentid"
class="customer-input"
:data-source="agentidDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="agentidSelect"
@change="agentidChange"
@focus="agentidChange"
@ -303,6 +313,8 @@
v-model="details.portload"
class="customer-input"
:data-source="portloadDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '300px'}"
@select="portloadSelect"
@change="portloadChange"
@focus="portloadChange"
@ -333,6 +345,8 @@
v-model="details.transport"
class="customer-input"
:data-source="transportDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '300px'}"
@select="transportSelect"
@change="transportChange"
@focus="transportChange"
@ -363,6 +377,8 @@
v-model="details.portdischarge"
class="customer-input"
:data-source="portdischargeDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '300px'}"
@select="portdischargeSelect"
@change="portdischargeChange"
@focus="portdischargeChange"
@ -393,6 +409,8 @@
v-model="details.destination"
class="customer-input"
:data-source="destinationDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '300px'}"
@select="destinationSelect"
@change="destinationChange"
@focus="destinationChange"
@ -423,6 +441,8 @@
v-model="details.placedelivery"
class="customer-input"
:data-source="placedeliveryDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '300px'}"
@select="placedeliverySelect"
@change="placedeliveryChange"
@focus="placedeliveryChange"
@ -453,6 +473,8 @@
v-model="details.placereceipt"
class="customer-input"
:data-source="placereceiptDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '300px'}"
@select="placereceiptSelect"
@change="placereceiptChange"
@focus="placereceiptChange"
@ -494,6 +516,8 @@
v-model="details.kindpkgs"
class="customer-input"
:data-source="kindpkgsDataArr"
:dropdown-match-select-width="false"
:dropdown-style="{ width: '200px'}"
@select="kindpkgsSelect"
@change="kindpkgsChange"
@focus="kindpkgsChange"
@ -1184,6 +1208,10 @@ export default {
this.modelContent = this.details[type]
},
handleModelSubmit() {
if (!this.modelName) {
this.$message.error('请输入模板名称')
return false
}
const type = this.enmuType(this.modelType)
BookingTemplateAdd({
title: this.modelName,
@ -1208,7 +1236,7 @@ export default {
return 10
case 'consignee':
return 20
case 'notifypart':
case 'notifyparty':
return 30
case 'notify':
return 30
@ -1406,6 +1434,8 @@ export default {
margin-bottom: 20px;
.top {
margin-bottom: 15px;
min-height: 32px;
overflow: hidden;
.name {
display: inline-block;
font-size: 13px;
@ -1520,6 +1550,12 @@ export default {
cursor: pointer;
}
}
.content{
.label{
margin-bottom: 10px;
font-size: 14px;
}
}
.feeself {
position: absolute;
top: -3px;
@ -1534,10 +1570,10 @@ export default {
border-bottom: none;
}
@media (max-width: 1300px) {
@media (max-width: 1700px) {
.feeself{
top: 21px;
right: -26px;
top: 21px !important;
right: -26px !important;
}
}
</style>

@ -683,10 +683,12 @@ export default {
uploadFile(file) {
const formData = new FormData()
formData.append('file', file.file)
const type = file.file.type
console.log(type)
BookingOrderOcrUpFile(formData).then(res => {
this.fileName = res.data
BookingOrderOcrGetImg({ fileName: this.fileName, scale: this.scale }).then(res => {
this.imgSrc = window.URL.createObjectURL(new Blob([res]))
this.imgSrc = window.URL.createObjectURL(new Blob([res], { type: `${type};chartset=UTF-8` }))
})
})
},

@ -421,6 +421,7 @@ export default {
this.upFileList = newFileList
},
beforeUpload(file) {
debugger
this.upFileList = [...this.upFileList, file]
return false
},

@ -27,7 +27,7 @@
</a-form-item>
</a-col>
</template>
<a-col :md="(!advanced && 8) || formBtnCol" :sm="24">
<a-col :md="formBtnCol || (!advanced && 8)" :sm="24">
<span
class="table-page-search-submitButtons"
:style="(advanced && { float: 'right', overflow: 'hidden' }) || {}"
@ -40,7 +40,7 @@
<span class="tab-btn" @click="formSetting">
<a-icon type="setting" :style="{ marginLeft: '0px' }" />
</span>
<a class="senior-search" @click="toggleAdvanced">
<a class="senior-search" @click="toggleAdvanced" v-if="formData.length > 4">
{{ advanced ? '收起查询' : '更多查询' }}
<!-- <a-icon :type="advanced ? 'up' : 'down'" /> -->
<i class="iconfont" :class="advanced ? 'icon-shouqi' : 'icon-zhankai'"></i>
@ -206,6 +206,7 @@ export default {
formAllData: null,
formMoreData: null,
formBtnCol: 8,
formBtnLoading: false,
//
setVisible: false,
showColumns: null,
@ -328,11 +329,13 @@ export default {
})
this.getList(this.formRes)
const len = this.formData.length % 4
if (len > 2) {
this.formBtnCol = 24
if (this.formData.length === 4 || this.formData.length > 4) {
this.formBtnCol = 8
} else {
this.formBtnCol = 24 - len * 6
this.formBtnCol = 24 - len * 4
}
console.log('formBtnCol', this.formBtnCol)
this.$forceUpdate()
})
},
getTableList() {
@ -378,6 +381,17 @@ export default {
// form
toggleAdvanced() {
this.advanced = !this.advanced
if (!this.advanced) {
const len = this.formData.length % 4
if (this.formData.length === 4 || this.formData.length > 4) {
this.formBtnCol = 8
} else {
this.formBtnCol = 24 - len * 4
}
} else {
const len = this.formData.length % 6
this.formBtnCol = 24 - len * 4
}
},
tableRefresh() {
let data = { ...this.formRes }
@ -388,7 +402,8 @@ export default {
const arr = this.formRes.MBLNO.split(/-||,|[.]/)
let val = ``
arr.map((item, index) => {
val += `${item}`
val += `${item}
` // 这里不要格式化
})
this.moreNumVal = val
this.moreNumVisible = !this.moreNumVisible
@ -429,12 +444,19 @@ export default {
const arr = data.map((item, index) => {
return item.label
})
console.log(arr)
this.formRes = {}
DjyUserConfigAdd({
type: 'booking_list_cond',
configJson: JSON.stringify(arr)
}).then(res => {
this.$message.success('保存成功')
this.$refs.setForm.handleCancel()
Object.keys(this.$refs).map((label, index) => {
if (label.includes('fromlabel-') && this.$refs[label].length > 0) {
this.$refs[label][0].$data.value = ''
}
})
this.init()
})
},
@ -519,6 +541,10 @@ export default {
if (this.tableOrderType !== '') {
query.DescStr = this.tableOrderType === 'desc'
}
if (query.MBLNO && query.MBLNO.split(/-||,|[.]/).length > 0) {
const arr = this.formRes.MBLNO.split(/-||,|[.]/)
query.MBLNO = arr.toString()
}
BookingOrderPage(query)
.then(res => {
if (res.success) {

Loading…
Cancel
Save