星油云站
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

529 lines
10 KiB

<template>
<view class="container">
<cu-custom class="main-totextbar bg-main-oil" :isBack="true" bgColor="bg-main-oil">
<block slot="backText">返回</block>
<block slot="content">商品列表</block>
</cu-custom>
<view class="options-frame">
<view v-for="item,index in optionsList" :key="index" :class="index == currentIndex ? 'active':''"
@click="selectOptions(index)">{{item.text}}<text>({{item.count}})</text></view>
</view>
<view class="search">
<uni-easyinput prefixIcon="search" v-model="paramter.customerphone" placeholder="请输入手机号后四位"
@confirm="search" maxlength="4" />
</view>
<scroll-view v-if="dataList.length" class="list" :scroll-y="true" @scrolltolower="lower">
<view class="item" v-for="item,index in dataList" :key="index">
<view class="header" @click="toDetails(item)">
<view class="identifying" :style="{background:identifying[1].background,opacity:identifying[1].opacity}">已上架</view>
</view>
<view class="introduce" @click="toDetails(item)">
<image :src="item.oderDetailImg"></image>
<view>{{item.productName}}</view>
<view>规格:默认</view>
<view>¥{{item.marketPrice}} X{{item.orderNum}}</view>
<view>库存:{{item.orderNum}}</view>
</view>
<view class="examine" @click="examineDetail" :style="{background:statusEnum[1].color}" >{{statusEnum[1].value}}</view>
<view class="footer">
<view class="button" @click="orderDelete">删除</view>
<view class="button">编辑</view>
<view class="button" @click="upDownFrame">上架</view>
</view>
</view>
<view style="height: 30rpx; background: #fff;"></view>
</scroll-view>
<view v-else class="empty">
<image src="https://publicxingyou.oss-cn-hangzhou.aliyuncs.com/mp-oil/yunsite-empty.png"></image>
<view>还没有订单哦~</view>
</view>
<uni-popup ref="detail">
<view class="determine-detail">
<view class="title">审核详情</view>
<uni-icons @click="$refs.detail.close()" color="#666666" type="closeempty" size="28"></uni-icons>
<view class="item" v-for="(item,index) in examineDetailList" :key="index">
<view>
<view class="header">审核时间</view>
<view>{{item.createTime}}</view>
</view>
<view>
<view class="header">审核结果</view>
<view>{{item.status}}</view>
</view>
<view>
<view class="header">反馈详情</view>
<view>{{item.dateil}}</view>
</view>
</view>
<view class="buttons">
<view @click="$refs.detail.close()">关闭</view>
</view>
</view>
</uni-popup>
<uni-popup ref="delete">
<view class="determine-frame">
<view class="title">是否删除该商品</view>
<view class="buttons">
<view @click="$refs.delete.close()">取消</view>
<view>确认</view>
</view>
</view>
</uni-popup>
<uni-popup ref="popup">
<view class="determine-frame">
<view class="title">是否上架/下架该商品</view>
<view class="buttons">
<view @click="$refs.popup.close()">取消</view>
<view>确认</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import serve from '@/api/packageIntegral/orderList.js'
export default {
options: {
styleIsolation: 'shared'
},
data() {
return {
currentIndex: 0,
code: '',
controlWindows: {
code: false
},
paramter: {
currentPage: 1,
pagesize: 20,
params: {
customerphone: ''
},
},
dataList: [{},{},{}],
optionsList: [{
text: '全部',
count: 0,
value: ''
}, {
text: '已上架',
count: 0,
value: ''
}, {
text: '未上架',
count: 0,
value: ''
}, {
text: '待审核',
count: 0,
value: ''
}],
identifying:{
0: {
background: '#F83D3D',
opacity: 1,
value: "已上架"
},
1: {
background: '#F83D3D',
opacity: 0.5,
value: "待上架"
}
},
statusEnum: {
'-1': {
color: '#F83D3D',
value: "已驳回"
},
1: {
color: '#8D38FC',
value: "待审核"
},
2: {
color: '#FCB438',
value: "已审核"
},
},
examineDetailList:[
{
createTime:'2023.11.22',
status:'1',
dateil:'未审核'
},
{
createTime:'2023.11.23',
status:'2',
dateil:'已审核'
},
{
createTime:'2023.11.24',
status:'已驳回',
dateil:'图片不清晰,请重新上传图片'
}
]
}
},
onLoad() {
// this.getByPageCloudMini()
},
methods: {
selectOptions(index) {
this.currentIndex = index
},
handler(json) {
json = json.replace(/'/g, '"')
let res = JSON.parse(json)
let values = Object.values(res)
let text = values.reduce((prev, item, index) => {
let _text = `${index == 0 ? '' :','}${item}`
return prev += _text
}, '')
return text
},
toDetails(item) {
uni.navigateTo({
url: `../orderDetails/index?orderId=${item.orderId}`
})
},
search() {
this.paramter.currentPage = 1
this.getByPageCloudMini()
},
getByPageCloudMini() {
serve.getByPageCloudMini(this.paramter).then(res => {
if (res.code === 20000) {
if (!res.data.list.length) {
uni.showToast({
title: '没有更多订单啦~',
icon: 'none'
})
return
}
if (this.paramter.currentPage == 1) {
this.dataList = []
}
this.dataList = this.dataList.concat(res.data.list)
}
})
},
lower() {
this.paramter.currentPage += 1
this.getByPageCloudMini()
},
examineDetail(){
this.$refs.detail.open('center')
},
orderDelete(){
this.$refs.delete.open('center')
},
upDownFrame() {
this.$refs.popup.open('center')
},
confirm() {
this.controlWindows.code = false
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .uni-easyinput__content {
background: #F7F7F7 !important;
}
.container {
height: 100vh;
display: flex;
flex-direction: column;
background: #fff;
>.options-frame {
display: flex;
justify-content: space-between;
margin-top: 43rpx;
padding: 0 31rpx;
>view {
width: 144rpx;
height: 66rpx;
font-size: 25rpx;
line-height: 66rpx;
text-align: center;
color: #000000;
background: #F7F7F7;
>text {
color: #F83D3D;
}
&.active {
color: #FFF;
background: #F83D3D;
>text {
color: #fff;
}
}
}
}
>.search {
margin: 50rpx auto 0;
width: 689rpx;
height: 74rpx;
background: #F7F7F7;
}
>.list {
margin-top: 35rpx;
flex: 1;
overflow-y: hidden;
.item {
position: relative;
margin-top: 20rpx;
background: #fff;
// min-height: 106rpx;
// border-bottom: 12rpx solid #F1F2F7;
&:nth-of-type(1) {
margin-top: 0
}
.header {
// padding: 26rpx 23rpx 0;
height: 60rpx;
// line-height: 83rpx;
width: 100%;
font-size: 30rpx;
color: #666;
border-top: 1rpx solid #D7D7D7;
.identifying{
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
// background-color: #F83D3D;
color: #FFF;
text-align: center;
border-bottom-right-radius: 30rpx;
}
}
.introduce {
position: relative;
padding: 24rpx 29rpx 31rpx 268rpx;
min-height: 220rpx;
>image {
position: absolute;
top: 13rpx;
left: 34rpx;
width: 220rpx;
height: 220rpx;
// border: 1px solid #333;
}
>view {
&:nth-of-type(1) {
font-size: 28rpx;
color: #000;
}
&:nth-of-type(2),
&:nth-of-type(3) {
margin-top: 11rpx;
font-size: 24rpx;
color: #999;
}
&:nth-of-type(3) {
margin-top: 18rpx;
}
&:nth-of-type(4) {
margin-top: 11rpx;
font-size: 28rpx;
color: #F83D3D;
}
}
}
.examine{
width: 120rpx;
height: 45rpx;
color: #FFF;
text-align: center;
line-height: 45rpx;
position: absolute;
right: 50rpx;
top: 180rpx;
}
>.footer {
position: relative;
height: 58rpx;
line-height: 58rpx;
padding: 0 34rpx 40rpx;
font-size: 32rpx;
color: #000;
font-weight: 550;
.button {
position: absolute;
top: 0;
width: 128rpx;
height: 58rpx;
line-height: 58rpx;
text-align: center;
font-size: 28rpx;
color: #999;
background: #FFF;
border: 1px solid #999;
border-radius: 10rpx;
}
>.button{
&:nth-of-type(1){
right: 360rpx;
}
&:nth-of-type(2){
right: 200rpx;
}
&:nth-of-type(3){
right: 40rpx;
}
}
}
}
}
.determine-detail {
padding: 30rpx 0;
width: 681rpx;
background: #FFFFFF;
border-radius: 15rpx;
position: relative;
>.title {
text-align: center;
font-size: 38rpx;
color: #000;
margin-bottom: 20rpx;
}
>uni-icons{
position: absolute;
top: 30rpx;
right: 30rpx;
}
>.item{
display: flex;
justify-content: space-evenly;
overflow-y: hidden;
font-size: 22rpx;
color: #666;
padding: 10rpx;
view{
width: 200rpx;
line-height: 46rpx;
}
.header{
font-size: 32rpx;
color: #000;
}
}
>.buttons {
display: flex;
justify-content: space-evenly;
margin-top: 50rpx;
>view {
width: 550rpx;
height: 76rpx;
text-align: center;
line-height: 76rpx;
border-radius: 10rpx;
font-size: 28rpx;
background: #FE0505;
color: #fff;
}
}
}
.determine-frame {
padding-top: 85rpx;
width: 681rpx;
height: 340rpx;
background: #FFFFFF;
border-radius: 15rpx;
>.title {
text-align: center;
font-size: 38rpx;
color: #000;
}
>.buttons {
display: flex;
justify-content: space-evenly;
margin-top: 80rpx;
>view {
width: 250rpx;
height: 76rpx;
text-align: center;
line-height: 76rpx;
border-radius: 10rpx;
font-size: 28rpx;
&:nth-of-type(1) {
background: #FFFFFF;
border: 1rpx solid #B6B6B6;
color: #333;
}
&:nth-of-type(2) {
background: #FE0505;
color: #fff;
}
}
}
}
>.empty {
margin: 218rpx auto 0;
>image {
width: 473rpx;
height: 404rpx;
}
>view {
margin-top: 45rpx;
text-align: center;
font-size: 28rpx;
color: #999;
}
}
}
</style>