修改BUG

dev
lilu 2 years ago
parent 7c8066de5d
commit 164cecf1c2

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

@ -32,7 +32,7 @@ export default {
this.closeThat(val) this.closeThat(val)
}) })
.$on('rename', ({ key, name }) => { .$on('rename', ({ key, name }) => {
console.log('rename', key, name) // console.log('rename', key, name)
try { try {
const item = this.pages.find(item => item.path === key) const item = this.pages.find(item => item.path === key)
item.meta.customTitle = name item.meta.customTitle = name
@ -48,7 +48,8 @@ export default {
...mapActions(['setNeedSavePages']), ...mapActions(['setNeedSavePages']),
onEdit(targetKey, action) { onEdit(targetKey, action) {
const _that = this const _that = this
console.log(this.needSavePages[targetKey]) // console.log(this.needSavePages[targetKey])
if (targetKey.includes('BookingDetail')) {
if (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList) { if (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList) {
this.$confirm({ this.$confirm({
title: '请确认无未保存数据!', title: '请确认无未保存数据!',
@ -70,13 +71,18 @@ export default {
delete $data[targetKey] delete $data[targetKey]
this.setNeedSavePages($data) this.setNeedSavePages($data)
} }
console.log('关闭?', targetKey, action) } else {
this[action](targetKey)
}
// console.log('', targetKey, action)
}, },
remove(targetKey) { remove(targetKey) {
this.pages = this.pages.filter(page => page.fullPath !== targetKey) this.pages = this.pages.filter(page => page.fullPath !== targetKey)
this.fullPathList = this.fullPathList.filter(path => path !== targetKey) this.fullPathList = this.fullPathList.filter(path => path !== targetKey)
console.log('== 关闭 ==')
// //
if (!this.fullPathList.includes(this.activeKey)) { if (!this.fullPathList.includes(this.activeKey)) {
console.log('=== 最后一个标签页 ===')
this.selectedLastPath() this.selectedLastPath()
} }
}, },
@ -148,7 +154,7 @@ export default {
}, },
// render // render
renderTabPane(title, keyPath) { renderTabPane(title, keyPath) {
console.log(title, keyPath) // console.log(title, keyPath)
let name = title let name = title
let data = Object.fromEntries(new URLSearchParams(keyPath.split('?')[1])) let data = Object.fromEntries(new URLSearchParams(keyPath.split('?')[1]))
const menu = this.renderTabPaneMenu(keyPath) const menu = this.renderTabPaneMenu(keyPath)

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

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

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

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

@ -683,10 +683,12 @@ export default {
uploadFile(file) { uploadFile(file) {
const formData = new FormData() const formData = new FormData()
formData.append('file', file.file) formData.append('file', file.file)
const type = file.file.type
console.log(type)
BookingOrderOcrUpFile(formData).then(res => { BookingOrderOcrUpFile(formData).then(res => {
this.fileName = res.data this.fileName = res.data
BookingOrderOcrGetImg({ fileName: this.fileName, scale: this.scale }).then(res => { 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 this.upFileList = newFileList
}, },
beforeUpload(file) { beforeUpload(file) {
debugger
this.upFileList = [...this.upFileList, file] this.upFileList = [...this.upFileList, file]
return false return false
}, },

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

Loading…
Cancel
Save