xiaodai2022 2 years ago
parent
commit
876114a6e0

+ 7 - 0
src/apis/service/youzan/othGoodLog/index.js

@@ -0,0 +1,7 @@
+// 物业管理员
+import http from "@/apis/axios";
+export default {
+ 
+  // 分页查询
+  list: (data, params) => http("youzan/yz_get_youzan_update_log", data, "post", params),
+};

+ 1 - 1
src/views/serviceParam/terrace/addEdit.vue

@@ -174,7 +174,7 @@ export default {
           }
           this.loading = false;
           if (res && res.code === 0) {
-            const title = this.id === "add" ? "添加成功!" : "修改成功!";
+            const title = this.id === "003" ? "添加成功!" : "修改成功!";
             this.$notify.success({
               title,
               message: "",

+ 335 - 0
src/views/youzan/othGoodLog/index.vue

@@ -0,0 +1,335 @@
+<template>
+  <div class="sort pagePadding">
+    <div v-if="powers && powers.length > 0 && powers.some((item) => item == '001')">
+      <ex-table
+        v-loading="loading"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="4" style="width: 140px">
+                <el-select
+                  v-model="parmValue.msg_type"
+                  filterable
+                  clearable
+                  :size="searchSize"
+                  placeholder="消息类型"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in msg_typeList"
+                    :key="'msg_type' + item.id"
+                    :label="item.label"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-col>
+              <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
+                <period-date-picker
+                  :type="1"
+                  :width="'135px'"
+                  :size="searchSize"
+                  :start="parmValue.start_date"
+                  :end="parmValue.end_date"
+                  @timeReturned="handleTime"
+                />
+              </el-col>
+
+              <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+                <el-button type="primary" :size="searchSize" @click="searchList">
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="3" class="fr" style="width: 66px; padding: 0 0 0 10px">
+                <el-button type="warning" :size="searchSize" @click="restSearch">
+                  重置
+                </el-button>
+              </el-col>
+            </el-row>
+          </div></template
+        >
+        <template #key_is_display="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="
+              (
+                is_display_list.find(
+                  (item) => item.id == scope.row.key_is_display + ''
+                ) || {}
+              ).type || 'info'
+            "
+            v-text="
+              (
+                is_display_list.find(
+                  (item) => item.id == scope.row.key_is_display + ''
+                ) || {}
+              ).label || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #msg_type="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="
+              (msg_typeList.find((item) => item.id == scope.row.msg_type + '') || {})
+                .type || '--'
+            "
+            v-text="
+              (msg_typeList.find((item) => item.id == scope.row.msg_type + '') || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+      </ex-table>
+    </div>
+    <no-auth v-else></no-auth>
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/service/youzan/othGoodLog";
+import roleLevel from "@/assets/js/roleLevel";
+import mixinPage from "@/mixins/elPaginationHandle";
+import { mapGetters } from "vuex";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "othGoodLog",
+  mixins: [mixinPage, resToken],
+
+  computed: {
+    //组件SIZE设置
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find((item) => item.menu_route == "othGoodLog") || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      msg_typeList: [
+        { id: "1", label: "商品上架", type: "success" },
+        { id: "2", label: "商品下架", type: "primary" },
+        { id: "3", label: "生成订单", type: "info" },
+        { id: "4", label: "商品删除", type: "danger" },
+        { id: "5", label: "商品编辑", type: "warning" },
+      ],
+      is_display_list: [
+        { id: "0", label: "上架", type: "success" },
+        { id: "1", label: "下架", type: "primary" },
+      ],
+      roleLevel: roleLevel,
+      loading: false,
+      sitem: {},
+      showRateModel: false,
+      modelRateId: "000",
+      sitemRate: {},
+      parmValue: {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        msg_type: "",
+        start_date: "",
+        end_date: "",
+      },
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "id",
+          label: "记录ID",
+        },
+        {
+          prop: "msg_type",
+          label: "数据类型",
+          _slot_: "msg_type",
+        },
+        {
+          prop: "key_item_id",
+          label: "有赞商品ID",
+        },
+        // {
+        //   prop: "key_alias",
+        //   label: "有赞商品别名",
+        // },
+        // {
+        //   prop: "key_kdt_id",
+        //   label: "有赞店铺ID",
+        // },
+        {
+          prop: "key_is_display",
+          label: "推送前状态",
+          _slot_: "key_is_display",
+        },
+        {
+          prop: "key_title",
+          label: "有赞商品名称",
+        },
+        {
+          prop: "key_price",
+          label: "有赞价格",
+        },
+        // {
+        //   prop: "key_channel",
+        //   label: "店铺类型", //0-网店,1:门店
+        // },
+        // {
+        //   prop: "key_barcode",
+        //   label: "有赞商品SKU码", //商品SKU维度的条形码,用于扫码快速搜索商品,使用场景如:扫码购、扫码搜索商品(只支持实物商品
+        // },
+        {
+          prop: "key_goods_no",
+          label: "采销商品编码", //商品编码,商家可以自定义参数,支持英文和数字组合
+        },
+        {
+          prop: "addtime",
+          label: "创建时间",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+  methods: {
+    restSearch() {
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.parmValue = {
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        msg_type: "",
+        start_date: "",
+        end_date: "",
+      };
+      this.searchList();
+    },
+    async handleTime(e) {
+      this.parmValue.start_date = e.startTime || "";
+      this.parmValue.end_date = e.endTime || "";
+      if (
+        (this.parmValue.start_date !== "" && this.parmValue.end_date !== "") ||
+        (this.parmValue.start_date === "" && this.parmValue.end_date === "")
+      ) {
+        this.pageInfo.curr = 1;
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
+    },
+    // 刷新表格
+    async searchList() {
+      if (this.loading) return;
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start === "" && this.parmValue.end !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.loading = true;
+      const { code, data } = await asyncRequest.list(this.parmValue);
+      if (code === 0) {
+        const { list, count } = data;
+
+        let arr = list;
+        arr.map((e) => {
+          for (let key in e.data) {
+            e[`key_${key}`] = e.data[key];
+          }
+          return e;
+        });
+        this.tableData = arr;
+        this.pageInfo.total = count;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.sort {
+  .my-breadcrumb {
+    .my-breadcrumb-item {
+      float: left;
+      span {
+        height: 32px;
+        line-height: 32px;
+      }
+      .label {
+        padding: 0 5px 0 0;
+        color: 010101;
+      }
+      .separator {
+        color: #787878;
+        font-size: 13px;
+        padding: 0 5px 0 0;
+      }
+      &:last-child {
+        .label {
+          color: #787878;
+        }
+      }
+      &:hover {
+        cursor: pointer;
+      }
+      &:last-child {
+        cursor: default;
+      }
+      &:only-child {
+        cursor: pointer;
+      }
+      // &.chover {
+      //   cursor: pointer;
+      // }
+    }
+  }
+}
+</style>

+ 0 - 0
src/views/youzan/othGoodLog/有赞商品推送


+ 18 - 26
src/views/youzan/othgoodsOffline/columns.js

@@ -28,12 +28,12 @@ const columns = [
     },
   
     {
-      prop: "updater",
+      prop: "creater",
       label: "操作人",
       minWidth: "155px",
     },
     {
-      prop: "updatetime",
+      prop: "addtime",
       label: "下线时间",
       minWidth: "155px",
     },
@@ -53,48 +53,40 @@ const columns = [
     {
       prop: "spuCode",
       label: "商品成本编号",
-      span: 8
+      span: 6
     },
     {
-      prop: "spuCode",
-      label: "上线商品编号",
-      span: 8
-    },
-    {
-      prop: "plat_code",
-      label: "平台商品编号",
-      span: 8
-    },
-    {
-      prop: "updatetime",
+      prop: "addtime",
       label: "下线时间",
-      span: 8
+      span: 6
     },
     {
-      prop: "platform_name",
-      label: "平台名称",
-      span: 8
+      prop: "creater",
+      label: "申请人",
+      span: 6
     },
     {
-      prop: "updater",
-      label: "申请人",
-      span: 8
+      prop: "result",
+      label: "下线原因",
+      span: 6
     },
-  
     
     {
       prop: "good_name",
       label: "商品名称",
-    },
-    {
-      prop: "result",
-      label: "下线原因",
+      span: 24
     },
     {
       prop: "offline_remark",
       label: "下线备注",
       span: 24
     },
+    {
+      prop: "children_list",
+      label: "下线商品信息",
+      span: 24,
+      _slot_:"children_list"
+    },
   ]
 
   export {

+ 14 - 2
src/views/youzan/othgoodsOffline/detail.vue

@@ -8,8 +8,20 @@
             v-if="newTime !== ''"
             :sitem="list"
             :columns="costArr"
-            :border="true"
           >
+            <template slot="children_list">
+              <el-table :data="list.children_list" size="mini" style="width: 100%">
+                <el-table-column prop="skuCode" label="商品上线编号" min-width="140">
+                </el-table-column>
+                <el-table-column prop="platform_name" label="平台名称" min-width="140">
+                </el-table-column>
+
+                <el-table-column prop="purchease" label="采购人" min-width="90">
+                </el-table-column>
+                <el-table-column prop="creater" label="创建人" min-width="90">
+                </el-table-column>
+              </el-table>
+            </template>
           </show-data-table>
         </el-tab-pane>
       </el-tabs>
@@ -51,7 +63,7 @@ export default {
       //数据
       list: {},
       parmValue: {
-        platform_youzan_id: this.$route.query.id,
+        id: this.$route.query.id,
       },
       activeName: "1",
       newTime: "",

+ 1 - 1
src/views/youzan/othgoodsOffline/index.vue

@@ -81,7 +81,7 @@
           >
             <i
               class="el-icon-view tb-icon"
-              @click="getRouter('othgoodsOfflineDetail', scope.row.platform_youzan_id)"
+              @click="getRouter('othgoodsOfflineDetail', scope.row.id)"
             ></i>
           </el-tooltip>
         </template>