修改分单切换,详情展开箭头等

szh_zidingyibiaoti
lilu 2 years ago
parent 767e0dc9a9
commit bf12480121

@ -8,7 +8,7 @@
:animated="Object.keys($refs).includes('sedOrder') ? false : true"
@change="changeTab"
>
<a-tab-pane key="1" tab="主单信息">
<a-tab-pane key="1" tab="主单信息" :forceRender="true">
<a-row :gutter="24">
<a-col :span="18" class="left-box" style="padding-right:0;">
<template>
@ -124,7 +124,7 @@
</a-col>
</a-row>
</a-tab-pane>
<a-tab-pane key="2" tab="分单信息" v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0">
<a-tab-pane key="2" tab="分单信息" :forceRender="true" v-show="bookingDetails.hbList && bookingDetails.hbList.length > 0">
<sedOrder
ref="sedOrder"
:details="bookingDetails"
@ -417,7 +417,8 @@ export default {
hasEdiRules: false,
tableRules: rules.tableRules,
hasTableRules: false,
inAddSave: false
inAddSave: false,
hasHbList: false
}
},
computed: {
@ -456,7 +457,6 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
console.log('== 切路由设置数据 1. ==', hisData)
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else if (this.$route.query.addNum) {
const hisData = {
@ -474,7 +474,6 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
console.log('== 切路由设置数据 2. ==', hisData)
this.$set(this.historyData, `add-${this.$route.query.addNum}`, hisData)
} else {
const hisData = {
@ -492,7 +491,6 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
console.log('== 切路由设置数据 3. ==', hisData)
this.$set(this.historyData, this.id, hisData)
}
next()
@ -518,7 +516,6 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
console.log('== 离开路由设置数据 1. ==', hisData)
this.$set(this.historyData, `copy-${this.id}`, hisData)
} else if (this.$route.query.addNum) {
const hisData = {
@ -536,7 +533,6 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
console.log('== 离开路由设置数据 2. ==', hisData)
this.$set(this.historyData, `add-${this.$route.query.addNum}`, hisData)
} else {
const hisData = {
@ -554,7 +550,6 @@ export default {
const secActive = this.$refs.sedOrder.$data.editIndex
hisData.secActive = secActive
}
console.log('== 离开路由设置数据 3. ==', hisData)
this.$set(this.historyData, this.id, hisData)
}
if (this.hasbookingDetail) {
@ -587,20 +582,19 @@ export default {
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
setTimeout(() => {
console.log('== 1. 获取切换数据 ==', this.bookingDetails.hbList.length)
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
if (this.tabActiveKey === '2') {
setTimeout(() => {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}, 200)
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([])
}
}
}, 200)
setTimeout(() => {
// console.log('== 1. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false
}, 500)
@ -622,20 +616,19 @@ export default {
this.bookingDetails.mblno = ''
}
setTimeout(() => {
console.log('== 2. 获取切换数据 ==', this.bookingDetails.hbList.length)
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
if (this.tabActiveKey === '2') {
setTimeout(() => {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}, 200)
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([])
}
}
}, 200)
setTimeout(() => {
// console.log('== 2. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false
}, 500)
@ -652,23 +645,22 @@ export default {
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
setTimeout(() => {
console.log('== 3. 获取切换数据 ==', this.bookingDetails.hbList.length)
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
if (this.tabActiveKey === '2') {
setTimeout(() => {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}, 200)
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([])
}
}
}, 200)
if (this.isCopy && !$data.isCopy) {
this.bookingDetails.mblno = ''
}
setTimeout(() => {
// console.log('== 3. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false
}, 500)
@ -681,9 +673,7 @@ export default {
this.mainOrderActiveKey = '1-1'
this.$forceUpdate()
this.init()
console.log('== 4. 新建 ==')
setTimeout(() => {
// console.log('== 4. - false ==')
this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false
}, 500)
@ -707,6 +697,9 @@ export default {
this.isAdd = true
this.bookingDetails.carrierid = this.type
this.bookingDetails.carrier = this.type
if (Object.keys(this.$refs).includes('sedOrder')) {
this.$refs.sedOrder.init([])
}
}
this.getDjyTenantConfig()
},
@ -879,6 +872,12 @@ export default {
this.checkSaveFun({ type: 'details', hasChange: false })
this.inChildLoading = false
this.$message.success({ content: '加载完成' })
if (!this.hasHbList && this.bookingDetails.hbList.length > 0) {
this.$refs.sedOrder.init(this.bookingDetails.hbList)
this.hasHbList = true
} else {
this.$refs.sedOrder.init([])
}
}, 1200)
this.$forceUpdate()
},
@ -1260,7 +1259,7 @@ export default {
this.tabActiveKey = '2'
this.Showtabs = true
setTimeout(() => {
this.$refs.sedOrder.init(data.hbList)
this.$refs.sedOrder.init(this.bookingDetails.hbList)
}, 200)
},
//

@ -1,8 +1,11 @@
<template>
<a-collapse class="collapse-box bill-info-box" :bordered="false" expandIconPosition="right" v-model="showKey">
<a-collapse-panel key="1">
<a-collapse class="collapse-box bill-info-box" :bordered="false" v-model="showKey">
<a-collapse-panel key="1" :showArrow="false">
<template slot="header">
<div class="base-tit"><i class="iconfont icon-electronic-signature"></i>签单信息</div>
<div class="base-tit"><i class="iconfont icon-electronic-signature"></i>签单信息 <span class="click-btn" @click.stop="tabStopFun"></span></div>
</template>
<template slot="extra">
<div class="tab-change"><i class="iconfont icon-xia" :class="{'active': !showKey.includes('1')}"></i></div>
</template>
<div class="container bill-info">
<a-form-model ref="billFrom" :model="details" :rules="rules">
@ -457,6 +460,11 @@ export default {
dateChangeFun ({ type, value }) {
this.details[type] = value || ''
console.log('== 日期修改 ==', type, value, this.details[type])
},
tabStopFun () {
return false
},
tabChangeFun () {
}
}
}

@ -1,10 +1,12 @@
<template>
<a-collapse class="collapse-box" :bordered="false" expandIconPosition="right" v-model="showKey">
<a-collapse-panel key="1">
<a-collapse class="collapse-box" :bordered="false" v-model="showKey">
<a-collapse-panel key="1" :showArrow="false">
<template slot="header">
<div class="base-tit"><i class="iconfont icon-goods"></i>货物信息</div>
<div class="base-tit"><i class="iconfont icon-goods"></i>货物信息 <span class="click-btn" @click.stop="tabStopFun"></span></div>
</template>
<template slot="extra">
<div class="tab-change"><i class="iconfont icon-xia" :class="{'active': !showKey.includes('1')}"></i></div>
</template>
<!-- <a-button type="primary" @click="checkbasic"> </a-button> -->
<div class="container cargo-info">
<a-form-model :selfUpdate="true" ref="cargoFrom" :model="details" :rules="rules">
<a-row :gutter="20">
@ -238,6 +240,11 @@ export default {
inputChange({ type, value }) {
this.details[type] = value
this.$forceUpdate()
},
tabStopFun () {
return false
},
tabChangeFun () {
}
}
}

