@@ -111,6 +117,9 @@
+
+
+
@@ -241,11 +250,13 @@ const formInline = reactive({
goodSpecs: "",
salePrice: 1,//销售价格-单规格
stock: 1,//库存数量-单规格
+ stockWarnCount: 1,//库存预警数量-单规格
netContent: 1,//净含量-单规格
unit: "kg",//净含量单位-单规格
netWeight: [ //多规格集合
{
goodSpecs: "",
+ stockWarnCount:1, //库存预警数量-多规格
goodPrice: 1,
goodStock: 1,
netContent: 1,
diff --git a/src/views/goods/goodsManage/index.vue b/src/views/goods/goodsManage/index.vue
index 1d4b9c4..dfdf5d3 100644
--- a/src/views/goods/goodsManage/index.vue
+++ b/src/views/goods/goodsManage/index.vue
@@ -135,20 +135,27 @@ const resetForm = () => {
let activeCurrent = ref("1");
let bottomList = reactive([
{ title: "全部", id: "1", value: "" },
+ { title: "待上架", id: "0", value: "" },
{ title: "已上架", id: "2", value: "" },
{ title: "已下架", id: "3", value: "" },
+ { title: "库存告急", id: "4", value: "" },
]);
const tabChange = (Event) => {
- if (Event.index == "0") {
- // 请求全部
- formInline.type = "1";
- } else if (Event.index == "1") {
- // 请求已上架
- formInline.type = "2";
- } else if (Event.index == "2") {
- // 请求已下架
- formInline.type = "3";
- }
+ console.log(Event.index);
+ formInline.type = bottomList[Event.index].id;
+ // if (Event.index == "0") {
+ // // 请求全部
+ // formInline.type = "1";
+ // } else if (Event.index == "1") {
+ // // 请求待上架
+ // formInline.type = "0";
+ // } else if (Event.index == "2") {
+ // // 请求已下架
+ // formInline.type = "3";
+ // } else if (Event.index == "3") {
+ // // 请求库存告急
+ // formInline.type = "4";
+ // }
loadData();
};
@@ -364,8 +371,10 @@ const getGoodsManageCount = async () => {
let response = await getGoodManageCount();
if (response.code == 200) {
bottomList[0].value = `(${response.data?.allGoodCount ?? ""})`;
- bottomList[1].value = `(${response.data?.alreadyListedCount ?? ""})`;
- bottomList[2].value = `(${response.data?.removedCount ?? ""})`;
+ bottomList[1].value = `(${response.data?.readyListedCount ?? ""})`;
+ bottomList[2].value = `(${response.data?.alreadyListedCount ?? ""})`;
+ bottomList[3].value = `(${response.data?.removedCount ?? ""})`;
+ bottomList[4].value = `(${response.data?.stockWaringCount ?? ""})`;
}
} catch (error) { }
};