From f837b731f571bb53cee99f9bc22a6f74855f3e6c Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期一, 12 八月 2024 02:43:20 +0800
Subject: [PATCH] add 商品结算测试
---
sub_pages/supplier/flower-manage/flower-manage.vue | 47 +++++++++++++++++++++++++++++++++++++++--------
1 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/sub_pages/supplier/flower-manage/flower-manage.vue b/sub_pages/supplier/flower-manage/flower-manage.vue
index 874c9b8..6d2ce88 100644
--- a/sub_pages/supplier/flower-manage/flower-manage.vue
+++ b/sub_pages/supplier/flower-manage/flower-manage.vue
@@ -13,9 +13,17 @@
<no-data v-if="!list||list.length==0" style="width: 100%;"></no-data>
<view v-for="(item,index) in list" :key="index" class="m-b-24 flow-manage-list">
<view class="flow-manage-list-item">
- <view class="flex">
- <image class="flower-img img100 m-r-6" :src="item.cover" @click="previewImg(item.cover)">
- </image>
+ <view class="flex m-r-6">
+ <view class="img flower-img m-r-6">
+ <image class="flower-img img100 " :src="item.cover"
+ :class="[!item.stock?'component-stock-zero':'']" @click="previewImg(item.cover)">
+
+ </image>
+ <view class="status" :class="[!item.stock?'zero':'']" v-if="item.statusStr">
+ {{ item.statusStr}}
+ </view>
+ </view>
+
<view class="flex1">
<view class=" flex">
<view class="title">{{item.name}}<span class="level">{{item.levelStr}}</span></view>
@@ -170,7 +178,7 @@
await this.$store.dispatch('sign_clear', 'flower');
this.getList()
},
- onReachBottom() {
+ onReachBottom() {
console.log('onReachBottom')
this.getMore()
},
@@ -241,21 +249,22 @@
})
},
async buttonStatus(item, status) {
- await this.$message.confirm(`确定${status==='off'?'下降':'上架'}此商品吗`)
+ await this.$message.confirm(`确定${status==='off'?'下架':'上架'}此商品吗`)
this.$message.showLoading()
this.$http.request('get', '/api/supplier/flower/list/' + status, {
params: {
id: item.id
}
}).then(res => {
+ this.$message.hideLoading()
if (res.code == 0) {
this.$message.showToast('操作成功')
- item.status = status
+ item.status = (status == 'off' ? 'OFF' : 'UP')
item.statusStr = (status == 'off' ? '下架' : '上架')
}
- }).finally(() => {
+ }).catch(e => {
this.$message.hideLoading()
- })
+ }).finally(() => {})
},
async buttonDelete(item) {
await this.$message.confirm('确定删除此商品吗')
@@ -346,6 +355,28 @@
height: 118rpx;
min-width: 128rpx;
min-height: 118rpx;
+ position: relative;
+
+ .status {
+ position: absolute;
+ min-width: 66rpx;
+ height: 34rpx;
+ background: #20613D;
+ left: 0;
+ top: 0;
+ border-top-left-radius: 8rpx;
+ border-bottom-right-radius: 8rpx;
+ color: #FFFFFF;
+ line-height: 34rpx;
+ font-size: 22rpx;
+ text-align: center;
+ }
+
+ .status.zero {
+ // background: unset;
+ // font-size: 24rpx;
+
+ }
}
.each-list {
--
Gitblit v1.9.3