@ -1,11 +1,13 @@
<template>
<a-collapse class="collapse-box" :bordered="false" expandIconPosition="right" v-model="showKey">
<a-collapse-panel key="1">
<a-collapse class="collapse-box" :bordered="false" v-model="showKey" >
<a-collapse-panel key="1" :showArrow="false">
<template slot="header">
<div class="base-tit"><i class="iconfont icon-a-fahuodaifahuo"></i>收发通信息</div>
<div class="base-tit"><i class="iconfont icon-a-fahuodaifahuo"></i>收发通信息 <span class="click-btn" @click.stop="tabStopFun"></span></div>
</template>
<template slot="extra">
<div class="tab-change"><i class="iconfont icon-xia" :class="{'active': !showKey.includes('1')}"></i></div>
</template>
<div class="mail-info">
<!-- <a-button type="primary" @click="checkbasic"> </a-button> -->
<a-form-model :selfUpdate="true" ref="mailingFrom" :model="details" :rules="rules">
<a-row :gutter="10">
<a-col class="left-sender-box" :xs="24" :sm="24" :md="24" :lg="10" :xl="11">
@ -1460,6 +1462,11 @@ export default {
this.details[type] = value || ''
}
console.log('== 日期修改 ==', type, value, this.details[type])
},
tabStopFun () {
return false
},
tabChangeFun () {
}
}
}

