Commit 3372192e authored by 黄媛媛's avatar 黄媛媛

供应商中心

parent 3f8afde5
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
{ {
"path": "pages/webbox/webbox" "path": "pages/webbox/webbox"
} }
], ],
"subPackages": [{ "subPackages": [{
"root": "pages/goods", "root": "pages/goods",
...@@ -101,6 +100,28 @@ ...@@ -101,6 +100,28 @@
} }
] ]
}, },
{
"root": "pages/mySupplier",
"pages": [
{
"path": "index/index",
"style": {
"navigationStyle": "custom"
}
},{
"path":"myBill"
},{
"path":"billDetails"
},{
"path":"mySupplierList"
},{
"path":"myProduct"
},{
"path":"supplierOrder"
}
]
},
{ {
"root": "pages/share", "root": "pages/share",
"pages": [{ "pages": [{
......
<template>
<view class="billDetailsStyle" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;">
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0">
<view
style="
height: calc(100vh);
width: calc(100vw);
overflow: hidden;
padding: 10px 0;
">
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox">
<view class="box_t">
<u-avatar :src="item.Photo" size="64"></u-avatar>
<text style="margin-left: 15px;">{{item.UserName}}</text>
</view>
<view class="box_c" v-for="(x, index2) in item.DetailList" :key="index2">
<image :src="x.CoverImagePath" style="width: 65px;height: 65px;border-radius: 6px;" ></image>
<view style="width: calc(100vw - 30px - 65px - 15px);display: flex;flex-direction: column;margin-left: 15px;">
<view class="box_c_name">{{x.GoodsName}}</view>
<view class="box_c_name" style="font-size: 12px;color: #555555;margin-top: 3px;">
规格:
<text v-for="(t, y) in x.SpecificationList" :key="y">{{t}}</text>
</view>
<view class="box_r_b">
<text style="font-size: 12px;color: #555555;">X{{x.Number}}</text>
<view style="padding: 5px 10px;background: #F8F6F5;font-size: 12px;color: #111111;">
<text>已得佣金:</text>
<text style="color: #FF4048;font-size: 12px;">{{x.Final_Price}}</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="OrderNoStyle" >
<text style="margin-left: 15px;">订单号:{{item.OrderNo}}</text>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
</template>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "账单详情",
contentHeight:0,
mainColor:'',
secondary:'',
g:[],
msg:{
pageIndex: 1,
pageSize:10,
BillId:0
},
SelectBillState:0,
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(options){
if(options){
this.msg.BillId = options.ID
}
this.init()
},
mounted() {
},
methods: {
init(){
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/GetOrderBilldetailPageList',
data: this.msg
},
(res) => {
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
}
}
</script>
<style>
.billDetailsStyle{
background: #FAF8F9;
}
.billDetailsStyle .listbox{
width: 100%;
margin-bottom: 10px;
padding: 15px;
background: #fff;
display: flex;
flex-direction: column;
align-items: center
}
.billDetailsStyle .box_t{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
overflow: hidden;
height: 32px;
}
.billDetailsStyle .box_c{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
overflow: hidden;
margin-top: 15px;
}
.billDetailsStyle .box_c_name{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
font-size: 13px;
color: #111111;
}
.billDetailsStyle .box_r_b{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 3px;
}
.billDetailsStyle .OrderNoStyle{
width: 100%;
height: 35px;
background: #F8F6F5;
display: flex;
flex-direction: row;
align-items: center;
font-size: 11px;
color: #888888;
margin-top: 15px;
}
</style>
<template>
<scroll-view
:scroll-y="true"
@scroll="scrollHandler"
@scrolltoupper="scrollTopHandler"
style="height: 100vh;">
<view class="mySupplierindexStyle" :style="{'height':contentHeight}">
<view
class="headStatus"
v-if="scrollTop > 50"
:style="[
headStyle,
{
zIndex: scrollTop < 10 ? 'unset' : 2,
opacity: scrollTop < 10 ? '100' : scrollTop,
},
]"
>
<view class="arrow" @click="redirectPrev">
<u-icon name="arrow-left" size="48" color="#000"></u-icon>
</view>
<view class="title" v-if="scrollTop > 50">{{pageTitle}}</view>
</view>
<view style="width: 100%;height: 100%;" >
<view class="sharebox_top" >
<view class="sharebox_top_nav" :style="{paddingTop:nav+'px'}">
<view class="arrow" @click="redirectPrev">
<u-icon name="arrow-left" size="48" color="#fff"></u-icon>
</view>
<view class="title" style="color: #FFFFFF;font-size: 16px;">{{pageTitle}}</view>
<view style="width: 24px;height: 24px;"></view>
</view>
<view class="sharebox_top_t">
<view class="top_t_l">
<u-avatar :src="u.Photo" size="130"></u-avatar>
<view style="display: flex;flex-direction: column;color: #fff;margin-left: 16px;">
<view style="display: flex;flex-direction: row;align-items: center">
<Text style='font-size: 18px;max-width: 150px;overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis;'>
{{u.Name}}
</Text>
</view>
</view>
</view>
</view>
<!-- <view style="width: 100%;margin-top: 5px;">
<span style='font: 12px;color: #FFFFFF;margin-left: 30px;'>等级:{{mySupplierC.UserInfo.GradeName}}</span>
</view> -->
<view class="Receiptbalance">
<view class="Receiptbalance_item">
<span >已结算佣金</span>
<span style='font-size: 18px;color: #111111;font-weight: 200;'>{{mySupplierC.SettlementIntroduction?(mySupplierC.SettlementIntroduction>10000?(mySupplierC.SettlementIntroduction/10000).toFixed(1)+'w':mySupplierC.SettlementIntroduction):0}}</span>
</view>
<view style="width: 1px;height: 34px;background: #E8E8E8;"></view>
<view class="Receiptbalance_item" >
<span>未结算佣金</span>
<span style='font-size: 18px;color: #111111;font-weight: 200;'>{{mySupplierC.NoSettlementIntroduction?(mySupplierC.NoSettlementIntroduction>10000?(mySupplierC.NoSettlementIntroduction/10000).toFixed(1)+'w':mySupplierC.NoSettlementIntroduction):0}}</span>
</view>
</view>
</view>
<view class="sharebox_menus" >
<view class="menus_item" @click="goUrl('/pages/mySupplier/myBill')">
<view style="display: flex;flex-direction: row;align-items: center;">
<image src="../../../static/images/supplierbill.png" style="width: 14px;height: auto;" mode='widthFix'></image>
<text style="font-size: 13px;color:#07090D;margin-left: 15px;">我的账单</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<text :style="{color:mainColor}">{{mySupplierC.TotalDistributorBill!=null ?mySupplierC.TotalDistributorBill:0}}</text>
<text style="color: #A5A3AB;margin-right: 5px;"></text>
<u-icon name="arrow" size="24" color="#A5A3AB"></u-icon>
</view>
</view>
<view class="menus_item" @click="goUrl('/pages/mySupplier/mySupplierList')">
<view style="display: flex;flex-direction: row;align-items: center;">
<image src="../../../static/images/mysupplier.png" style="width: 14px;height: auto;" mode='widthFix'></image>
<text style="font-size: 13px;color:#07090D;margin-left: 15px;">我的供应商</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<text :style="{color:mainColor}">{{mySupplierC.SupplierCount!=null ?mySupplierC.SupplierCount:0}}</text>
<text style="color: #A5A3AB;margin-right: 5px;"></text>
<u-icon name="arrow" size="24" color="#A5A3AB"></u-icon>
</view>
</view>
<view class="menus_item" @click="goUrl_t('/pages/mySupplier/myProduct')">
<view style="display: flex;flex-direction: row;align-items: center;">
<image src="../../../static/images/supplierShop.png" style="width: 14px;height: auto;" mode='widthFix'></image>
<text style="font-size: 13px;color:#07090D;margin-left: 15px;">我的商品</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<text :style="{color:mainColor}">{{mySupplierC.GoodsCount!=null ?mySupplierC.GoodsCount:0}}</text>
<text style="color: #A5A3AB;margin-right: 5px;"></text>
<u-icon name="arrow" size="24" color="#A5A3AB"></u-icon>
</view>
</view>
<view class="menus_item" @click="goUrl('/pages/mySupplier/supplierOrder')">
<view style="display: flex;flex-direction: row;align-items: center;">
<image src="../../../static/images/supplierFy.png" style="width: 14px;height: auto;" mode='widthFix'></image>
<text style="font-size: 13px;color:#07090D;margin-left: 15px;">返佣订单</text>
</view>
<view style="display: flex;flex-direction: row;align-items: center;">
<text :style="{color:mainColor}">{{mySupplierC.TotalOrderIntroduction!=null ?mySupplierC.TotalOrderIntroduction:0}}</text>
<text style="color: #A5A3AB;margin-right: 5px;"></text>
<u-icon name="arrow" size="24" color="#A5A3AB"></u-icon>
</view>
</view>
</view>
<view style="width: 100%;height: 30px;background: #f3f4f6;"></view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
</view>
</scroll-view>
</template>
<script>
import auth from "../../../components/auth/index.vue";
export default {
components:{
auth,
},
data() {
return {
pageTitle: "供应商服务",
contentHeight:0,
mainColor:'',
secondary:'',
userinfo:{},
mySupplierC:{},
showAuth:false,
nav:0,
headStyle:{},
scrollTop:0,
words:{},
u:{},
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.nav = uni.getMenuButtonBoundingClientRect().top;
this.headStyle.paddingTop = this.nav +'px';
},
mounted() {
let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length-1].route;
let pages = wx.getStorageSync("basedata")
? wx.getStorageSync("basedata").bar_title
: [];
this.words = wx.getStorageSync("basedata") ? wx.getStorageSync("basedata").share_setting_custom.words:{},
pages.forEach((x) => {
if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name;
}
});
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(){
this.u = uni.getStorageSync("mall_UserInfo");
console.log(this.u)
if (!this.u) {
this.u = {
nickName: "未登录",
avatarUrl: ""
};
this.showAuth = true;
}else{
this.init()
}
},
methods: {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth=false;
this.init()
},
goback(){
uni.navigateBack()
},
init(){
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/GetUserMemberSupplierCenter',
data: {}
},
(res) => {
uni.hideNavigationBarLoading()
this.mySupplierC = res.data
}
);
},
getUserCenter(){
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/GetUserDistrbutorCenter',
data: {}
},
(res) => {
uni.hideNavigationBarLoading()
this.mySupplierC = res.data
}
);
},
redirectPrev() {
if (this.prevPage != "") {
uni.navigateBack({
delta: 1,
});
}
},
goUrl(url){
console.log(url)
uni.navigateTo({
url: url
});
},
goUrl_t(url){
uni.navigateTo({
url: url+'?ID='+ this.mySupplierC.supplierIds
});
},
goUrl2(url){
uni.navigateTo({
url: url
});
},
scrollHandler(e) {
this.scrollTop = e.detail.scrollTop;
//this.$forceUpdate();
},
scrollTopHandler() {
this.scrollTop = 0;
},
}
}
</script>
<style>
.mySupplierindexStyle{
background: #f3f4f6;
}
image{will-change: transform}
.mySupplierindexStyle .shareadd{
width: 100%;
display: flex;
flex-direction: column;align-items: center;
padding-top: 50px;
}
.mySupplierindexStyle .shareadd .shareadd_b{
width: 60%;height: 45px;border-radius: 22.5px;display: flex;align-items: center;justify-content: center;color: #fff;margin-top: 20px;
}
.mySupplierindexStyle .sharebox_top{
width: 100%;
/* padding: 10px; */
height: 200px;
display: flex;
flex-direction: column;
align-items: center;
background-image: url(../../../static/images/mysupperbg.png);
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
}
.mySupplierindexStyle .sharebox_top .sharebox_top_nav{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 44px;
padding: 0 10px;
}
.mySupplierindexStyle .sharebox_top .sharebox_top_t{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
/* padding: 5px 0; */
margin-top: 20px;
}
.mySupplierindexStyle .sharebox_top .sharebox_top_t .top_t_l{
margin-left: 30px;
display: flex;
flex-direction: row;
align-items: center;
}
.mySupplierindexStyle .sj_style{
display: flex;flex-direction: row;align-items: center;justify-content: center;background: rgba(55, 55, 55, 0.1);
width: 70px ;
height: 20px;
border-radius: 10px;
margin-left: 20px;
}
.mySupplierindexStyle .steatus_t{
width: 100%;display: flex;flex-direction: column;align-items: center;
}
.mySupplierindexStyle .sharebox_topc{
width: 94%;
height: 40px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
padding: 0 20px;
margin-top: 18px;
}
.mySupplierindexStyle .sharebox_c{
width: 94%;
margin-left: 3%;
height: 99px;
border-radius: 10rpx;
background: #fff;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
/* padding: 15px 15px; */
margin-top: -15px;
}
.mySupplierindexStyle .center_item{
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
.mySupplierindexStyle .sharebox_menus{
width: 94%;
margin-left: 3%;
border-radius: 10rpx;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
/* padding: 10px 0; */
margin-top: 45px;
}
.sharebox_menus .menus_item{
width: 100%;
height: 45px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 15px;
}
.sharebox_menus .menus_item .item_text{
font-size: 13px;
margin: 5px 0;
}
.mySupplierindexStyle .headStatus {
overflow: hidden;
position: relative;
width: 140vw;
padding-right: 40vw;
padding-bottom: 10px;
position: fixed;
left: 0;
right: 0;
top: 0;
display: flex;
background: #FFFFFF;
}
.mySupplierindexStyle .headStatus .arrow {
height: 24px;
margin: 5px 10px;
width: 24px;
}
.mySupplierindexStyle .headStatus .title {
font-size: 16px;
color: #000;
flex: 1;
width: 1px;
margin-left: 10px;
line-height: 34px;
/* text-align: center; */
}
.mySupplierindexStyle .buyvip{
position: absolute;
width: 116px;
height: 64px;
right: 0;
top: 100px;
}
.mySupplierindexStyle .Receiptbalance{
width: 94%;
height: 75px;
position: absolute;
left: 3%;
bottom: -35px;
background: #FFFFFF;
border-radius: 6px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-around;
padding: 0 10px;
}
.mySupplierindexStyle .Receiptbalance_item{
width: 40%;
height: 50px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
font-size: 12px;
color: #111111;
}
</style>
<template>
<view class="myBillStyle" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;">
<u-tabs :list="list" :is-scroll="false" :current="SelectBillState" @change="change" :active-color='mainColor' bg-color='#FFFFFF'></u-tabs>
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0">
<view
style="
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
padding: 10px 0;
">
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;background: #FFFFFF;">
<view v-for="(item, index) in g" :key="index" class="listbox" @click="goDetails(item)">
<view class="box_b" >
<view class="box_b_t">
<text>{{item.Periods}}</text>
<text :style="{color:item.BillState==1?'#FF4048':'#111111','font-size':'16px'}">{{item.BillState==2?'+':''}}{{item.Money}}</text>
</view>
<view class="box_b_b">
<text>{{item.SupplierName}}</text>
<text v-if="item.BillState == 1">待打款</text>
<text v-if="item.BillState == 2">已打款</text>
<text v-if="item.BillState == 3">驳回</text>
</view>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
</template>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "我的账单",
contentHeight:0,
mainColor:'',
secondary:'',
g:[],
list:[
{name: '全部'},
{name: '待打款'},
{name: '已打款'},
],
msg:{
pageIndex: 1,
pageSize:10,
SelectBillState:-1
},
SelectBillState:0,
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.init()
},
mounted() {
},
methods: {
init(){
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/GetSupplierDistributorBill',
data: this.msg
},
(res) => {
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
change(index){
if(index==1){
this.msg.SelectBillState = -1;
}else if(index ==2){
this.msg.SelectBillState = 1;
}else if(index ==3){
this.msg.SelectBillState = 2;
}
this.SelectBillState = index;
this.msg.pageIndex=1;
this.g=[]
this.init()
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
goDetails(item){
uni.navigateTo({
url: '/pages/mySupplier/billDetails?ID='+item.Id
});
}
}
}
</script>
<style>
.myBillStyle{
background: #f3f4f6;
}
.myBillStyle .listbox{
width: 94%;
border-radius: 10rpx;
background: #fff;
}
.myBillStyle .listbox .box_b{
width: 100%;
padding: 10px;
/* border-top: 1px solid #f5f5f5; */
display: flex;
flex-direction: column;
align-items: center;
border-bottom: 1px solid #E2E2E2;
}
.myBillStyle .listbox .box_b_t{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 14px;
color: #000000;
}
.myBillStyle .listbox .box_b_b{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 10px;
color: #999999;
margin-top: 10px;
}
.myBillStyle .text_s{
font-size: 14px;
color: #999999;
margin-top: 3px;
}
</style>
<template>
<view class="myProductStyle" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;">
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0">
<view
style="
height: calc(100vh);
width: calc(100vw);
overflow: hidden;
padding: 10px 0;
">
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox">
<view class="box_c" >
<image :src="item.CoverImage" style="width: 65px;height: 65px;border-radius: 6px;"></image>
<view style="width: calc(100vw - 30px - 65px - 15px);display: flex;flex-direction: column;margin-left: 15px;">
<view class="box_c_name">{{item.Name}}</view>
</view>
</view>
<view class="SupplierListstyle">
<view class="Sitem" v-for="(x, index2) in item.SupplierSpecificationList" :key="index2" v-if='item.showdetail == true || index2==0' @click=" isdetail(index,index2) ">
<view class="Sitem_gg" >
<text v-for="(j, index3) in x.attr_list" :key="index3">{{j.attr_group_name}}:{{j.attr_name}}{{x.attr_list.length==index3+1?'':','}}</text>
</view>
<view class="Sitem_k">库存{{x.stock}}</view>
<view class="Sitem_k">成本价{{x.costPrice}}</view>
<view class="Sitem_k" :style="{color:mainColor}">¥{{x.price}}</view>
<u-icon name="arrow" v-if='item.showdetail==false && index2==0' ></u-icon>
<u-icon name="arrow-down" v-if='item.showdetail==true && index2==0'></u-icon>
</view>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
</template>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "我的产品",
contentHeight:0,
mainColor:'',
secondary:'',
g:[],
msg:{
pageIndex: 1,
pageSize:10,
SupplierIds:0
},
SelectBillState:0,
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
onLoad(options){
if(options){
this.msg.SupplierIds = options.ID
}
this.init()
},
mounted() {
},
methods: {
init(){
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/GetAppletGoodsPageList',
data: this.msg
},
(res) => {
uni.hideLoading();
let data = res.data.pageData
data.forEach(x=>{
x.showdetail = false
})
this.g = this.g.concat(data);
console.log(this.g)
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
isdetail(index,index2){
if(index2==0){
this.g[index].showdetail = !this.g[index].showdetail;
this.$forceUpdate()
}
},
}
}
</script>
<style>
.myProductStyle{
background: #FAF8F9;
}
.myProductStyle .listbox{
width: 100%;
margin-bottom: 10px;
padding: 15px;
background: #fff;
display: flex;
flex-direction: column;
align-items: center
}
.myProductStyle .box_t{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
overflow: hidden;
height: 32px;
}
.myProductStyle .box_c{
display: flex;
flex-direction: row;
width: 100%;
overflow: hidden;
margin-top: 15px;
}
.myProductStyle .box_c_name{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
line-clamp: 3;
-webkit-box-orient: vertical;
font-size: 13px;
color: #111111;
}
.myProductStyle .box_r_b{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 3px;
}
.myProductStyle .OrderNoStyle{
width: 100%;
height: 35px;
background: #F8F6F5;
display: flex;
flex-direction: row;
align-items: center;
font-size: 11px;
color: #888888;
margin-top: 15px;
}
.myProductStyle .SupplierListstyle{
width: 100%;
background: #F8F6F5;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 10px;
}
.myProductStyle .Sitem{
width: 96%;
display: flex;
flex-direction: row;
align-items: center;
font-size: 10px;
color: #888888;
height: 35px;
margin-left: 2%;
}
.myProductStyle .Sitem_gg{
width: 35%;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
}
.Sitem_k{
width: 20%;
text-align: center
}
</style>
<template>
<view class="mySupplierList" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;">
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0">
<view
style="
height: calc(100vh);
width: calc(100vw);
overflow: hidden;
padding: 10px 0;
">
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox" >
<view>
<view style="font-size: 14px;color: #000000;">{{item.Name}}</view>
<view style="font-size: 10px;color: #999999;margin-top: 5px;">{{item.Mobile}}</view>
</view>
<view style="display: flex;flex-direction: row;align-items: center;" @click="checkBL(item.SupplierCommissionList)">
<text style="font-size: 12px;color: #888888;">返佣比例查询</text>
<u-icon name="arrow" size="24" color="#A5A4AC"></u-icon>
</view>
</view>
</view>
<!-- <u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/> -->
</scroll-view>
</view>
<view class="agreementbox" v-if='isshowagreement==true'></view>
<view class="agreementbox_t" v-if='isshowagreement==true'>
<view class="agreement_b">
<view style="width: 100%;height: 45px;font-size: 14px;color: #000000;display: flex;flex-direction: row;border-bottom: 1px solid #E2E2E2;">
<view class="popupstyle">
<text>毛利率</text>
</view>
<view class="popupstyle">
<text>返佣比例</text>
</view>
</view>
<view style="width: 100%;max-height: 360px;font-size: 12px;color: #111111;display: flex;flex-direction: row;">
<view style="width: 50%;display: flex;flex-direction: column;align-items: center;">
<view class="popupstyle_t" v-for="(item, index) in supplierList" :key="index">
<text>{{index+1}}0%</text>
</view>
</view>
<view style="width: 50%;display: flex;flex-direction: column;align-items: center;">
<view class="popupstyle_t" v-for="(item, index2) in supplierList" :key="index2">
<text>{{item.CommissionRate}}%</text>
</view>
</view>
</view>
<view class="agreement_bottom" :style="{background:mainColor}" @click="read">
<Text style='color: #fff;'>确定</Text>
</view>
</view>
</view>
</template>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "我的供应商",
contentHeight:0,
mainColor:'',
secondary:'',
g:[],
isshowagreement:false,
msg:{
pageIndex: 1,
pageSize:10,
BillId:0
},
SelectBillState:0,
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
supplierList:[],
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
},
onLoad(options){
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.init()
},
mounted() {
},
methods: {
init(){
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/GetUserMemberSupplier',
data: {}
},
(res) => {
uni.hideLoading();
this.g = res.data;
// this.g = this.g.concat(res.data.pageData);
// this.page_count = res.data.pageCount;
// if (this.page_count == 1) {
// this.status = "nomore";
// }
}
);
},
lower(e) {
// if (this.msg.pageIndex < this.page_count) {
// this.msg.pageIndex++;
// this.status = "loading";
// this.init();
// } else {
// this.status = "nomore";
// }
},
checkBL(list){
this.isshowagreement = true;
this.supplierList = list
},
read(){
this.isshowagreement = false
},
}
}
</script>
<style>
.mySupplierList{
background: #FAF8F9;
}
.mySupplierList .listbox{
width: 100%;
padding: 15px;
background: #fff;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #E2E2E2;
}
.mySupplierList .box_t{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
overflow: hidden;
height: 32px;
}
.mySupplierList .box_c{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
overflow: hidden;
margin-top: 15px;
}
.mySupplierList .box_c_name{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
font-size: 13px;
color: #111111;
}
.mySupplierList .box_r_b{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 3px;
}
.mySupplierList .OrderNoStyle{
width: 100%;
height: 35px;
background: #F8F6F5;
display: flex;
flex-direction: row;
align-items: center;
font-size: 11px;
color: #888888;
margin-top: 15px;
}
.mySupplierList .agreementbox{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #333333;
opacity: 0.3;
z-index: 888;
}
.mySupplierList .agreementbox_t{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
}
.mySupplierList .agreementbox_t .agreement_b{
width:80% ;
border-radius: 10px;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
}
.mySupplierList .agreementbox_t .agreement_bottom{
width: 100%;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
}
.mySupplierList .agreement_b .popupstyle{
width: 50%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.mySupplierList .agreement_b .popupstyle_t{
width: 100%;
height: 30px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
</style>
<template>
<view class="supplierOrder" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;">
<view style="width: 100%;display: flex;flex-direction: row;align-items: center;">
<view style="width: calc(100vw - 75px);">
<u-tabs :list="list" :is-scroll="false" :current="SelectBillState" @change="change" :active-color='mainColor' bg-color='#FFFFFF'></u-tabs>
</view>
<view style="width: 75px;height: 40px;display: flex;flex-direction: row;align-items: center;justify-content: center;background: #FFFFFF;" @click="show = true">
<text>筛选</text>
<image src="../../static/images/shaix.png" style="width: 11px;height: 13px;"></image>
</view>
</view>
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0">
<view
style="
height: calc(100vh - 50px);
width: calc(100vw);
overflow: hidden;
padding: 10px 0;
">
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox">
<view class="box_t">
<view style="display: flex;flex-direction: row;align-items: center;">
<u-avatar :src="item.Photo" size="64"></u-avatar>
<text class="box_tname">{{item.UserName}}</text>
</view>
<view>{{item.StatusName}}</view>
</view>
<view class="box_c" v-for="(x, index2) in item.DetailList" :key="index2">
<image :src="x.CoverImagePath" style="width: 65px;height: 65px;border-radius: 6px;" ></image>
<view style="width: calc(100vw - 30px - 65px - 15px);display: flex;flex-direction: column;margin-left: 15px;">
<view class="box_c_name">{{x.GoodsName}}</view>
<view class="box_c_name" style="font-size: 12px;color: #555555;margin-top: 3px;">
规格:
<text v-for="(t, y) in x.SpecificationList" :key="y">{{t}}</text>
</view>
<view class="box_r_b">
<text style="font-size: 12px;color: #555555;">X{{x.Number}}</text>
</view>
</view>
</view>
<view class="box_r_b">
<text style="font-size: 12px;color: #555555;"></text>
<view style="padding: 5px 10px;background: #F8F6F5;font-size: 12px;color: #111111;">
<text>已得佣金:</text>
<text style="color: #FF4048;font-size: 12px;">{{item.Commission}}</text>
<text></text>
</view>
</view>
<view class="OrderNoStyle" >
<text style="margin-left: 15px;">订单号:{{item.OrderNo}}</text>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
</template>
</view>
<u-popup v-model="show"
mode="right"
length="70%"
height='100%'
>
<view class="popupbox">
<text class="popupbox_text" style="margin-top: 15px;">供应商</text>
<view class="popup_item" @click="showmodel=true">
<view :style="{color:SupplierName==''?'#A5A4AC':'#111111'}">{{SupplierName==''?'请选择~':SupplierName}}</view>
</view>
<text class="popupbox_text" style="margin-top: 15px;">商品名称</text>
<view class="popup_item">
<input class="uni-input inputM" v-model="msg.GoodsName" />
</view>
<text class="popupbox_text" style="margin-top: 15px;">下单时间段</text>
<view style="width: 96%;display: flex;flex-direction: row;align-items: center;justify-content: space-between;margin-left: 2%;height: 40px;">
<view class="popup_item_t" @click="godate(1)">
<text>{{msg.StartTime}}</text>
</view>
<view>-</view>
<view class="popup_item_t" @click="godate(2)">
<text>{{msg.EndTime}}</text>
</view>
</view>
<view class="popup_b" :style="{height:cHeight+'px'}">
<view class="popup_b_item" style="background: #FAF8F9;color: #000000;" @click="goreset()">
<text>重置</text>
</view>
<view class="popup_b_item" :style="{background:mainColor }" @click="determine()">
<text>确定</text>
</view>
</view>
</view>
</u-popup>
<u-picker mode="selector" v-model="showmodel" :range="array" range-key="Name" @confirm= 'choosesupplier'></u-picker>
<u-picker v-model="showpicker" mode="time" @confirm='dateconfirm'></u-picker>
</view>
</template>
<script>
import wPicker from "../foot/w-picker/w-picker.vue"
export default {
components:{
wPicker
},
data() {
return {
pageTitle: "供应商订单",
contentHeight:0,
mainColor:'',
secondary:'',
g:[],
show:false,
showmodel:false,
showpicker:false,
list:[
{name: '全部'},
{name: '待付款'},
{name: '已付款'},
{name: '已完成'},
],
msg:{
pageIndex: 1,
pageSize:10,
UserId:0,
SupplierId:0,
GoodsName:'',
CommissionState:0,
StartTime:'',
EndTime:'',
},
rangeVal:'',//时间
SupplierName:'',
SelectBillState:0,
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
cHeight:0,
array:[]
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.msg.UserId = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserId:0
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.init()
this.getUserMemberSupplier()
},
mounted() {
this.cHeight = this.$uiConfig.is_bang ? 80 : 52;
},
methods: {
init(){
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/GetUserDistributionOrdersPageList',
data: this.msg
},
(res) => {
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
);
},
choosesupplier(val){
this.msg.SupplierId = this.array[val].ID;
this.SupplierName = this.array[val].Name;
},
godate(type){
this.datetype = type;
this.showpicker = true;
},
dateconfirm(val){
if(this.datetype==1){
this.msg.StartTime = val.year +'-'+val.month +'-'+val.day
}else if(this.datetype==2){
this.msg.EndTime = val.year +'-'+val.month +'-'+val.day
}
},
getUserMemberSupplier(){
this.request2(
{
url: '/api/AppletUser/GetUserMemberSupplier',
data: {}
},
(res) => {
this.array = res.data
console.log(this.array)
}
);
},
change(index){
this.msg.CommissionState = index
this.SelectBillState = index;
this.msg.pageIndex=1;
this.g=[]
this.init()
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
goDetails(item){
uni.navigateTo({
url: '/pages/mySupplier/billDetails?ID='+item.Id
});
},
goreset(){//重置
this.show=false;
this.msg.SupplierId=0;
this.msg.GoodsName='';
this.msg.StartTime='';
this.msg.EndTime='';
this.msg.pageIndex=1;
this.SupplierName = '',
this.g=[]
this.init()
},
determine(){//确认
this.show=false
this.msg.pageIndex=1;
this.g=[]
this.init()
}
}
}
</script>
<style>
.supplierOrder{
background: #f3f4f6;
}
.supplierOrder .listbox{
width: 100%;
margin-bottom: 10px;
padding: 15px;
background: #fff;
display: flex;
flex-direction: column;
align-items: center
}
.supplierOrder .box_t{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
justify-content: space-between;
}
.supplierOrder .box_c{
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
overflow: hidden;
margin-top: 15px;
}
.supplierOrder .box_tname{
width: 480rpx;
margin-left: 5px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
}
.supplierOrder .box_c_name{
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
line-clamp: 1;
-webkit-box-orient: vertical;
font-size: 13px;
color: #111111;
}
.supplierOrder .box_r_b{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 3px;
}
.supplierOrder .OrderNoStyle{
width: 100%;
height: 35px;
background: #F8F6F5;
display: flex;
flex-direction: row;
align-items: center;
font-size: 11px;
color: #888888;
margin-top: 15px;
}
.supplierOrder .popupbox{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: relative;
}
.supplierOrder .popupbox_text{
font-size: 12px;
color: #111111;
margin-left: 5%;
}
.supplierOrder .popup_item{
width: 90%;
height: 40px;
margin-left: 5%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 5px;
margin-top: 10px;
background: #F8F6F5;
}
.supplierOrder .inputM{
width: 100%;
}
.supplierOrder .popup_b{
width: 100%;
position: absolute;
left: 0;
bottom: 0;
display: flex;
flex-direction: row;
align-items: center;
color: #FFFFFF;
}
.supplierOrder .popup_b_item{
width: 50%;
height: 100%;
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: center;
font-size: 14px;
padding-top: 15px;
}
.supplierOrder .popup_item_t{
width: 44%;
height: 100%;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 5px;
margin-top: 10px;
background: #F8F6F5;
}
</style>
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