|
|
@@ -40,43 +40,61 @@
|
|
|
transform: 'scale(1)'
|
|
|
}"></up-tabs>
|
|
|
|
|
|
+ <!-- 管理按钮 -->
|
|
|
+ <view v-if="goodsList.length" class='nav acea-row row-between-wrapper'>
|
|
|
+ <view>共 <text class='num font-color'>{{ goodsList.length }}</text>件商品</view>
|
|
|
+ <view class='administrate acea-row row-center-wrapper' @click='manage'>
|
|
|
+ {{ footerswitch ? '管理' : '取消' }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
<!-- 商品列表 -->
|
|
|
<view class="product-list">
|
|
|
- <view class="product-card" v-for="(item, index) in goodsList" :key="index">
|
|
|
- <view class="product-header">
|
|
|
- <image class="product-image" :src="item.image" mode="aspectFit" />
|
|
|
- <view class="product-info">
|
|
|
- <view class="nameweight">
|
|
|
- <text class="product-name">{{ item.storeName }}</text>
|
|
|
- <text class="product-weight">{{ item.weight }}g</text>
|
|
|
- </view>
|
|
|
- <view class="nameweight">
|
|
|
- <view class="price-info">
|
|
|
- <text class="label">工费</text>
|
|
|
- <view class="value"><text class="unit">¥</text>{{ item.totalLaborCost }}<text class="unit">/g</text></view>
|
|
|
+ <up-checkbox-group shape="circle" @change="checkboxChange" class="centent" activeColor="#F8C008">
|
|
|
+ <view class="product-card" v-for="(item, index) in goodsList" :key="index">
|
|
|
+ <view class="product-header">
|
|
|
+ <!-- 多选框 -->
|
|
|
+ <up-checkbox
|
|
|
+ :name="item.id.toString()"
|
|
|
+ :checked="item.checked"
|
|
|
+ v-if="!footerswitch"
|
|
|
+ style="margin-right: 10rpx;"
|
|
|
+ activeColor="#F8C008"
|
|
|
+ />
|
|
|
+
|
|
|
+ <image class="product-image" :src="item.image" mode="aspectFit" />
|
|
|
+ <view class="product-info">
|
|
|
+ <view class="nameweight">
|
|
|
+ <text class="product-name">{{ item.storeName }}</text>
|
|
|
+ <text class="product-weight">{{ item.weight }}g</text>
|
|
|
</view>
|
|
|
- <view class="price-info">
|
|
|
- <text class="label">附加费</text>
|
|
|
- <view class="value"><text class="unit">¥</text>{{ item.additionalAmount }}</view>
|
|
|
+ <view class="nameweight">
|
|
|
+ <view class="price-info">
|
|
|
+ <text class="label">工费</text>
|
|
|
+ <view class="value"><text class="unit">¥</text>{{ item.totalLaborCost }}<text class="unit">/g</text></view>
|
|
|
+ </view>
|
|
|
+ <view class="price-info">
|
|
|
+ <text class="label">附加费</text>
|
|
|
+ <view class="value"><text class="unit">¥</text>{{ item.additionalAmount }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="product-stats">
|
|
|
+ <text class="stat">销量:{{ Number(item.sales || 0) + Number(item.ficti || 0) }}</text>
|
|
|
+ <text class="stat">库存:{{ item.stock }}</text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="product-stats">
|
|
|
- <text class="stat">销量:{{ Number(item.sales || 0) + Number(item.ficti || 0) }}</text>
|
|
|
- <text class="stat">库存:{{ item.stock }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
- <view class="action-buttons">
|
|
|
- <button class="btn btn-delete" @click="deleteFn(item,index)">删除</button>
|
|
|
- <button class="btn btn-offline" v-show="params.isShow==1" @click="OffShellFn(item,index)">下架</button>
|
|
|
- <button class="btn btn-offline" v-show="params.isShow==0" @click="PutOnShellFn(item,index)">上架</button>
|
|
|
- <button class="btn btn-edit" v-show="params.isShow==0" @click="toEditProduct(item)">编辑</button>
|
|
|
+ <view class="action-buttons">
|
|
|
+ <button class="btn btn-delete" @click="deleteFn(item,index)">删除</button>
|
|
|
+ <button class="btn btn-offline" v-show="params.isShow==1" @click="OffShellFn(item,index)">下架</button>
|
|
|
+ <button class="btn btn-offline" v-show="params.isShow==0" @click="PutOnShellFn(item,index)">上架</button>
|
|
|
+ <button class="btn btn-edit" v-show="params.isShow==0" @click="toEditProduct(item)">编辑</button>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </up-checkbox-group>
|
|
|
+
|
|
|
<view class="loadingicon acea-row row-center-wrapper" v-if="goodScroll">
|
|
|
<text
|
|
|
class="loading iconfont icon-jiazai"
|
|
|
@@ -92,17 +110,37 @@
|
|
|
<text>我是有底线的</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <!-- 底部操作栏 -->
|
|
|
+ <view v-if="!footerswitch" class='footer acea-row row-between-wrapper'>
|
|
|
+ <view>
|
|
|
+ <up-checkbox-group shape="circle" @change="checkboxAllChange">
|
|
|
+ <up-checkbox value="all" :checked="!!isAllSelect" activeColor="#F8C008" />
|
|
|
+ <text class='checkAll'>全选</text>
|
|
|
+ </up-checkbox-group>
|
|
|
+ </view>
|
|
|
+ <view class='button acea-row row-middle'>
|
|
|
+ <button v-if="params.isShow==1" class='bnt' @click="batchOffShell">批量下架</button>
|
|
|
+ <button v-if="params.isShow==0" class='bnt' @click="batchPutOnShell">批量上架</button>
|
|
|
+<!-- <button class='bnt cart-color delete-btn' @click="batchDelete">批量删除</button>-->
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {computed, ref} from 'vue'
|
|
|
+import {computed, ref,watch} from 'vue'
|
|
|
import { onLoad, onShow, onReachBottom } from "@dcloudio/uni-app";
|
|
|
-import { productsList,productPutOnShell,productOffShell,productDelete } from "@/api/merchant.js";
|
|
|
+import { productsList, productPutOnShell, productOffShell, productDelete, batchStatus } from "@/api/merchant.js";
|
|
|
import { useAppStore } from "@/stores/app";
|
|
|
|
|
|
const appStore = useAppStore();
|
|
|
|
|
|
+// 管理相关状态
|
|
|
+const footerswitch = ref(true); // true: 显示正常模式, false: 显示管理模式
|
|
|
+const isAllSelect = ref(false); // 是否全选
|
|
|
+const selectValue = ref([]); // 选中的商品ID数组
|
|
|
+
|
|
|
const tabList = ref([
|
|
|
{name:'销售中',code:1},
|
|
|
{name:'已下架',code:0}
|
|
|
@@ -126,12 +164,160 @@ const isNoDataState = computed(() => {
|
|
|
return goodsList.value.length === 0 && !loading.value;
|
|
|
});
|
|
|
|
|
|
-
|
|
|
onShow(() => {
|
|
|
merchantInfo.value = appStore.userInfo.merchant;
|
|
|
getGroomList()
|
|
|
})
|
|
|
|
|
|
+// 切换管理状态
|
|
|
+const manage = () => {
|
|
|
+ footerswitch.value = !footerswitch.value;
|
|
|
+ // 退出管理状态时,清空选择
|
|
|
+ if (footerswitch.value) {
|
|
|
+ resetSelection();
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 重置选择状态
|
|
|
+const resetSelection = () => {
|
|
|
+ goodsList.value.forEach(item => {
|
|
|
+ item.checked = false;
|
|
|
+ });
|
|
|
+ isAllSelect.value = false;
|
|
|
+ selectValue.value = [];
|
|
|
+}
|
|
|
+
|
|
|
+// 多选框变化
|
|
|
+const checkboxChange = (values) => {
|
|
|
+
|
|
|
+ goodsList.value.forEach(item => {
|
|
|
+ item.checked = values.includes(item.id.toString());
|
|
|
+ });
|
|
|
+
|
|
|
+ selectValue.value = values;
|
|
|
+ isAllSelect.value = goodsList.value.length === values.length;
|
|
|
+};
|
|
|
+
|
|
|
+// 全选变化
|
|
|
+const checkboxAllChange = (event) => {
|
|
|
+ if (event.length > 0) {
|
|
|
+ setAllSelectValue(1);
|
|
|
+ } else {
|
|
|
+ setAllSelectValue(0);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+// 设置全选状态
|
|
|
+const setAllSelectValue = (status) => {
|
|
|
+ const selectValues = [];
|
|
|
+
|
|
|
+ goodsList.value.forEach(item => {
|
|
|
+ if (status) {
|
|
|
+ item.checked = true;
|
|
|
+ selectValues.push(item.id);
|
|
|
+ isAllSelect.value = true;
|
|
|
+ } else {
|
|
|
+ item.checked = false;
|
|
|
+ isAllSelect.value = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ selectValue.value = selectValues;
|
|
|
+ console.log(selectValue.value)
|
|
|
+};
|
|
|
+
|
|
|
+// 检查是否有选中商品
|
|
|
+const checkHasSelected = () => {
|
|
|
+ if (!selectValue.value || selectValue.value.length === 0) {
|
|
|
+ uni.showToast({ title: '请先选择商品', icon: 'none' });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
+// 批量下架
|
|
|
+const batchOffShell = async () => {
|
|
|
+ if (!checkHasSelected()) return;
|
|
|
+
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `确定要下架选中的${selectValue.value.length}件商品吗?`,
|
|
|
+ success: async (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ try {
|
|
|
+ const { code, message } = await batchStatus({ ids: selectValue.value, status:0 });
|
|
|
+ if (code === 200) {
|
|
|
+ uni.showToast({ title: '批量下架成功', icon: 'success' });
|
|
|
+ // 从列表中移除下架的商品
|
|
|
+ goodsList.value = goodsList.value.filter(item => !selectValue.value.includes(item.id.toString()));
|
|
|
+ resetSelection();
|
|
|
+ footerswitch.value = true; // 退出管理模式
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: message || '操作失败', icon: 'none' });
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ uni.showToast({ title: err.message || '操作失败', icon: 'none' });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+// 批量上架
|
|
|
+const batchPutOnShell = async () => {
|
|
|
+ if (!checkHasSelected()) return;
|
|
|
+
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `确定要上架选中的${selectValue.value.length}件商品吗?`,
|
|
|
+ success: async (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ try {
|
|
|
+ const { code, message } = await batchStatus({ ids: selectValue.value,status:1 });
|
|
|
+ if (code === 200) {
|
|
|
+ uni.showToast({ title: '批量上架成功', icon: 'success' });
|
|
|
+ // 从列表中移除上架的商品
|
|
|
+ goodsList.value = goodsList.value.filter(item => !selectValue.value.includes(item.id.toString()));
|
|
|
+ resetSelection();
|
|
|
+ footerswitch.value = true; // 退出管理模式
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: message || '操作失败', icon: 'none' });
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ uni.showToast({ title: err.message || '操作失败', icon: 'none' });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+// 批量删除
|
|
|
+const batchDelete = async () => {
|
|
|
+ if (!checkHasSelected()) return;
|
|
|
+
|
|
|
+ uni.showModal({
|
|
|
+ title: '警告',
|
|
|
+ content: `确定要删除选中的${selectValue.value.length}件商品吗?此操作不可恢复!`,
|
|
|
+ success: async (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ try {
|
|
|
+ const { code, message } = await batchDeleteApi({ ids: selectValue.value.join(',') });
|
|
|
+ if (code === 200) {
|
|
|
+ uni.showToast({ title: '批量删除成功', icon: 'success' });
|
|
|
+ // 从列表中移除删除的商品
|
|
|
+ goodsList.value = goodsList.value.filter(item => !selectValue.value.includes(item.id.toString()));
|
|
|
+ resetSelection();
|
|
|
+ footerswitch.value = true; // 退出管理模式
|
|
|
+ } else {
|
|
|
+ uni.showToast({ title: message || '操作失败', icon: 'none' });
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ uni.showToast({ title: err.message || '操作失败', icon: 'none' });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
const tabChange = (item) => {
|
|
|
console.log('item',item)
|
|
|
goodsList.value = [];
|
|
|
@@ -140,21 +326,29 @@ const tabChange = (item) => {
|
|
|
params.value.isShow = item.code;
|
|
|
params.value.page = 1;
|
|
|
getGroomList();
|
|
|
+ // 切换标签时退出管理模式
|
|
|
+ footerswitch.value = true;
|
|
|
+ resetSelection();
|
|
|
}
|
|
|
+
|
|
|
const onSearch = () => {
|
|
|
goodsList.value = [];
|
|
|
loading.value = false;
|
|
|
goodScroll.value = true;
|
|
|
params.value.page = 1;
|
|
|
getGroomList();
|
|
|
+ // 搜索时退出管理模式
|
|
|
+ footerswitch.value = true;
|
|
|
+ resetSelection();
|
|
|
}
|
|
|
+
|
|
|
// 清除搜索内容
|
|
|
const onClear = () => {
|
|
|
console.log('清除搜索内容');
|
|
|
- searchVal.value = ''; // 手动清空关键词
|
|
|
- // 如果需要清除后立即刷新列表,可以调用搜索
|
|
|
+ searchVal.value = '';
|
|
|
onSearch();
|
|
|
}
|
|
|
+
|
|
|
const getGroomList = async () => {
|
|
|
if (!goodScroll.value) return;
|
|
|
try {
|
|
|
@@ -162,7 +356,14 @@ const getGroomList = async () => {
|
|
|
params.value.merchantId = merchantInfo.value.id;
|
|
|
params.value.keyword = searchVal.value;
|
|
|
const { data } = await productsList(params.value);
|
|
|
- goodsList.value = [...goodsList.value, ...data.list] || [];
|
|
|
+
|
|
|
+ // 初始化选择状态
|
|
|
+ const newList = data.list || [];
|
|
|
+ newList.forEach(item => {
|
|
|
+ item.checked = false;
|
|
|
+ });
|
|
|
+
|
|
|
+ goodsList.value = [...goodsList.value, ...newList];
|
|
|
goodScroll.value = data.list.length >= params.value.limit;
|
|
|
params.value.page++;
|
|
|
} catch (err) {
|
|
|
@@ -171,6 +372,7 @@ const getGroomList = async () => {
|
|
|
loading.value = false;
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
async function OffShellFn(obj,index) {
|
|
|
const {code} = await productOffShell(obj.id);
|
|
|
if(code == 200){
|
|
|
@@ -178,87 +380,134 @@ async function OffShellFn(obj,index) {
|
|
|
goodsList.value.splice(index,1);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
async function PutOnShellFn(obj,index) {
|
|
|
const {code} = await productPutOnShell(obj.id);
|
|
|
if(code == 200){
|
|
|
uni.showToast({ title: "操作成功", icon: "none" });
|
|
|
goodsList.value.splice(index,1);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+
|
|
|
function toEditProduct (obj){
|
|
|
uni.navigateTo({
|
|
|
url:`/pages/merchantCenters/releaseProduct?id=${obj.id}`
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
async function deleteFn(obj,index){
|
|
|
- const {code} = await productDelete(obj.id);
|
|
|
- if(code == 200){
|
|
|
- uni.showToast({ title: "操作成功", icon: "none" });
|
|
|
- goodsList.value.splice(index,1);
|
|
|
- }
|
|
|
+ uni.showModal({
|
|
|
+ title: '警告',
|
|
|
+ content: '确定要删除此商品吗?此操作不可恢复!',
|
|
|
+ success: async (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ const {code} = await productDelete(obj.id);
|
|
|
+ if(code == 200){
|
|
|
+ uni.showToast({ title: "操作成功", icon: "none" });
|
|
|
+ goodsList.value.splice(index,1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
+
|
|
|
onReachBottom(() => {
|
|
|
getGroomList();
|
|
|
});
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
+<style scoped>
|
|
|
+/* 管理栏样式 */
|
|
|
+.nav {
|
|
|
+ width: 100%;
|
|
|
+ height: 90rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 0 30rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #282828;
|
|
|
+ border-top: 1px solid #f0f0f0;
|
|
|
+ border-bottom: 1px solid #f0f0f0;
|
|
|
+ margin-top: 20rpx;
|
|
|
+}
|
|
|
|
|
|
-/* 搜索栏样式 */
|
|
|
-.search-bar {
|
|
|
- background: #fff;
|
|
|
- padding: 30rpx 30rpx 0;
|
|
|
+.nav .administrate {
|
|
|
+ width: 120rpx;
|
|
|
+ height: 50rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ border: 1px solid #F8C008;
|
|
|
+ color: #F8C008;
|
|
|
+ font-size: 24rpx;
|
|
|
}
|
|
|
|
|
|
-.search-input {
|
|
|
+.num {
|
|
|
+ color: #F8C008;
|
|
|
+ font-weight: bold;
|
|
|
+ margin: 0 4rpx;
|
|
|
+}
|
|
|
+
|
|
|
+/* 底部操作栏样式 */
|
|
|
+.footer {
|
|
|
+ z-index: 9;
|
|
|
width: 100%;
|
|
|
- height: 60rpx;
|
|
|
+ height: 96rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ position: fixed;
|
|
|
+ padding: 0 30rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-top: 1rpx solid #eee;
|
|
|
+ border-bottom: 1px solid #EEEEEE;
|
|
|
+ bottom: 0rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.footer .checkAll {
|
|
|
font-size: 28rpx;
|
|
|
+ color: #282828;
|
|
|
+ margin-left: 16rpx;
|
|
|
}
|
|
|
|
|
|
-/* 标签页样式 */
|
|
|
-.tabs {
|
|
|
+.footer .button {
|
|
|
display: flex;
|
|
|
- background: white;
|
|
|
- border-radius: 10rpx;
|
|
|
- margin-bottom: 20rpx;
|
|
|
+ gap: 20rpx;
|
|
|
}
|
|
|
|
|
|
-.tab {
|
|
|
- flex: 1;
|
|
|
- text-align: center;
|
|
|
- padding: 20rpx;
|
|
|
+.footer .button .bnt {
|
|
|
font-size: 28rpx;
|
|
|
- color: #666;
|
|
|
+ color: #333333;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ background-color: #F8C008;
|
|
|
+ width: 180rpx;
|
|
|
+ height: 60rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ text-align: center;
|
|
|
+ border: none;
|
|
|
}
|
|
|
|
|
|
-.tab.active {
|
|
|
- color: #333;
|
|
|
- font-weight: bold;
|
|
|
- border-bottom: 4rpx solid #333;
|
|
|
-}
|
|
|
-.product-list{
|
|
|
- padding: 30rpx;
|
|
|
- box-sizing: border-box;
|
|
|
+.footer .button .delete-btn {
|
|
|
+ background-color: #e64340;
|
|
|
}
|
|
|
-/* 商品卡片样式 */
|
|
|
+
|
|
|
+/* 商品卡片调整 */
|
|
|
.product-card {
|
|
|
- background: #fff;
|
|
|
+ width: 100%;
|
|
|
+ position: relative;
|
|
|
+ background-color: #fff;
|
|
|
border-radius: 16rpx;
|
|
|
padding: 30rpx;
|
|
|
- margin-bottom: 20rpx;
|
|
|
+ margin: 20rpx 30rpx;
|
|
|
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
|
|
|
}
|
|
|
|
|
|
.product-header {
|
|
|
display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
margin-bottom: 20rpx;
|
|
|
}
|
|
|
|
|
|
.product-image {
|
|
|
- width: 120rpx;
|
|
|
- height: 120rpx;
|
|
|
- border-radius: 10rpx;
|
|
|
+ width: 180rpx;
|
|
|
+ height: 180rpx;
|
|
|
+ border-radius: 12rpx;
|
|
|
margin-right: 20rpx;
|
|
|
}
|
|
|
|
|
|
@@ -266,133 +515,120 @@ onReachBottom(() => {
|
|
|
flex: 1;
|
|
|
}
|
|
|
|
|
|
-.nameweight{
|
|
|
+.nameweight {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
margin-bottom: 20rpx;
|
|
|
}
|
|
|
+
|
|
|
.product-name {
|
|
|
font-size: 28rpx;
|
|
|
+ font-weight: bold;
|
|
|
color: #333;
|
|
|
- display: block;
|
|
|
+ flex: 1;
|
|
|
+ margin-right: 20rpx;
|
|
|
}
|
|
|
+
|
|
|
.product-weight {
|
|
|
- background-color: rgba(197, 128, 3, 0.10);
|
|
|
- color: #C58003;
|
|
|
- font-size: 24rpx;
|
|
|
- padding: 8rpx 16rpx;
|
|
|
- border-radius: 8rpx;
|
|
|
- float: right;
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #999;
|
|
|
+ background: #f5f5f5;
|
|
|
+ padding: 4rpx 12rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
}
|
|
|
|
|
|
.price-info {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- margin-bottom: 8rpx;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
}
|
|
|
|
|
|
-.label {
|
|
|
+.price-info .label {
|
|
|
font-size: 24rpx;
|
|
|
- color: #666666;
|
|
|
+ color: #666;
|
|
|
+ margin-right: 10rpx;
|
|
|
+ min-width: 60rpx;
|
|
|
}
|
|
|
|
|
|
-.value {
|
|
|
- color: #FD5F3C;
|
|
|
- font-size: 32rpx;
|
|
|
- .unit{
|
|
|
- font-size: 24rpx;
|
|
|
- }
|
|
|
+.price-info .value {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #e64340;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
+.price-info .unit {
|
|
|
+ font-size: 20rpx;
|
|
|
}
|
|
|
|
|
|
-/* 销售数据样式 */
|
|
|
.product-stats {
|
|
|
display: flex;
|
|
|
- margin-bottom: 20rpx;
|
|
|
- gap: 10rpx;
|
|
|
+ gap: 30rpx;
|
|
|
+ margin-top: 10rpx;
|
|
|
}
|
|
|
|
|
|
-.stat {
|
|
|
+.product-stats .stat {
|
|
|
font-size: 24rpx;
|
|
|
- color: #666;
|
|
|
- padding: 10rpx;
|
|
|
- background-color: #F5F7FA;
|
|
|
- border-radius: 8rpx;
|
|
|
+ color: #999;
|
|
|
}
|
|
|
|
|
|
-/* 操作按钮样式 */
|
|
|
.action-buttons {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- gap: 30rpx;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ gap: 20rpx;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ border-top: 1rpx solid #f0f0f0;
|
|
|
}
|
|
|
|
|
|
.btn {
|
|
|
+ font-size: 28rpx;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ background: transparent;
|
|
|
flex: 1;
|
|
|
height: 60rpx;
|
|
|
line-height: 60rpx;
|
|
|
- border-radius: 8rpx;
|
|
|
- font-size: 28rpx;
|
|
|
- border: none;
|
|
|
}
|
|
|
|
|
|
.btn-delete {
|
|
|
- background: #FEEAEA;
|
|
|
color: #F52929;
|
|
|
+ background-color: #FEEAEA;
|
|
|
}
|
|
|
+
|
|
|
.btn-offline {
|
|
|
- background: #F5F7FA;
|
|
|
- color: #333;
|
|
|
+ color: #333333;
|
|
|
+ background-color: #F5F7FA;
|
|
|
}
|
|
|
|
|
|
.btn-edit {
|
|
|
- background: #F8C008;
|
|
|
- color: #333;
|
|
|
+ color: #333333;
|
|
|
+ background-color: #F8C008;
|
|
|
}
|
|
|
-.no-data {
|
|
|
- margin: 150rpx auto 0;
|
|
|
- text-align: center;
|
|
|
|
|
|
- img {
|
|
|
- width: 65%;
|
|
|
- height: auto;
|
|
|
- }
|
|
|
+/* 搜索栏样式 */
|
|
|
+.search-bar {
|
|
|
+ background-color: #fff;
|
|
|
+ position: sticky;
|
|
|
+ top: 0;
|
|
|
+ z-index: 100;
|
|
|
+ padding: 20rpx 30rpx 0;
|
|
|
}
|
|
|
-.mores-txt {
|
|
|
- width: 100%;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- height: 70rpx;
|
|
|
- color: #999;
|
|
|
- font-size: 24rpx;
|
|
|
|
|
|
- .iconfont {
|
|
|
- margin-top: 2rpx;
|
|
|
- font-size: 20rpx;
|
|
|
- }
|
|
|
-}
|
|
|
.search-bar-con {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- background-color: #fff;
|
|
|
- border-bottom: 1rpx solid #eee;
|
|
|
+ padding-bottom: 20rpx;
|
|
|
}
|
|
|
|
|
|
.search-input-wrapper {
|
|
|
- flex: 1;
|
|
|
- position: relative;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- background-color: #F9F7F0;
|
|
|
- border-radius: 16rpx;
|
|
|
- height: 72rpx;
|
|
|
- line-height: 72rpx;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ border-radius: 50rpx;
|
|
|
padding: 0 20rpx;
|
|
|
- box-sizing: border-box;
|
|
|
+ height: 70rpx;
|
|
|
}
|
|
|
|
|
|
.search-icon {
|
|
|
- margin-right: 20rpx;
|
|
|
+ margin-right: 10rpx;
|
|
|
}
|
|
|
|
|
|
.search-input {
|
|
|
@@ -408,8 +644,44 @@ onReachBottom(() => {
|
|
|
}
|
|
|
|
|
|
.clear-btn {
|
|
|
- padding: 10rpx;
|
|
|
+ width: 40rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ background: #e0e0e0;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
margin-left: 10rpx;
|
|
|
}
|
|
|
|
|
|
+/* 加载状态 */
|
|
|
+.loadingicon {
|
|
|
+ text-align: center;
|
|
|
+ color: #999;
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding: 30rpx 0;
|
|
|
+}
|
|
|
+
|
|
|
+/* 无数据状态 */
|
|
|
+.no-data {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 100rpx 0;
|
|
|
+}
|
|
|
+
|
|
|
+.no-data image {
|
|
|
+ width: 300rpx;
|
|
|
+ height: 300rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.mores-txt {
|
|
|
+ text-align: center;
|
|
|
+ color: #999;
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding: 30rpx 0 60rpx;
|
|
|
+ border-top: 1rpx solid #f0f0f0;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
</style>
|