wangfukang 3 years ago
parent
commit
f91354860b
  1. 283
      pages/index/customAndSupplierProductDetail.vue

283
pages/index/customAndSupplierProductDetail.vue

@ -0,0 +1,283 @@
<template>
<view class="container">
<view class="tui-order-item boxbg">
<view class="shop-box" v-for="(item,index3) in list" :key="index3">
<uni-card :title="item.productName?item.productName:'暂无'"
:sub-title="item.createTime?item.createTime:'暂无'" >
<view class="uni-body" style="text-align: center;">采购价:{{item.realPrice?item.realPrice:'暂无'}} 总数量:{{item.productCount?item.productCount:'暂无'}} 总价:{{item.shouldPay?item.shouldPay:'暂无'}}</view>
<view style="margin: 5px 0;height: 1px;background: #eee;"></view>
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
<view style="width: 29%;text-align: center;">数量</view>
</view>
<view v-for="(data,index2) in item.customerBuyProductDetailLogVos" :key="index2" style='height: 50rpx;line-height: 50rpx;'>
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;float: left;height: 50rpx;overflow: hidden;">
{{data.attributeList | sliceMsg}}
</view>
<view style="width: 29%;text-align: center;float: left;">
{{data.productCount}}
</view>
</view>
</uni-card>
</view>
</view>
<u-loadmore :status="status" />
</view>
</template>
<script>
export default {
data() {
return {
list:[],
status: 'loadmore',
pages: 1,
pageNum: 1,
userId:'',
type:''
}
},
filters: {
sliceMsg(val) {
var name = ''
if (typeof(val) == 'string') {
let newObj = JSON.parse(val)
for (let as in newObj) {
name += newObj[as] + '/'
}
}
return name;
}
},
onLoad(option) {
this.userId = option.id
this.type = option.type
this.getList()
},
onReachBottom() {
if (this.pages >= this.pageNum) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getList();
},
methods: {
getList(id) {
this.status = 'loading';
this.tui.request("/app/sale/getCustomerBuyProductLog", "post", {
userId: this.userId,
pageSize: 10,
pageNum: this.pageNum
}, false, false).then((res) => {
this.status = 'nomore';
if (res.code == 200) {
// this.list = res.result.records
if (this.pages == 1) {
this.list = res.result.records
} else {
this.list = [...this.list, ...res.result.records]
}
this.pageNum = res.result.pages
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
}
},
}
</script>
<style lang="scss">
.uni-card__header-box{
text-align: center !important;
}
.uni-card__header-content-title{
font-weight: bold;
}
.container {
padding-bottom: 118rpx;
.boxbg {
padding-top: 10rpx;
background-color: #fff;
margin: 30upx;
border-radius: 10upx;
box-shadow: 0px 1px 10px 2px #e2e2e2;
}
.tui-order-item {
.u-collapse-content {
display: flex;
justify-content: space-between;
line-height: 30px;
}
.tui-goods-info {
width: 100%;
box-sizing: border-box;
background: #fff;
line-height: 26px;
border-top: 10px solid #eee;
.tui-price-flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.tui-size32 {
font-size: 32rpx;
font-weight: 500;
}
.tui-size-24 {
font-size: 24rpx;
}
.tui-price-large {
font-size: 32rpx;
.lineText {
text-decoration: line-through;
font-size: 12px;
color: #888;
}
}
.tui-flex-shrink {
flex-shrink: 0;
}
.tui-goods-price {
width: 100%;
display: flex;
align-items: flex-end;
justify-content: flex-end;
font-size: 24rpx;
}
.tui-primary-color {
color: #EB0909;
}
.tui-pbtm20 {
padding-bottom: 20rpx;
}
}
}
}
.tui-tabbar {
width: 100%;
height: 98rpx;
background: #fff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
padding-bottom: env(safe-area-inset-bottom);
z-index: 996;
}
.tui-btn-mr {
width:130rpx;
height: 60rpx;
background: #088FEB;
color: #fff;
border-radius: 10px;
line-height: 60rpx;
text-align: center;
margin-right: 30rpx;
}
.shop-box {
width: 95%;
margin: 0 auto;
position: relative;
}
.shop-name {
width: 100%;
height: 200rpx;
line-height: 80rpx;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
font-size: 28rpx;
font-weight: bold;
display: flex;
.uni-icons {
color: #088FEB !important;
}
}
.shop-productName {
flex: 1;
display: flex;
flex-direction: column;
padding-left: 20rpx;
}
.shop-productName view {
height: 55rpx;
}
.shop-collapse {
display: flex;
height: 80rpx;
font-size: 26rpx;
line-height: 80rpx;
}
.shop-collapse text {
flex: 1;
text-align: center;
padding-right: 40rpx;
border-right: 1px solid #eee;
}
.content-list {
width: 95%;
margin: 0 auto;
display: flex;
height: 80rpx;
border-bottom: 1px solid #eee;
}
.content-list:last-child {
border-bottom: none;
height: auto;
}
.list-name {
width: 200rpx;
text-align: left;
line-height: 40px;
height: 80rpx;
padding-left: 20rpx;
}
.list-val {
width: 560rpx;
height: 80rpx;
line-height: 80rpx;
}
.list-val input {
width: 400rpx;
height: 60rpx;
display: inline-block;
line-height: 60rpx;
float: left;
margin-top: 10rpx;
padding-left: 20rpx;
border-bottom: 1px solid #088FEB;
}
textarea {
margin: 20rpx;
border: 1px solid #eee;
height: 150rpx;
width: 500rpx;
}
</style>
Loading…
Cancel
Save