szh_zidingyibiaoti
lilu 2 years ago
commit fe044a0df7

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -195,7 +195,7 @@
<template #goodsStatusList="{ row }"> <template #goodsStatusList="{ row }">
<div class="goods-status"> <div class="goods-status">
<div class="goods-status-left"> <div class="goods-status-left">
<template v-for="(status, sindex) in row.goodsStatusList" > <template v-for="(status, sindex) in row.goodsStatusList">
<a-popover placement="top" :key="sindex" v-show="status.finishTime || status.remark"> <a-popover placement="top" :key="sindex" v-show="status.finishTime || status.remark">
<div slot="content"> <div slot="content">
<div v-if="status.finishTime">{{ status.finishTime }}</div> <div v-if="status.finishTime">{{ status.finishTime }}</div>
@ -246,7 +246,7 @@
<p v-if="RecentlyCarrierData.length" class="Awrapper">最近使用 <span class="line"></span></p> <p v-if="RecentlyCarrierData.length" class="Awrapper">最近使用 <span class="line"></span></p>
<div class="group-label" v-if="RecentlyCarrierData.length"> <div class="group-label" v-if="RecentlyCarrierData.length">
<a-radio :style="radioStyle" :value="item.code" v-for="item in RecentlyCarrierData" :key="item.code"> <a-radio :style="radioStyle" :value="item.code" v-for="item in RecentlyCarrierData" :key="item.code">
<img class="radio-logo" :src="require(`@/assets/logo/${item.code}.png`)" /> <img class="radio-logo" :src="item.ImgSrc" />
<!-- {{ item.code }} --> <!-- {{ item.code }} -->
{{ item.cnName }} {{ item.cnName }}
</a-radio> </a-radio>
@ -256,8 +256,7 @@
<p class="Awrapper">{{ e }}<span class="line"></span></p> <p class="Awrapper">{{ e }}<span class="line"></span></p>
<div class="group-label"> <div class="group-label">
<a-radio :style="radioStyle" :value="item.code" v-for="item in RcarrierData[e]" :key="item.code"> <a-radio :style="radioStyle" :value="item.code" v-for="item in RcarrierData[e]" :key="item.code">
<img class="radio-logo" :src="require(`@/assets/logo/${item.code}.png`)" /> <img class="radio-logo" :src="item.ImgSrc" />
<!-- {{ item.code }} -->
{{ item.cnName }} {{ item.cnName }}
</a-radio> </a-radio>
</div> </div>
@ -305,9 +304,13 @@
</div> </div>
<!-- v-show="goodStatusShow" --> <!-- v-show="goodStatusShow" -->
<div class="goods-hovers-list" :class="{'hide-goods-hover': !goodStatusShow}" :style="{ top: `${goodStatusScreenY}px`, left: `${goodStatusScreenX}px` }" > <div
class="goods-hovers-list"
:class="{ 'hide-goods-hover': !goodStatusShow }"
:style="{ top: `${goodStatusScreenY}px`, left: `${goodStatusScreenX}px` }"
>
<div class="title">货运动态</div> <div class="title">货运动态</div>
<template v-for="(goodStatusItem, gindex) in goodStatusData" > <template v-for="(goodStatusItem, gindex) in goodStatusData">
<template v-if="goodStatusItem.finishTime || goodStatusItem.remark"> <template v-if="goodStatusItem.finishTime || goodStatusItem.remark">
<a-popover placement="top" :key="gindex"> <a-popover placement="top" :key="gindex">
<div slot="content"> <div slot="content">
@ -315,11 +318,15 @@
<div v-if="goodStatusItem.remark">{{ goodStatusItem.remark }}</div> <div v-if="goodStatusItem.remark">{{ goodStatusItem.remark }}</div>
<div v-if="goodStatusItem.extData">{{ goodStatusItem.extData }}</div> <div v-if="goodStatusItem.extData">{{ goodStatusItem.extData }}</div>
</div> </div>
<div class="goods-btn" :class="{ 'active': goodStatusItem.finishTime || goodStatusItem.remark }">{{ goodStatusItem.statusName }}</div> <div class="goods-btn" :class="{ active: goodStatusItem.finishTime || goodStatusItem.remark }">
{{ goodStatusItem.statusName }}
</div>
</a-popover> </a-popover>
</template> </template>
<template v-else> <template v-else>
<div class="goods-btn" :key="gindex" :class="{ 'active': goodStatusItem.finishTime || goodStatusItem.remark }">{{ goodStatusItem.statusName }}</div> <div class="goods-btn" :key="gindex" :class="{ active: goodStatusItem.finishTime || goodStatusItem.remark }">
{{ goodStatusItem.statusName }}
</div>
</template> </template>
</template> </template>
</div> </div>
@ -676,7 +683,7 @@ export default {
computed: { computed: {
...mapGetters(['bookingList', 'bookingGridOptions']) ...mapGetters(['bookingList', 'bookingGridOptions'])
}, },
beforeRouteLeave (to, from, next) { beforeRouteLeave(to, from, next) {
// const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data)) // const copyArr = JSON.parse(JSON.stringify(this.gridOptions.data))
// const first = copyArr.splice(0, 20) // const first = copyArr.splice(0, 20)
this.setBookingGridOptions(this.gridOptions) this.setBookingGridOptions(this.gridOptions)
@ -703,7 +710,7 @@ export default {
// } // }
next() next()
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next(vm => {
vm.upDate() vm.upDate()
}) })
@ -716,7 +723,7 @@ export default {
}, },
methods: { methods: {
...mapActions(['setBookingList', 'setBookingGridOptions']), ...mapActions(['setBookingList', 'setBookingGridOptions']),
createdInit () { createdInit() {
this.showColumns = JSON.parse(JSON.stringify(initData.columns)) this.showColumns = JSON.parse(JSON.stringify(initData.columns))
this.formAllData = JSON.parse(JSON.stringify(initData.condAllData)) this.formAllData = JSON.parse(JSON.stringify(initData.condAllData))
this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData)) this.fromTableAllData = JSON.parse(JSON.stringify(initData.columnsAllData))
@ -725,23 +732,27 @@ export default {
this.getConfigUser(true) this.getConfigUser(true)
this.getCarrier() this.getCarrier()
}, },
onresize () { onresize() {
window.onresize = () => { window.onresize = () => {
this.screenWidth = document.body.clientWidth this.screenWidth = document.body.clientWidth
} }
}, },
upDate () { upDate() {
if (Object.keys(this.gridOptions).length > 0) { if (Object.keys(this.gridOptions).length > 0) {
if (Object.keys(this.bookingGridOptions).length === 0) { return false } if (Object.keys(this.bookingGridOptions).length === 0) {
return false
}
const newData = JSON.parse(JSON.stringify(this.bookingGridOptions)) const newData = JSON.parse(JSON.stringify(this.bookingGridOptions))
if (newData && newData.data.length > this.gridOptions.data.length) { if (newData && newData.data.length > this.gridOptions.data.length) {
console.log('这里插入最新舱单', newData.data.length, this.gridOptions.data.length) console.log('这里插入最新舱单', newData.data.length, this.gridOptions.data.length)
} }
} }
}, },
upDate1 () { upDate1() {
if (Object.keys(this.gridOptions).length > 0) { if (Object.keys(this.gridOptions).length > 0) {
if (Object.keys(this.bookingGridOptions).length === 0) { return false } if (Object.keys(this.bookingGridOptions).length === 0) {
return false
}
const newData = JSON.parse(JSON.stringify(this.bookingGridOptions)) const newData = JSON.parse(JSON.stringify(this.bookingGridOptions))
// N // N
if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) { if (this.bookingGridOptions.data && this.bookingGridOptions.data.length > 0) {
@ -879,7 +890,7 @@ export default {
getConfigUser(isInit = false) { getConfigUser(isInit = false) {
// //
const query = { const query = {
typeArr: ['booking_list_cond', 'booking_list_column'] typeArr: ['booking_list_cond', 'booking_list_column']
} }
DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => { DjyUserConfigMulti(this.$qs.stringify(query, { arrayFormat: 'repeat' })).then(res => {
const $data = {} const $data = {}
@ -939,6 +950,15 @@ export default {
} }
Object.keys(Obj).forEach(e => { Object.keys(Obj).forEach(e => {
Obj[e].forEach(item => { Obj[e].forEach(item => {
RData[item].forEach((Ai, AiIndex) => {
let imgSrc = ''
try {
imgSrc = require(`@/assets/logo/${Ai.code}.png`)
} catch (error) {
imgSrc = require('@/assets/logo/default.png')
}
RData[item][AiIndex].ImgSrc = imgSrc
})
Data[e].push(...RData[item]) Data[e].push(...RData[item])
}) })
}) })
@ -971,7 +991,7 @@ export default {
console.log(err) console.log(err)
}) })
}, },
setFormData (data, isReset = false, isInit = false) { setFormData(data, isReset = false, isInit = false) {
if (Object.keys(data).length > 0 && JSON.parse(data.configJson).length) { if (Object.keys(data).length > 0 && JSON.parse(data.configJson).length) {
const arr = JSON.parse(data.configJson) const arr = JSON.parse(data.configJson)
const nowData = [] const nowData = []
@ -1025,7 +1045,7 @@ export default {
} }
this.$forceUpdate() this.$forceUpdate()
}, },
setTableList (data) { setTableList(data) {
if (Object.keys(data).length > 0 && JSON.parse(data.configJson).length) { if (Object.keys(data).length > 0 && JSON.parse(data.configJson).length) {
this.formTableData = JSON.parse(data.configJson) this.formTableData = JSON.parse(data.configJson)
const nowTableArr = this.formTableData.map((item, index) => { const nowTableArr = this.formTableData.map((item, index) => {
@ -1057,7 +1077,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
} }
}, },
setPageSize (data) { setPageSize(data) {
if (data && JSON.parse(data.configJson)) { if (data && JSON.parse(data.configJson)) {
this.gridOptions.pagerConfig.pageSize = JSON.parse(data.configJson).pageSize this.gridOptions.pagerConfig.pageSize = JSON.parse(data.configJson).pageSize
this.$forceUpdate() this.$forceUpdate()
@ -1506,7 +1526,7 @@ export default {
this.remarkShow = false this.remarkShow = false
this.remarkData = null this.remarkData = null
}, },
goodStatusclick (e, data) { goodStatusclick(e, data) {
if (!this.goodStatusShow) { if (!this.goodStatusShow) {
this.goodStatusHover(e, data) this.goodStatusHover(e, data)
} else { } else {
@ -1721,17 +1741,17 @@ export default {
} }
}, },
getSelectFirst ({ form, index, value }) { getSelectFirst({ form, index, value }) {
const fun = this.emnuSelectApi(form.label) const fun = this.emnuSelectApi(form.label)
if (fun) { if (fun) {
this.getFromSelectData(fun).then((data) => { this.getFromSelectData(fun).then(data => {
this.formData[index].dataList = data this.formData[index].dataList = data
this.$refs[`fromlabel-${form.label}`][0].$data.dataList = data this.$refs[`fromlabel-${form.label}`][0].$data.dataList = data
}) })
} }
}, },
removeMoreFun () { removeMoreFun() {
const select = this.$refs.xGrid.getCheckboxRecords() const select = this.$refs.xGrid.getCheckboxRecords()
if (select.length === 0) { if (select.length === 0) {
this.$message.error('请选择操作订单') this.$message.error('请选择操作订单')
@ -1742,28 +1762,29 @@ export default {
}) })
this.deleteBookingOrder(removeArr) this.deleteBookingOrder(removeArr)
}, },
removeFun (data) { removeFun(data) {
this.deleteBookingOrder([data.id]) this.deleteBookingOrder([data.id])
}, },
deleteBookingOrder (arr) { deleteBookingOrder(arr) {
DeleteBookingOrder(arr.toString()).then(res => { DeleteBookingOrder(arr.toString())
if (res.success) { .then(res => {
this.$message.success('删除成功') if (res.success) {
this.gridOptions.data = this.gridOptions.data.filter(item => !arr.includes(item.id)) this.$message.success('删除成功')
this.gridOptions.pagerConfig.total = this.gridOptions.pagerConfig.total - arr.length this.gridOptions.data = this.gridOptions.data.filter(item => !arr.includes(item.id))
this.$forceUpdate() this.gridOptions.pagerConfig.total = this.gridOptions.pagerConfig.total - arr.length
} else { this.$forceUpdate()
this.$message.error(res.message) } else {
} this.$message.error(res.message)
}) }
.catch(err => { })
console.log(err) .catch(err => {
}) console.log(err)
})
}, },
cancelRemove () { cancelRemove() {
console.log('== 取消 ==') console.log('== 取消 ==')
}, },
pageClick (e) { pageClick() {
this.goodStatusShow = false this.goodStatusShow = false
this.goodStatusData = null this.goodStatusData = null
}, },
@ -2294,17 +2315,17 @@ export default {
} }
// //
.goods-status{ .goods-status {
width: 100%; width: 100%;
display: flex; display: flex;
height: 48px; height: 48px;
.goods-status-left{ .goods-status-left {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
height: 48px; height: 48px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
.goods-tip{ .goods-tip {
font-size: 12px; font-size: 12px;
margin: 0 4px; margin: 0 4px;
cursor: pointer; cursor: pointer;
@ -2314,11 +2335,11 @@ export default {
color: @primary-color; color: @primary-color;
} }
} }
.goods-status-right{ .goods-status-right {
width: 30px; width: 30px;
text-align: center; text-align: center;
height: 48px; height: 48px;
i{ i {
color: @primary-color; color: @primary-color;
cursor: pointer; cursor: pointer;
height: 48px; height: 48px;
@ -2327,9 +2348,10 @@ export default {
} }
} }
.dzRemark, .czRemark{ .dzRemark,
.czRemark {
display: block; display: block;
text-align:left; text-align: left;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -2411,7 +2433,7 @@ export default {
} }
} }
} }
.goods-hovers-list{ .goods-hovers-list {
max-height: 400px; max-height: 400px;
position: fixed; position: fixed;
top: 0; top: 0;
@ -2426,15 +2448,15 @@ export default {
white-space: normal; white-space: normal;
text-align: left; text-align: left;
z-index: 999 !important; z-index: 999 !important;
transition: .5s all; transition: 0.5s all;
display: block; display: block;
opacity: 1; opacity: 1;
&.hide-goods-hover{ &.hide-goods-hover {
display: none; display: none;
opacity: 0; opacity: 0;
} }
// overflow: auto; // overflow: auto;
&::before{ &::before {
content: ''; content: '';
float: left; float: left;
width: 0; width: 0;
@ -2456,11 +2478,11 @@ export default {
font-weight: 600; font-weight: 600;
} }
.goods-btn { .goods-btn {
display:inline-block; display: inline-block;
font-size: 12px; font-size: 12px;
color: #666; color: #666;
word-break: break-all; word-break: break-all;
width:82px; width: 82px;
height: 28px; height: 28px;
line-height: 28px; line-height: 28px;
border-radius: 4px; border-radius: 4px;
@ -2469,7 +2491,7 @@ export default {
text-align: center; text-align: center;
margin: 0 2px 8px; margin: 0 2px 8px;
cursor: pointer; cursor: pointer;
&.active{ &.active {
color: @primary-color; color: @primary-color;
border: 1px solid @primary-color; border: 1px solid @primary-color;
} }
@ -2507,13 +2529,13 @@ export default {
font-size: 100px; font-size: 100px;
} }
} }
.pono{ .pono {
text-align: left; text-align: left;
} }
/deep/ .vxe-header--row th{ /deep/ .vxe-header--row th {
text-align: left !important; text-align: left !important;
} }
/deep/ .vxe-cell--title{ /deep/ .vxe-cell--title {
width: 100%; width: 100%;
text-align: left; text-align: left;
} }

@ -155,7 +155,7 @@ const columns = [
{ {
title: '全称', title: '全称',
align: 'center', align: 'center',
width: '90', width: '180',
dataIndex: 'fullName' dataIndex: 'fullName'
}, },
{ {
@ -167,25 +167,25 @@ const columns = [
{ {
title: '电话', title: '电话',
align: 'center', align: 'center',
width: '110', width: '140',
dataIndex: 'tel' dataIndex: 'tel'
}, },
{ {
title: '邮箱', title: '邮箱',
align: 'center', align: 'center',
width: '60', width: '200',
dataIndex: 'email' dataIndex: 'email'
}, },
{ {
title: 'QQ', title: 'QQ',
align: 'center', align: 'center',
width: '60', width: '180',
dataIndex: 'qq' dataIndex: 'qq'
}, },
{ {
title: '网址', title: '网址',
align: 'center', align: 'center',
width: '60', width: '180',
dataIndex: 'webUrl' dataIndex: 'webUrl'
}, },
{ {
@ -203,19 +203,19 @@ const columns = [
{ {
title: '地址', title: '地址',
align: 'center', align: 'center',
width: '60', width: '180',
dataIndex: 'addr' dataIndex: 'addr'
}, },
{ {
title: '英文全名', title: '英文全名',
align: 'center', align: 'center',
width: '80', width: '160',
dataIndex: 'fullNameEN' dataIndex: 'fullNameEN'
}, },
{ {
title: '英文地址', title: '英文地址',
align: 'center', align: 'center',
width: '80', width: '300',
dataIndex: 'addrEN' dataIndex: 'addrEN'
}, },
// { // {
@ -227,7 +227,7 @@ const columns = [
{ {
title: '发票抬头', title: '发票抬头',
align: 'center', align: 'center',
width: '80', width: '200',
dataIndex: 'invTitle' dataIndex: 'invTitle'
}, },
{ {

Loading…
Cancel
Save