Browse Source

V1.0.4运费模板

zhengjinyi 1 year ago
parent
commit
42a2f258d8
21 changed files with 928 additions and 585 deletions
  1. 6 2
      src/main/resources/static/css/supplier-center/dashboard.css
  2. 2 0
      src/main/resources/static/css/supplier-center/order/settlement.css
  3. 40 15
      src/main/resources/static/css/supplier-center/shop/freight.css
  4. 2 0
      src/main/resources/static/css/supplier-center/shop/goods.css
  5. 8 0
      src/main/resources/static/css/supplier-center/shop/release.css
  6. BIN
      src/main/resources/static/img/supplier/icon-freight-empty@2x.png
  7. 94 0
      src/main/resources/static/js/common/serviceapi/supplier.service.js
  8. 2 1
      src/main/resources/static/js/supplier-center/dashboard.js
  9. 49 192
      src/main/resources/static/js/supplier-center/shop/freight.js
  10. 1 34
      src/main/resources/static/js/supplier-center/shop/mixins/checkeMixins.js
  11. 416 0
      src/main/resources/static/js/supplier-center/shop/mixins/freightMixins.js
  12. 25 0
      src/main/resources/static/js/supplier-center/shop/mixins/releaseMixins.js
  13. 2 1
      src/main/resources/static/js/supplier-center/shop/release.js
  14. 2 0
      src/main/resources/templates/components/foot-link.html
  15. 3 0
      src/main/resources/templates/components/head-link.html
  16. 2 2
      src/main/resources/templates/index.html
  17. 1 1
      src/main/resources/templates/pay/caimei-paylist.html
  18. 10 1
      src/main/resources/templates/shopping/confirm.html
  19. 12 3
      src/main/resources/templates/supplier-center/dashboard.html
  20. 213 272
      src/main/resources/templates/supplier-center/shop/freight.html
  21. 38 61
      src/main/resources/templates/supplier-center/shop/release.html

+ 6 - 2
src/main/resources/static/css/supplier-center/dashboard.css

