Commit 7972b674 authored by xiejb's avatar xiejb

商品清单金额总计

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