|
|
|
@ -2,21 +2,23 @@ |
|
|
|
<view class="order-list"> |
|
|
|
<uni-segmented-control :current="controlCurrent" :values="controlItems" @clickItem="onClickItem" styleType="text" activeColor="#007AFF"></uni-segmented-control> |
|
|
|
<scroll-list style="touch-action: none" ref="orderRef" :option="orderOption" @load="orderUp" @refresh="orderDown"> |
|
|
|
<view v-for="(items, index) in orderData" :key="index"> |
|
|
|
<view v-for="(item, index) in list" :key="index"> |
|
|
|
<view class="list-border list-title-line"> |
|
|
|
<text class="list-title">广州民族印刷有限公司</text> |
|
|
|
<text class="list-title-Subtitle">{{controlItems[items.orderStatus-1] }}</text> |
|
|
|
<text class="list-title">{{item.customerEnterpriseName}}</text> |
|
|
|
<text class="list-title-Subtitle">{{controlItems[item.orderStatus-1] }}</text> |
|
|
|
</view> |
|
|
|
<view class="list-border list-info-line" v-for="(item, index) in items.orderItemList" :key="index"> |
|
|
|
<view class="list-info " :class="index===items.orderItemList.length?'list-border':''"> |
|
|
|
<view class="list-border list-info-line" v-for="(subItem, subIndex) in item.supplierOrderList[0].orderItmes" :key="subIndex"> |
|
|
|
<view class="list-info"> |
|
|
|
<view class=""> |
|
|
|
<!-- <image class="list-image" :src="item.productImg" mode=""></image> --> |
|
|
|
<image class="list-image" src="../../static/logo.png" mode=""> |
|
|
|
<image class="list-image" :src="subItem.productImg" mode=""> |
|
|
|
</view> |
|
|
|
<view class="list-info-contant"> |
|
|
|
<view class="list-info-title">{{ item.brandName }}{{ item.categoryName }}</view> |
|
|
|
<view class="list-info-title">{{ subItem.productName }} |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="list-info-text"> |
|
|
|
{{ item.categoryName }}/{{ item.brandName }}/{{ item.gramWeight }}g/{{ item.length }}*{{ item.width }}/{{ item.pieceQuantity }}张 |
|
|
|
{{ subItem.categoryName }}/{{ subItem.brandName }}/{{ item.gramWeight }}g/{{ subItem.length }}*{{ subItem.width }}/{{ subItem.pieceQuantity }}张 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -24,10 +26,10 @@ |
|
|
|
<view class="list-border list-bottom-contant"> |
|
|
|
<view> |
|
|
|
<text class="list-bottom-contant-text">交货时间:</text> |
|
|
|
<text class="list-bottom-contant-subtext">{{ items.deliveryDay }}天</text> |
|
|
|
<text class="list-bottom-contant-subtext">{{ item.deliveryDay }}天</text> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<text class="list-title-Subtitle">¥{{ items.totalOfferPrice }}</text> |
|
|
|
<text class="list-title-Subtitle">¥{{ item.totalOfferPrice }}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<uGap></uGap> |
|
|
|
@ -39,7 +41,8 @@ |
|
|
|
<script> |
|
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
|
import scrollList from '@/components/scroll-list/scroll-list.vue' |
|
|
|
import { gettradingHallList } from '@/apis/trade' |
|
|
|
// import { gettradingHallList } from '@/apis/trade' |
|
|
|
import { getBasePaperDeals } from '@/apis/clientDetailApi.js' |
|
|
|
export default { |
|
|
|
// props: { |
|
|
|
// queryOrderData: { |
|
|
|
@ -67,46 +70,40 @@ export default { |
|
|
|
background: '#F7F8FA', |
|
|
|
fontSize: '40rpx' |
|
|
|
}, |
|
|
|
orderParams: { |
|
|
|
cooperationState: 0, |
|
|
|
latitude: 23.12616, |
|
|
|
longitude: 113.38466, |
|
|
|
km: 5 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
// queryOrderData(value) { |
|
|
|
// console.log('value', value) |
|
|
|
// }, |
|
|
|
orderParams: { |
|
|
|
handler(val) { |
|
|
|
this.getTradingQurty() |
|
|
|
params: { |
|
|
|
asc: '', |
|
|
|
desc: '', |
|
|
|
// customerEnterpriseId: this.$store.state.supplierInfo.id || null, // 客户企业ID默认为空,传值时网关获取当前用户关联企业id失效 |
|
|
|
// mallSupplierId: this.$store.state.supplierInfo.supplierId || null, // 供应商id |
|
|
|
customerEnterpriseId: '651107734133018624', |
|
|
|
mallSupplierId: '670334117090562048', // 供应商id |
|
|
|
status: '0', // 状态 0 全部 待发货/30106,待收货/30107,待借款/30207,已完成/30104 |
|
|
|
enterpriseIds: [] //企业ID集合网关获取 |
|
|
|
}, |
|
|
|
deep: true |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
if (option) { |
|
|
|
option.latitude && (this.params.latitude = option.latitude) |
|
|
|
option.longitude && (this.params.longitude = option.longitude) |
|
|
|
option.km && (this.params.km = option.km) |
|
|
|
pagination: { |
|
|
|
pageNum: 0, // 初始会执行一次下拉加载 |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
list: [] |
|
|
|
} |
|
|
|
this.getTradingQurty() |
|
|
|
}, |
|
|
|
onLoad(option) {}, |
|
|
|
methods: { |
|
|
|
// 获取订单列表 |
|
|
|
getTradingQurty() { |
|
|
|
getList() { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
gettradingHallList({ ...this.orderPagination }) |
|
|
|
getBasePaperDeals({ ...this.params, ...this.pagination }) |
|
|
|
.then(res => { |
|
|
|
console.log('订单列表', res) |
|
|
|
if (res) { |
|
|
|
if (this.orderPagination.pageNum == 1) { |
|
|
|
this.orderData = res.records |
|
|
|
if (this.pagination.pageNum == 1) { |
|
|
|
this.list = res.records |
|
|
|
} else { |
|
|
|
this.orderData = this.orderData.concat(res.records) |
|
|
|
this.list = this.list.concat(res.records) |
|
|
|
} |
|
|
|
resolve({ list: this.orderData, total: res.total }) |
|
|
|
// this.list = [] |
|
|
|
// this.list = [...this.list, ...[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]] |
|
|
|
resolve({ list: this.list, total: res.total }) |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
@ -117,9 +114,9 @@ export default { |
|
|
|
//订单分页 |
|
|
|
orderUp(page) { |
|
|
|
this.orderPagination.pageNum++ |
|
|
|
this.getTradingQurty() |
|
|
|
this.getList() |
|
|
|
.then(({ list, total }) => { |
|
|
|
this.$refs.orderRef.loadSuccess({ list, total }) |
|
|
|
this.$refs.orderRef.refreshSuccess({ list, total }) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$refs.orderRef.loadFail() |
|
|
|
@ -128,7 +125,7 @@ export default { |
|
|
|
//订单分页 |
|
|
|
orderDown() { |
|
|
|
this.orderPagination.pageNum = 1 |
|
|
|
this.getTradingQurty() |
|
|
|
this.getList() |
|
|
|
.then(({ list, total }) => { |
|
|
|
this.$refs.orderRef.refreshSuccess({ list, total }) |
|
|
|
}) |
|
|
|
|