@ -404,7 +404,10 @@ export default {
immediate: true,
handler(nD, oD) {
this.id = this.$route.query.id
// this.init()
this.inSave = true
setTimeout(() => {
this.inSave = false
}, 1200)
if (this.$refs.basicInfo) {
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
@ -425,36 +428,42 @@ export default {
this.checkFromInit()
},
methods: {
init(data = {}) {
console.log('= 创建分单 =')
init(data = []) {
this.inSecLoad = true
if (Object.keys(data).length > 0) {
this.sedOrderList = JSON.parse(JSON.stringify(data))
} else if (this.parSedOrderList.length > 0) {
this.sedOrderList = JSON.parse(JSON.stringify(this.parSedOrderList))
} else {
this.sedOrderList = []
}
// else if (this.parSedOrderList.length > 0) {
// this.sedOrderList = JSON.parse(JSON.stringify(this.parSedOrderList))
// }
if (this.sedOrderList.length > 0) {
this.sedOrderList.map((item, index) => {
item.isNoSave = false
})
this.editIndex = 0
const data = JSON.parse(JSON.stringify(this.sedOrderList[0]))
if (!data.bookingEDIExt) {
data.bookingEDIExt = {
const $data = JSON.parse(JSON.stringify(this.sedOrderList[0]))
if (!$data.bookingEDIExt) {
$data.bookingEDIExt = {
weiTuoFang: '',
ediAttn: '',
ediAttnTel: '',
ediAttnMail: ''
}
}
this.editDetails = data
console.log('== 创建分单 - init 结束 ==', this.editDetails)
this.editDetails = $data
setTimeout(() => {
this.$refs.goodsTable.init()
}, 1000)
setTimeout(() => {
this.inSecLoad = false
}, 2000)
} else {
this.editDetails = JSON.parse(JSON.stringify(sedDetail))
setTimeout(() => {
this.inSecLoad = false
}, 2000)
}
},
@ -539,10 +548,12 @@ export default {
this.editDetails = data
this.editIndex = this.sedOrderList.length
this.sedOrderList.push(data)
// console.log('== 1 ==', this.sedOrderList)
this.$emit('changeHB', this.sedOrderList)
},
changeDetailFun(data) {
// console.log('== 2 load ==', this.inSave, this.inSecLoad)
if (this.inSave || this.inSecLoad) { return false }
const { detail, type } = data
if (!detail.bookingEDIExt) {
@ -558,6 +569,7 @@ export default {
}
this.editDetails = detail
this.sedOrderList[this.editIndex] = detail
// console.log('== 2 ==', data, this.sedOrderList)
this.$emit('changeHB', this.sedOrderList)
this.$forceUpdate()
},
@ -761,24 +773,19 @@ export default {
},
removeSucc (id, index) {
const removeIndex = index
console.log('当前删除分单index为', removeIndex)
this.sedOrderList.splice(removeIndex, 1)
this.$emit('sedOrderRemove', this.sedOrderList)
if (this.sedOrderList.length === 0) {
console.log('== 子单列表删除完毕 ==')
this.editIndex = 0
this.editDetails = null
return false
}
if (this.editDetails.id === id) {
console.log('== 删除数据为当前编辑数据 ==')
const num = this.editIndex === 0 ? 0 : this.editIndex - 1
this.editIndex = num > this.sedOrderList.length ? this.sedOrderList.length - 1 : num
this.editDetails = this.sedOrderList[this.editIndex]
console.log('== 删除数据为当前编辑数据 end ==', this.editIndex, this.editDetails)
} else {
this.editIndex = removeIndex < this.editIndex ? this.editIndex - 1 : this.editIndex
console.log('== 删除分单 index ==', this.editIndex)
}
setTimeout(() => {
this.inSecLoad = false

@ -26,6 +26,30 @@
font-size: 18px;
color: @primary-color;
}
.click-btn{
position: absolute;
width: 100%;
height: 100%;
// background: #f99;
z-index: 9;
top: 0;left: 0;
}
}
.tab-change i{
transition: .5s all;
display: inline-block;
&.active{
transform: rotate(-90deg);
}
}
/deep/ .ant-collapse-header {
position: relative;
}
/deep/ .ant-collapse-header .ant-collapse-extra {
position: absolute !important;
top: 7px !important;
right: 11px !important;
z-index: 99;
}
/*多余线条去掉 */
.ant-collapse-item {

@ -24,6 +24,30 @@
font-weight: 500;
color: @primary-color;
}
.click-btn{
position: absolute;
width: 100%;
height: 100%;
// background: #f99;
z-index: 9;
top: 0;left: 0;
}
}
.tab-change i{
transition: .5s all;
display: inline-block;
&.active{
transform: rotate(-90deg);
}
}
/deep/ .ant-collapse-header {
position: relative;
}
/deep/ .ant-collapse-header .ant-collapse-extra {
position: absolute !important;
top: 7px !important;
right: 11px !important;
z-index: 99;
}
.cargo-info {
box-shadow: none;

@ -25,6 +25,31 @@
font-size: 18px;
color: @primary-color;
}
.click-btn{
position: absolute;
width: 100%;
height: 100%;
// background: #f99;
z-index: 9;
top: 0;left: 0;
}
}
.tab-change i{
transition: .5s all;
display: inline-block;
&.active{
transform: rotate(-90deg);
}
}
/deep/ .ant-collapse-header {
position: relative;
}
/deep/ .ant-collapse-header .ant-collapse-extra {
position: absolute !important;
top: 7px !important;
right: 11px !important;
z-index: 99;
}
.left-sender-box{
padding-top: 4px;

Loading…
Cancel
Save