积分商城
This commit is contained in:
@@ -9,29 +9,31 @@
|
||||
<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" />
|
||||
<uni-easyinput prefixIcon="search" borderColor="#DCDFE6" v-model="paramter.params.productName" placeholder="请输入商品名称"
|
||||
@confirm="search" @clear="search" />
|
||||
</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 class="identifying"
|
||||
:style="{background:identifying[item.productStatus].background,
|
||||
opacity:identifying[item.productStatus].opacity}">{{item.productStatus =='1'?'已上架':'未上架'}}</view>
|
||||
</view>
|
||||
<view class="introduce" @click="toDetails(item)">
|
||||
<image :src="item.oderDetailImg"></image>
|
||||
<image :src="item.url"></image>
|
||||
<view>{{item.productName}}</view>
|
||||
<view>规格:默认</view>
|
||||
<view>¥{{item.marketPrice}} X{{item.orderNum}}</view>
|
||||
<view>库存:{{item.orderNum}}</view>
|
||||
<view>库存:{{item.totalStock}}</view>
|
||||
</view>
|
||||
<view class="examine" @click="examineDetail" :style="{background:statusEnum[1].color}" >{{statusEnum[1].value}}</view>
|
||||
<view class="examine" @click="examineDetail(item)"
|
||||
:style="{background:statusEnum[item.auditStatus].color}" >{{statusEnum[item.auditStatus].value}}</view>
|
||||
<view class="footer">
|
||||
<view class="button" @click="orderDelete">删除</view>
|
||||
<view class="button">编辑</view>
|
||||
<view class="button" @click="upDownFrame">上架</view>
|
||||
<view class="button" @click="upDownFrame(item)">{{item.productStatus =='1'?'上架':'下架'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 30rpx; background: #fff;"></view>
|
||||
@@ -50,13 +52,13 @@
|
||||
<view class="header">审核时间</view>
|
||||
<view>{{item.createTime}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="status">
|
||||
<view class="header">审核结果</view>
|
||||
<view>{{item.status}}</view>
|
||||
<view>{{statusEnum[item.auditStatus].value}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="header">反馈详情</view>
|
||||
<view>{{item.dateil}}</view>
|
||||
<view>{{item.remark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buttons">
|
||||
@@ -77,10 +79,10 @@
|
||||
|
||||
<uni-popup ref="popup">
|
||||
<view class="determine-frame">
|
||||
<view class="title">是否上架/下架该商品?</view>
|
||||
<view class="title">是否{{productData.productStatus =='1'?'下架':'上架'}}该商品?</view>
|
||||
<view class="buttons">
|
||||
<view @click="$refs.popup.close()">取消</view>
|
||||
<view>确认</view>
|
||||
<view @click="submitProduct">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -89,7 +91,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serve from '@/api/packageIntegral/orderList.js'
|
||||
import serve from '@/api/packageIntegral/productList.js'
|
||||
|
||||
export default {
|
||||
options: {
|
||||
@@ -106,11 +108,9 @@
|
||||
paramter: {
|
||||
currentPage: 1,
|
||||
pagesize: 20,
|
||||
params: {
|
||||
customerphone: ''
|
||||
},
|
||||
params: {},
|
||||
},
|
||||
dataList: [{},{},{}],
|
||||
dataList: [],
|
||||
optionsList: [{
|
||||
text: '全部',
|
||||
count: 0,
|
||||
@@ -129,22 +129,18 @@
|
||||
value: ''
|
||||
}],
|
||||
identifying:{
|
||||
0: {
|
||||
1: {
|
||||
background: '#F83D3D',
|
||||
opacity: 1,
|
||||
value: "已上架"
|
||||
},
|
||||
1: {
|
||||
2: {
|
||||
background: '#F83D3D',
|
||||
opacity: 0.5,
|
||||
value: "待上架"
|
||||
}
|
||||
},
|
||||
statusEnum: {
|
||||
'-1': {
|
||||
color: '#F83D3D',
|
||||
value: "已驳回"
|
||||
},
|
||||
1: {
|
||||
color: '#8D38FC',
|
||||
value: "待审核"
|
||||
@@ -153,34 +149,38 @@
|
||||
color: '#FCB438',
|
||||
value: "已审核"
|
||||
},
|
||||
3: {
|
||||
color: '#F83D3D',
|
||||
value: "已驳回"
|
||||
},
|
||||
},
|
||||
examineDetailList:[
|
||||
{
|
||||
createTime:'2023.11.22',
|
||||
status:'1',
|
||||
dateil:'未审核'
|
||||
},
|
||||
{
|
||||
createTime:'2023.11.23',
|
||||
status:'2',
|
||||
dateil:'已审核'
|
||||
},
|
||||
{
|
||||
createTime:'2023.11.24',
|
||||
status:'已驳回',
|
||||
dateil:'图片不清晰,请重新上传图片'
|
||||
}
|
||||
]
|
||||
examineDetailList:[],
|
||||
productData:{}
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
// this.getByPageCloudMini()
|
||||
this.productByPage()
|
||||
this.getTopInfo()
|
||||
},
|
||||
|
||||
methods: {
|
||||
selectOptions(index) {
|
||||
this.currentIndex = index
|
||||
console.log(index,'index')
|
||||
if(index == 0){
|
||||
this.paramter.params ={}
|
||||
}else if(index ==1){
|
||||
this.paramter.params ={}
|
||||
this.paramter.params.productStatus = 1
|
||||
}else if(index ==2){
|
||||
this.paramter.params ={}
|
||||
this.paramter.params.productStatus = 2
|
||||
}else if(index ==3){
|
||||
this.paramter.params ={}
|
||||
this.paramter.params.auditStatus = 1
|
||||
}
|
||||
this.productByPage()
|
||||
},
|
||||
handler(json) {
|
||||
json = json.replace(/'/g, '"')
|
||||
@@ -197,12 +197,23 @@
|
||||
url: `../orderDetails/index?orderId=${item.orderId}`
|
||||
})
|
||||
},
|
||||
getTopInfo(){
|
||||
serve.getTopInfo(this.paramter).then(res => {
|
||||
if (res.code === 20000) {
|
||||
this.optionsList[0].count = res.data.count
|
||||
this.optionsList[1].count = res.data.availableCount
|
||||
this.optionsList[2].count = res.data.noAvailableCount
|
||||
this.optionsList[3].count = res.data.auditCount
|
||||
}
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.paramter.currentPage = 1
|
||||
this.getByPageCloudMini()
|
||||
this.productByPage()
|
||||
this.getTopInfo()
|
||||
},
|
||||
getByPageCloudMini() {
|
||||
serve.getByPageCloudMini(this.paramter).then(res => {
|
||||
productByPage() {
|
||||
serve.productByPage(this.paramter).then(res => {
|
||||
if (res.code === 20000) {
|
||||
if (!res.data.list.length) {
|
||||
uni.showToast({
|
||||
@@ -220,17 +231,41 @@
|
||||
},
|
||||
lower() {
|
||||
this.paramter.currentPage += 1
|
||||
this.getByPageCloudMini()
|
||||
this.productByPage()
|
||||
},
|
||||
examineDetail(){
|
||||
examineDetail(item){
|
||||
serve.productAuditHistory({id:item.id}).then(res=>{
|
||||
this.examineDetailList = res.data
|
||||
})
|
||||
this.$refs.detail.open('center')
|
||||
},
|
||||
orderDelete(){
|
||||
this.$refs.delete.open('center')
|
||||
},
|
||||
upDownFrame() {
|
||||
upDownFrame(item) {
|
||||
this.productData = item
|
||||
this.$refs.popup.open('center')
|
||||
},
|
||||
submitProduct(){
|
||||
let data = {}
|
||||
data.id = this.productData.id
|
||||
if(this.productData.productStatus ==1){
|
||||
data.productStatus = 2
|
||||
}else if(this.productData.productStatus ==2){
|
||||
data.productStatus = 1
|
||||
}
|
||||
|
||||
serve.productStatus(data).then(res=>{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
if (res.code !== 20000) return
|
||||
this.$refs.popup.close()
|
||||
this.productByPage()
|
||||
this.getTopInfo()
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
this.controlWindows.code = false
|
||||
}
|
||||
@@ -249,6 +284,13 @@
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
|
||||
>.search {
|
||||
margin: 50rpx auto 0;
|
||||
width: 689rpx;
|
||||
height: 74rpx;
|
||||
background: #FFF;
|
||||
|
||||
}
|
||||
>.options-frame {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -280,13 +322,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
>.search {
|
||||
margin: 50rpx auto 0;
|
||||
width: 689rpx;
|
||||
height: 74rpx;
|
||||
background: #F7F7F7;
|
||||
|
||||
}
|
||||
|
||||
>.list {
|
||||
margin-top: 35rpx;
|
||||
@@ -439,9 +474,16 @@
|
||||
color: #666;
|
||||
padding: 10rpx;
|
||||
view{
|
||||
width: 200rpx;
|
||||
width: 240rpx;
|
||||
line-height: 46rpx;
|
||||
}
|
||||
>.status{
|
||||
width: 160rpx;
|
||||
>view{
|
||||
width: 160rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.header{
|
||||
font-size: 32rpx;
|
||||
color: #000;
|
||||
|
||||
Reference in New Issue
Block a user