Commit 7972b674 authored by xiejb's avatar xiejb

商品清单金额总计

parent 49cf6d7f
......@@ -19,7 +19,7 @@ module.exports = {
// Various Dev Server settings
host: '0.0.0.0', // can be overwritten by process.env.HOST
// host: '192.168.1.153', // can be overwritten by process.env.HOST
// host: '10.1.56.78', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
disableHostCheck: true,
......
......@@ -16,7 +16,10 @@
<i slot="left-icon" class="fa fa-search"></i>
<div slot="action" class="font14" @click="onSearch">搜索</div>
</van-search>
<search-result :result-num="searchNum"></search-result>
<div class="search">
<search-result :result-num="searchNum"></search-result>
<!-- <van-checkbox @click="itemClick(item,index)" v-model="allChecked">复选框</van-checkbox> -->
</div>
<div class="w100 listHeight" ref="scrollRef">
<van-pull-refresh
v-model="isRefreshing"
......@@ -82,7 +85,8 @@ export default {
postDataList: [],
checked: '',
checkedList: [],
choosedPost: []
choosedPost: [],
allChecked: false
}
},
computed: {
......@@ -289,9 +293,6 @@ export default {
</script>
<style lang="scss" scoped>
.content {
background-color: #F5F5F5;
}
.more-search {
width: 75%;
height: 100%;
......@@ -299,6 +300,12 @@ export default {
display: flex;
flex-direction: column;
}
.search{
background-color: #F5F5F5;
.content {
}
}
.title-layout {
height: 45px;
line-height: 45px;
......
......@@ -20,11 +20,10 @@
<!-- </van-list>
</van-pull-refresh> -->
</div>
<van-empty v-if="detailData.length === 0" description="暂无更多数据" />
<div class="goods-sum">
<div class="sum-number-detail">{{detailData.length}} 个商品</div>
<div class="sum-amount">金额总计:<span style="font-size: 16PX;">{{orderTotalAmount}}</span></div>
<van-empty v-if="detailData.length === 0" description="暂无数据" />
<div class="goods-sum" v-if="isShowTotalAmount">
<div class="sum-number-detail">{{orderItem.goodsInfos.length}} 个商品</div>
<div class="sum-amount">金额总计:<span style="font-size: 16PX;">{{orderItem.orderTotalAmount}}</span></div>
</div>
<goods-high-search v-model="showHighSearch" @onsearch="moreSearchConfirm" @onclean="moreSearchClean"/>
</div>
......@@ -59,8 +58,9 @@ export default {
goodsSpec: '', // 商品规格
manufacturer: '', // 生产企业
},
totalAmount: 0
};
totalAmount: 0,
isShowTotalAmount: true
}
},
props: {
// totalAmount: {
......@@ -177,19 +177,23 @@ export default {
getMyOrderDetail(params).then(res => {
this.detailData = []
this.totalAmount = 0
if (res.code === 200 && res.data && res.data.code === '00000' &&
res.data.entity && res.data.entity.detailList && res.data.entity.detailList.length > 0) {
if (res.code === 200 && res.data &&
res.data.entity && res.data.entity.detailList) {
this.detailData = res.data.entity.detailList
// let array = []
// for (var i = 0; i < 10; i++) {
// array.push(this.detailData.goodsInfos[0])
// array.push(this.detailData.goodsInfos[1])
// }
if (this.detailData.length !== this.orderItem.goodsInfos.length) {
this.isShowTotalAmount = false
} else {
this.isShowTotalAmount = true
}
let total = 0
this.detailData.forEach(item => {
this.totalAmount = this.totalAmount + parseFloat(item.taxAmount)
console.log(parseFloat(item.taxAmount))
total = total + parseFloat(item.taxAmount)
console.log(total)
})
} else {
console.log('订单详情', '请求失败')
this.totalAmount = total
} else if (res.code === 500) {
_this.$toast(rt.message)
}
}).catch(err => {
console.log('订单详情', err)
......
......@@ -268,6 +268,7 @@ export default {
// console.log(Object.keys(this.$refs))
// this.$refs.all[0].httpAction(this.moreSearchInfo)
if (!this.isFirst) {
this.isFirst = true
this.$EventBus.$emit('myOrderMoreSearch', this.moreSearchInfo)
}
})
......@@ -283,12 +284,10 @@ export default {
},
/// 处理tabsTitle
tabsTitleData() {
this.tabsTitle = [{title: '全部', name: 'all'}]
this.tabsTitle = []
for (let i = 0; i < allTabsTitle.length; i++) {
let dic = allTabsTitle[i]
if (dic.name !== 'all') {
this.tabsTitle.push(dic)
}
this.tabsTitle.push(dic)
}
},
closeAppPage() {
......
......@@ -219,6 +219,7 @@ export default {
} else {
// 加载成功后下一页自增1
_this.currentPage++
_this.finished = false
}
} else {
_this.$toast(rt.message)
......@@ -240,7 +241,7 @@ export default {
setMoreSearchInfoAction () {
let _this = this
const dataList = []
console.log(_this.moreSearchInfo)
// console.log(_this.moreSearchInfo)
_this.moreSearchInfo.consignor.forEach(item => {
const model = {
'businessType': '',
......@@ -262,7 +263,7 @@ export default {
'orderNo': !_this.moreSearchInfo.orderNo ? '':_this.moreSearchInfo.orderNo, // 订单号
// 订单状态ERP 100 已开单110 已取消180 已完(销退)WMS200 待出库210 拣配中220 已出库TMS300 调度中310 运输中400 已签收410 签收执420 拒收
'orderStatusCode': _this.orderTypeCode,
'orderType': '', // 订单类型 正常销售SALE销售退货SALE_RTN
'orderType': 'SALE', // 订单类型 正常销售SALE销售退货SALE_RTN
'pageNum': _this.currentPage,
'pageSize': _this.pageSize,
'shippingAdress': '', // 送货地址
......@@ -274,7 +275,7 @@ export default {
}
dataList.push(model)
})
console.log(dataList)
// console.log(dataList)
return dataList
},
// 是否返回空数组
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment