浏览代码

Merge branch '成品安全库存看板' into 测试

lxf 1 年之前
父节点
当前提交
49679b1372
共有 1 个文件被更改,包括 81 次插入0 次删除
  1. 81 0
      src/views/group/data-board/safety-stock/index.vue

+ 81 - 0
src/views/group/data-board/safety-stock/index.vue

@@ -0,0 +1,81 @@
+<template>
+  <el-card class="box-card">
+    <byTable
+      :hidePagination="true"
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      highlight-current-row
+      :action-list="[
+        {
+          text: '刷新',
+          action: () => getList(),
+        },
+      ]"
+      :tableHeight="'calc(100vh - 192px)'"
+      @get-list="getList">
+    </byTable>
+  </el-card>
+</template>
+
+<script setup>
+import byTable from "/src/components/byTable/index";
+
+const { proxy } = getCurrentInstance();
+const sourceList = ref({
+  data: [],
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "SKU品号",
+        prop: "skuSpecCode",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "SKU品名",
+        prop: "skuSpecName",
+        "min-width": 320,
+      },
+    },
+    {
+      attrs: {
+        label: "日销售量",
+        prop: "dailySales",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "安全库存",
+        prop: "safetyStock",
+        width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "库存数量",
+        prop: "inventoryQuantity",
+        width: 160,
+      },
+    },
+  ];
+});
+const getList = ()=> {
+  loading.value = true;
+  proxy.post("/salesBoard/getBzSkuSalesBoard", {}).then((res) => {
+    sourceList.value.data = res;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+getList();
+</script>
+
+<style lang="scss" scoped></style>