|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <div class="salesEdit-wrap">
|
|
|
|
|
|
+ <div class="salesNewEdit-wrap">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
<a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
|
|
<a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
|
|
<!-- 自定义的二级文字标题 -->
|
|
<!-- 自定义的二级文字标题 -->
|
|
@@ -28,26 +28,31 @@
|
|
</a-card>
|
|
</a-card>
|
|
<!-- 正常产品 -->
|
|
<!-- 正常产品 -->
|
|
<a-card size="small" :bordered="false" class="salesEdit-cont" v-if="salesBillSn">
|
|
<a-card size="small" :bordered="false" class="salesEdit-cont" v-if="salesBillSn">
|
|
- <productNormalList ref="productNormalList" :detailData="detailData" :warehouseSn="warehouseSn" :salesBillSn="salesBillSn"></productNormalList>
|
|
|
|
|
|
+ <div style="padding: 10px;">
|
|
|
|
+ <productNormalList ref="productNormalList" :detailData="detailData" :warehouseSn="warehouseSn" :salesBillSn="salesBillSn"></productNormalList>
|
|
|
|
+ </div>
|
|
</a-card>
|
|
</a-card>
|
|
<!-- 活动产品 -->
|
|
<!-- 活动产品 -->
|
|
- <a-collapse v-model="activeKey" expand-icon-position="right" style="background: #f8f8f8;border-color: #f8f8f8;">
|
|
|
|
- <a-collapse-panel
|
|
|
|
- v-for="item in activeList"
|
|
|
|
- :key="item.activeId"
|
|
|
|
- forceRender
|
|
|
|
- style="background: #fff;border-radius: 5px;margin-bottom: 10px;border: 0;overflow: hidden;">
|
|
|
|
- <div slot="header" style="display: inline-block;padding:6px;width:80%;">
|
|
|
|
|
|
+ <a-card
|
|
|
|
+ size="small"
|
|
|
|
+ :bordered="false"
|
|
|
|
+ class="salesEdit-cont"
|
|
|
|
+ v-for="item in activeList"
|
|
|
|
+ :key="item.activeId"
|
|
|
|
+ >
|
|
|
|
+ <div slot="title" style="display: inline-block;width:80%;">
|
|
<div>
|
|
<div>
|
|
<strong style="margin-right:10px;font-size:16px;">{{item.activeName}}</strong> ({{item.activeDesc}})
|
|
<strong style="margin-right:10px;font-size:16px;">{{item.activeName}}</strong> ({{item.activeDesc}})
|
|
- <span style="margin-left:10px;color:#00aaff;" @click="(event) => {showDesc(event, item.activeId)}">
|
|
|
|
|
|
+ <span style="margin-left:10px;color:#00aaff;cursor: pointer;" @click="(event) => {showDesc(event, item.activeId)}">
|
|
<a-icon title="查看活动详情" type="eye"/> 详情
|
|
<a-icon title="查看活动详情" type="eye"/> 详情
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div slot="extra" @click="tooglePanel(item)" style="cursor: pointer;">{{ item.isActive ? '收起' : '展开' }} <a-icon type="caret-right" :rotate="item.isActive ? 90 : 0"/> </div>
|
|
|
|
+ <div v-show="item.isActive" style="padding: 10px;">
|
|
<productList :ref="'productList-'+item.activeId" :detailData="detailData" :warehouseSn="warehouseSn" :salesBillSn="salesBillSn"></productList>
|
|
<productList :ref="'productList-'+item.activeId" :detailData="detailData" :warehouseSn="warehouseSn" :salesBillSn="salesBillSn"></productList>
|
|
- </a-collapse-panel>
|
|
|
|
- </a-collapse>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </a-card>
|
|
</a-spin>
|
|
</a-spin>
|
|
<div class="affix-cont">
|
|
<div class="affix-cont">
|
|
<div class="footer-price">
|
|
<div class="footer-price">
|
|
@@ -122,7 +127,6 @@ export default {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
activeList:[], // 活动列表
|
|
activeList:[], // 活动列表
|
|
- activeKey: [], // 默认展开的活动
|
|
|
|
activeDesKey: {},
|
|
activeDesKey: {},
|
|
salesBillSn: null, // 销售单sn
|
|
salesBillSn: null, // 销售单sn
|
|
detailData: { discountAmount: 0, id: null, salesBillSn: '' }, // 订单基础数据
|
|
detailData: { discountAmount: 0, id: null, salesBillSn: '' }, // 订单基础数据
|
|
@@ -135,11 +139,29 @@ export default {
|
|
showDetail: false
|
|
showDetail: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ shippingAddress () {
|
|
|
|
+ const shippingAddrProvinceName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrProvinceName ? this.detailData.salesBillExtEntity.shippingAddrProvinceName : ''
|
|
|
|
+ const shippingAddrCityName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrCityName ? this.detailData.salesBillExtEntity.shippingAddrCityName : ''
|
|
|
|
+ const shippingAddrCountyName = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddrCountyName ? this.detailData.salesBillExtEntity.shippingAddrCountyName : ''
|
|
|
|
+ const shippingAddr = this.detailData && this.detailData.salesBillExtEntity && this.detailData.salesBillExtEntity.shippingAddr ? this.detailData.salesBillExtEntity.shippingAddr : ''
|
|
|
|
+ if (!shippingAddrProvinceName && !shippingAddrCityName && !shippingAddrCountyName && !shippingAddr) {
|
|
|
|
+ return '--'
|
|
|
|
+ } else {
|
|
|
|
+ return shippingAddrProvinceName + shippingAddrCityName + shippingAddrCountyName + shippingAddr
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
// 返回
|
|
// 返回
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ name: 'salesQueryNewList', query: { closeLastOldTab: true } })
|
|
this.$router.push({ name: 'salesQueryNewList', query: { closeLastOldTab: true } })
|
|
},
|
|
},
|
|
|
|
+ tooglePanel(item){
|
|
|
|
+ console.log(1)
|
|
|
|
+ item.isActive=!item.isActive
|
|
|
|
+ this.activeList.splice()
|
|
|
|
+ },
|
|
// 销售单详情
|
|
// 销售单详情
|
|
getOrderDetail (flag) {
|
|
getOrderDetail (flag) {
|
|
salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
|
|
salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
|
|
@@ -242,7 +264,7 @@ export default {
|
|
}
|
|
}
|
|
]
|
|
]
|
|
this.activeList.map(item => {
|
|
this.activeList.map(item => {
|
|
- this.activeKey.push(item.activeId)
|
|
|
|
|
|
+ item.isActive = true
|
|
this.activeDesKey['search-'+item.activeId] = false
|
|
this.activeDesKey['search-'+item.activeId] = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -270,10 +292,10 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
- .salesEdit-wrap{
|
|
|
|
|
|
+ .salesNewEdit-wrap{
|
|
position: relative;
|
|
position: relative;
|
|
height: 100%;
|
|
height: 100%;
|
|
- padding-bottom: 51px;
|
|
|
|
|
|
+ padding-bottom: 75px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
>.ant-spin-nested-loading{
|
|
>.ant-spin-nested-loading{
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
@@ -300,11 +322,11 @@ export default {
|
|
-webkit-box-orient: vertical;
|
|
-webkit-box-orient: vertical;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .ant-collapse .ant-collapse-header {
|
|
|
|
- padding: 3px 0 5px 8px!important;
|
|
|
|
|
|
+ .ant-card-small > .ant-card-body {
|
|
|
|
+ padding: 0!important;
|
|
}
|
|
}
|
|
.affix-cont{
|
|
.affix-cont{
|
|
- padding: 5px 15px;
|
|
|
|
|
|
+ padding: 10px 15px;
|
|
text-align: right;
|
|
text-align: right;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|