Forráskód Böngészése

Merge remote-tracking branch 'origin/developerM' into developer

zhengjinyi 9 hónapja
szülő
commit
6ae1c71f18

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

@@ -108,6 +108,8 @@ public class SupplierPageController extends BaseController {
     private static final String ENCYCLOPEDIA_PREVIEW = "supplier-center/encyclopedia/preview";
     /** 供应商采美数据报表页面 */
     private static final String SHOP_CHARTS = "supplier-center/encyclopedia/charts";
+    /** 供应商优惠券核销 */
+    private static final String COUPON_WRITE = "supplier-center/shop/coupon-write";
 
     /** 我的采美 */
     @GetMapping("/supplier/dashboard.html")
@@ -228,6 +230,12 @@ public class SupplierPageController extends BaseController {
         return ORDER_EDIT;
     }
 
+    /** 订单优惠券核销 */
+    @GetMapping("/supplier/coupon-write.html")
+    public String couponWrite() {
+        return COUPON_WRITE;
+    }
+
     /** 员工管理 */
     @GetMapping("/supplier/operation/list.html")
     public String operationList() {

+ 8 - 1
src/main/resources/static/css/base/base.pc.css

@@ -136,7 +136,7 @@ iframe{width:320px !important;height: 280px !important}
 .baseHeadCenter .hotKey{color:#50607A;font-size:12px;line-height:36px;box-sizing: border-box;padding-left: 0;}
 .baseHeadCenter .hotKey .word{padding:0 8px;font-style:normal;cursor:pointer;}
 .baseHeadCenter .hotKey .word:hover{color:#FF5B00}
-.baseHeadCenter .searchAi-pc{height: 44px;position: absolute;right: -110px;letter-spacing:1px; padding: 0 15px;border: 1px solid #e0e0e0;border-radius: 4px;display: flex;justify-content: center;font-size: 18px;font-weight: 600;cursor: pointer;line-height: 42px;top: 0;align-items: center; }
+.baseHeadCenter .searchAi-pc{height: 42px;position: absolute;right: -110px;letter-spacing:1px; padding: 0 15px;border: 2px solid #e0e0e0;border-radius: 8px;display: flex;justify-content: center;font-size: 18px;font-weight: 600;cursor: pointer;line-height: 42px;top: 0;align-items: center; }
 .baseHeadCenter .searchAi-pc:hover{background-color: #f7f7f7;}
 .baseHeadCenter .searchAi-pc img{ width: 24px;height: 24px;display: block;}
 .baseHeadCenter .searchAi-pc .ai-tips{position: absolute;top: -8px;right: -20px;height: 16px;line-height: 16px;color: #fff;letter-spacing:normal;background: linear-gradient(98deg, #1ceaf7, #196eff);font-size: 12px;z-index: 999;transform: scale(0.85);padding: 1px 2px;border-radius: 2px;display: inline-block;}
@@ -668,6 +668,13 @@ iframe{width:320px !important;height: 280px !important}
 }
 .cm_ai_container_records .cm_ai_records_user .name{
     margin-left: 8px;
+    -o-text-overflow: ellipsis;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    word-break: break-all;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 1;
+    overflow: hidden;
 }
 .cm_ai_container_main{
     width: calc(100% - 240px);

+ 4 - 4
src/main/resources/static/css/index/index_new.pc.css

@@ -31,7 +31,7 @@ li{list-style:none;}
     align-items: center;
 }
 .quickOperation .el-carousel {
-    width: 1336px;
+    width: 1184px;
 }
 .quickOperation .el-carousel .el-carousel__button {
     width: 14px;
@@ -92,7 +92,7 @@ li{list-style:none;}
     padding-top: 10px;
 }
 .quickOperation .carousel-list .list:hover .card {
-    border: 1px solid #FF5B00;
+    border: 3px solid #FF5B00;
 }
 .quickOperation .carousel-list .list .card .card-content {
     width: 100%;
@@ -164,9 +164,9 @@ li{list-style:none;}
 /* 楼层 */
 .section_container{width:100%;height:auto;float:left}
 .section_container .inner{width:1184px;margin:0 auto}
-.section_left{width:900px;float:left;padding-top:40px;}
+.section_left{width:900px;float:left;padding-top:10px;}
 /*右边区域*/
-.section_right{width:284px;float:right;box-sizing:border-box;padding-top:40px}
+.section_right{width:284px;float:right;box-sizing:border-box;padding-top:10px}
 .section_right .section_right_item{width:284px;height:auto;background-color:#FFFFFF;float:left;margin-bottom:16px;padding:16px;box-sizing:border-box;border-radius:8px}
 .section_right .section_right_item.ross{width:284px;height:343px;color: #FFFFFF;padding:0;cursor: pointer}
 .section_right .section_right_item.ross.none{display: none;}

+ 1 - 1
src/main/resources/static/css/product/detail.pc.css

@@ -6,7 +6,7 @@ li{list-style:none;}
 .productShopBox{width: 100%;box-sizing: border-box;height: 80px;padding: 0 16px;margin: 16px auto;background: #FFFFFF;border-radius: 16px;display: flex;flex-direction: row;justify-content: space-between;align-items: center;}
 .productShopBox a:hover{ color: #333333;}
 .productShopBox .shop-item{ display: flex;flex: 1;flex-direction: row;align-items: center; }
-.productShopBox .shopBox-logo{ width: 60px;height: 60px;border-radius: 30px;overflow: hidden;margin-right: 12px;background:rgba(0,0,0,0.02);}
+.productShopBox .shopBox-logo{ width: 60px;height: 60px;border-radius: 30px;overflow: hidden;margin-right: 12px;background:rgba(0,0,0,0.02);border: 1px solid #F7F7F7;}
 .productShopBox .shopBox-logo img{ width: 60px;height: 60px;border-radius: 30px;}
 .productShopBox .shopBox-content{ display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-webkit-flex-direction: column;-moz-box-orient: vertical;-moz-box-direction: normal;flex-direction: column }
 .productShopBox .shopBox-name{ font-weight: 600;font-size: 16px;line-height: 24px;color: #11192d;margin-right: 16px;}

+ 61 - 0
src/main/resources/static/css/supplier-center/shop/coupon-write.css

@@ -0,0 +1,61 @@
+ @media screen and (min-width:768px) {
+     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: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: left;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;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07)}
+    .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;}
+}

+ 7 - 3
src/main/resources/static/js/mixins/cmAiMixins.js

@@ -257,9 +257,13 @@ var cmAiMixins = function() {
             },
             // 查询记录
             async getChatHistory() {
-                const data = await this.userNewChatHistory(this.chatHistoryParams)
-                console.log('chatHistory', data)
-                this.chatHistory = data
+                try {
+                    const data = await this.userNewChatHistory(this.chatHistoryParams)
+                    console.log('chatHistory', data)
+                    this.chatHistory = data
+                } catch (error) {
+                    console.log('Error history:', error);
+                }
             },
             // 查询详情
             async handleChatDetail(chatId) {

+ 117 - 0
src/main/resources/static/js/supplier-center/shop/coupon-write.js

@@ -0,0 +1,117 @@
+var settlement = new Vue({
+    el:'#settlement',
+    mixins: [cmSysVitaMixins],
+    data:{
+        listQuery:{
+            shopId:'',
+            pageNum: 1,
+            pageSize: 10,
+            shopOrderNo:'',
+            name: '',
+            settlestatus:'',
+            refundStatus:'',
+            beginTime:'',
+            endTime:''
+        },
+        listLoading: 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();
+        },
+        //导出
+        downloadExportExcel(){
+            const _this = this;
+            CAIMEI.Modal('确定导出当前数据?','取消','确定',function () {
+                _this.exportExcel()
+            })
+        },
+        // 下载
+        exportExcel(){
+            const _this = this;
+            const NODE_ENV_BASE_URL = $("#coreServer").val();
+            const xhr = new XMLHttpRequest();
+            xhr.open('POST', `${NODE_ENV_BASE_URL}/order/shop/exportExcel`, true);     // 请求方式,看具体接口情况决定
+            xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');  // 内容类型,看具体接口情况决定
+            xhr.withCredentials = true;
+            xhr.responseType = "blob";  // 返回类型blob
+            // 发送ajax请求
+            xhr.send(`shopId=${this.listQuery.shopId}&shopOrderNo=${this.listQuery.shopOrderNo}&name=${this.listQuery.name}&settlestatus=${this.listQuery.settlestatus}&beginTime=${this.listQuery.beginTime}&endTime=${this.listQuery.endTime}`); // 数据格式,看具体接口情况决定
+            // 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
+            xhr.onload = function () {
+                // 请求完成
+                if (this.status === 200) {
+                    // 返回200
+                    let blob = this.response;
+                    const link = document.createElement('a')
+                    link.href = URL.createObjectURL(blob)
+                    link.download =`采美结算列表${_this.getNowDate()}.xlsx`
+                    document.body.appendChild(link)
+                    link.click()
+                    document.body.removeChild(link)
+                }
+            };
+            xhr.onerror = function() {alert("数据导出失败")};
+        },
+        getNowDate() {
+            const timeOne = new Date()
+            const year = timeOne.getFullYear()
+            let month = timeOne.getMonth() + 1
+            let day = timeOne.getDate()
+            month = month < 10 ? '0' + month : month
+            day = day < 10 ? '0' + day : day
+            return `${year}${month}${day}`
+        },
+        getList () {//获取结算列表数据
+            const _this = this;
+            SupplierApi.settlementList(_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();
+        $('.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");
+
+    }
+})

+ 1 - 1
src/main/resources/templates/error/404.html

@@ -36,7 +36,7 @@
                 color: #fff;
                 display: inline-block;
                 line-height: 44px;
-                border-radius: 2px;
+                border-radius: 22px;
             }
 
 

+ 13 - 13
src/main/resources/templates/index.html

@@ -86,21 +86,21 @@
             </van-swipe-item>
         </van-swipe>
     </div>
-    <div id="new-container" class="section_container" v-if="newsList.length>0">
-        <div class="inner">
-            <div class="new-label">公告:</div>
-            <div class="new-list">
-                <a href="javascript:void(0)" class="new-li" v-for="(list ,index) in newsList" :key="index" @click="hanldDetails(list.id)">
-                    <span class="new-icon"></span>
-                    <p v-text="list.title"></p>
-                </a>
-            </div>
-            <a href="/news.html" class="new-more"> 更多>> </a>
-        </div>
-    </div>
+<!--    <div id="new-container" class="section_container" v-if="newsList.length>0">-->
+<!--        <div class="inner">-->
+<!--            <div class="new-label">公告:</div>-->
+<!--            <div class="new-list">-->
+<!--                <a href="javascript:void(0)" class="new-li" v-for="(list ,index) in newsList" :key="index" @click="hanldDetails(list.id)">-->
+<!--                    <span class="new-icon"></span>-->
+<!--                    <p v-text="list.title"></p>-->
+<!--                </a>-->
+<!--            </div>-->
+<!--            <a href="/news.html" class="new-more"> 更多>> </a>-->
+<!--        </div>-->
+<!--    </div>-->
     <!--  快捷运营  -->
     <div class="quickOperation" v-if="quickoperaList.length > 0 && isPC" v-cloak>
-        <el-carousel :autoplay="false" indicator-position="outside">
+        <el-carousel :autoplay="false" indicator-position="outside" arrow="never">
             <el-carousel-item v-for="(item, index) in quickoperaList" :key="item">
                 <div class="carousel-list">
                     <div class="list" v-for="(i, o) in item" :key="o" @click="goQuickOpera(i)">

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

@@ -19,6 +19,7 @@
             <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>-->
         </div>
     </div>
     <div class="navList">

+ 93 - 0
src/main/resources/templates/supplier-center/shop/coupon-write.html

@@ -0,0 +1,93 @@
+<!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>采美365网-我的店铺-优惠券核销</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/coupon-write.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="settlement">
+    <div class="navLayout" v-cloak>
+        <div class="crumbs" v-if="isPC">
+            <span>我的店铺</span>
+            <span>&gt;</span>
+            <span>优惠券核销</span>
+        </div>
+        <div class="wrap clear">
+            <!--左侧面包屑-->
+            <template th:replace="supplier-center/components/tableft"></template>
+            <div class="right">
+                <div class="main-content">
+                    <el-table
+                            :data="list"
+                            v-loading="listLoading"
+                            element-loading-text="Loading"
+                            border
+                            fit
+                            height="600px"
+                            highlight-current-row
+                            :header-cell-style="{background:'#E1E1E1',color:'#606266'}"
+                    >
+                        <el-table-column label="优惠券编号" align="center" prop="shopOrderNo" >
+                            <template slot-scope="{row}">
+                                {{ row.shopOrderNo}}
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="创建时间" align="center" prop="orderTime">
+                            <template slot-scope="{row}">
+                                {{ row.orderTime}}
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="使用时间" align="center" prop="orderTime">
+                            <template slot-scope="{row}">
+                                {{ row.orderTime}}
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="买家名称" align="center" prop="name">
+                            <template slot-scope="{row}">
+                                {{ row.name}}
+                            </template>
+                        </el-table-column>
+                        <el-table-column label="操作" align="center" >
+                            <template slot-scope="{row}">
+                                <el-button type="success" style="margin: 2px;" size="mini" >核销</el-button>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </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>
+</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/coupon-write.js(v=${version})}"></script>
+</body>
+</html>