Explorar o código

供应商推广查看

zhengjinyi hai 1 mes
pai
achega
17ec94f38a

+ 8 - 0
src/main/java/com/caimei/www/controller/authorized/supplier/SupplierPageController.java

@@ -110,6 +110,8 @@ public class SupplierPageController extends BaseController {
     private static final String SHOP_CHARTS = "supplier-center/encyclopedia/charts";
     /** 供应商优惠券核销 */
     private static final String COUPON_WRITE = "supplier-center/shop/coupon-write";
+    /** 供应商推广中心数据 */
+    private static final String SHOP_TASK = "supplier-center/shop/task";
 
     /** 我的采美 */
     @GetMapping("/supplier/dashboard.html")
@@ -308,6 +310,12 @@ public class SupplierPageController extends BaseController {
         return FREIGHT_LIST;
     }
 
+    /** 推广数据 */
+    @GetMapping("/supplier/task.html")
+    public String taskList(){
+        return SHOP_TASK;
+    }
+
     /** 商品预览 */
     @GetMapping("/supplier/goods/preview.html")
     public String goodsPreview() {

+ 65 - 0
src/main/resources/static/css/supplier-center/shop/task.css

@@ -0,0 +1,65 @@
+ @media screen and (min-width:768px) {
+     .wrap.settlement{box-sizing: border-box;padding: 0 30px; }
+     .navLayout .left{float: left;width:11%;}
+     .navLayout .right{float: right;width:88%;}
+     table, td, th{border: none;}
+    .pageWrap{width: 968px;margin: auto;padding: 32px 0}
+    .crumbs{color: #22272e;font-size: 16px;}
+     .head-top{overflow: hidden;background: #fff;padding:10px 17px;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);border-radius: 8px;}
+     .head-top .form-row {float: left; height: 40px;font-size: 12px;color: #627386;line-height: 40px;margin-right: 10px;margin-bottom: 10px}
+     .state {width: 158px !important;}
+     .state.small{width: 170px;margin: 0 8px;}
+     .head-top .form-row .time {width: 185px !important;}
+     input::placeholder{color: #9aa5b5;font-size: 12px;}
+     #newBtn div{height: 36px;border-radius: 2px;display: inline-block;text-align: center;cursor: pointer}
+     #newBtn{float: right;margin: 0;}
+    .query-btn{ width: 90px; height: 36px; background-color: #FF5B00;border-radius: 2px;text-align: center;color: #fff;line-height: 36px;cursor: pointer;float: left;margin: 0 5px;}
+    .main-content{padding: 0;background: #fff; margin-top: 10px;border-radius: 8px;overflow: hidden;}
+    .main-content .a-line{text-decoration: underline;}
+    .main-title{height: 55px;line-height: 55px;border-bottom: solid 1px #e2e7ef;color: #627386;}
+    .main-title li{list-style: none;display: inline-block;width: 10%; text-align: center}
+    .main-title li.samewidth{width: 15%;}
+    .main-title li:nth-child(4){width: 20%}
+    .mentlist ul li{list-style: none;display: inline-block;font-size: 12px;text-align: center;width: 10%;vertical-align: middle; line-height: 20px;color: #22272e;}
+    .mentlist ul{padding: 10px 0;margin-bottom: 30px}
+    .mentlist li.samewidth{width: 15%;}
+    .mentlist li:nth-child(4){width: 20%;vertical-align: middle; word-break: break-all;overflow: hidden;text-overflow: ellipsis;display: -webkit-inline-box;
+    -webkit-line-clamp: 2; -webkit-box-orient: vertical;}
+    .samewidth a{text-decoration: underline;color: #1890f9;}
+    .status-red{color: #f94b4b;}
+    .status-blue{color: #1890f9;}
+    .status-yellow{color: #f9a94b;}
+    .air{position: relative;min-height: 600px}
+    .air img{position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto; width: 221px;height: 180px}
+    .empty{background: #fff;margin-top: 10px;border-radius: 8px;}
+    .navLayout{min-height: auto;}
+    ::-webkit-scrollbar{ height: 6px;}
+    .pagination{width: 100%;margin-top: 10px;background: #FFFFFF;padding: 8px 20px;box-sizing: border-box;border-radius: 8px;}
+ }
+
+/* 移动*/
+
+@media screen and (max-width: 768px){
+    #settlement{ padding-top: 27vw; }
+    table, td, th{border: none;}
+    .head-top{padding: 3vw 0;background: #fff;}
+    .head-top .form-row{margin:1.5vw 0;color: #627386;float: left;width: 50%;}
+    .head-top .form-row.time{width: 100%;box-sizing: border-box;padding: 0 2vw;}
+    .state {width: 92% !important;margin: 0 2vw;}
+    .head-top .form-row .time {width: 47.2% !important;}
+    #newBtn{float: left;margin: 2vw;}
+    .main-content{padding-bottom: 15vw;}
+    .content-list .list{padding: 3.3vw;background: #fff;margin: 2.7vw 0}
+    .content-list div div{margin: 2.7vw 0}
+    .content-list span{color: #9aa5b5;font-size: 3.2vw;line-height: 6.4vw}
+    .content-list p{color: #22272e;font-size: 3.4vw}
+    .order-name p{width: 89vw;overflow: hidden;display: block;text-overflow: ellipsis;white-space: nowrap}
+    .order-price span,.order-info span{display: inline-block;width: 28%;}
+    .order-info span:nth-child(3){width: 41%}
+    .OrderNo p{color: #FF5B00}
+    .content-list .status-red{color: #f94b4b;}
+    .content-list .status-blue{color: #1890f9;}
+    .content-list .status-yellow{color: #f9a94b;}
+    footer{display: none;}
+    .pagination{width: 100%;min-height: 2vw;position: fixed;bottom: 0;left: 0;background: #FFFFFF;z-index: 99;padding: 2vw;box-sizing: border-box;}
+}

+ 1 - 1
src/main/resources/static/js/base.js

@@ -381,7 +381,7 @@ const globalFot = new Vue({
         if (globalUserData.token) {
             this.userInfo = globalUserData;
             setTimeout(function () {
-                if(this.userInfo.userIdentity!== 3){
+                if(_self.userInfo.userIdentity!== 3){
                     // 获取头部购物车数据
                     _self.getHeadCart(_self.userInfo.userId);
                 }

+ 11 - 0
src/main/resources/static/js/common/serviceapi/supplier.service.js

@@ -1213,6 +1213,17 @@ var SupplierApi = {
             }).then(function (res) {
                 callback(res);
             });
+        },
+        // 供应商商品推广数据
+        getShopTaskList: function (params, callback) {
+            Http.AjaxService({
+                url: '/user/seller/shop/taskList',
+                type:'get',
+                data:params,
+                json:false,
+            }).then(function (res) {
+                callback(res);
+            });
         }
 
 };

+ 71 - 0
src/main/resources/static/js/supplier-center/shop/task.js

@@ -0,0 +1,71 @@
+var settlement = new Vue({
+    el:'#taskContent',
+    mixins: [cmSysVitaMixins],
+    data:{
+        listQuery:{
+            shopId:'',
+            pageNum: 1,
+            pageSize: 10,
+        },
+        listLoading: true,
+        isLoading: true,
+        list:[],
+        total:0,
+        layout: 'total, sizes, prev, pager, next, jumper',
+    },
+    computed: {
+        disabled() {
+            return !(this.list.length > 0)
+        }
+    },
+    filters: {
+        NumFormat: function (text) {//处理金额
+            return Number(text).toFixed(2);
+        },
+        payStatusType:function(value) {
+            if (value === 1) {
+                return '待结算';
+            } else if (value === 2) {
+                return '部分结算';
+            } else {
+                return '已结算';
+            }
+        }
+    },
+    methods:{
+        handleCurrentChange(val){
+            this.listQuery.pageNum = val;
+            this.getList();
+        },
+        getList () {//获取结算列表数据
+            const _this = this;
+            SupplierApi.getShopTaskList(this.listQuery,function (response) {
+                if(response.code===0){
+                    const data = response.data;
+                    _this.list = data.list;
+                    _this.total = data.total;
+                    _this.listLoading = false
+                }else{
+                    _this.listLoading = false
+                    CAIMEI.Alert(response.msg, '确定', false);
+                }
+            })
+        },
+    },
+    mounted:function () {
+        if(globalUserData){
+            this.listQuery.shopId = globalUserData.shopId;
+        }
+        if(isPC){
+            this.layout ='total, prev, pager, next, jumper';
+        }else{
+            this.layout ='total, prev, pager, next';
+        }
+        this.getList();
+        this.isLoading = false
+        setTimeout(()=>{
+            $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
+            $('.navLayout').find('.navList').eq(1).addClass("on").find('.con').show().find('a').eq(6).addClass("on");
+        },200)
+    }
+})

+ 2 - 1
src/main/resources/templates/supplier-center/components/tableft.html

@@ -19,7 +19,8 @@
             <a href="/supplier/goods.html">我的商品</a>
             <a href="/supplier/brand.html">品牌管理</a>
             <a href="/supplier/freight.html">运费模板管理</a>
-<!--            <a href="/supplier/coupon-write.html">优惠券核销</a>-->
+            <a href="/supplier/task.html">推广中心</a>
+            <!--            <a href="/supplier/coupon-write.html">优惠券核销</a>-->
         </div>
     </div>
     <div class="navList">

+ 98 - 0
src/main/resources/templates/supplier-center/shop/task.html

@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="zh-CN" xmlns:th="https://www.thymeleaf.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="https://www.thymeleaf.org ">
+<head>
+    <title>我的交易-结算管理</title>
+    <template th:replace="components/head-link"></template>
+    <link th:href="@{/css/base/center.css(v=${version})}" rel="stylesheet" type="text/css">
+    <link th:href="@{/css/supplier-center/shop/task.css(v=${version})}" rel="stylesheet" type="text/css">
+    <!--element ui 样式表-->
+    <link rel="stylesheet" href="https://unpkg.zhimg.com/element-ui@2.15.13/lib/theme-chalk/index.css"/>
+    <link rel="stylesheet" href="/lib/element-ui/element-ui-min.css"/>
+    <template th:replace="components/analysis"></template>
+</head>
+<body>
+<!-- 引用头部 -->
+<template th:replace="components/header"></template>
+
+<!-- 我的采美 -->
+<div id="taskContent">
+    <div v-if="isLoading" class="loading" :style="{opacity: isLoading ? '1' :'0'}">
+        <img src="/img/base/loading.gif">
+    </div>
+    <template v-else>
+        <div class="navLayout">
+            <div class="crumbs" v-if="isPC"></div>
+            <div class="wrap clear task">
+                <!--左侧面包屑-->
+                <template th:replace="supplier-center/components/tableft"></template>
+                <div class="right">
+                    <div class="head-top clear">
+                        <div id="newBtn">
+                            <el-button type="primary" @click="getList" round>查询</el-button>
+                        </div>
+                    </div>
+                    <div class="main-content" v-if="list.length>0">
+                        <el-table
+                                :data="list"
+                                v-loading="listLoading"
+                                element-loading-text="Loading"
+                                border
+                                fit
+                                height="572px"
+                                highlight-current-row
+                                :header-cell-style="{background:'#E1E1E1',color:'#606266'}"
+                        >
+                            <el-table-column label="推广商品ID" align="center" prop="productId" width="100">
+                                <template slot-scope="{row}">
+                                    {{ row.productId}}
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="推广商品图片" align="center" prop="mainImage">
+                                <template slot-scope="{row}">
+                                    <img :src="row.mainImage" :alt="row.productName" style="width: 60px;height: 60px;">
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="推广商品名称" align="center" prop="productName">
+                                <template slot-scope="{row}">
+                                    {{ row.productName}}
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="推广浏览量" align="center" prop="countNum">
+                                <template slot-scope="{row}">
+                                    {{ row.countNum ? row.countNum : '0' }}
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                    </div>
+                    <div v-else class="empty">
+                        <img src="/img/order/icon-set.svg"/>
+                        <div class="msg"><p>暂无数据</p></div>
+                    </div>
+                    <div class="pagination">
+                        <el-pagination
+                                background
+                                :small="false"
+                                @current-change="handleCurrentChange"
+                                :current-page="listQuery.pageNum"
+                                :page-size="listQuery.pageSize"
+                                :layout="layout"
+                                :total="total"
+                        >
+                        </el-pagination>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </template>
+</div>
+
+<!-- 引入底部 -->
+<template th:replace="components/footer"></template>
+<template th:replace="components/foot-link"></template>
+<script type="text/javascript" src="/lib/element-ui/element-ui.min.js"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/center.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/supplier.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/supplier-center/shop/task.js(v=${version})}"></script>
+</body>
+</html>