lxf 1 year ago
parent
commit
1b8a4d7eb1
1 changed files with 16 additions and 0 deletions
  1. 16 0
      src/views/group/data-board/sales-volume/index.vue

+ 16 - 0
src/views/group/data-board/sales-volume/index.vue

@@ -55,6 +55,14 @@ const config = computed(() => {
   return [
   return [
     {
     {
       attrs: {
       attrs: {
+        label: "序号",
+        prop: "index",
+        width: 60,
+        align: "center",
+      },
+    },
+    {
+      attrs: {
         label: "SKU品号",
         label: "SKU品号",
         prop: "skuSpecCode",
         prop: "skuSpecCode",
         width: 160,
         width: 160,
@@ -94,6 +102,14 @@ const getList = (req, status) => {
   }
   }
   loading.value = true;
   loading.value = true;
   proxy.post("/salesBoard/getBzSkuSpecSalesPage", sourceList.value.pagination).then((res) => {
   proxy.post("/salesBoard/getBzSkuSpecSalesPage", sourceList.value.pagination).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      res.rows = res.rows.map((item, index) => {
+        return {
+          ...item,
+          index: index + 1,
+        };
+      });
+    }
     sourceList.value.data = res.rows;
     sourceList.value.data = res.rows;
     sourceList.value.pagination.total = res.total;
     sourceList.value.pagination.total = res.total;
     setTimeout(() => {
     setTimeout(() => {