@@ -26,12 +26,16 @@
      .msg_num {width: 20px;height: 20px;line-height: 20px;display: block;background: red;border-radius: 50%;color: #fff;font-size: 10px;text-align: center;position: relative;top: 10px;right: -15px;}
      .icon.msg:before {width: 25px;height: 25px;background-position: -240px -371px}
      .product {margin: 20px 0;}
-     .product p {font-size: 16px;font-weight: normal;font-stretch: normal;line-height: 21px;letter-spacing: 0px;color: #22272e;padding: 10px 22px;}
+     .product-title{width: 100%;height: 56px;box-sizing: border-box;padding: 12px 0;}
+     .product-title p {font-size: 16px;font-weight: normal;font-stretch: normal;line-height: 32px;letter-spacing: 0px;color: #22272e;float: left;padding-left: 20px;}
+     .product-title .product-sel{float: right;height: 100%;}
+     .product-title .product-sel span{}
+     .product-title .product-sel .state{width: 160px;}
      .product ul {height: 50px;line-height: 80px;background-color: #ffffff;box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.07);padding: 15px;}
      .product li {display: inline-block;margin-right: 20px;width: 110px;text-align: center;color: #333333;position: relative;cursor: pointer;}
      .icon.confirm:before {width: 34px;height: 35px;background-position:-159px -405px;position: absolute;right: 53px;}
      .icon.other:before {background-position: -197px -405px;}
-    .icon.down:before{background-position: -234px -405px;}
+     .icon.down:before{background-position: -234px -405px;}
      .rank_top p {font-size: 16px;color: #22272e;display: inline-block;}
      .rank_top span {color: #627386;font-size: 16px;}
      .sales-ranke ul li {display: inline-block;width: 10%;}

+ 2 - 0
src/main/resources/static/css/supplier-center/order/settlement.css

@@ -1,4 +1,5 @@
  @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)}
@@ -35,6 +36,7 @@
 /* 移动*/
 
 @media screen and (max-width: 768px){
+    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;}

+ 40 - 15
src/main/resources/static/css/supplier-center/shop/freight.css

@@ -1,27 +1,52 @@
 li{list-style: none}
  @media screen and (min-width:768px) {
-    .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)}
-    .head-top>div {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 0;}
+    table, td, th{border: none;}
     input::placeholder{color: #9aa5b5;font-size: 12px;}
     textarea::placeholder{color: #9aa5b5;}
-    #newBtn div{height: 36px;border-radius: 2px;display: inline-block;text-align: center;cursor: pointer}
-    #newBtn{float: left;margin: 0}
-    .goods-main{width: 100%; height: auto; float: left; margin:10px 0;background: #fff;}
-    .goods-tips{width: 100%;box-sizing: border-box;margin-top: 14px;}
-    .goods-tips .end-tips{width:100%;height: 32px;background: #FFF3F3;border-radius: 2px;line-height: 32px;color: #F94B4B;font-size: 12px;box-sizing: border-box;padding: 0 10px;}
-    .goods-tips .end-tips .tips{display:inline-block;width:32px;height:32px;line-height:32px;box-sizing:border-box;position:relative;color:#333;font-size:14px;text-align:center;white-space:nowrap}
-    .goods-tips .end-tips .tips:before{display:inline-block;width:20px;height:20px;vertical-align:middle;background-position:-24px 1px;margin-right:2px;}
-    .goods-main-empty{width: 100%;height: 60px;line-height: 60px;text-align: center;float: left;margin-top: 20px;}
-    .goods-main-empty p{font-size: 14px;color: #333;}
-    .goods-main-empty p a{color: #FF5B00;text-decoration: underline;margin: 0 3px;}
+    .freight-content{width: 100%;min-height: 652px; box-sizing: border-box;padding:40px 56px;background: #fff;}
+    .crumbs{color: #22272e;font-size: 16px;}
+    .head-top{overflow: hidden;}
+    .head-top>div {float: left; height: 40px;font-size: 12px;color: #627386;line-height: 40px;margin-right: 10px;margin-bottom: 10px}
+    .freight-main{width: 100%; min-height: 600px; float: left;box-sizing: border-box; background: #fff;}
+    .freight-list{width: 100%;height: auto;margin-bottom: 32px;margin-top: 24px;}
+    .freight-list-title{width: 100%;height: 57px;border-top: 1px solid #B8BFCA;border-right: 1px solid #B8BFCA;border-left: 1px solid #B8BFCA;box-sizing: border-box;padding: 0 16px;}
+    .freight-list-title .list-name{float: left;font-size: 16px;color: #333333;line-height: 56px;font-weight: bold;}
+    .freight-list-title .list-right{float: right;font-size: 14px;line-height: 56px;color: #666666;}
+    .freight-list-title .list-right span.none{color: #9AA5B5;margin-right: 20px;}
+    .freight-list-title .list-right span.copy a{color: #2398FF;}
+    .el-table--border::after,.el-table--group::after,.el-table::before {background-color: #B8BFCA !important;}
+    .el-table--border,.el-table--group {border-color: #B8BFCA !important;}
+    .freight-main .empty{width: 100%;height: 60px;line-height: 60px;text-align: center;float: left;margin-top: 20px;}
+    .freight-main .empty p{font-size: 14px;color: #333;}
+    .freight-main .empty p a{color: #FF5B00;text-decoration: underline;margin: 0 3px;}
     .empty{background: #fff;margin-top: 10px;}
     .navLayout{min-height: auto;}
     ::-webkit-scrollbar{ height: 6px;}
     .pagination{width: 100%;margin-top: 10px;float: left; background: #FFFFFF;padding: 8px 20px;box-sizing: border-box;}
     .el-button--primary.is-plain{background:#FFE6DC !important;color: #FF5B00 !important;border-color: #FF5B00 !important;}
+
+   /* 运费模板弹窗 */
+    .el-message{min-width: 280px !important;}
+    .el-dialog__body{padding: 10px 20px !important;box-sizing: border-box;max-height: 620px;}
+    .el-form-content{width: 100%;max-height: 500px;overflow: hidden;overflow-y: scroll;box-sizing: border-box;padding: 0 12px;}
+    .el-form-list{width: 100%;height: auto;border: 1px solid #B8BFCA;border-radius: 2px;margin-bottom: 10px;}
+    .el-form-list:last-child{margin-bottom: 0;}
+    .el-form-list-title{width: 100%;box-sizing: border-box;padding: 0 13px;line-height: 40px;background: #F5F5F5;font-size: 14px;color: #333333; position: relative;}
+    .el-form-list-title .el-form-close{width: 20px;height: 20px;line-height: 20px;background: #F94B4B;text-align: center;color: #FFFFFF;cursor: pointer;position: absolute;right: 0;top: 0;}
+    .el-form-list-roles{box-sizing: border-box;padding: 0 13px;}
+    .el-form-list-roles.rol3{border-top: 1px solid #B8BFCA;border-bottom: 1px solid #B8BFCA;}
+    .el-form-role3,.el-form-role5{align-items: center;box-sizing: border-box;display: flex;justify-content: space-between;padding: 12px 0;}
+    .el-form-role3-ns,.el-form-role5-ns{width: 550px;line-height: 24px;}
+    .el-form-add{ width: 100%;box-sizing: border-box;line-height: 24px;font-size: 14px;color: #FF5B00;}
+    /* 运费规则弹窗 */
+    .el-form-areas-content{width: 100%;max-height: 600px;overflow: hidden;overflow-y: scroll;box-sizing: border-box;padding: 0 12px;}
+    .el-area-wup{margin-bottom: 20px;}
+    .el-area-box{display: flex;flex-wrap: wrap;}
+    .el-area-checkbox{align-items: center;display: flex;flex: 0 0 auto;margin: 10px 16px 0 0;}
+    .el-area-label{ margin-left: 8px;cursor: pointer;}
+    .el-area-label.disabled{ color: #9AA5B5;cursor: not-allowed;}
+   /* 运费规则弹窗 */
+    .box-row-col{width: 100%;height: 118px;background: #F7F7F7;box-sizing: border-box;padding: 16px;}
  }
 
 /*移动*/

+ 2 - 0
src/main/resources/static/css/supplier-center/shop/goods.css

@@ -1,5 +1,6 @@
 li{list-style: none}
  @media screen and (min-width:768px) {
+    table, td, th{border: none;}
     .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)}
     .head-top>div {float: left; height: 40px;font-size: 12px;color: #627386;line-height: 40px;margin-right: 10px;margin-bottom: 10px}
@@ -26,6 +27,7 @@ li{list-style: none}
 
 /*移动*/
  @media screen and (max-width:768px) {
+    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%;}
     .state {width: 92% !important;margin: 0 2vw;}

+ 8 - 0
src/main/resources/static/css/supplier-center/shop/release.css

@@ -103,8 +103,11 @@ div{box-sizing: border-box;}
     .preview-container{width: 100%;height: 100%;position: fixed;top: 0;left: 0;background: rgba(0,0,0,.5);z-index: 99999;display: none;}
     .preview-container .preview-content{width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;}
     .preview-container .preview-content img{border-radius: 4px;}
+
     /*销售信息*/
     input[type="radio"]{opacity:0;}
+
+    .release-from .release-input-add{width: 100%;margin-top: 10px;float: left;}
     .release-from .release-input .release-props{width: 100%;height: 38px;}
     .release-from .release-input .release-props .release-radio{width:150px;height:36px;margin-right:10px;line-height:34px;box-sizing:border-box;font-size:14px;text-align:center;display:inline-block}
     .release-from .release-input .release-props .release-radio.second{width:100px;}
@@ -113,6 +116,11 @@ div{box-sizing: border-box;}
     .release-from .release-input .release-props .release-radio i:before{position:absolute;right:0;bottom:0;display:none;width:20px;height:20px;background-position:-208px -253px}
     .release-from .release-input .release-props .release-radio input:checked + i{border-color:#FF5B00;color:#FF5B00}
     .release-from .release-input .release-props .release-radio input:checked + i:before{display:block}
+    .release-from .release-input .release-props .release-select{width: 320px;float: left;}
+    .release-from .release-input .release-props .release-select-refresh{width: auto;float: left;color: #FFFFFF;font-size: 14px;text-align: center;line-height: 36px;margin: 0 15px;}
+    .release-from .release-input .release-props .release-select-all{width: 92px;float: left;}
+    .release-from .release-input .release-props .release-select-all a{width: 92px;height: 36px;box-sizing: border-box; background: #FFEBE4;border-radius: 2px 2px 2px 2px;opacity: 1;display: block;color: #FF5B00;font-size: 14px;line-height: 36px;text-align: center;border: 1px solid #FF5B00;}
+
     .release-from .release-input .release-province{width: 100%;height: auto;margin-top: 20px;}
     .release-from .release-input .release-province .province-item{line-height:26px;padding: 0 10px;text-align: center;font-size: 14px;color: #627386;background: #F0F3F7;border-radius: 2px;display: block;margin: 0 10px 10px 0;float: left;}
     .release-from .release-input .release-province .province-item.active{background: #FF5B00;color: #FFF;}

BIN
src/main/resources/static/img/supplier/icon-freight-empty@2x.png


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

@@ -879,6 +879,100 @@ var SupplierApi = {
             .then(function(res){
                 callback(res);
             });
+        },
+        /**
+         * @供应商运费模板列表
+         * @param:shopId 供应商Id
+         * @param:pageNum 页码
+         * @param:pageSize 条数
+         */
+        getFreightTemp : function (params, callback) {
+            Http.AjaxService({
+                url:'/commodity/shop/product/getFreightTemplate',
+                type:'GET',
+                data:params,
+                json:true,
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        /**
+         * @删除运费模板
+         * @param:id  运费模板Id
+         */
+        delFreight : function (params, callback) {
+            Http.AjaxService({
+                url:'/commodity/shop/product/delFreight',
+                type:'GET',
+                data:params,
+                json:true,
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        /**
+         * @运费模板详情
+         * @param:id  运费模板Id
+         */
+        freightTemplateDetail : function (params, callback) {
+            Http.AjaxService({
+                url:'/commodity/shop/product/templateDetail',
+                type:'GET',
+                data:params,
+                json:true,
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        /**
+         * @复制运费模板
+         * @param:id  运费模板Id
+         */
+        getFreightTemplateById : function (params, callback) {
+            Http.AjaxService({
+                url:'/commodity/shop/product/getFreightTemplateById',
+                type:'GET',
+                data:params,
+                json:true,
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        /**
+         * @供应商运费模板(获取地区)
+         * @param:freightId 运费模板Id
+         * @param:ruleId 运费规则Id
+         */
+        getFreightArea : function (params, callback) {
+            Http.AjaxService({
+                url:'/commodity/shop/getArea',
+                type:'GET',
+                data:params,
+                json:true,
+            })
+            .then(function(res){
+                callback(res);
+            });
+        },
+        /**
+         * @保存运费模板
+         */
+        saveFreightTemplate : function (params, callback) {
+            Http.AjaxService({
+                url:'/commodity/shop/product/saveFreightTemplate',
+                type:'post',
+                data:params,
+                json:false,
+                isHost:true
+            })
+            .then(function(res){
+                callback(res);
+            });
         }
 
+
 };

+ 2 - 1
src/main/resources/static/js/supplier-center/dashboard.js

@@ -15,7 +15,8 @@
         msgFlag:false,
         isShow:false,
         orderNumData:[],//统计订单金额
-        paytotalfeeData:[]//统计订单数量
+        paytotalfeeData:[],//统计订单数量
+        platform:1
     },
      methods: {
          dashboardDataInfo:function(){

+ 49 - 192
src/main/resources/static/js/supplier-center/shop/freight.js

@@ -1,6 +1,6 @@
 var myGoods = new Vue({
     el:"#myGoods",
-    mixins: [cmSysVitaMixins],
+    mixins: [cmSysVitaMixins,freightMixins],
     data: {
         userId:0,
         shopId:'',
@@ -9,29 +9,15 @@ var myGoods = new Vue({
         listQuery:{
             shopId:'',
             pageNum:1,
-            pageSize:10,
-            productCode:'',//货号
-            name:'',//商品名称
-            showFlag:'',// 新品展示状态
-            validFlag:'',//状态
-            featuredFlag:'',//是否主推
-            commodityType:'',//商品属性
-            bigTypeId:'',//一级
-            smallTypeId:'',//二级
-            tinyTypeId:'',//三级
-            groundMall:'' // 上架平台
+            pageSize:2,
         },
-        classificationFirstList:[],
-        classificationTwoList:[],
-        classificationThreeList:[],
-        productsList:[],
+        freightList:[],
         total:0,
         layout: '',
         isForbid:false,
         listLoading:true,
         productRadio:[],
         handlePros:{},
-        dialogFormVisible:false,
         groundMallType:0,
     },
     filters: {
@@ -54,28 +40,22 @@ var myGoods = new Vue({
         }
     },
     methods: {
+        tableCellStyle() {
+            return 'border-color: #B8BFCA;'
+        },
         //切换页码
         handleCurrentChange(val){
             this.listQuery.pageNum = val;
             this.getList();
         },
-        // 多选商品
-        handleSelectionChange(row) {
-            if(this.isForbid){ return }
-            this.productRadio = row
-            console.log('row', row)
-        },
         getList(){//我的商品数据初始化
             const _this = this;
-            SupplierApi.GetMyProductList(_this.listQuery,function(response){
+            SupplierApi.getFreightTemp(this.listQuery,function(response){
                 if(response.code === 0){
                     const data  = response.data
-                    let page = data.productPage;
-                    _this.featuredNum = data.featuredNum;
-                    _this.isForbid = data.listingFee === 1
-                    _this.productsList = _this.handleResults(page.results,_this.featuredNum)
-                    console.log('productsList',_this.productsList)
-                    _this.total = page.totalRecord;
+                    _this.freightList = data.results
+                    console.log('freightList',_this.freightList)
+                    _this.total = data.totalRecord;
                     _this.listLoading = false
                 }else{
                     CAIMEI.Alert(response.msg, '确定');
@@ -83,175 +63,52 @@ var myGoods = new Vue({
                 }
             })
         },
-        //处理
-        handleResults(list,featuredNum){
-            return list.map(function(el){
-                el.isAddFeatured = false;
-                el.isDelFeatured = false;
-                if(featuredNum<4){
-                    if(el.validFlag === 2 && el.featuredFlag === 0 ){
-                        el.isAddFeatured = true;
-                    }
-                }
-                if(featuredNum>0){
-                    if (el.validFlag === 2 && el.featuredFlag === 1) {
-                        el.isDelFeatured = true;
-                    }
-                }
-                return el
-            })
-        },
-        handleCommodityType(event){//选择商品属性
-            console.log('event',event)
-            console.log('event',this.listQuery.commodityType)
-            this.GetFistClassFn(this.listQuery.commodityType);
-        },
-        handeleChangeFirst(event){//选择一级分类
-            console.log('event',event)
-            console.log('event',this.listQuery.bigTypeId)
-            this.GetTwoClassFn(this.listQuery.bigTypeId);
-        },
-        handeleChangeTwo(event){//选择二级分类
-            console.log('event',event)
-            console.log('event',this.listQuery.smallTypeId)
-            this.GetThreeClassFn(this.listQuery.smallTypeId);
-        },
-        GetFistClassFn(value){//获取一级分类菜单
-            const _this = this;
-            PublicApi.GetFirstClassFication({typeSort:value},function (response) {
-                if(response.data.length>0){
-                     _this.classificationFirstList = response.data;
-                }else {
-                      _this.classificationFirstList = [];
-                }
-            })
-        },
-        GetTwoClassFn(value){//获取二级分类菜单
-            const _this = this;
-            PublicApi.GetTwoClassFication({bigTypeId:value},function (response) {
-                if(response.code===0){
-                    if(response.data.length>0){
-                        _this.classificationTwoList = response.data;
-                     }else {
-                         _this.classificationTwoList = [];
-                     }
-                }
-            })
-        },
-        GetThreeClassFn(value){//获取三级分类菜单
-            const _this = this;
-            PublicApi.GetThreeClassFication({smallTypeId:value},function (response) {
-                if(response.code===0){
-                  if(response.data.length>0){
-                        _this.classificationThreeList = response.data;
-                  }else {
-                     _this.classificationThreeList = [];
-                  }
-                }
-            })
-        },
-        handleDownshelfAll(){//批量下架
-            const _this = this;
-            let isValidFlag = false;
-            let productIds = '';
-            _this.productRadio.forEach(function(el){
-                if(el.validFlag === 2){
-                    productIds += el.productId+','
-                }
-                if(el.validFlag !== 2){
-                    isValidFlag = true;
-                }
+        // 复制运费模板
+        handleCopy(freight){
+            this.$confirm('确定复制该模板吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.$message({
+                    type: 'success',
+                    message: '复制成功!'
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消复制'
+                });
             });
-            if(isValidFlag){
-                CAIMEI.Alert('部分选中的商品暂未上架,不能进行下架操作','确定');
-                return;
-            }
-            CAIMEI.Modal('批量下架会将选中的商品在全部平台进行下架,确定操作吗?','取消','确定',function () {
-                SupplierApi.SupplierSoldOut({productIds: productIds,groundMallType:0},function (response) {
-                    if (response.code === 0){
-                        CAIMEI.dialog('下架成功!');
-                        _this.getList();
-                    }else{
-                        CAIMEI.Alert(response.msg,'确定');
-                    }
-                })
-            })
-        },
-        // 操作下架商品
-        handleDownshelf(pros){
-            if(this.isForbid){ return }
-            this.dialogFormVisible = true
-            this.handlePros = pros
-            if(this.handlePros.groundMall === '0'){
-                this.groundMallType = 1
-            }else if(this.handlePros.groundMall === '4'){
-                this.groundMallType = 2
-            }else{
-                this.groundMallType = 0
-            }
         },
-        // 下架商品
-        handleConfirmShelf(){
-            const _this = this
-            SupplierApi.SupplierSoldOut({productIds:this.handlePros.productId,groundMallType:this.groundMallType},function (response) {
-                if (response.code === 0){
-                    _this.dialogFormVisible = false
-                    CAIMEI.dialog('下架成功~');
-                    _this.getList();
-                }else{
-                    _this.dialogFormVisible = false
-                    CAIMEI.Alert(response.msg,'确定');
-                }
-            })
-        },
-        handlePushHot(pros){//添加主页推荐
-            var _this = this;
-            var num = 4-this.featuredNum;
-            if(this.isForbid){ return }
-            CAIMEI.Modal('总共能添加4个主推商品,您还能添加'+num+'个确定将该商品添加为主推商品吗?','取消','确定',function () {
-                SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:1,shopId:_this.shopId},function (response) {
-                    if (response.code == 0){
-                        CAIMEI.dialog('添加成功~');
-                        _this.productsList = [];
-                        _this.getList();
-                    }else{
-                        CAIMEI.Alert(response.msg,'确定');
-                    }
-                })
-            })
-        },
-        handleDeleteHot(pros){//删除主页推荐
-            var _this = this;
-            if(this.isForbid){ return }
-            CAIMEI.Modal('是否把该商品从主推商品中删除?','取消','确定',function () {
-                SupplierApi.SwitchFeatured({productId:pros.productId,featuredFlag:0,shopId:_this.shopId},function (response) {
-                    if (response.code == 0){
-                        CAIMEI.dialog('删除成功~');
-                        _this.productsList = [];
-                        _this.getList();
-                    }else{
-                        CAIMEI.Alert(response.msg,'确定');
-                    }
-                })
-            })
-        },
-        handlePreview(pros){//预览商品
-            if(this.isForbid){ return }
-            window.open('/product-'+pros.productId+'.html');
-        },
-        handleEdit(pros){//编辑商品
-            if(this.isForbid){ return }
-            location.href ='/supplier/release.html?productId='+pros.productId+'&type=edit';
-        },
-        toFixedFn(text){
-            return Number(text).toFixed(2);
+        // 修改运费模板
+        handleEdit(freight){
+            console.log('修改运费模板')
+        },
+        // 删除运费模板
+        handleDele(freight){
+            console.log('删除运费模板')
+            this.$confirm('确定删除该模板吗?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                this.$message({
+                    type: 'success',
+                    message: '删除成功!'
+                });
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '已取消删除'
+                });
+            });
         }
     },
     mounted: function () {
         if(globalUserData){
             this.userId = globalUserData.userId;
-            this.listQuery.shopId = globalUserData.shopId;
-            this.shopId =globalUserData.shopId;
+            this.listQuery.shopId = this.shopId = globalUserData.shopId;
         }
         this.getList();
         if(isPC){

+ 1 - 34
src/main/resources/static/js/supplier-center/shop/mixins/checkeMixins.js

@@ -12,7 +12,6 @@ var checkeMixins = function () {
                 vShow_Tags:false,
                 vShow_price:false,
                 vShow_includedTax:false,
-                vShow_isProvince:false,
                 vShow_isNewProductType:false,
                 vShow_taxPoint:false,
                 vShow_GoodsImages:false,
@@ -24,6 +23,7 @@ var checkeMixins = function () {
                 vShow_QualificationNo:false,
                 vShow_ProductName:false,
                 vShow_QualificationTime:false,
+                vShow_byFlag:false // 物流方式
             }
         },
         mounted: function() {
@@ -274,21 +274,6 @@ var checkeMixins = function () {
                     },3000);
                     return;
                 }
-                if(_this.releaseParams.areaFlag === '0'){
-                    _this.ProvinceList.forEach(function(el){
-                        if(el.isChecked){
-                            _this.releaseParams.provinceIds+=el.provinceID+',';
-                        }
-                    });
-                    if(_this.releaseParams.provinceIds === ''){
-                        _this.vShow_isProvince = true;
-                        _this.fromMessage = '请选择指定区域';
-                        setTimeout(function(){
-                            _this.vShow_isProvince = false;
-                        },3000);
-                        return;
-                    }
-                }
                 _this.activeNum++;
                 _this.scrollIntoView();
                 if(_this.vShow_detailInfoEditor){
@@ -385,24 +370,6 @@ var checkeMixins = function () {
                     this.releaseParams.trainingFee = '';
                 }
             },
-            input_minBuyNumber: function(event){
-                this.vShow_MinBuyNumber = false;
-                var E_Number = event.target.value;
-                if(E_Number!==''){
-                    this.releaseParams.minBuyNumber = parseInt(E_Number.replace(/[^0-9]/g,''));
-                }else{
-                    this.releaseParams.minBuyNumber = '';
-                }
-            },
-            input_stock: function(event){
-                this.vShow_Stock = false;
-                var E_stock = event.target.value;
-                if(E_stock!==''){
-                    this.releaseParams.stock = parseInt(E_stock.replace(/[^0-9]/g,''));
-                }else{
-                    this.releaseParams.stock = '';
-                }
-            },
             toFixedFn: function(text){
                 return Number(text).toFixed(2);
             },

+ 416 - 0
src/main/resources/static/js/supplier-center/shop/mixins/freightMixins.js

@@ -0,0 +1,416 @@
+// 发布商品
+const freightDefault = () =>{
+    return {
+        id:'', // 运费模板Id
+        freightId:'', // 运费规则的Id
+        areaTax:'', // 运费规则地区名
+        ruleTax:'', // 运费规则文案
+        freightAreaList:[], // 运费规则地区id集合
+        freightAmount:'',// 运费金额
+        freeType:'', //是否指定条件包邮 0无条件 1指定条件包邮
+        freeCondition:'',// 包邮条件 0 满足件数 1 满足金额
+        productNum:'', // 包邮商品件数
+        allAmount:'', // 包邮商品金额
+        checked:false, // false 未勾选 true 已勾选
+    }
+}
+const freightMixins = function () {
+    return {
+        data() {
+            return {
+                rules: {
+                    name: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
+                    freightAmount: [{ required: true, message: '请输入固定运费金额', trigger: 'blur' }],
+                    freights: [{ required: true, type: 'array', message: '请添加运费规则', trigger: ['change'] }],
+                },
+                dialogFormVisible:false, // 控制运费模板弹窗显示
+                rulesFormVisible:false, // 控制运费规则弹窗显示
+                areasFormVisible:false, // 控制省市区弹窗显示
+                urbanFormVisible:false, // 控制数去弹窗显示
+                freightTemp:{
+                    id:'',
+                    name:'',
+                    shopId:'',
+                    freightRuleList:[]
+                },
+                freightRulesForm:{}, // 记录运费规则
+                freightAreasType:'', // 设置省市类型
+                cityUrbanForm:{}, // 市区
+                areaUrbanForm:{}, // 区域
+                areaRulesForm:{}, // 规则
+                areaRulesIndex:0, // 规则记录
+                areaData:[]
+            }
+        },
+        computed: {
+
+        },
+        mounted () {
+            this.freightTemp.shopId = globalUserData.shopId
+            this.freightTemp.freightRuleList.push(freightDefault())
+        },
+        methods: {
+            disabled(value){
+                // 如果是添加的情况下 如果 value 值 大于 0 设置禁用
+                // 如果是编辑的情况下 如果 value === 索引 就设为 false 否则 大于 0 设置禁用
+                if(this.freightAreasType === 'add'){
+                    return value.type !== this.areaRulesIndex && value.type > 0;
+                }else if(this.freightAreasType === 'edit'){
+                   if(value.type === this.areaRulesIndex ){
+                       return false
+                   }else{
+                       if(value.type>0){
+                           return true
+                       }
+                   }
+                }
+            },
+            // 新增运费模板
+            handleAddFreight(){
+                this.freightTemp.name = ''
+                this.freightTemp.freightRuleList = []
+                this.freightTemp.freightRuleList.push(freightDefault())
+                this.handleInitAreas()
+                this.dialogFormVisible = true
+            },
+            // 新增运费规则
+            handleAddRole(){
+                this.freightTemp.freightRuleList.push(freightDefault())
+            },
+            // 删除运费规则
+            handleDelRole(index){
+                this.freightTemp.freightRuleList.splice(index, 1)
+            },
+            // 修改运费规则
+            changeFreightRole(freight,index){
+                this.freightRulesForm = freight
+                this.rulesFormVisible = true
+            },
+            // 设置运费规则
+            sittingFreightRole(freight,index){
+                this.freightRulesForm = freight
+                this.rulesFormVisible = true
+            },
+            // 勾选指定条件包邮
+            handleFreightFreeType(value){
+                console.log('value',value)
+                if(value){
+                    this.freightRulesForm.freeType = 1
+                    this.freightRulesForm.freeCondition = 0
+                }else{
+                    this.freightRulesForm.freeType = 0
+                    this.freightRulesForm.freeCondition = ''
+                }
+            },
+            // 确认设置规则
+            handleConfirmRoles(){
+                this.$refs['ruleForm'].validate(valid => {
+                    if (valid) {
+                        if(this.freightRulesForm.checked){
+                            this.freightRulesForm.ruleTax = `固定运费${this.freightRulesForm.freightAmount}元 / ${this.freightRulesForm.freeCondition === 0 ? `满${this.freightRulesForm.productNum}件包邮` : `满¥${this.freightRulesForm.allAmount}包邮` }`
+                        }else{
+                            this.freightRulesForm.ruleTax = `固定运费${this.freightRulesForm.freightAmount}元`
+                        }
+                        console.log('freightRulesForm',this.freightRulesForm)
+                        this.rulesFormVisible = false
+                    } else {
+                        return false
+                    }
+                })
+            },
+            // 获取地区集合
+            getFreightArea(freightId='',ruleId=''){
+                const _this = this;
+                SupplierApi.getFreightArea({ freightId:freightId,ruleId:ruleId },function(response){
+                    if(response.code === 0){
+                        _this.areaData =  response.data
+                        console.log('areaData',_this.areaData)
+                    }else{
+                        console.log('获取地区集合失败')
+                    }
+                })
+            },
+            // 修改省市区
+            changeFreightAreas(type,freight,index){
+                console.log('areaData',this.areaData)
+                this.freightAreasType = type
+                this.areaRulesForm = freight
+                this.areaRulesIndex = index+1
+                this.areasFormVisible = true
+            },
+            // 设置省市区
+            sittingFreightAreas(type,freight,index){
+                this.getFreightArea()
+                this.freightAreasType = type
+                this.areaRulesForm = freight
+                this.areaRulesIndex = index+1
+                this.areasFormVisible = true
+            },
+            // 取消选择省市
+            handleCanleAreas(){
+                // this.handleInitAreas()
+                this.areasFormVisible = false
+            },
+            // 勾选地区
+            handleCheckAllChange(area,value) {
+                if(area.checked){
+                    area.type = this.areaRulesIndex
+                    area.checkedCities = area.provinceList.map(city => { return city.name })
+                    area.provinceList.forEach(city=> {
+                        city.type = area.type
+                        city.checked = area.checked
+                        city.checkedCities = city.cityList.map(el => {
+                            return el.name
+                        })
+                        city.cityList.forEach(urban => {
+                            urban.type = city.type
+                            urban.checked = city.checked
+                        })
+                    })
+                }else{
+                    area.checkedCities = []
+                    area.type =  0
+                    area.provinceList.forEach(city=>{
+                        city.type = area.type
+                        city.checked = area.checked
+                        city.checkedCities = []
+                        city.cityList.forEach(urban=>{
+                            urban.type =  city.type
+                            urban.checked = city.checked
+                        })
+                    })
+                }
+                let checkedCount = area.checkedCities.length;
+                area.checked = checkedCount === area.provinceList.length;
+                area.isIndeterminate = checkedCount > 0 && checkedCount < area.provinceList.length;
+                console.log('areaData',this.areaData)
+            },
+            // 勾选省份
+            handleCheckedCitiesChange(city,area,value) {
+                if(city.checked){
+                    city.type = area.type = this.areaRulesIndex
+                    area.checkedCities.push(city.name)
+                    city.checkedCities = city.cityList.map(el => {return el.name})
+                    city.cityList.forEach(el=>{
+                        el.type = city.type
+                        el.checked = city.checked
+                    })
+                }else{
+                    let index = area.checkedCities.indexOf(city.name);
+                    if (index !== -1) {
+                        area.checkedCities.splice(index, 1);
+                    }
+                    city.type = area.type = 0
+                    city.checkedCities = []
+                    city.cityList.forEach(el=>{
+                        el.type = city.type
+                        el.checked = city.checked
+                    })
+                }
+                let checkedCount = area.checkedCities.length;
+                area.checked = checkedCount === area.provinceList.length;
+                console.log('checkedCount',checkedCount)
+                area.isIndeterminate = checkedCount > 0 && checkedCount < area.provinceList.length;
+                console.log('isIndeterminate',area.isIndeterminate)
+            },
+            // 确认省份
+            handleConfirmAreas(){
+                const _this = this
+                console.log('areaRulesIndex',this.areaRulesIndex)
+                let newCheckedCities = []
+                this.areaData.forEach(area =>{
+                    if(area.checked && area.type === _this.areaRulesIndex){
+                        let areaCheckedCities = []
+                        area.provinceList.forEach(city => {
+                            if(city.type === _this.areaRulesIndex){
+                                areaCheckedCities.push(city.name)
+                            }
+                        })
+                        newCheckedCities = [...newCheckedCities,...areaCheckedCities]
+                    }else{
+                        // 省循环
+                       area.provinceList.forEach(city => {
+                           // 省勾选取省名字
+                           if(city.checked && city.type === _this.areaRulesIndex){
+                               let cityCheckedCities = []
+                               cityCheckedCities.push(city.name)
+                               newCheckedCities = [...newCheckedCities,...cityCheckedCities]
+                           }else{
+                               let newUrbanText = []
+                               let urbanCheckedCities = []
+                               city.cityList.forEach(urban => {
+                                   // 市勾选取市名字 如果勾选了取勾选的市名称存储
+                                   if(urban.checked && urban.type === _this.areaRulesIndex){
+                                       newUrbanText.push(urban.name)
+                                   }
+                               })
+                               if(newUrbanText.length > 0){
+                                   urbanCheckedCities.push(`${city.name}(${newUrbanText.join('、')})`)
+                               }
+                               newCheckedCities = [...newCheckedCities,...urbanCheckedCities]
+                           }
+                        })
+                    }
+                })
+                console.log('newCheckedCities',newCheckedCities)
+                this.areaRulesForm.freightAreaList = JSON.stringify(this.handleTotalUrban())
+                console.log('freightAreaList',this.areaRulesForm.freightAreaList)
+                this.areaRulesForm.areaTax = newCheckedCities.join('、')
+                console.log('areaTax',this.areaRulesForm.freightAreaList)
+                this.areasFormVisible = false
+            },
+            // 显示市区
+            handleUrbanForm(city,area,flag){
+                if(flag){ return }
+                this.cityUrbanForm = city
+                this.areaUrbanForm = area
+                this.urbanFormVisible = true
+            },
+            // 全选市区
+            handleUrbanChange(){
+                const _this = this
+                if(this.cityUrbanForm.checked){
+                    this.cityUrbanForm.cityList.forEach(el=>{
+                        el.checked = !!_this.cityUrbanForm.checked;
+                        el.type = _this.cityUrbanForm.type = _this.areaRulesIndex
+                    })
+                    this.cityUrbanForm.checkedCities = this.cityUrbanForm.cityList.map(el => { return el.name })
+                    this.cityUrbanForm.isIndeterminate = false
+                }else{
+                    this.cityUrbanForm.cityList.forEach(el=>{
+                        el.checked = false
+                        el.type = _this.cityUrbanForm.type = 0
+                    })
+                    this.cityUrbanForm.checkedCities = []
+                    this.cityUrbanForm.isIndeterminate = true
+                }
+            },
+            // 单选市区
+            handleCheckedUrbanChange(urban,value){
+                console.log('cityUrbanForm',this.cityUrbanForm)
+                if(urban.checked){
+                    urban.type =  this.areaRulesIndex
+                    this.cityUrbanForm.checkedCities.push(urban.name)
+                }else{
+                    let index = this.cityUrbanForm.checkedCities.indexOf(urban.name);
+                    if (index !== -1) {
+                        this.cityUrbanForm.checkedCities.splice(index, 1);
+                    }
+                    urban.type =  this.cityUrbanForm.type = 0;
+                }
+                let checkedCount = this.cityUrbanForm.checkedCities.length;
+                this.cityUrbanForm.checked = checkedCount === this.cityUrbanForm.cityList.length;
+                this.cityUrbanForm.isIndeterminate = checkedCount > 0 && checkedCount < this.cityUrbanForm.cityList.length;
+            },
+            // 确认市
+            handleConfirmUrban(){
+                if(this.cityUrbanForm.checked){
+                    this.areaUrbanForm.checkedCities.push(this.cityUrbanForm.name)
+                }else{
+                    let index = this.areaUrbanForm.checkedCities.indexOf(this.cityUrbanForm.name);
+                    if (index !== -1) {
+                        this.areaUrbanForm.checkedCities.splice(index, 1);
+                    }
+                }
+                let checkedCount = this.areaUrbanForm.checkedCities.length;
+                this.areaUrbanForm.checked = checkedCount === this.areaUrbanForm.provinceList.length;
+                console.log('checkedCount',checkedCount)
+                this.areaUrbanForm.isIndeterminate = checkedCount > 0 && checkedCount < this.areaUrbanForm.provinceList.length;
+                console.log('isIndeterminate',this.areaUrbanForm.isIndeterminate)
+                this.urbanFormVisible = false
+            },
+            // 取消保存运费模板
+            handleCanleFreights(){
+                // 取消保存运费模板, 全部初始化
+                this.freightTemp.name = ''
+                this.freightTemp.freightRuleList = []
+                this.freightTemp.freightRuleList.push(freightDefault())
+                this.handleInitAreas()
+                this.dialogFormVisible = false
+            },
+            // 确认保存运费模板
+            handleConfirmShelf(){
+                let freightFlag = false
+                let aresFlag = false
+                this.freightTemp.freightRuleList.forEach(freight =>{
+                    if(!freight.ruleTax){
+                        freightFlag = true
+                    }
+                    if(!freight.areaTax){
+                        aresFlag = true
+                    }
+                })
+                // 判断是否有模板名称为空
+                if(!this.freightTemp.name){
+                    this.$message({ message: '请输入模板名称',type: 'warning'});
+                    return false
+                }
+                // 判断是否有运费规则为空
+                if(freightFlag){
+                    this.$message({ message: '请设置运费规则',type: 'warning'});
+                    return false
+                }
+                // 判断是否有省事为空
+                if(aresFlag){
+                    this.$message({ message: '运费规则对应的省市不能为空',type: 'warning'});
+                    return false
+                }
+                let params = JSON.stringify(this.freightTemp.freightRuleList)
+                console.log('params',params)
+                this.saveFreightTemplate(this.freightTemp,params)
+            },
+            // 处理数据
+            checkedStringify(params){
+
+            },
+            // 保存运费模板
+            saveFreightTemplate(params){
+                const _this = this;
+                params.freightRuleList = JSON.stringify(params.freightRuleList)
+                console.log('params',params)
+                SupplierApi.saveFreightTemplate(params,function(response){
+                    if(response.code === 0){
+                        this.$message({ message: '保存成功',type: 'success'});
+                    }else{
+                        this.$message({ message: `${response.msg}`,type: 'warning'});
+                    }
+                })
+            },
+            // 统计规则地区id
+            handleTotalUrban(){
+                const _this = this
+                const array = []
+                this.areaData.forEach(area =>{
+                    area.provinceList.forEach(city => {
+                        city.cityList.forEach(urban => {
+                            if(urban.checked && urban.type === _this.areaRulesIndex){
+                                array.push(
+                                    {
+                                        id:urban.id ? urban.id : '',
+                                        ruleId:urban.ruleId ? urban.ruleId : '',
+                                        type:urban.type,
+                                        cityId:urban.cityId
+                                    }
+                                )
+                            }
+                        })
+                    })
+                })
+                return array
+            },
+            // 初始化选择地区域数据
+            handleInitAreas(){
+                this.areaData.forEach(area =>{
+                    area.checked = false
+                    area.provinceList.forEach(city => {
+                        city.checked = false
+                        city.cityList.forEach(urban => {
+                            urban.checked = false
+                        })
+                    })
+                })
+            }
+        }
+    }
+}();
+

+ 25 - 0
src/main/resources/static/js/supplier-center/shop/mixins/releaseMixins.js

@@ -23,6 +23,23 @@ var releaseMixins = function () {
                 isSkuRule:false,
                 isMallSkuRule:false,
                 isPlatforms:false,
+                options: [{
+                    value: '选项1',
+                    label: '黄金糕'
+                }, {
+                    value: '选项2',
+                    label: '双皮奶',
+                    disabled: true
+                }, {
+                    value: '选项3',
+                    label: '蚵仔煎'
+                }, {
+                    value: '选项4',
+                    label: '龙须面'
+                }, {
+                    value: '选项5',
+                    label: '北京烤鸭'
+                }],
             }
         },
         mounted: function() {
@@ -111,6 +128,14 @@ var releaseMixins = function () {
             },
             handleSkuInput(){
                 this.isSkuRule = false
+            },
+            // 刷新运费模板
+            handleRefresh(){
+
+            },
+            // 新增运费模板
+            handleAddFreight(){
+
             },
             addSupplierReleaseInfo(){
                 var _this = this;

+ 2 - 1
src/main/resources/static/js/supplier-center/shop/release.js

@@ -45,7 +45,7 @@ var releaseContainer = new Vue({
             minBuyNumber:'',//起订量
             stock:'',//库存
             step:1,//购买数量
-            // byFlag:0,//运费
+            byFlag:0,//运费
             allAreaFlag:1,//销售区域
             provinceIds:0,//指定区域
             detailInfo:'',//商品详情信息
@@ -64,6 +64,7 @@ var releaseContainer = new Vue({
             productName:'',//资质产品名称
             qualificationTime:'',//证书有效日期
             groundMall:'0',
+            freightsTemp:'',
             skus:[],// sku
             mallSkus:[] //外部Sku
         },

+ 2 - 0
src/main/resources/templates/components/foot-link.html

@@ -5,6 +5,7 @@
 <script charset="utf-8" type="text/javascript" src="/lib/jquery-confirm.min.js"></script>
 <script charset="utf-8" type="text/javascript" src="/lib/vue2.6.12.min.js"></script>
 <script charset="utf-8" type="text/javascript" src="/lib/lazyload.js"></script>
+<script charset="utf-8" type="text/javascript" src="/lib/element-ui/element-ui.min.js"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/ajax.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/utils.service.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/common/serviceapi/shopping.service.js(v=${version})}"></script>
@@ -13,3 +14,4 @@
 <script charset="utf-8" type="text/javascript" th:src="@{/js/mixins/cmSysMixins.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/auto-input.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/base.js(v=${version})}"></script>
+

+ 3 - 0
src/main/resources/templates/components/head-link.html

@@ -11,3 +11,6 @@
     <link th:href="@{/css/base/init.css(v=${version})}" rel="stylesheet" type="text/css">
     <link th:href="@{/css/base/base.h5.css(v=${version})}" media="screen and (max-width:768px)" rel="stylesheet" type="text/css">
     <link th:href="@{/css/base/base.pc.css(v=${version})}" media="screen and (min-width:768px)" rel="stylesheet" type="text/css">
+    <!--element ui 样式表-->
+    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"/>
+    <link rel="stylesheet" href="/lib/element-ui/element-ui-min.css"/>

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

@@ -236,7 +236,7 @@
                                                 <div class="main_price_login">
                                                     <!--priceFlag 0公开价格 1不公开价格 2仅对会员机构公开-->
                                                     <template v-if="pros.product && pros.product.priceFlag == 1">
-                                                        <em class="price_grade"><span>¥</span>价格未公开</em>
+                                                        <em class="price_grade_club"><span>¥</span>价格未公开</em>
                                                     </template>
                                                     <!--机构价仅会员可见 && 用户是普通机构-->
                                                     <template v-else-if="pros.product && pros.product.priceFlag==2 && GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG!=1">
@@ -369,7 +369,7 @@
                                                     <div class="main_price_login">
                                                         <!--priceFlag 0公开价格 1不公开价格 2仅对会员机构公开-->
                                                         <template v-if="pros.product.priceFlag == 1">
-                                                            <em class="price_grade"><span>¥</span>价格未公开</em>
+                                                            <em class="price_grade_club"><span>¥</span>价格未公开</em>
                                                         </template>
                                                         <!--机构价仅会员可见 && 用户是普通机构-->
                                                         <template v-else-if="pros.product.priceFlag==2 && GLOBAL_USER_IDENTITY === 4 && GLOBAL_VIP_FLAG!=1">

+ 1 - 1
src/main/resources/templates/pay/caimei-paylist.html

@@ -81,7 +81,7 @@
                         <span class="none">
                                 ¥{{list.receiptAmount | NumFormat}}
                                 <span v-if="list.accountAmount > 0">
-                                    余额抵扣:(¥{{list.accountAmount | NumFormat}})
+                                    (余额抵扣:¥{{list.accountAmount | NumFormat}})
                                 </span>
                             </span>
                     </div>

+ 10 - 1
src/main/resources/templates/shopping/confirm.html

@@ -229,8 +229,11 @@
                             <template v-if="supplier.postageFlag === 0">
                                 运费:<span>包邮</span>
                             </template>
+
                             <template v-if="supplier.postageFlag === 1">
+
                                 <el-popover
+                                        v-if="supplier.coldChain>0"
                                         placement="bottom"
                                         width="240"
                                         trigger="click">
@@ -239,7 +242,7 @@
                                                 v-model="supplier.handlePostageFlag"
                                                 @change="handlePostageFlag($event,supplier)">
                                             <el-radio :label="1">不包邮</el-radio>
-                                            <el-radio :label="2">到付</el-radio>
+<!--                                            <el-radio :label="2">到付</el-radio>-->
                                         </el-radio-group>
                                     </div>
                                     <template v-if="supplier.handlePostageFlag === 1">
@@ -291,6 +294,12 @@
                                         <i class="el-icon-caret-bottom"></i>
                                     </span>
                                 </el-popover>
+                                <template v-else>
+                                    <span>
+                                        运费:
+                                        <span>¥{{ handleTotalPostage(supplier) | NumFormat }}</span>
+                                    </span>
+                                </template>
                             </template>
                             <template v-if="supplier.postageFlag === 2">
                                 运费:

+ 12 - 3
src/main/resources/templates/supplier-center/dashboard.html

@@ -64,8 +64,17 @@
                     </div>
                 </div>
                 <div class="product">
-                    <p>商品数据</p>
-                     <ul>
+                    <div class="product-title">
+                        <p>商品数据</p>
+                        <div class="product-sel">
+                            <span>所属平台</span>
+                            <el-select v-model="platform" class="state" clearable @change="">
+                                <el-option label="【采美平台】" :value="1" ></el-option>
+                                <el-option label="【丽格集采平台】" :value="4"></el-option>
+                            </el-select>
+                        </div>
+                    </div>
+                    <ul>
                          <li class="icon confirm mIcon">
                              <a href="/supplier/goods.html">全部商品<span>{{homeData.allNum}}</span></a>
                          </li>
@@ -75,7 +84,7 @@
                          <li class="icon down confirm mIcon">
                              <a href="/supplier/goods.html">已下架<span>{{homeData.downNum}}</span></a>
                          </li>
-                     </ul>
+                    </ul>
                 </div>
                 <div class="ranking">
                     <div class="rank_top">

+ 213 - 272
src/main/resources/templates/supplier-center/shop/freight.html

@@ -2,7 +2,7 @@
 <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>
+    <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/freight.css(v=${version})}" rel="stylesheet" type="text/css">
@@ -26,290 +26,231 @@
             <!--左侧面包屑-->
             <template th:replace="supplier-center/components/tableft"></template>
             <div class="right">
-                <div class="head-top clear">
-                    <div class="form-row low">
-                        <span v-if="isPC">商品名称:</span>
-                        <el-input
-                                v-model="listQuery.name"
-                                class="state"
-                                placeholder="请输入商品名称"
-                                clearable
-                                @keyup.enter.native="getList"
-                                @clear="getList"
-                        ></el-input>
+                <div class="freight-content clear">
+                    <div class="head-top clear">
+                        <div id="newBtn">
+                            <el-button type="primary" @click="handleAddFreight">新增运费模板</el-button>
+                        </div>
                     </div>
-                    <div class='form-row low'>
-                        <span v-if="isPC">商品编码:</span>
-                        <el-input
-                                v-model="listQuery.productCode"
-                                class="state"
-                                placeholder="请输入商品编码"
-                                clearable
-                                @keyup.enter.native="getList"
-                                @clear="getList"
-                        ></el-input>
-                    </div>
-                    <div class="form-row">
-                        <span v-if="isPC">商品状态:</span>
-                        <el-select v-model="listQuery.validFlag" class="state" clearable @change="getList">
-                            <el-option value="" label="所有"></el-option>
-                            <el-option label="待审核" value="1"></el-option>
-                            <el-option label="审核未通过" value="8"></el-option>
-                            <el-option label="已上架" value="2"></el-option>
-                            <el-option label="已下架" value="3"></el-option>
-                            <el-option label="已冻结" value="9"></el-option>
-                            <el-option label="已隐身" value="10"></el-option>
-                            <el-option label="已删除" value="0"></el-option>
-                        </el-select>
-                    </div>
-                    <div class="form-row">
-                        <span v-if="isPC">主推商品:</span>
-                        <el-select v-model="listQuery.featuredFlag" class="state" clearable @change="getList">
-                            <el-option label="所有" value="" ></el-option>
-                            <el-option label="是" value="1"></el-option>
-                            <el-option label="否" value="0"></el-option>
-                        </el-select>
-                    </div>
-                    <div class="form-row">
-                        <span v-if="isPC">商品属性:</span>
-                        <el-select v-model="listQuery.commodityType" class="state" clearable @change="handleCommodityType($event)">
-                            <el-option label="所有" value="" ></el-option>
-                            <el-option label="产品" value="1"></el-option>
-                            <el-option label="仪器" value="2"></el-option>
-                        </el-select>
-                    </div>
-                    <div class="form-row fenlei">
-                        <span v-if="isPC">商品分类:</span>
-                        <el-select v-model="listQuery.bigTypeId" class="state" clearable @change="handeleChangeFirst($event)">
-                            <el-option label="所有" value="" ></el-option>
-                            <el-option
-                                    v-for="item in classificationFirstList"
-                                    :key="item.bigTypeId"
-                                    :label="item.name"
-                                    :value="item.bigTypeId"
-                            ></el-option>
-                        </el-select>
-                    </div>
-                    <div class="form-row fenlei">
-                        <el-select v-model="listQuery.smallTypeId" class="state small" clearable @change="handeleChangeTwo($event)">
-                            <el-option label="二级分类" value="" ></el-option>
-                            <el-option
-                                    v-for="item in classificationTwoList"
-                                    :key="item.smallTypeId"
-                                    :label="item.name"
-                                    :value="item.smallTypeId"
-                            ></el-option>
-                        </el-select>
-                    </div>
-                    <div class="form-row fenlei">
-                        <el-select v-model="listQuery.tinyTypeId" class="state small" clearable @change="getList">
-                            <el-option label="三级分类" value="" ></el-option>
-                            <el-option
-                                    v-for="item in classificationThreeList"
-                                    :key="item.tinyTypeId"
-                                    :label="item.name"
-                                    :value="item.tinyTypeId"
-                            ></el-option>
-                        </el-select>
-                    </div>
-                    <div class="form-row">
-                        <span v-if="isPC">新品展示:</span>
-                        <el-select v-model="listQuery.showFlag" class="state" clearable @change="getList">
-                            <el-option value="" label="所有"></el-option>
-                            <el-option label="待审核" value="0"></el-option>
-                            <el-option label="已展示" value="1"></el-option>
-                            <el-option label="展示过期" value="2"></el-option>
-                            <el-option label="未展示" value="3"></el-option>
-                            <el-option label="审核未通过" value="4"></el-option>
-                            <el-option label="已下线" value="5"></el-option>
-                        </el-select>
-                    </div>
-                    <div class="form-row">
-                        <span v-if="isPC">上架平台:</span>
-                        <el-select v-model="listQuery.groundMall" class="state" clearable @change="getList">
-                            <el-option label="所有" value="" ></el-option>
-                            <el-option label="【采美平台】" value="0"></el-option>
-                            <el-option label="【丽格集采联盟平台】" value="4"></el-option>
-                        </el-select>
-                    </div>
-                    <div id="newBtn">
-                        <el-button type="primary" @click="getList">查询</el-button>
-                        <el-button type="primary" :disabled="disabled"  @click="handleDownshelfAll">批量下架</el-button>
+                    <div class="freight-main" v-if="freightList.length>0">
+                        <div class="freight-list" v-for="(freight,index) in freightList" :key="index">
+                            <div class="freight-list-title">
+                                <div class="list-name">{{ freight.name }}</div>
+                                <div class="list-right">
+                                    <span class="none">最后编辑时间:{{ freight.endTime }}</span>
+                                    <span class="copy"><a href="JavaScript:void(0);" @click="handleCopy(freight)">复制模板</a> |</span>
+                                    <span><a href="JavaScript:void(0);" @click="handleEdit(freight)">修改</a> | </span>
+                                    <span><a href="JavaScript:void(0);" @click="handleDele(freight)">删除</a></span>
+                                </div>
+                            </div>
+                            <el-table :data="freight.list"
+                                      border
+                                      :highlight-current-row="false"
+                                      :cell-style="tableCellStyle"
+                                      :header-cell-style="tableCellStyle"
+                            >
+                                <el-table-column label="配送地区" align="center" prop="areas" >
+                                    <template slot-scope="{row}">
+                                        {{ row.areas}}
+                                    </template>
+                                </el-table-column>
+                                <el-table-column label="运费" align="center" prop="text" width="350">
+                                    <template slot-scope="{row}">
+                                        {{ row.text}}
+                                    </template>
+                                </el-table-column>
+
+                            </el-table>
+                        </div>
+                        <div class="pagination">
+                            <el-pagination
+                                    background
+                                    :small="false"
+                                    @current-change="handleCurrentChange"
+                                    :current-page="listQuery.pageNum"
+                                    :layout="layout"
+                                    :total="total"
+                            >
+                            </el-pagination>
+                        </div>
                     </div>
-                </div>
-                <div class="goods-tips" v-if="isForbid">
-                    <div class="end-tips">
-                        <span class="WEB-icon tips"></span>
-                        <span>您的上架费已到期,已禁止商品的所有操作,支付账户上架费后才能继续操作。</span>
+                    <div  class="empty" v-else>
+                        <img src="/img/supplier/icon-freight-empty@2x.png">
+                        <div class="msg"><p>暂无任何运费模板</p></div>
                     </div>
-                </div>
-                <div class="goods-main" v-if="productsList.length>0">
-                    <el-table
-                            :data="productsList"
-                            v-loading="listLoading"
-                            element-loading-text="Loading"
-                            border
-                            fit
-                            height="600px"
-                            highlight-current-row
-                            :header-cell-style="{background:'#E1E1E1',color:'#606266'}"
-                            @selection-change="handleSelectionChange"
-                    >
-                        <el-table-column
-                                type="selection"
-                                align="center"
-                                width="55">
-                        </el-table-column>
-                        <el-table-column label="商品图片" align="center" prop="shopOrderNo" width="80">
-                            <template slot-scope="{row}">
-                                <img :src="row.image" :alt="row.name" style="width: 40px;height: 40px;">
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="商品名称" align="center" prop="orderTime" width="200">
-                            <template slot-scope="{row}">
-                                {{ row.name}}
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="商品分类" align="center" prop="name" width="120">
-                            <template slot-scope="{row}">
-                                {{ row.typeName}}
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="市场价/售价" align="center" prop="payTotalFee" width="160">
-                            <template slot-scope="{row}">
-                                ¥{{ row.normalPrice | NumFormat }}/ ¥{{ row.price | NumFormat }}
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="上架平台" align="center" prop="groundMall" width="250">
-                            <template slot-scope="{row}">
-                                <template v-if="row.groundMall === '0'">
-                                    <P>
-                                        <span style="float: left;">【采美平台】</span>
-                                        <el-tag v-if="row.validFlag===0" type="danger" size="small" style="float: right;">已删除</el-tag>
-                                        <el-tag v-if="row.validFlag===1" type="warning" size="small" style="float: right;">待审核</el-tag>
-                                        <el-tag v-if="row.validFlag===2" type="success" size="small" style="float: right;">已上架</el-tag>
-                                        <el-tag v-if="row.validFlag===3" type="danger" size="small" style="float: right;">已下架</el-tag>
-                                        <el-tag v-if="row.validFlag===8" type="danger" size="small" style="float: right;">审核未通过</el-tag>
-                                        <el-tag v-if="row.validFlag===9" type="danger" size="small" style="float: right;">已隐身</el-tag>
-                                        <el-tag v-if="row.validFlag===10" type="danger" size="small" style="float: right;">已冻结</el-tag>
-                                    </P>
-                                </template>
-                                <template v-else-if="row.groundMall === '4'">
-                                    <P>
-                                        <span style="float: left;">【丽格集采联盟平台】</span>
-                                        <el-tag v-if="row.mallValidFlag===1" type="warning" size="small" style="float: right;">待审核</el-tag>
-                                        <el-tag v-if="row.mallValidFlag===2" type="success" size="small" style="float: right;">已上架</el-tag>
-                                        <el-tag v-if="row.mallValidFlag===3" type="danger" size="small" style="float: right;">已下架</el-tag>
-                                        <el-tag v-if="row.mallValidFlag===8" type="danger" size="small" style="float: right;">审核未通过</el-tag>
-                                    </P>
-                                </template>
-                                <template v-else>
-                                    <P>
-                                        <span style="float: left;">【采美平台】</span>
-                                        <el-tag v-if="row.validFlag===0" type="danger" size="small" style="float: right;">已删除</el-tag>
-                                        <el-tag v-if="row.validFlag===1" type="warning" size="small" style="float: right;">待审核</el-tag>
-                                        <el-tag v-if="row.validFlag===2" type="success" size="small" style="float: right;">已上架</el-tag>
-                                        <el-tag v-if="row.validFlag===3" type="danger" size="small" style="float: right;">已下架</el-tag>
-                                        <el-tag v-if="row.validFlag===8" type="danger" size="small" style="float: right;">审核未通过</el-tag>
-                                        <el-tag v-if="row.validFlag===9" type="danger" size="small" style="float: right;">已隐身</el-tag>
-                                        <el-tag v-if="row.validFlag===10" type="danger" size="small" style="float: right;">已冻结</el-tag>
-                                    </P>
-                                    <P>
-                                        <span style="float: left;">【丽格集采联盟平台】</span>
-                                        <el-tag v-if="row.mallValidFlag===1" type="warning" size="small" style="float: right;">待审核</el-tag>
-                                        <el-tag v-if="row.mallValidFlag===2" type="success" size="small" style="float: right;">已上架</el-tag>
-                                        <el-tag v-if="row.mallValidFlag===3" type="danger" size="small" style="float: right;">已下架</el-tag>
-                                        <el-tag v-if="row.mallValidFlag===8" type="danger" size="small" style="float: right;">审核未通过</el-tag>
-                                    </P>
-                                </template>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="新品展示" align="center" prop="showFlag" width="120" >
-                            <template slot-scope="{row}">
-                                <template v-if="row.groundMall === '0' || row.groundMall === '0##4'">
-                                    <el-tag v-if="row.showFlag===0" type="warning" size="small">待审核</el-tag>
-                                    <el-tag v-if="row.showFlag===1" type="success" size="small">已展示</el-tag>
-                                    <el-tag v-if="row.showFlag===2" type="danger" size="small">展示过期</el-tag>
-                                    <el-tag v-if="row.showFlag===3" type="warning" size="small">未展示</el-tag>
-                                    <el-tag v-if="row.showFlag===4" type="danger" size="small">审核未通过</el-tag>
-                                    <el-tag v-if="row.showFlag===5" type="danger" size="small">已下线</el-tag>
-                                </template>
-                                <template v-else>
-                                    <span>--</span>
-                                </template>
-                            </template>
-                        </el-table-column>
-                        <el-table-column label="操作" align="center" width="250">
-                            <template slot-scope="{row}">
-                                <el-button type="primary" style="margin: 5px;" v-if="[0,1,2,3,8,9].indexOf(row.validFlag)!=-1" :disabled="isForbid" size="mini" plain @click="handleEdit(row)">编辑</el-button>
-                                <template  v-if="[2].indexOf(row.validFlag)!=-1 || [2].indexOf(row.mallValidFlag)!=-1">
-                                    <el-button type="primary" style="margin: 5px;" :disabled="isForbid" size="mini" plain @click="handleDownshelf(row)">下架</el-button>
-                                </template>
-                                <template v-if="row.groundMall === '0' || row.groundMall === '0##4'">
-                                    <el-button type="primary" style="margin: 5px;" v-if="[2].indexOf(row.validFlag)!=-1" :disabled="isForbid" size="mini" plain @click="handlePreview(row)">查看</el-button>
-                                    <el-button type="primary" style="margin: 5px;" v-if="row.isDelFeatured" :disabled="isForbid" size="mini" plain @click="handleDeleteHot(row)">删除主页推荐</el-button>
-                                    <el-button type="primary" style="margin: 5px;" v-if="row.isAddFeatured" :disabled="isForbid" size="mini" plain @click="handlePushHot(row)">添加主页推荐</el-button>
-                                </template>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </div>
-                <div  class="empty" v-else>
-                    <img src="/img/order/icon-goods.svg">
-                    <div class="msg"><p>您还未发布任何商品快去<a href="/supplier/release.html">发布</a>吧</p></div>
-                </div>
-                <div class="pagination">
-                    <el-pagination
-                            background
-                            :small="false"
-                            @current-change="handleCurrentChange"
-                            :current-page="listQuery.pageNum"
-                            :layout="layout"
-                            :total="total"
-                    >
-                    </el-pagination>
-                </div>
-                <!--下架弹窗-->
-                <el-dialog title="下架" :visible.sync="dialogFormVisible" width="380px" style="margin: 200px auto;">
-                    <template v-if="handlePros.groundMall === '0'">
-                        <p>确定将商品从【采美平台】下架吗?</p>
-                    </template>
-                    <template v-else-if="handlePros.groundMall === '4'">
-                        <p>确定将商品从【丽格集采联盟平台】下架吗?</p>
-                    </template>
-                    <template v-else>
-                        <el-row :gutter="24" class="box-row" style="margin-bottom: 20px;">
-                            <el-col :span="12" v-if="handlePros.mallValidFlag === 2 && handlePros.validFlag === 2">
-                                <el-radio v-model="groundMallType" :label="0">全部平台</el-radio>
-                            </el-col>
-                            <el-col :span="12" v-if="handlePros.validFlag === 2">
-                                <el-radio v-model="groundMallType" :label="1">【采美平台】</el-radio>
-                            </el-col>
+                    <!--运费模板弹窗-->
+                    <el-dialog title="创建运费模板" :visible.sync="dialogFormVisible" :close-on-click-modal="false" :close-on-press-escape="false"  width="750px">
+                        <div class="el-form-content">
+                            <el-form ref="dataForm" :rules="rules" :model="freightTemp" label-position="right" label-width="0">
+                                <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                                    <span style="font-weight: bold;">模板名称:</span>
+                                </el-row>
+                                <el-form-item style="margin-left: 0;margin-bottom: 10px;">
+                                    <el-input v-model="freightTemp.name" placeholder="请输入模板名称"  maxlength="30"></el-input>
+                                </el-form-item>
+                                <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                                    <span style="font-weight: bold;">设置运费:</span>
+                                    <span style="color: #F94B4B;">(注意:未设置的其他省市默认包邮)</span>
+                                </el-row>
+                                <el-form-item style="margin-bottom: 10px;">
+                                    <div class="el-form-list" v-for="(freight,index) in freightTemp.freightRuleList" :key="index">
+                                        <div class="el-form-list-title">
+                                            运费规则{{index+1}}
+                                            <div class="el-form-close" v-if="index>0" @click="handleDelRole(index)"><i class="el-icon-close"></i></div>
+                                        </div>
+                                        <div class="el-form-list-roles rol3">
+                                            <div class="el-form-role3">
+                                                <template v-if="freight.areaTax">
+                                                    <div class="el-form-role3-ns">
+                                                        <span style="color: #333333;">{{ freight.areaTax }}</span>
+                                                    </div>
+                                                    <el-button plain size="mini" @click="changeFreightAreas('edit',freight,index)">修改省市</el-button>
+                                                </template>
+                                                <template  v-else>
+                                                    <div class="el-form-role3-ns">
+                                                        <span style="color: #9AA5B5;">对应地区</span>
+                                                    </div>
+                                                    <el-button plain size="mini" @click="sittingFreightAreas('add',freight,index)">选择省市</el-button>
+                                                </template>
+                                            </div>
+                                        </div>
+                                        <div class="el-form-list-roles">
+                                            <div class="el-form-role5">
+                                                <template v-if="freight.ruleTax">
+                                                    <div class="el-form-role5-ns">
+                                                        <span style="color: #333333;">{{ freight.ruleTax }}</span>
+                                                    </div>
+                                                    <el-button plain size="mini" @click="changeFreightRole(freight,index)">修改规则</el-button>
+                                                </template>
+                                                <template  v-else>
+                                                    <div class="el-form-role5-ns">
+                                                        <span style="color: #9AA5B5;">对应运费规则</span>
+                                                    </div>
+                                                    <el-button plain size="mini" @click="sittingFreightRole(freight,index)">设置规则</el-button>
+                                                </template>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </el-form-item>
+                                <div class="el-form-add" v-if="freightTemp.freightRuleList.length < 10">
+                                    <el-button type="text" icon="el-icon-circle-plus-outline" @click="handleAddRole" style="padding: 0 0;">添加运费规则</el-button>
+                                </div>
+                            </el-form>
+                        </div>
+                        <div slot="footer" class="dialog-footer">
+                            <el-button @click="handleCanleFreights">取消</el-button>
+                            <el-button type="primary" @click="handleConfirmShelf">确定</el-button>
+                        </div>
+                    </el-dialog>
+                    <!--设置省市区弹窗-->
+                    <el-dialog title="选择省市" :visible.sync="areasFormVisible" :close-on-click-modal="false" :close-on-press-escape="false" width="750px">
+                        <div class="el-form-content">
+                            <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                                <div class="el-area-wup" v-for="(area,index) in areaData" :key="index">
+                                    <div class="el-area-box">
+                                        <div class="el-area-checkbox">
+                                            <el-checkbox :indeterminate="area.isIndeterminate" v-model="area.checked" :disabled="disabled(area)" @change="handleCheckAllChange(area,$event)"></el-checkbox>
+                                            <div class="el-area-label" :class="disabled(area) ? 'disabled' : ''">{{ area.name }}</div>
+                                        </div>
+                                    </div>
+                                    <div class="el-area-box">
+                                        <div class="el-area-checkbox" v-for="city in area.provinceList" :key="city">
+                                            <el-checkbox :indeterminate="city.isIndeterminate" v-model="city.checked"  :disabled="disabled(city)" @change="handleCheckedCitiesChange(city,area,$event)"></el-checkbox>
+                                            <div class="el-area-label" :class="disabled(city) ? 'disabled' : ''" @click="handleUrbanForm(city,area,disabled(city))">
+                                                {{ city.name }}
+                                                ({{ city.checkedCities.length }}/{{ city.cityList.length }})
+                                                <i class="el-icon-arrow-right"></i>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </el-row>
+                        </div>
+                        <div slot="footer" class="dialog-footer">
+                            <el-button @click="handleCanleAreas">取消</el-button>
+                            <el-button type="primary" @click="handleConfirmAreas">确定</el-button>
+                        </div>
+                    </el-dialog>
+                    <!--设置市区弹窗-->
+                    <el-dialog :title="cityUrbanForm.name" :visible.sync="urbanFormVisible" :close-on-click-modal="false" :close-on-press-escape="false" width="750px" style="margin: 100px auto;">
+                        <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                            <div class="el-area-wup">
+                                <div class="el-area-box">
+                                    <div class="el-area-checkbox">
+                                        <el-checkbox :indeterminate="cityUrbanForm.isIndeterminate" v-model="cityUrbanForm.checked" :disabled="disabled(cityUrbanForm)" @change="handleUrbanChange">全选</el-checkbox>
+                                    </div>
+                                </div>
+                                <div class="el-area-box">
+                                    <div class="el-area-checkbox" v-for="urban in cityUrbanForm.cityList" :key="urban">
+                                        <el-checkbox :indeterminate="urban.isIndeterminate" v-model="urban.checked" :disabled="disabled(urban)" @change="handleCheckedUrbanChange(urban,$event)">{{ urban.name }}</el-checkbox>
+                                    </div>
+                                </div>
+                            </div>
                         </el-row>
-                        <el-row :gutter="24" class="box-row" style="margin-bottom: 20px;" v-if="handlePros.mallValidFlag === 2">
-                            <el-col :span="12">
-                                <el-radio v-model="groundMallType" :label="2">【丽格集采联盟平台】</el-radio>
-                            </el-col>
-                        </el-row>
-                    </template>
-
-                    <div slot="footer" class="dialog-footer">
-                        <el-button @click="dialogFormVisible = false">取消</el-button>
-                        <el-button type="primary" @click="handleConfirmShelf">确定</el-button>
-                    </div>
-                </el-dialog>
+                        <div slot="footer" class="dialog-footer">
+                            <el-button @click="urbanFormVisible = false">取消</el-button>
+                            <el-button type="primary" @click="handleConfirmUrban">确定</el-button>
+                        </div>
+                    </el-dialog>
+                    <!--运费规则弹窗-->
+                    <el-dialog title="运费规则" :visible.sync="rulesFormVisible" :close-on-click-modal="false" :close-on-press-escape="false" width="750px" style="margin: 100px auto;">
+                        <el-form ref="ruleForm" :rules="rules" :model="freightRulesForm" label-position="right" label-width="0">
+                            <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                                <span style="font-weight: bold;">运费方式:</span>
+                                <span>固定运费</span>
+                            </el-row>
+                            <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                                <span style="font-weight: bold;">运费金额:</span>
+                            </el-row>
+                            <el-form-item prop="freightAmount" :rules="rules.freightAmount" style="margin-left: 0;">
+                                <el-input v-model="freightRulesForm.freightAmount">
+                                    <template slot="append">元</template>
+                                </el-input>
+                            </el-form-item>
+                            <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                                <span>
+                                    <el-checkbox v-model="freightRulesForm.checked" @change="handleFreightFreeType"></el-checkbox>
+                                    指定条件包邮
+                                </span>
+                            </el-row>
+                            <div class="box-row-col" v-if="freightRulesForm.checked">
+                                <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;">
+                                    <el-radio v-model="freightRulesForm.freeCondition" :label="0">满足件数</el-radio>
+                                    <el-radio v-model="freightRulesForm.freeCondition" :label="1">满足金额</el-radio>
+                                </el-row>
+                                <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;" v-if="freightRulesForm.freeCondition === 0">
+                                    满
+                                    <el-input v-model="freightRulesForm.productNum" style="width: 180px">
+                                        <template slot="append">件</template>
+                                    </el-input>
+                                    可包邮
+                                </el-row>
+                                <el-row :gutter="24" class="box-row" style="margin-bottom: 10px;margin-left: 0;margin-right: 0;"  v-if="freightRulesForm.freeCondition === 1">
+                                    满
+                                    <el-input v-model="freightRulesForm.allAmount" style="width: 180px">
+                                        <template slot="append">元</template>
+                                    </el-input>
+                                    可包邮
+                                </el-row>
+                            </div>
+                        </el-form>
+                        <div slot="footer" class="dialog-footer">
+                            <el-button @click="rulesFormVisible = false">取消</el-button>
+                            <el-button type="primary" @click="handleConfirmRoles">确定</el-button>
+                        </div>
+                    </el-dialog>
+                </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/common/serviceapi/supplier.service.js(v=${version})}"></script>
+<script charset="utf-8" type="text/javascript" th:src="@{/js/supplier-center/shop/mixins/freightMixins.js(v=${version})}"></script>
 <script charset="utf-8" type="text/javascript" th:src="@{/js/supplier-center/shop/freight.js(v=${version})}"></script>
 </body>
 </html>

+ 38 - 61
src/main/resources/templates/supplier-center/shop/release.html

@@ -2,7 +2,7 @@
 <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>
+    <title>采美365网-我的店铺-发布商品</title>
     <template th:replace="components/head-link"></template>
 
     <link th:href="@{/css/base/center.css(v=${version})}" rel="stylesheet" type="text/css">
@@ -421,23 +421,52 @@
                                 </div>
                             </div>
                             <div class="release-from clear">
-                                <div class="release-label"><span class="star">*</span>销售区域:</div>
+                                <div class="release-label"><span class="star">*</span>物流方式:</div>
                                 <div class="release-input">
                                     <div class="release-props">
                                         <label class="release-radio">
-                                            <input type="radio" name="allAreaFlag" v-model="releaseParams.allAreaFlag" value="1"  @click="radioChangeAllAreaFlag">
-                                            <i class="icon mIcon">全部区域</i>
+                                            <input type="radio" name="byFlag" v-model="releaseParams.byFlag" value="0"  @click="radioChangeByFlag">
+                                            <i class="icon mIcon">包邮</i>
                                         </label>
                                         <label class="release-radio">
-                                            <input type="radio" name="allAreaFlag" v-model="releaseParams.allAreaFlag" value="0" checked @click="radioChangeAllAreaFlag">
-                                            <i class="icon mIcon">指定区域</i>
+                                            <input type="radio" name="byFlag" v-model="releaseParams.byFlag" value="1" checked @click="radioChangeByFlag">
+                                            <i class="icon mIcon">使用运费模板</i>
+                                        </label>
+                                        <label class="release-radio">
+                                            <input type="radio" name="byFlag" v-model="releaseParams.byFlag" value="2" checked @click="radioChangeByFlag">
+                                            <i class="icon mIcon">到付</i>
                                         </label>
                                     </div>
-                                    <div class="release-province clear" v-show="releaseParams.allAreaFlag==0">
-                                        <a class="province-item" href="javascript: void(0);" v-for="(item, index) in ProvinceList" :key="index" :class="item.isChecked ? 'active':''"  @click="addProvinceFn(item,index)" >{{item.name}}</a>
+                                </div>
+                                <div class="release-tips" v-show="vShow_byFlag">{{fromMessage}}</div>
+                            </div>
+                            <div class="release-from clear" v-if="releaseParams.byFlag === '1'">
+                                <div class="release-label"><span class="star">*</span>选择模板:</div>
+                                <div class="release-input">
+                                    <div class="release-props">
+                                        <div class="release-select">
+                                            <el-select v-model="releaseParams.freightsTemp" placeholder="请选择" style="width: 320px;">
+                                                <el-option
+                                                        v-for="item in options"
+                                                        :key="item.value"
+                                                        :label="item.label"
+                                                        :value="item.value"
+                                                        :disabled="item.disabled">
+                                                </el-option>
+                                            </el-select>
+                                        </div>
+                                        <div class="release-select-refresh">
+                                            <el-button type="text" icon="el-icon-refresh-right" @click="handleRefresh" style="padding: 0 0;color: #333333;">刷新</el-button>
+                                        </div>
+                                        <div class="release-select-all">
+                                            <a href="/supplier/freight.html" target="_blank">所有模板</a>
+                                        </div>
                                     </div>
                                 </div>
-                                <div class="release-tips" v-show="vShow_isProvince">{{fromMessage}}</div>
+                                <div class="release-input-add">
+                                    <el-button type="primary" @click="handleAddFreight">新增运费模板</el-button>
+                                </div>
+                                <div class="release-tips" v-show="vShow_byFlag">{{fromMessage}}</div>
                             </div>
                             <div class="release-from clear">
                                 <div class="from-button secondbtn">
@@ -445,58 +474,6 @@
                                     <a href="javascript: void(0);" class="btn next" @click="NextStep1">下一步</a>
                                 </div>
                             </div>
-<!--                            <div class="release-from clear">-->
-<!--                                <div class="release-label"><span class="star">*</span>起订量:</div>-->
-<!--                                <div class="release-input">-->
-<!--                                    <input class="input" v-model="releaseParams.minBuyNumber" maxlength="40" type="number" placeholder="请输入商品起订量" @input="input_minBuyNumber">-->
-<!--                                </div>-->
-<!--                                <div class="release-tips" v-show="vShow_MinBuyNumber">{{fromMessage}}</div>-->
-<!--                            </div>-->
-<!--                            <div class="release-from clear">-->
-<!--                                <div class="release-label"><span class="star">*</span>市场价:</div>-->
-<!--                                <div class="release-input" id="normalPrice">-->
-<!--                                    <input class="input price" v-model="releaseParams.normalPrice" maxlength="40" type="number" placeholder="请输入商品市场价" @input="input_normalPrice">-->
-<!--                                    <span class="yang">¥</span>-->
-<!--                                </div>-->
-<!--                                <div class="release-tips" v-show="vShow_NormalPrice">{{fromMessage}}</div>-->
-<!--                            </div>-->
-<!--                            <div class="release-from clear">-->
-<!--                                <div class="release-label"><span class="star">*</span>售价:</div>-->
-<!--                                <div class="release-input">-->
-<!--                                    <input class="input price" v-model="releaseParams.price" maxlength="40" type="number" placeholder="请输入商品售价" @input="input_price">-->
-<!--                                    <span class="yang">¥</span>-->
-<!--                                </div>-->
-<!--                                <div class="release-tips" v-show="vShow_price">{{fromMessage}}</div>-->
-<!--                            </div>-->
-
-<!--                            <div class="release-from clear">-->
-<!--                                <div class="release-label rightTxt">结算价:</div>-->
-<!--                                <div class="release-input">-->
-<!--                                    <input class="input price" v-model="releaseParams.costPrice" maxlength="40" type="number" placeholder="请输入商品结算价">-->
-<!--                                    <span class="yang">¥</span>-->
-<!--                                </div>-->
-<!--                            </div>-->
-<!--                            <div class="release-from clear">-->
-<!--                                <div class="release-label"><span class="star">*</span>库存:</div>-->
-<!--                                <div class="release-input"><input class="input" v-model="releaseParams.stock" maxlength="40" type="number" placeholder="请输入商品库存量" @input="input_stock"></div>-->
-<!--                                <div class="release-tips" v-show="vShow_Stock">{{fromMessage}}</div>-->
-<!--                            </div>-->
-
-<!--                            <div class="release-from clear">-->
-<!--                                <div class="release-label"><span class="star">*</span>运费:</div>-->
-<!--                                <div class="release-input">-->
-<!--                                    <div class="release-props">-->
-<!--                                        <label class="release-radio">-->
-<!--                                            <input type="radio" name="byFlag" v-model="releaseParams.byFlag" value="0"  @click="radioChangeByFlag">-->
-<!--                                            <i class="icon mIcon">买家承担</i>-->
-<!--                                        </label>-->
-<!--                                        <label class="release-radio">-->
-<!--                                            <input type="radio" name="byFlag" v-model="releaseParams.byFlag" value="1" checked @click="radioChangeByFlag">-->
-<!--                                            <i class="icon mIcon">卖家承担</i>-->
-<!--                                        </label>-->
-<!--                                    </div>-->
-<!--                                </div>-->
-<!--                            </div>-->
                         </div>
                         <!--商品信息-->
                         <div class="release-main-container" v-show="activeNum == 2">