Преглед изворни кода

营销管理模块新增 服务套餐和服务套餐订单页面

hzj18279462576@163.com пре 10 месеци
родитељ
комит
729275e6e3

+ 2 - 2
src/main.js

@@ -31,9 +31,9 @@ Vue.use(Viewer, {
     zIndex: 99999 // 设置图片预览组件的层级,确保能在其他组件之上
   }
 });
-// Vue.prototype.Tupiantou ='https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload'//线上
+Vue.prototype.Tupiantou ='https://mxys.chuanghai-tech.com/sqx_fast/alioss/upload'//线上
 // Vue.prototype.Tupiantou ='http://192.168.161.190:8171/sqx_fast/alioss/upload'//线上
-Vue.prototype.Tupiantou ="https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/alioss/upload"; //线下
+// Vue.prototype.Tupiantou ="https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast/alioss/upload"; //线下
 Vue.prototype.Tupian = function(img) {
   return "https://mxys.chuanghai-tech.com/wmfile" + img;
   // return "http://192.168.161.190:8171/wmfile" + img;

+ 18 - 0
src/router/index.js

@@ -281,6 +281,12 @@ const mainRoutes = {
       meta: { title: "商品规格", isTab: true }
     },
     {
+      path: "/specificationVolume",
+      component: _import("selfShop/specificationVolume"),
+      name: "specificationVolume",
+      meta: { title: "规格销量", isTab: true }
+    },
+    {
       path: "/orderDetails",
       component: _import("selfShop/orderDetails"),
       name: "orderDetails",
@@ -529,6 +535,18 @@ const mainRoutes = {
       meta: { title: "活动管理", isTab: true }
     },
     {
+      path: "/servicePackage",
+      component: _import("servicePackage/servicePackage"),
+      name: "servicePackage",
+      meta: { title: "服务套餐", isTab: true }
+    },
+    {
+      path: "/packageOrder",
+      component: _import("servicePackage/packageOrder"),
+      name: "packageOrder",
+      meta: { title: "服务套餐订单", isTab: true }
+    },
+    {
       path: "/integralDetail",
       component: _import("integral/integralDetail"),
       name: "integralDetail",

+ 2 - 2
src/utils/httpRequest.js

@@ -85,8 +85,8 @@ http.adornWss = actionName => {
   // 非生产环境 && 开启代理, 接口前缀统一使用[/proxyApi/]前缀做代理拦截!
   // return (process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? '/proxyApi/' : window.SITE_CONFIG.baseUrl) + actionName
   // return 'wss://www.daweilinli.com/wss/' + actionName
-  return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
-  // return "wss://mxys.chuanghai-tech.com/wss-test/" + actionName;
+  // return 'wss://mxys.chuanghai-tech.com/wss/' + actionName
+  return "wss://mxys.chuanghai-tech.com/wss-test/" + actionName;
 };
 /**
  * get请求参数处理

+ 138 - 87
src/views/mission/mission.vue

@@ -173,8 +173,8 @@
           >  
         </div>
         <div style="margin:5px;display: inline-block;">
-          <span>订单创建开始时间:</span>
-          <el-date-picker
+          <!-- <span>订单创建开始时间:</span> -->
+          <!-- <el-date-picker
             style="width: 160px;margin-left: 10px;"
             v-model="startTime"
             align="right"
@@ -183,10 +183,22 @@
             value-format="yyyy-MM-dd"
             placeholder="选择开始时间"
           >
-          </el-date-picker
-          >&nbsp;&nbsp;&nbsp;
+          </el-date-picker> -->
+          <span>订单创建时间:</span>
+          <el-date-picker
+            v-model="startTime"
+            type="datetimerange"
+            unlink-panels
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+          &nbsp;&nbsp;&nbsp;
         </div>
-        <div style="margin:5px;display: inline-block;">
+        <!-- <div style="margin:5px;display: inline-block;">
           <span>订单创建截止时间:</span>
           <el-date-picker
             style="width: 160px;margin-left: 10px;"
@@ -198,11 +210,11 @@
             placeholder="选择截止时间"
           >
           </el-date-picker>
-        </div>
+        </div> -->
 
         <div style="margin:5px;display: inline-block;">
-          <span>支付开始时间:</span>
-          <el-date-picker
+          <!-- <span>支付开始时间:</span> -->
+          <!-- <el-date-picker
             style="width: 160px;margin-left: 10px;"
             v-model="payStartTime"
             align="right"
@@ -211,10 +223,21 @@
             value-format="yyyy-MM-dd"
             placeholder="选择开始时间"
           >
-          </el-date-picker
-          >&nbsp;&nbsp;&nbsp;
+          </el-date-picker> -->
+          <span>支付时间:</span>
+          <el-date-picker
+            v-model="payStartTime"
+            type="datetimerange"
+            unlink-panels
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          ></el-date-picker>
+          &nbsp;&nbsp;&nbsp;
         </div>
-        <div style="margin:5px;display: inline-block;">
+        <!-- <div style="margin:5px;display: inline-block;">
           <span>支付截止时间:</span>
           <el-date-picker
             style="width: 160px;margin-left: 10px;"
@@ -226,10 +249,10 @@
             placeholder="选择截止时间"
           >
           </el-date-picker>
-        </div>
+        </div> -->
         <div v-if="status == 14" style="margin:5px;display: inline-block;">
-          <span>退款开始时间:</span>
-          <el-date-picker
+          <!-- <span>退款开始时间:</span> -->
+          <!-- <el-date-picker
             style="width: 200px;margin-left: 10px;"
             v-model="refundStartTime"
             align="right"
@@ -238,10 +261,21 @@
             value-format="yyyy-MM-dd HH:mm:ss"
             placeholder="选择开始时间"
           >
-          </el-date-picker
-          >&nbsp;&nbsp;&nbsp;
+          </el-date-picker> -->
+          <span>退款时间:</span>
+          <el-date-picker
+            v-model="refundStartTime"
+            type="datetimerange"
+            unlink-panels
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          ></el-date-picker>
+          &nbsp;&nbsp;&nbsp;
         </div>
-        <div v-if="status == 14" style="margin:5px;display: inline-block;">
+        <!-- <div v-if="status == 14" style="margin:5px;display: inline-block;">
           <span>退款结束时间:</span>
           <el-date-picker
             style="width: 200px;margin-left: 10px;"
@@ -253,7 +287,7 @@
             placeholder="选择结束时间"
           >
           </el-date-picker>
-        </div>
+        </div> -->
         <el-button
           style="margin-left:15px;"
           size="mini"
@@ -490,8 +524,10 @@
         <el-table-column prop="remark" label="订单备注" width="150">
         </el-table-column>
 
-        <el-table-column prop="createTime" label="创建时间"></el-table-column>
-        <el-table-column prop="payTime" label="支付时间"></el-table-column>
+        <el-table-column prop="createTime" label="创建时间" width="100"></el-table-column>
+        <el-table-column prop="payTime" label="支付时间" width="100"></el-table-column>
+        <el-table-column prop="receivingTime" label="接单时间" width="100"></el-table-column>
+        <el-table-column prop="finishTime" label="订单完成时间" width="120"></el-table-column>
         <el-table-column prop="payType" label="支付方式" width="100">
           <template slot-scope="scope">
             <span v-if="scope.row.payType === 1">微信</span>
@@ -503,7 +539,7 @@
         <el-table-column
           prop="orderCode"
           label="取餐号"
-          width="100"
+          width="110"
         ></el-table-column>
         <!-- <el-table-column
           fixed="right"
@@ -1063,10 +1099,8 @@
       <el-table v-loading="tableDataLoadingQS" :data="riderData">
         <el-table-column type="index" label="序号" width="80">
         </el-table-column>
-        <el-table-column prop="userName" label="骑手姓名">
-        </el-table-column>
-        <el-table-column prop="userPhone" label="骑手手机号">
-        </el-table-column>
+        <el-table-column prop="userName" label="骑手姓名"> </el-table-column>
+        <el-table-column prop="userPhone" label="骑手手机号"> </el-table-column>
         <el-table-column prop="payTime" label="订单支付时间"></el-table-column>
         <el-table-column prop="receveTime" label="接单时间"></el-table-column>
         <el-table-column prop="stationName" label="所在站点"></el-table-column>
@@ -1381,10 +1415,13 @@ export default {
       // },
       startTime: "",
       endTime: "",
-      payStartTime: dayjs()
-        .subtract(6, "day")
-        .format("YYYY-MM-DD"), //支付开始时间
-      payEndTime: dayjs().format("YYYY-MM-DD"),
+      payStartTime: [
+          dayjs()
+            .subtract(6, "day").startOf('day')
+            .format("YYYY-MM-DD HH:mm:ss"),
+          dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
+        ], //支付开始时间
+      payEndTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
       refundStartTime: "",
       refundEndTime: "",
 
@@ -1796,9 +1833,12 @@ export default {
       this.endTime = "";
       this.refundStartTime = "";
       this.refundEndTime = "";
-      this.payStartTime = dayjs()
-        .subtract(6, "day")
-        .format("YYYY-MM-DD");
+      this.payStartTime = [
+          dayjs()
+            .subtract(6, "day").startOf('day')
+            .format("YYYY-MM-DD HH:mm:ss"),
+          dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
+        ];
       this.payEndTime = dayjs().format("YYYY-MM-DD");
       this.stationName = "";
       this.spEarningTypeId = "";
@@ -1868,12 +1908,12 @@ export default {
           reservationFlag: this.reservationFlag,
           indentStatus: this.indentStatus,
           riderPhone: this.riderPhone,
-          startTime: this.startTime,
-          endTime: this.endTime,
-          refundStartTime: this.refundStartTime,
-          refundEndTime: this.refundEndTime,
-          payStartTime: this.payStartTime,
-          payEndTime: this.payEndTime,
+          startTime: this.startTime ? this.startTime[0] : "",
+          endTime: this.startTime ? this.startTime[1] : "",
+          refundStartTime: this.refundStartTime ? this.refundStartTime[0] : "",
+          refundEndTime: this.refundStartTime ? this.refundStartTime[1] : "",
+          payStartTime: this.payStartTime ? this.payStartTime[0] : "",
+          payEndTime: this.payStartTime ? this.payStartTime[1] : "",
           riderStationId: this.stationName,
           shopTypeId: this.spEarningTypeId,
           couponType: this.couponType
@@ -1907,7 +1947,7 @@ export default {
             }
           }
           this.totalMoney = this.totalMoney.toFixed(2);
-          console.log(data.data.totalCount,'此时间段暂无数据');
+          console.log(data.data.totalCount, "此时间段暂无数据");
           if (!data.data.totalCount) {
             this.$message({
               message: "此时间段暂无数据",
@@ -2179,14 +2219,14 @@ export default {
             }
           });
         } else {
-          if(data.msg=='订单状态发生变更,请刷新后重试!'){
+          if (data.msg == "订单状态发生变更,请刷新后重试!") {
             this.$message({
-              message: '当前订单状态不支持转单',
+              message: "当前订单状态不支持转单",
               type: "warning",
               duration: 1500,
               onClose: () => {}
             });
-          }else{
+          } else {
             this.$message({
               message: data.msg,
               type: "warning",
@@ -2263,7 +2303,7 @@ export default {
     },
 
     // 骑手明细  (-------------------------------------------------------)
-    riderListData(){
+    riderListData() {
       this.dialogFormVisibleQS = true;
       this.$http({
         url: this.$http.adornUrl("admin/transferRecord/queryTransferRecords"),
@@ -2276,21 +2316,21 @@ export default {
       }).then(({ data }) => {
         console.log(data, "骑手明细");
         this.tableDataLoadingQS = false;
-        this.riderData=data.data.list
-        this.totalCountQS=data.data.totalCount
+        this.riderData = data.data.list;
+        this.totalCountQS = data.data.totalCount;
       });
     },
     riderDetail(row) {
-      this.orderIdQS = row.orderId
-      this.riderListData()
+      this.orderIdQS = row.orderId;
+      this.riderListData();
     },
     handleSizeChangeQS(val) {
       this.limitQS = val;
-      this.riderListData()
+      this.riderListData();
     },
     handleCurrentChangeQS(val) {
       this.pageQS = val;
-      this.riderListData()
+      this.riderListData();
     },
 
     // 导出
@@ -2371,12 +2411,14 @@ export default {
             reservationFlag: this.reservationFlag,
             indentStatus: this.indentStatus,
             riderPhone: this.riderPhone,
-            startTime: this.startTime,
-            endTime: this.endTime,
-            payStartTime: this.payStartTime,
-            payEndTime: this.payEndTime,
-            refundStartTime: this.refundStartTime,
-            refundEndTime: this.refundEndTime,
+            startTime: this.startTime ? this.startTime[0] : "",
+            endTime: this.startTime ? this.startTime[1] : "",
+            payStartTime: this.payStartTime ? this.payStartTime[0] : "",
+            payEndTime: this.payStartTime ? this.payStartTime[1] : "",
+            refundStartTime: this.refundStartTime
+              ? this.refundStartTime[0]
+              : "",
+            refundEndTime: this.refundStartTime ? this.refundStartTime[1] : "",
             riderStationId: this.stationName,
             shopTypeId: this.spEarningTypeId,
             couponType: this.couponType
@@ -2416,23 +2458,23 @@ export default {
         if (this.$route.params.refund == 14) {
           this.status = this.$route.params.refund;
           this.payStartTime = "";
-          this.payEndTime = "";
-          this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
-          this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
+          // this.payEndTime = "";
+          this.refundStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
+          // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
           this.taskdataSelect();
         } else if (this.$route.params.refund == 15) {
           this.status = this.$route.params.refund;
-          this.payStartTime = this.$route.params.dayId + " " + "00:00:00";
-          this.payEndTime = this.$route.params.dayId + " " + "23:59:59";
+          this.payStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
+          // this.payEndTime = this.$route.params.dayId + " " + "23:59:59";
           this.refundStartTime = "";
-          this.refundEndTime = "";
+          // this.refundEndTime = "";
           this.taskdataSelect();
         } else {
           this.status = "";
           this.refundStartTime = "";
-          this.refundEndTime = "";
+          // this.refundEndTime = "";
           this.payStartTime = "";
-          this.payEndTime = "";
+          // this.payEndTime = "";
           this.taskdataSelect();
         }
       } else if (this.$route.params.type == "shop") {
@@ -2440,21 +2482,24 @@ export default {
           console.log(this.$route.params, "商家-钩子中获取参数");
           this.status = this.$route.params.refund;
           this.payStartTime = "";
-          this.payEndTime = "";
+          // this.payEndTime = "";
           this.shopName = this.$route.params.shopName;
-          this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
-          this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
+          this.refundStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
+          // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
           this.taskdataSelect();
         }
       } else {
         this.status = "";
         this.shopName = "";
         this.refundStartTime = "";
-        this.refundEndTime = "";
-        this.payStartTime = dayjs()
-          .subtract(6, "day")
-          .format("YYYY-MM-DD");
-        this.payEndTime = dayjs().format("YYYY-MM-DD");
+        // this.refundEndTime = "";
+        this.payStartTime = [
+          dayjs()
+            .subtract(6, "day").startOf('day')
+            .format("YYYY-MM-DD HH:mm:ss"),
+          dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
+        ];
+        // this.payEndTime = dayjs().format("YYYY-MM-DD");
         // this.taskdataSelect();
       }
     }
@@ -2479,23 +2524,25 @@ export default {
         if (this.$route.params.refund == 14) {
           this.status = this.$route.params.refund;
           this.payStartTime = "";
-          this.payEndTime = "";
-          this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
-          this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
+          // this.payEndTime = "";
+          this.refundStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
+          // this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
+          // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
           this.taskdataSelect();
         } else if (this.$route.params.refund == 15) {
           this.status = this.$route.params.refund;
-          this.payStartTime = this.$route.params.dayId + " " + "00:00:00";
-          this.payEndTime = this.$route.params.dayId + " " + "23:59:59";
+          this.payStartTime = [this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
+          // this.payStartTime = this.$route.params.dayId + " " + "00:00:00";
+          // this.payEndTime = this.$route.params.dayId + " " + "23:59:59";
           this.refundStartTime = "";
-          this.refundEndTime = "";
+          // this.refundEndTime = "";
           this.taskdataSelect();
         } else {
           this.status = "";
           this.refundStartTime = "";
-          this.refundEndTime = "";
+          // this.refundEndTime = "";
           this.payStartTime = "";
-          this.payEndTime = "";
+          // this.payEndTime = "";
           this.taskdataSelect();
         }
       } else if (this.$route.params.type == "shop") {
@@ -2503,21 +2550,25 @@ export default {
           console.log(this.$route.params, "商家-钩子中获取参数");
           this.status = this.$route.params.refund;
           this.payStartTime = "";
-          this.payEndTime = "";
+          // this.payEndTime = "";
           this.shopName = this.$route.params.shopName;
-          this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
-          this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
+          this.refundStartTime =[ this.$route.params.dayId + " " + "00:00:00",this.$route.params.dayId + " " + "23:59:59"];
+          // this.refundStartTime = this.$route.params.dayId + " " + "00:00:00";
+          // this.refundEndTime = this.$route.params.dayId + " " + "23:59:59";
           this.taskdataSelect();
         }
       } else {
         this.status = "";
         this.shopName = "";
         this.refundStartTime = "";
-        this.refundEndTime = "";
-        this.payStartTime = dayjs()
-          .subtract(6, "day")
-          .format("YYYY-MM-DD");
-        this.payEndTime = dayjs().format("YYYY-MM-DD");
+        // this.refundEndTime = "";
+        this.payStartTime = [
+          dayjs()
+            .subtract(6, "day").startOf('day')
+            .format("YYYY-MM-DD HH:mm:ss"),
+          dayjs().endOf('day').format("YYYY-MM-DD HH:mm:ss")
+        ];
+        // this.payEndTime = dayjs().format("YYYY-MM-DD");
         this.taskdataSelect();
       }
     });

+ 1 - 1
src/views/selfShop/shopPublish.vue

@@ -1752,7 +1752,7 @@ export default {
     },
     // 确定图片
     searchAffirm() {
-      
+
       this.cover1.forEach(i=>{
         this.goodsCover=i.goodsCover
       })

+ 802 - 0
src/views/selfShop/specificationVolume.vue

@@ -0,0 +1,802 @@
+<template>
+  <div>
+    <div style="width: 100%;margin:2% 0;display: inline-block;">
+      <span>商铺名称:</span>
+      <el-input
+        style="width: 150px;"
+        @keydown.enter.native="select"
+        clearable
+        placeholder="请输入商铺名称"
+        v-model="shopName"
+      >
+      </el-input
+      >&nbsp;&nbsp;&nbsp;&nbsp;
+
+      <span>规格属性名:</span>
+      <el-input
+        style="width: 180px;"
+        @keydown.enter.native="select"
+        clearable
+        placeholder="请输入规格属性名"
+        v-model="skuName"
+      >
+      </el-input
+      >&nbsp;&nbsp;&nbsp;&nbsp;
+      <span>时间:</span>
+      <el-date-picker
+        style="width: 380px;"
+        v-model="info.stockDate"
+        type="datetimerange"
+        unlink-panels
+        range-separator="-"
+        start-placeholder="开始日期"
+        end-placeholder="结束日期"
+        format="yyyy-MM-dd HH:mm:ss"
+        value-format="yyyy-MM-dd HH:mm:ss"
+        :clearable="false"
+      >
+      </el-date-picker>
+      <el-button
+        style="margin-left:15px;"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="attributeSelect"
+        >查询</el-button
+      >
+      <el-button
+        style="margin-left:15px;"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="attributeCleans"
+        >重置</el-button
+      >
+      <el-button
+        :disabled="!isAuth('specificationVolume:import')"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="attributeImport"
+        >导出</el-button
+      >
+    </div>
+    <!-- <div style="float: right;margin-right:2%;">
+      <el-button
+        :disabled="!isAuth('specificationVolume:import')"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="attributeImport"
+        >导出</el-button
+      >
+    </div> -->
+    <el-table v-loading="tableDataLoading" :data="typeDatas.list" row-key="id">
+      <el-table-column type="index" label="编号" width="80"> </el-table-column>
+      <el-table-column label="商铺名称" prop="shopName"> </el-table-column>
+      <!-- <el-table-column prop="ruleName" label="规格名称"> </el-table-column> -->
+      <el-table-column label="规格属性名" prop="skuInfo">
+        <!-- <template slot-scope="scope">
+          <div v-for="(item, index) in scope.row.ruleValue" :key="index">
+            <div>
+              <span>{{ item.value }}:</span>
+              <span>{{ item.detail }}</span>
+            </div>
+          </div>
+        </template> -->
+      </el-table-column>
+      <el-table-column prop="value" label="销量"> </el-table-column>
+      <!-- <el-table-column label="操作" width="180">
+        <template slot-scope="scope">
+          <el-button size="mini" type="primary" :disabled="!isAuth('specification:update')" @click="updates(scope.row)">
+            修改
+          </el-button>
+          <el-button size="mini" type="danger" :disabled="!isAuth('specification:delete')" @click="deletes(scope.row)">
+            删除
+          </el-button>
+        </template>
+      </el-table-column> -->
+    </el-table>
+    <!-- <div style="text-align: center;margin-top: 10px;">
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10,  20, 30, 50, 100]"
+        :page-size="size" :current-page="page" layout="total,sizes, prev, pager, next,jumper"
+        :total="typeDatas.totalCount">
+      </el-pagination>
+    </div> -->
+    <!-- 添加规格 -->
+    <el-dialog
+      title="添加规格"
+      customClass="customWidth"
+      :visible.sync="dialogFormVisible"
+    >
+      <div style="margin-bottom: 10px;">
+        <span style="width: 80px;display: inline-block;text-align: right;"
+          >规格标题:</span
+        >
+        <el-input
+          style="width:200px"
+          v-model="ruleName"
+          placeholder="请输入标题名称 例:衣服"
+        ></el-input>
+      </div>
+      <div style="margin:40px 0 0 73px;">
+        <div
+          class="ruleitem"
+          v-for="(item, index) in this.ruleValue"
+          :key="index"
+        >
+          <div>
+            {{ item.value }}
+            <span @click="deleterule(index)">
+              <icon-svg name="schu" class="ruleicon"></icon-svg>
+            </span>
+          </div>
+          <div>
+            <el-tag
+              :key="tag"
+              v-for="(tag, j) in item.detail.split(',')"
+              closable
+              :disable-transitions="false"
+              @close="handleClose(tag, j, item)"
+            >
+              {{ tag }}
+            </el-tag>
+            <el-input
+              class="input-new-tag"
+              v-model="inputValues[index]"
+              ref="saveTagInput"
+              size="small"
+              style="width:120px;"
+              placeholder="请输入属性名"
+              @keyup.enter.native="handleInputConfirm(index, item)"
+            >
+            </el-input>
+            <el-button
+              class="button-new-tag"
+              size="small"
+              @click="handleInputConfirm(index, item)"
+              >添加</el-button
+            >
+          </div>
+        </div>
+      </div>
+      <div style="margin:30px 0 0 83px;">
+        <div v-if="isshow" class="btn_specif">
+          <el-button type="primary" @click="btnToclick()">添加新规格</el-button>
+        </div>
+      </div>
+      <div style="margin:10px 0 0 0px;">
+        <div
+          v-if="!isshow"
+          style="margin-top: 20px;"
+          :visible.sync="dialogFormVisible"
+        >
+          <div style="display: inline-block;">
+            <span style="width: 80px;display: inline-block;text-align: right;"
+              >规格:</span
+            >
+            <el-input
+              style="width:50%;"
+              v-model="releobject.value"
+              placeholder="例:颜色"
+            ></el-input>
+          </div>
+          <div style="display: inline-block;">
+            <span style="width: 80px;display: inline-block;text-align: right;"
+              >规格值:</span
+            >
+            <el-input
+              style="width:50%;"
+              v-model="releobject.detail"
+              placeholder="例:黑色"
+            ></el-input>
+          </div>
+          <div style="display: inline-block;">
+            <el-button type="primary" @click="speciTo()">确 定</el-button>
+            <el-button @click="speciTotwo()">取 消</el-button>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="specificationTo()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 修改规格 -->
+    <el-dialog
+      title="修改规格"
+      customClass="customWidth"
+      :visible.sync="dialogFormVisible1"
+    >
+      <div style="color:red;">
+        此处修改的规格不会改变已生成的商品,如想更改商品信息请去商品列表更新商品
+      </div>
+      <el-form :model="form">
+        <el-form-item label="规格标题:">
+          <el-input
+            v-model="form.ruleName"
+            style="width:200px;"
+            placeholder="请输入分类名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <div style="margin-left:73px;">
+            <div
+              class="ruleitem"
+              v-for="(item, index) in form.ruleValue"
+              :key="index"
+            >
+              <div>
+                {{ item.value }}
+                <span @click="deleterule1(index)">
+                  <icon-svg name="schu" class="ruleicon"></icon-svg>
+                </span>
+              </div>
+              <div>
+                <el-tag
+                  :key="tag"
+                  v-for="(tag, j) in item.detail.split(',')"
+                  closable
+                  :disable-transitions="false"
+                  @close="handleClose1(tag, j, item)"
+                >
+                  {{ tag }}
+                </el-tag>
+                <el-input
+                  class="input-new-tag"
+                  v-model="inputValues[index]"
+                  ref="saveTagInput"
+                  size="small"
+                  style="width:120px;"
+                  placeholder="请输入属性名"
+                  @keyup.enter.native="handleInputConfirm1(index, item)"
+                >
+                </el-input>
+                <el-button
+                  class="button-new-tag"
+                  size="small"
+                  @click="handleInputConfirm(index, item)"
+                  >添加</el-button
+                >
+              </div>
+            </div>
+          </div>
+        </el-form-item>
+        <el-form-item>
+          <div style="margin-left:83px;">
+            <div v-if="isshow" class="btn_specif">
+              <el-button type="primary" @click="btnToclick1()"
+                >添加新规格</el-button
+              >
+            </div>
+          </div>
+          <div style="margin-top:10px;">
+            <div
+              v-if="!isshow"
+              style="margin-top: 20px;"
+              :visible.sync="dialogFormVisible"
+            >
+              <div style="display: inline-block;">
+                <span
+                  style="width: 100px;display: inline-block;text-align: right;"
+                  >规格:</span
+                >
+                <el-input
+                  style="width:50%;"
+                  v-model="releobject.value"
+                  placeholder="请输入规格"
+                ></el-input>
+              </div>
+              <div style="display: inline-block;">
+                <span
+                  style="width: 100px;display: inline-block;text-align: right;"
+                  >规格值:</span
+                >
+                <el-input
+                  style="width:50%;"
+                  v-model="releobject.detail"
+                  placeholder="请输入规格值"
+                ></el-input>
+              </div>
+              <div style="display: inline-block;">
+                <el-button type="primary" @click="speciTo1()">确 定</el-button>
+                <el-button @click="speciTotwo1()">取 消</el-button>
+              </div>
+            </div>
+          </div>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="amendNoticeTo()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <div style="text-align: center;margin-top: 10px;">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :page-sizes="[10, 20, 30, 50, 100]"
+        :page-size="limit"
+        :current-page="page"
+        layout="total,sizes, prev, pager, next"
+        :total="typeDatas.total"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import dayjs from "dayjs";
+export default {
+  data() {
+    return {
+      size: 10,
+      page: 1,
+      limit: 10,
+      ruleName: "",
+      releobject: {
+        value: "",
+        detail: ""
+      },
+      detailarr: [],
+      detsilshow: true,
+      inputVisible: false,
+      inputValues: {
+        inputValue0: "",
+        inputValue1: "",
+        inputValue2: "",
+        inputValue3: "",
+        inputValue4: "",
+        inputValue5: ""
+      },
+      ruleValue: [],
+      dynamicTags: [],
+      form: {
+        id: "",
+        ruleName: "",
+        ruleValue: [],
+        createTime: ""
+      },
+      isshow: true,
+      formLabelWidth: "100px",
+      tableDataLoading: false,
+      dialogFormVisible1: false,
+      dialogFormVisible: false,
+      typeDatas: {
+        list: [],
+        total: 0
+      },
+
+      shopName: "",
+      skuName: "", // 规格属性名
+      info: {
+        stockDate: [
+          dayjs()
+            .subtract(1, "day")
+            .startOf("day")
+            .format("YYYY-MM-DD HH:mm:ss"),
+          dayjs()
+            .subtract(1, "day")
+            .endOf("day")
+            .format("YYYY-MM-DD HH:mm:ss")
+        ] //日期
+      }
+    };
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.size = val;
+      this.dataSelect();
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.dataSelect();
+    },
+    deleterule(index) {
+      this.ruleValue.splice(index, 1);
+    },
+    btnToclick() {
+      this.isshow = false;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    speciTotwo() {
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    speciTo() {
+      if (this.ruleName == "") {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请输入标题名称",
+          type: "warning"
+        });
+        return;
+      }
+      if (this.releobject.value == "") {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请输入规格",
+          type: "warning"
+        });
+        return;
+      }
+      if (this.releobject.detail == "") {
+        this.$message({
+          title: "提示",
+          duration: 1800,
+          type: "error",
+          message: "请输入规格值",
+          type: "warning"
+        });
+        return;
+      }
+
+      this.ruleValue.push({
+        value: this.releobject.value,
+        detail: this.releobject.detail
+      });
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    handleClose(tag, j, item) {
+      var detailarr = item.detail.split(",");
+      detailarr.splice(j, 1);
+      if (detailarr.length < 1) {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "规格值至少要有一个",
+          type: "warning"
+        });
+        return;
+      } else {
+        item.detail = String(detailarr);
+      }
+    },
+    handleInputConfirm(index, item) {
+      let inputValue = this.inputValues[index];
+      if (inputValue) {
+        var detailarr = item.detail.split(",");
+        detailarr.push(inputValue);
+        for (var i = 0; i < detailarr.length; i++) {
+          for (var j = 0; j < detailarr.length; j++) {
+            if (detailarr[i] == detailarr[j] && i != j) {
+              detailarr.splice(j, 1);
+            }
+          }
+        }
+        item.detail = String(detailarr);
+        this.inputValues[index] = "";
+      }
+      this.inputVisible = false;
+    },
+    // 添加规格弹框
+    addNotice() {
+      this.ruleName = "";
+      this.ruleValue = [];
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+      this.dialogFormVisible = true;
+    },
+    // 添加规格
+    specificationTo() {
+      if (this.ruleName == "") {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请输入标题名称",
+          type: "warning"
+        });
+        return;
+      }
+      if (this.ruleValue.length == 0) {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请至少添加一种规格",
+          type: "warning"
+        });
+        return;
+      }
+      this.$http({
+        url: this.$http.adornUrl("selfGoodsRule/save"),
+        method: "post",
+        data: this.$http.adornData({
+          ruleName: this.ruleName,
+          ruleValue: this.ruleValue
+        })
+      }).then(({ data }) => {
+        if (data.code == 0) {
+          this.dialogFormVisible = false;
+          this.$message({
+            message: "操作成功",
+            type: "success",
+            duration: 1500,
+            onClose: () => {
+              this.ruleName = "";
+              this.ruleValue = [];
+              this.dataSelect();
+            }
+          });
+        } else {
+          this.$message({
+            message: data.msg,
+            type: "error",
+            duration: 1500,
+            onClose: () => {}
+          });
+        }
+      });
+    },
+    // 修改弹框
+    updates(rows) {
+      this.dialogFormVisible1 = true;
+      this.form.id = rows.id;
+      this.form.ruleName = rows.ruleName;
+      this.form.ruleValue = rows.ruleValue;
+      this.form.createTime = rows.createTime;
+    },
+    // 修改商品规格
+    amendNoticeTo() {
+      this.$http({
+        url: this.$http.adornUrl("selfGoodsRule/update"),
+        method: "post",
+        data: this.$http.adornData({
+          id: this.form.id,
+          ruleName: this.form.ruleName,
+          ruleValue: this.form.ruleValue,
+          createTime: this.form.createTime
+        })
+      }).then(({ data }) => {
+        if (data.code == 0) {
+          this.dialogFormVisible1 = false;
+          this.$message({
+            message: "操作成功",
+            type: "success",
+            duration: 1500,
+            onClose: () => {
+              this.dataSelect();
+            }
+          });
+        } else {
+          this.$message({
+            message: data.msg,
+            type: "error",
+            duration: 1500,
+            onClose: () => {}
+          });
+        }
+      });
+    },
+    btnToclick1() {
+      this.isshow = false;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    speciTotwo1() {
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    deleterule1(index) {
+      this.form.ruleValue.splice(index, 1);
+    },
+    speciTo1() {
+      this.form.ruleValue.push({
+        value: this.releobject.value,
+        detail: this.releobject.detail
+      });
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    handleClose1(tag, j, item) {
+      var detailarr = item.detail.split(",");
+      detailarr.splice(j, 1);
+      if (detailarr.length < 1) {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "规格值至少要有一个",
+          type: "warning"
+        });
+        return;
+      } else {
+        item.detail = String(detailarr);
+      }
+    },
+    handleInputConfirm1(index, item) {
+      let inputValue = this.inputValues[index];
+      if (inputValue) {
+        var detailarr = item.detail.split(",");
+        detailarr.push(inputValue);
+        for (var i = 0; i < detailarr.length; i++) {
+          for (var j = 0; j < detailarr.length; j++) {
+            if (detailarr[i] == detailarr[j] && i != j) {
+              detailarr.splice(j, 1);
+            }
+          }
+        }
+        item.detail = String(detailarr);
+        this.inputValues[index] = "";
+      }
+      this.inputVisible = false;
+    },
+    // 删除分类
+    deletes(row) {
+      this.$confirm(`确定删除此条信息?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.$http({
+            url: this.$http.adornUrl("selfGoodsRule/delete"),
+            method: "get",
+            params: this.$http.adornParams({
+              id: row.id
+            })
+          }).then(({ data }) => {
+            if (data.code == 0) {
+              this.$message({
+                message: "删除成功",
+                type: "success",
+                duration: 1500,
+                onClose: () => {
+                  this.dataSelect();
+                }
+              });
+            } else {
+              this.$message({
+                message: data.msg,
+                type: "error",
+                duration: 1500,
+                onClose: () => {}
+              });
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    // 获取数据
+    dataSelect() {
+      this.tableDataLoading = true;
+      console.log(
+        {
+          page: this.page,
+          limit: this.size,
+          shopName: this.shopName,
+          skuName: this.skuName,
+          startTime: this.info.stockDate[0],
+          endTime: this.info.stockDate[1]
+        },
+        "查询参数"
+      );
+
+      this.$http({
+        url: this.$http.adornUrl("app/order/goods-sku-sales-count"),
+        method: "get",
+        params: this.$http.adornParams({
+          page: this.page,
+          limit: this.size,
+          shopName: this.shopName,
+          skuName: this.skuName,
+          startTime: this.info.stockDate[0],
+          endTime: this.info.stockDate[1]
+        })
+      }).then(({ data }) => {
+        console.log(data, "规格销量");
+
+        this.tableDataLoading = false;
+        let returnData = data.data;
+        this.typeDatas.list = returnData.list;
+        this.typeDatas.total = returnData.totalCount;
+      });
+    },
+    select() {
+      this.page = 1;
+      this.dataSelect();
+    },
+
+    // 查询
+    attributeSelect() {
+      this.page = 1;
+      this.dataSelect();
+    },
+    // 重置
+    attributeCleans() {
+      this.shopName = "";
+      this.skuName = "";
+      this.info.stockDate = [
+        dayjs()
+          .subtract(1, "day")
+          .startOf("day")
+          .format("YYYY-MM-DD HH:mm:ss"),
+        dayjs()
+          .subtract(1, "day")
+          .endOf("day")
+          .format("YYYY-MM-DD HH:mm:ss")
+      ];
+      this.page = 1;
+      this.dataSelect();
+    },
+    // 导出
+    attributeImport() {}
+  },
+  mounted() {
+    this.dataSelect();
+    console.log([
+      dayjs()
+        .subtract(1, "day")
+        .startOf("day")
+        .format("YYYY-MM-DD HH:mm:ss"),
+      dayjs()
+        .subtract(1, "day")
+        .endOf("day")
+        .format("YYYY-MM-DD HH:mm:ss")
+    ]);
+  }
+};
+</script>
+
+<style>
+.customWidth {
+  width: 60% !important;
+}
+
+.ruleitem {
+  padding-left: 10px;
+  margin-top: 15px;
+}
+
+.ruleitem .ruleicon {
+  position: relative;
+  top: 3px;
+  left: 2px;
+  width: 1.2em;
+  height: 1.2em;
+}
+
+.el-tag + .el-tag {
+  margin-left: 10px;
+}
+
+.button-new-tag {
+  height: 32px;
+  line-height: 31px;
+  padding-top: 0;
+  padding-bottom: 0;
+  border-radius: 4px;
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+  background-color: #f5f7fa;
+  position: relative;
+  left: -5px;
+  border-color: #dcdfe6;
+  border: 1px solid #dcdfe6;
+}
+
+.input-new-tag {
+  width: 90px;
+  margin-left: 10px;
+  vertical-align: bottom;
+}
+
+.el-input--small .el-input__inner {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+</style>

+ 826 - 0
src/views/servicePackage/packageOrder.vue

@@ -0,0 +1,826 @@
+<template>
+  <div>
+    <div style="width: 100%;margin:2% 0;display: inline-block;">
+      <span>套餐名称:</span>
+      <el-input
+        style="width: 150px;"
+        @keydown.enter.native="select"
+        clearable
+        placeholder="请输入套餐名称"
+        v-model="shopName"
+      >
+      </el-input
+      >&nbsp;&nbsp;&nbsp;&nbsp;
+
+      <span>购买用户手机号:</span>
+      <el-input
+        style="width: 180px;"
+        @keydown.enter.native="select"
+        clearable
+        placeholder="请输入购买用户手机号"
+        v-model="skuName"
+      >
+      </el-input
+      >&nbsp;&nbsp;&nbsp;&nbsp;
+
+      <span>收货人手机号:</span>
+      <el-input
+        style="width: 180px;"
+        @keydown.enter.native="select"
+        clearable
+        placeholder="请输入收货人手机号"
+        v-model="skuName"
+      >
+      </el-input
+      >&nbsp;&nbsp;&nbsp;&nbsp;
+      <span>收货人姓名:</span>
+      <el-input
+        style="width: 180px;"
+        @keydown.enter.native="select"
+        clearable
+        placeholder="请输入收货人姓名"
+        v-model="skuName"
+      >
+      </el-input
+      >&nbsp;&nbsp;&nbsp;&nbsp;
+      <span>状态:</span>
+      <el-select
+        v-model="skuName"
+        placeholder="请选择状态
+        "
+        style="width:150px;"
+      >
+        <el-option label="待使用" value="待使用"></el-option>
+        <el-option label="使用中" value="使用中"></el-option>
+        <el-option label="已使用" value="已使用"></el-option>
+        <el-option label="已过期" value="已过期"></el-option>
+      </el-select>&nbsp;&nbsp;&nbsp;&nbsp;
+
+      <el-button
+        style="margin-left:15px;"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="attributeSelect"
+        >查询</el-button
+      >
+      <el-button
+        style="margin-left:15px;"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="attributeCleans"
+        >重置</el-button
+      >
+      <el-button
+        :disabled="!isAuth('specificationVolume:import')"
+        size="mini"
+        type="primary"
+        icon="document"
+        @click="attributeImport"
+        >导出</el-button
+      >
+    </div>
+    <el-table v-loading="tableDataLoading" :data="typeDatas.list" row-key="id">
+      <el-table-column type="index" label="编号" width="80"> </el-table-column>
+      <el-table-column label="购买套餐" prop="shopName"> </el-table-column>
+      <el-table-column prop="ruleName" label="购买用户手机号"> </el-table-column>
+      <el-table-column label="收货人姓名" prop="skuInfo">
+        <!-- <template slot-scope="scope">
+          <div v-for="(item, index) in scope.row.ruleValue" :key="index">
+            <div>
+              <span>{{ item.value }}:</span>
+              <span>{{ item.detail }}</span>
+            </div>
+          </div>
+        </template> -->
+      </el-table-column>
+      <el-table-column prop="ruleName" label="收货人手机号"> </el-table-column>
+      <el-table-column prop="value" label="收货地址"> </el-table-column>
+      <el-table-column prop="value" label="套餐订单id"> </el-table-column>
+      <el-table-column prop="value" label="未使用订单详情时间"> </el-table-column>
+      <el-table-column prop="value" label="已使用订单详情时间"> </el-table-column>
+      <el-table-column prop="value" label="例假周期长度"> </el-table-column>
+      <el-table-column prop="value" label="例假经期长度"> </el-table-column>
+      <el-table-column prop="value" label="上一次例假开始时间"> </el-table-column>
+      <el-table-column prop="value" label="购买价格"> </el-table-column>
+      <el-table-column prop="value" label="有效期"> </el-table-column>
+      <el-table-column prop="value" label="状态"> </el-table-column>
+      <el-table-column prop="value" label="状态更新时间"> </el-table-column>
+      <el-table-column label="操作" width="180">
+        <template slot-scope="scope">
+          <el-button size="mini" type="primary" :disabled="!isAuth('specification:update')" @click="updates(scope.row)">
+            订单详情
+          </el-button>
+          <el-button size="mini" type="primary" :disabled="!isAuth('specification:update')" @click="updates(scope.row)">
+            编辑
+          </el-button>
+          <el-button size="mini" type="danger" :disabled="!isAuth('specification:delete')" @click="deletes(scope.row)">
+            删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- <div style="text-align: center;margin-top: 10px;">
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10,  20, 30, 50, 100]"
+        :page-size="size" :current-page="page" layout="total,sizes, prev, pager, next,jumper"
+        :total="typeDatas.totalCount">
+      </el-pagination>
+    </div> -->
+    <!-- 添加规格 -->
+    <el-dialog
+      title="添加规格"
+      customClass="customWidth"
+      :visible.sync="dialogFormVisible"
+    >
+      <div style="margin-bottom: 10px;">
+        <span style="width: 80px;display: inline-block;text-align: right;"
+          >规格标题:</span
+        >
+        <el-input
+          style="width:200px"
+          v-model="ruleName"
+          placeholder="请输入标题名称 例:衣服"
+        ></el-input>
+      </div>
+      <div style="margin:40px 0 0 73px;">
+        <div
+          class="ruleitem"
+          v-for="(item, index) in this.ruleValue"
+          :key="index"
+        >
+          <div>
+            {{ item.value }}
+            <span @click="deleterule(index)">
+              <icon-svg name="schu" class="ruleicon"></icon-svg>
+            </span>
+          </div>
+          <div>
+            <el-tag
+              :key="tag"
+              v-for="(tag, j) in item.detail.split(',')"
+              closable
+              :disable-transitions="false"
+              @close="handleClose(tag, j, item)"
+            >
+              {{ tag }}
+            </el-tag>
+            <el-input
+              class="input-new-tag"
+              v-model="inputValues[index]"
+              ref="saveTagInput"
+              size="small"
+              style="width:120px;"
+              placeholder="请输入属性名"
+              @keyup.enter.native="handleInputConfirm(index, item)"
+            >
+            </el-input>
+            <el-button
+              class="button-new-tag"
+              size="small"
+              @click="handleInputConfirm(index, item)"
+              >添加</el-button
+            >
+          </div>
+        </div>
+      </div>
+      <div style="margin:30px 0 0 83px;">
+        <div v-if="isshow" class="btn_specif">
+          <el-button type="primary" @click="btnToclick()">添加新规格</el-button>
+        </div>
+      </div>
+      <div style="margin:10px 0 0 0px;">
+        <div
+          v-if="!isshow"
+          style="margin-top: 20px;"
+          :visible.sync="dialogFormVisible"
+        >
+          <div style="display: inline-block;">
+            <span style="width: 80px;display: inline-block;text-align: right;"
+              >规格:</span
+            >
+            <el-input
+              style="width:50%;"
+              v-model="releobject.value"
+              placeholder="例:颜色"
+            ></el-input>
+          </div>
+          <div style="display: inline-block;">
+            <span style="width: 80px;display: inline-block;text-align: right;"
+              >规格值:</span
+            >
+            <el-input
+              style="width:50%;"
+              v-model="releobject.detail"
+              placeholder="例:黑色"
+            ></el-input>
+          </div>
+          <div style="display: inline-block;">
+            <el-button type="primary" @click="speciTo()">确 定</el-button>
+            <el-button @click="speciTotwo()">取 消</el-button>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="specificationTo()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 修改规格 -->
+    <el-dialog
+      title="修改规格"
+      customClass="customWidth"
+      :visible.sync="dialogFormVisible1"
+    >
+      <div style="color:red;">
+        此处修改的规格不会改变已生成的商品,如想更改商品信息请去商品列表更新商品
+      </div>
+      <el-form :model="form">
+        <el-form-item label="规格标题:">
+          <el-input
+            v-model="form.ruleName"
+            style="width:200px;"
+            placeholder="请输入分类名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <div style="margin-left:73px;">
+            <div
+              class="ruleitem"
+              v-for="(item, index) in form.ruleValue"
+              :key="index"
+            >
+              <div>
+                {{ item.value }}
+                <span @click="deleterule1(index)">
+                  <icon-svg name="schu" class="ruleicon"></icon-svg>
+                </span>
+              </div>
+              <div>
+                <el-tag
+                  :key="tag"
+                  v-for="(tag, j) in item.detail.split(',')"
+                  closable
+                  :disable-transitions="false"
+                  @close="handleClose1(tag, j, item)"
+                >
+                  {{ tag }}
+                </el-tag>
+                <el-input
+                  class="input-new-tag"
+                  v-model="inputValues[index]"
+                  ref="saveTagInput"
+                  size="small"
+                  style="width:120px;"
+                  placeholder="请输入属性名"
+                  @keyup.enter.native="handleInputConfirm1(index, item)"
+                >
+                </el-input>
+                <el-button
+                  class="button-new-tag"
+                  size="small"
+                  @click="handleInputConfirm(index, item)"
+                  >添加</el-button
+                >
+              </div>
+            </div>
+          </div>
+        </el-form-item>
+        <el-form-item>
+          <div style="margin-left:83px;">
+            <div v-if="isshow" class="btn_specif">
+              <el-button type="primary" @click="btnToclick1()"
+                >添加新规格</el-button
+              >
+            </div>
+          </div>
+          <div style="margin-top:10px;">
+            <div
+              v-if="!isshow"
+              style="margin-top: 20px;"
+              :visible.sync="dialogFormVisible"
+            >
+              <div style="display: inline-block;">
+                <span
+                  style="width: 100px;display: inline-block;text-align: right;"
+                  >规格:</span
+                >
+                <el-input
+                  style="width:50%;"
+                  v-model="releobject.value"
+                  placeholder="请输入规格"
+                ></el-input>
+              </div>
+              <div style="display: inline-block;">
+                <span
+                  style="width: 100px;display: inline-block;text-align: right;"
+                  >规格值:</span
+                >
+                <el-input
+                  style="width:50%;"
+                  v-model="releobject.detail"
+                  placeholder="请输入规格值"
+                ></el-input>
+              </div>
+              <div style="display: inline-block;">
+                <el-button type="primary" @click="speciTo1()">确 定</el-button>
+                <el-button @click="speciTotwo1()">取 消</el-button>
+              </div>
+            </div>
+          </div>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible1 = false">取 消</el-button>
+        <el-button type="primary" @click="amendNoticeTo()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <div style="text-align: center;margin-top: 10px;">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :page-sizes="[10, 20, 30, 50, 100]"
+        :page-size="limit"
+        :current-page="page"
+        layout="total,sizes, prev, pager, next"
+        :total="typeDatas.total"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import dayjs from "dayjs";
+export default {
+  data() {
+    return {
+      size: 10,
+      page: 1,
+      limit: 10,
+      ruleName: "",
+      releobject: {
+        value: "",
+        detail: ""
+      },
+      detailarr: [],
+      detsilshow: true,
+      inputVisible: false,
+      inputValues: {
+        inputValue0: "",
+        inputValue1: "",
+        inputValue2: "",
+        inputValue3: "",
+        inputValue4: "",
+        inputValue5: ""
+      },
+      ruleValue: [],
+      dynamicTags: [],
+      form: {
+        id: "",
+        ruleName: "",
+        ruleValue: [],
+        createTime: ""
+      },
+      isshow: true,
+      formLabelWidth: "100px",
+      tableDataLoading: false,
+      dialogFormVisible1: false,
+      dialogFormVisible: false,
+      typeDatas: {
+        list: [],
+        total: 0
+      },
+
+      shopName: "",
+      skuName: "", // 规格属性名
+      info: {
+        stockDate: [
+          dayjs()
+            .subtract(1, "day")
+            .startOf("day")
+            .format("YYYY-MM-DD HH:mm:ss"),
+          dayjs()
+            .subtract(1, "day")
+            .endOf("day")
+            .format("YYYY-MM-DD HH:mm:ss")
+        ] //日期
+      }
+    };
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.size = val;
+      this.dataSelect();
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.dataSelect();
+    },
+    deleterule(index) {
+      this.ruleValue.splice(index, 1);
+    },
+    btnToclick() {
+      this.isshow = false;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    speciTotwo() {
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    speciTo() {
+      if (this.ruleName == "") {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请输入标题名称",
+          type: "warning"
+        });
+        return;
+      }
+      if (this.releobject.value == "") {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请输入规格",
+          type: "warning"
+        });
+        return;
+      }
+      if (this.releobject.detail == "") {
+        this.$message({
+          title: "提示",
+          duration: 1800,
+          type: "error",
+          message: "请输入规格值",
+          type: "warning"
+        });
+        return;
+      }
+
+      this.ruleValue.push({
+        value: this.releobject.value,
+        detail: this.releobject.detail
+      });
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    handleClose(tag, j, item) {
+      var detailarr = item.detail.split(",");
+      detailarr.splice(j, 1);
+      if (detailarr.length < 1) {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "规格值至少要有一个",
+          type: "warning"
+        });
+        return;
+      } else {
+        item.detail = String(detailarr);
+      }
+    },
+    handleInputConfirm(index, item) {
+      let inputValue = this.inputValues[index];
+      if (inputValue) {
+        var detailarr = item.detail.split(",");
+        detailarr.push(inputValue);
+        for (var i = 0; i < detailarr.length; i++) {
+          for (var j = 0; j < detailarr.length; j++) {
+            if (detailarr[i] == detailarr[j] && i != j) {
+              detailarr.splice(j, 1);
+            }
+          }
+        }
+        item.detail = String(detailarr);
+        this.inputValues[index] = "";
+      }
+      this.inputVisible = false;
+    },
+    // 添加规格弹框
+    addNotice() {
+      this.ruleName = "";
+      this.ruleValue = [];
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+      this.dialogFormVisible = true;
+    },
+    // 添加规格
+    specificationTo() {
+      if (this.ruleName == "") {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请输入标题名称",
+          type: "warning"
+        });
+        return;
+      }
+      if (this.ruleValue.length == 0) {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "请至少添加一种规格",
+          type: "warning"
+        });
+        return;
+      }
+      this.$http({
+        url: this.$http.adornUrl("selfGoodsRule/save"),
+        method: "post",
+        data: this.$http.adornData({
+          ruleName: this.ruleName,
+          ruleValue: this.ruleValue
+        })
+      }).then(({ data }) => {
+        if (data.code == 0) {
+          this.dialogFormVisible = false;
+          this.$message({
+            message: "操作成功",
+            type: "success",
+            duration: 1500,
+            onClose: () => {
+              this.ruleName = "";
+              this.ruleValue = [];
+              this.dataSelect();
+            }
+          });
+        } else {
+          this.$message({
+            message: data.msg,
+            type: "error",
+            duration: 1500,
+            onClose: () => {}
+          });
+        }
+      });
+    },
+    // 修改弹框
+    updates(rows) {
+      this.dialogFormVisible1 = true;
+      this.form.id = rows.id;
+      this.form.ruleName = rows.ruleName;
+      this.form.ruleValue = rows.ruleValue;
+      this.form.createTime = rows.createTime;
+    },
+    // 修改商品规格
+    amendNoticeTo() {
+      this.$http({
+        url: this.$http.adornUrl("selfGoodsRule/update"),
+        method: "post",
+        data: this.$http.adornData({
+          id: this.form.id,
+          ruleName: this.form.ruleName,
+          ruleValue: this.form.ruleValue,
+          createTime: this.form.createTime
+        })
+      }).then(({ data }) => {
+        if (data.code == 0) {
+          this.dialogFormVisible1 = false;
+          this.$message({
+            message: "操作成功",
+            type: "success",
+            duration: 1500,
+            onClose: () => {
+              this.dataSelect();
+            }
+          });
+        } else {
+          this.$message({
+            message: data.msg,
+            type: "error",
+            duration: 1500,
+            onClose: () => {}
+          });
+        }
+      });
+    },
+    btnToclick1() {
+      this.isshow = false;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    speciTotwo1() {
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    deleterule1(index) {
+      this.form.ruleValue.splice(index, 1);
+    },
+    speciTo1() {
+      this.form.ruleValue.push({
+        value: this.releobject.value,
+        detail: this.releobject.detail
+      });
+      this.isshow = true;
+      this.releobject.value = "";
+      this.releobject.detail = "";
+    },
+    handleClose1(tag, j, item) {
+      var detailarr = item.detail.split(",");
+      detailarr.splice(j, 1);
+      if (detailarr.length < 1) {
+        this.$message({
+          title: "提示",
+          type: "error",
+          duration: 1800,
+          message: "规格值至少要有一个",
+          type: "warning"
+        });
+        return;
+      } else {
+        item.detail = String(detailarr);
+      }
+    },
+    handleInputConfirm1(index, item) {
+      let inputValue = this.inputValues[index];
+      if (inputValue) {
+        var detailarr = item.detail.split(",");
+        detailarr.push(inputValue);
+        for (var i = 0; i < detailarr.length; i++) {
+          for (var j = 0; j < detailarr.length; j++) {
+            if (detailarr[i] == detailarr[j] && i != j) {
+              detailarr.splice(j, 1);
+            }
+          }
+        }
+        item.detail = String(detailarr);
+        this.inputValues[index] = "";
+      }
+      this.inputVisible = false;
+    },
+    // 删除分类
+    deletes(row) {
+      this.$confirm(`确定删除此条信息?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.$http({
+            url: this.$http.adornUrl("selfGoodsRule/delete"),
+            method: "get",
+            params: this.$http.adornParams({
+              id: row.id
+            })
+          }).then(({ data }) => {
+            if (data.code == 0) {
+              this.$message({
+                message: "删除成功",
+                type: "success",
+                duration: 1500,
+                onClose: () => {
+                  this.dataSelect();
+                }
+              });
+            } else {
+              this.$message({
+                message: data.msg,
+                type: "error",
+                duration: 1500,
+                onClose: () => {}
+              });
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    // 获取数据
+    dataSelect() {
+      this.tableDataLoading = true;
+      console.log(
+        {
+          page: this.page,
+          limit: this.size,
+          shopName: this.shopName,
+          skuName: this.skuName,
+          startTime: this.info.stockDate[0],
+          endTime: this.info.stockDate[1]
+        },
+        "查询参数"
+      );
+
+      this.$http({
+        url: this.$http.adornUrl("app/order/goods-sku-sales-count"),
+        method: "get",
+        params: this.$http.adornParams({
+          page: this.page,
+          limit: this.size,
+          shopName: this.shopName,
+          skuName: this.skuName,
+          startTime: this.info.stockDate[0],
+          endTime: this.info.stockDate[1]
+        })
+      }).then(({ data }) => {
+        console.log(data, "规格销量");
+
+        this.tableDataLoading = false;
+        let returnData = data.data;
+        this.typeDatas.list = returnData.list;
+        this.typeDatas.total = returnData.totalCount;
+      });
+    },
+    select() {
+      this.page = 1;
+      this.dataSelect();
+    },
+
+    // 查询
+    attributeSelect() {
+      this.page = 1;
+      this.dataSelect();
+    },
+    // 重置
+    attributeCleans() {
+      this.shopName = "";
+      this.skuName = "";
+      this.info.stockDate = [
+        dayjs()
+          .subtract(1, "day")
+          .startOf("day")
+          .format("YYYY-MM-DD HH:mm:ss"),
+        dayjs()
+          .subtract(1, "day")
+          .endOf("day")
+          .format("YYYY-MM-DD HH:mm:ss")
+      ];
+      this.page = 1;
+      this.dataSelect();
+    },
+    // 导出
+    attributeImport() {}
+  },
+  mounted() {
+    this.dataSelect();
+    console.log([
+      dayjs()
+        .subtract(1, "day")
+        .startOf("day")
+        .format("YYYY-MM-DD HH:mm:ss"),
+      dayjs()
+        .subtract(1, "day")
+        .endOf("day")
+        .format("YYYY-MM-DD HH:mm:ss")
+    ]);
+  }
+};
+</script>
+
+<style>
+.customWidth {
+  width: 60% !important;
+}
+
+.ruleitem {
+  padding-left: 10px;
+  margin-top: 15px;
+}
+
+.ruleitem .ruleicon {
+  position: relative;
+  top: 3px;
+  left: 2px;
+  width: 1.2em;
+  height: 1.2em;
+}
+
+.el-tag + .el-tag {
+  margin-left: 10px;
+}
+
+.button-new-tag {
+  height: 32px;
+  line-height: 31px;
+  padding-top: 0;
+  padding-bottom: 0;
+  border-radius: 4px;
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+  background-color: #f5f7fa;
+  position: relative;
+  left: -5px;
+  border-color: #dcdfe6;
+  border: 1px solid #dcdfe6;
+}
+
+.input-new-tag {
+  width: 90px;
+  margin-left: 10px;
+  vertical-align: bottom;
+}
+
+.el-input--small .el-input__inner {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+</style>

+ 861 - 0
src/views/servicePackage/servicePackage.vue

@@ -0,0 +1,861 @@
+<template>
+  <el-tabs v-model="activeName" @tab-click="handleClick">
+    <el-tab-pane label="服务套餐" name="first">
+      <div style="display: inline-block;width: 100%;">
+        <div style="position: relative;display: inline-block;margin: 10px 0px;">
+          <span>套餐名称:</span>
+          <el-input
+            style="width: 150px;"
+            @keydown.enter.native="shopSelect"
+            placeholder="请输入套餐名称"
+            v-model="setmealName"
+          >
+          </el-input
+          >&nbsp;&nbsp;
+        </div>
+        <div style="position: relative;display: inline-block;margin: 10px 0px;">
+          <span>套餐类型:</span>
+          <el-select
+            v-model="setmealType"
+            placeholder="请选择套餐类型"
+            style="width:150px;"
+            @change="shopSelect()"
+          >
+            <el-option label="月度套餐" value="月度套餐"></el-option>
+            <el-option label="季度套餐" value="季度套餐"></el-option>
+            <el-option label="年度套餐" value="年度套餐"></el-option>
+            <el-option label="自定义" value="自定义"></el-option>
+          </el-select>
+          &nbsp;&nbsp;&nbsp;&nbsp;
+        </div>
+        <div style="position: relative;display: inline-block;margin: 10px 0px;">
+          <span>套餐适用性别:</span>
+          <el-select
+            v-model="setmealSex"
+            placeholder="请选择套餐适用性别"
+            style="width:180px;"
+            @change="shopSelect()"
+          >
+            <el-option label="男生专区" value="男生专区"></el-option>
+            <el-option
+              label="女生专区"
+              value="女生专区"
+            ></el-option> </el-select
+          >&nbsp;&nbsp;&nbsp;&nbsp;
+        </div>
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="search"
+          >查询
+        </el-button>
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="clean"
+          >重置
+        </el-button>
+        <el-button
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="addSetmeal"
+          >添加套餐
+        </el-button>
+        <el-button
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="delSetmeal"
+          >批量删除
+        </el-button>
+        <el-button
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="setmealImp"
+          >导出
+        </el-button>
+      </div>
+
+      <el-table
+        v-loading="tableDataLoading"
+        :data="typeDatas.list"
+        row-key="id"
+      >
+        <el-table-column label="编号" type="index" width="80">
+        </el-table-column>
+        <el-table-column label="套餐名称" prop="shopName"> </el-table-column>
+        <el-table-column prop="shopCover" label="套餐图片" width="150">
+          <template slot-scope="scope">
+            <div style="display: inline-block; margin: 3px;">
+              <el-popover placement="top-start" title="" trigger="hover">
+                <img
+                  style="width: 50px; height: 50px"
+                  :src="scope.row.shopCover"
+                  alt=""
+                  slot="reference"
+                />
+                <img
+                  style="width: 300px; height: auto"
+                  :src="scope.row.shopCover"
+                  alt=""
+                />
+              </el-popover>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="套餐id" prop="phone" width="120">
+        </el-table-column>
+
+        <el-table-column label="套餐价格" prop="shopTypeName">
+        </el-table-column>
+        <el-table-column label="套餐内容" prop="putawayFlag"> </el-table-column>
+
+        <el-table-column label="绑定店铺信息" prop="cashDeposit" width="150">
+        </el-table-column>
+        <el-table-column label="套餐类型" prop="errandMoney" width="150">
+        </el-table-column>
+        <el-table-column
+          label="套餐适用性别"
+          prop="distributionDistance"
+          width="150"
+        >
+        </el-table-column>
+        <el-table-column label="套餐绑定规则" prop="exemptMinMoney">
+        </el-table-column>
+        <el-table-column label="时间段" prop="minimumDelivery">
+        </el-table-column>
+        <el-table-column label="有效期" prop="enableFullReductionFlag">
+        </el-table-column>
+        <el-table-column label="创建时间" prop="enableFullReductionFlag">
+        </el-table-column>
+        <el-table-column label="状态" prop="autoSendOrder">
+          <template slot-scope="scope">
+            <el-switch
+              v-model="scope.value"
+              active-value="1"
+              inactive-value="0"
+            >
+            </el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="230" fixed="right">
+          <template slot-scope="scope">
+            <el-button
+              :disabled="!isAuth('shopsList:update')"
+              size="mini"
+              type="primary"
+              @click="updateMima(scope.row)"
+              style="margin: 5px;"
+              >编辑
+            </el-button>
+            <el-button
+              :disabled="!isAuth('shopsList:delete')"
+              size="mini"
+              type="danger"
+              @click="deletes(scope.row)"
+              style="margin: 5px;"
+              >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="text-align: center;margin-top: 10px;">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :page-sizes="[10, 20, 30, 50, 100]"
+          :page-size="limit"
+          :current-page="page"
+          layout="total,sizes, prev, pager, next,jumper"
+          :total="typeDatas.total"
+        >
+        </el-pagination>
+      </div>
+    </el-tab-pane>
+    <el-tab-pane label="规则配置" name="third">
+      <div style="position: relative;display: inline-block;margin: 10px 0px;">
+        <span>规格名称:</span>
+        <el-input
+          style="width: 150px;"
+          @keydown.enter.native="shopSelect"
+          placeholder="请输入套餐名称"
+          v-model="setmealName"
+        >
+        </el-input
+        >&nbsp;&nbsp;
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="searchRule"
+          >查询
+        </el-button>
+        <el-button
+          style="margin-left:15px;"
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="cleanRule"
+          >重置
+        </el-button>
+        <el-button size="mini" type="primary" icon="document" @click="addRule"
+          >添加
+        </el-button>
+        <el-button
+          size="mini"
+          type="primary"
+          icon="document"
+          @click="setRuleImp"
+          >导出
+        </el-button>
+      </div>
+      <el-table
+        v-loading="tableDataLoading"
+        :data="typeDatas1.list"
+        row-key="id"
+      >
+        <el-table-column label="编号" type="index" width="80">
+        </el-table-column>
+        <el-table-column label="规则名称" prop="shopTypeName">
+        </el-table-column>
+        <el-table-column label="规则id" prop="shopTypeName"> </el-table-column>
+        <el-table-column label="套餐内容" prop="shopTypeName">
+        </el-table-column>
+        <el-table-column label="规格排序" prop="shopTypeName">
+          <template slot-scope="scope">
+            <el-input-number v-model="scope.num" label="排序"></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建时间" prop="shopTypeName">
+        </el-table-column>
+        <el-table-column label="状态" prop="autoSendOrder">
+          <template slot-scope="scope">
+            <el-switch
+              v-model="scope.value"
+              active-value="1"
+              inactive-value="0"
+            >
+            </el-switch>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200">
+          <template slot-scope="scope">
+            <el-button
+              :disabled="!isAuth('shopsList:update')"
+              size="mini"
+              type="primary"
+              @click="addNotice1(scope.row)"
+              style="margin: 5px;"
+              >编辑
+            </el-button>
+            <el-button
+              :disabled="!isAuth('shopsList:delete')"
+              size="mini"
+              type="danger"
+              @click="deletes1(scope.row)"
+              style="margin: 5px;"
+              >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="text-align: center;margin-top: 10px;float:right">
+        <el-pagination
+          @size-change="handleSizeChange1"
+          @current-change="handleCurrentChange1"
+          :page-sizes="[10, 20, 30, 50, 100]"
+          :page-size="limit1"
+          :current-page="page1"
+          layout="total,sizes, prev, pager, next,jumper"
+          :total="typeDatas1.total"
+        >
+        </el-pagination>
+      </div>
+    </el-tab-pane>
+
+    <el-dialog
+      :title="addSetmealTitle"
+      customClass="setmeal"
+      :visible.sync="addSetmealVisible"
+      :before-close="cancelSetmeal"
+    >
+      <el-form :model="addSetmealForm">
+        <div style="display: flex;">
+          <el-form-item label="套餐名称:">
+            <el-input
+              v-model="addSetmealForm.name"
+              style="width:200px;"
+              placeholder="请输入套餐名称"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="套餐价格:">
+            <el-input
+              v-model="addSetmealForm.price"
+              style="width:200px;"
+              placeholder="请输入套餐价格"
+            ></el-input>
+          </el-form-item>
+        </div>
+        <el-form-item>
+          <div
+            style="display: flex;align-items: center;margin: 2% 0;flex-flow: wrap;"
+          >
+            <span style="display: inline-block;text-align: left;"
+              >套餐图片:<br />(可上传多张)&nbsp;&nbsp;&nbsp;</span
+            >
+
+            <div v-for="(item, index) of potost" :key="index">
+              <div style="position: relative;margin: 5px;">
+                <img
+                  :src="item"
+                  class="avatar"
+                  style="width:148px;height: 148px;"
+                />
+                <div @click="handleRemove(index)" class="divhove">
+                  <i
+                    class="el-icon-delete"
+                    style="margin: 0;font-size: 18px;color: #fff;"
+                  ></i>
+                </div>
+              </div>
+            </div>
+            <div class="imgs">
+              <el-upload
+                :action="Tupiantou"
+                list-type="picture-card"
+                :show-file-list="false"
+                :on-success="handleUploadSuccess"
+                :on-progress="onprogress1"
+              >
+                <el-progress
+                  v-if="percentage1 > 0 && percentage1 < 100"
+                  type="circle"
+                  :percentage="percentage1"
+                >
+                </el-progress>
+                <i v-else class="el-icon-plus"></i>
+              </el-upload>
+            </div>
+          </div>
+        </el-form-item>
+        <div>
+          <el-form-item label="套餐内容:">
+            <el-input
+              v-model="addSetmealForm.price"
+              style="width:200px;"
+              placeholder="请输入套餐内容"
+            ></el-input>
+            <i
+              class="el-icon-circle-plus-outline"
+              @click="mealAdd"
+              style="margin-left: 15px;font-size: 22px;color: #56a9ff;cursor: pointer;"
+            ></i>
+            <i
+              class="el-icon-delete"
+              @click="mealRemove"
+              style="margin-left: 15px;font-size: 22px;color: #f56c6c;cursor: pointer;"
+            ></i>
+          </el-form-item>
+          <div style="display: flex;">
+            <el-form-item label="绑定店铺及菜品:" style="margin-left: 80px;">
+              <el-input
+                v-model="addSetmealForm.price"
+                style="width:200px;"
+                placeholder="请输入套餐内容"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="该内容实际价格:">
+              <el-input
+                v-model="addSetmealForm.price"
+                style="width:200px;"
+                placeholder="请输入套餐内容"
+              ></el-input>
+              <i
+                class="el-icon-circle-plus-outline"
+                @click="mealAdd"
+                style="margin-left: 15px;font-size: 22px;color: #56a9ff;cursor: pointer;"
+              ></i>
+              <i
+                class="el-icon-delete"
+                @click="mealRemove"
+                style="margin-left: 15px;font-size: 22px;color: #f56c6c;cursor: pointer;"
+              ></i>
+            </el-form-item>
+          </div>
+        </div>
+        <div style="display: flex;">
+          <el-form-item label="套餐类型:">
+            <el-select
+              v-model="addSetmealForm.name"
+              placeholder="请选择套餐类型"
+              style="width:180px;"
+            >
+              <el-option label="月度套餐" value="月度套餐"></el-option>
+              <el-option label="季度套餐" value="季度套餐"></el-option>
+              <el-option label="年度套餐" value="年度套餐"></el-option>
+              <el-option label="自定义" value="自定义"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="时间段:">
+            <el-date-picker
+              style="width: 380px;"
+              v-model="addSetmealForm.name"
+              type="datetimerange"
+              unlink-panels
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :clearable="false"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </div>
+        <el-form-item label="有效期:">
+          <el-date-picker
+            style="width: 380px;"
+            v-model="addSetmealForm.name"
+            type="datetimerange"
+            unlink-panels
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            :clearable="false"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <div style="display: flex;">
+          <el-form-item label="套餐适用性别:">
+            <el-select
+              v-model="addSetmealForm.name"
+              placeholder="请选择套餐适用性别"
+              style="width:180px;"
+            >
+              <el-option label="男生专区" value="男生专区"></el-option>
+              <el-option label="女生专区" value="女生专区"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="订单生成预约单时间:">
+            选择的时间前
+            <el-input
+              v-model="addSetmealForm.price"
+              style="width:100px;"
+              placeholder=""
+            ></el-input>
+            小时(保留一位小数)
+          </el-form-item>
+        </div>
+        <el-form-item label="套餐绑定规则:">
+          <el-input
+            v-model="addSetmealForm.price"
+            style="width:100px;"
+            placeholder=""
+          ></el-input>
+        </el-form-item>
+        <el-form-item
+          label="套餐状态:"
+          style="display: flex;align-items: center;"
+        >
+          <el-switch
+            style="display: block"
+            v-model="addSetmealForm.price"
+            active-color="#13ce66"
+            active-text="启用"
+            inactive-text="关闭"
+            active-value="1"
+            inactive-value="0"
+          >
+          </el-switch>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelSetmeal">取 消</el-button>
+        <el-button type="primary" @click="amendSetmeal">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog
+      :title="addRuleTitle"
+      customClass="setRule"
+      :visible.sync="addRuleVisible"
+      :before-close="cancelRule"
+      center
+    >
+      <el-form :model="addRuleForm">
+        <el-form-item label="排序:">
+          <el-input-number
+            v-model="addRuleForm.num"
+            label="描述文字"
+          ></el-input-number>
+        </el-form-item>
+        <el-form-item label="规则名称:">
+          <el-input
+            v-model="addRuleForm.name"
+            style="width:200px;"
+            placeholder="请输入规则名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="规则内容:">
+          <el-input
+            v-model="addSetmealForm.name"
+            style="width:450px;"
+            placeholder="请输入规则内容"
+            type="textarea"
+            :rows="6"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelRule">取 消</el-button>
+        <el-button type="primary" @click="amendRule">确 定</el-button>
+      </div>
+    </el-dialog>
+  </el-tabs>
+</template>
+
+<script>
+import { jsonp } from "vue-jsonp";
+import {
+  provinceAndCityData,
+  regionData,
+  provinceAndCityDataPlus,
+  regionDataPlus,
+  CodeToText,
+  TextToCode
+} from "element-china-area-data";
+var geocoder,
+  map,
+  markersArray = [];
+export default {
+  data() {
+    return {
+      activeName: "first",
+      setmealName: "",
+      setmealType: "",
+      setmealSex: "",
+      limit: 10,
+      page: 1,
+      tableDataLoading: false,
+      typeDatas: {
+        list: [],
+        total: 10
+      },
+
+      limit1: 10,
+      page1: 1,
+      typeDatas1: {
+        list: [],
+        total: 10
+      },
+
+      // 添加套餐
+      addSetmealVisible: false,
+      addSetmealTitle: "",
+      addSetmealForm: {
+        name: "",
+        price: ""
+      },
+      potost: [],
+      percentage1: 0, //进度条
+
+      addRuleTitle: "",
+      addRuleVisible: false,
+      addRuleForm: {
+        num: 1,
+        name: ""
+      }
+    };
+  },
+  methods: {
+    // tabs切换
+    handleClick(tab, event) {
+      if (tab._props.label == "服务套餐") {
+        this.page = 1;
+        this.limit = 10;
+        this.dataSelect();
+      }
+      if (tab._props.label == "规则配置") {
+        this.page1 = 1;
+        this.limit1 = 10;
+        this.dataSelect1();
+      }
+    },
+
+    handleSizeChange(val) {
+      this.limit = val;
+      this.dataSelect();
+    },
+    handleCurrentChange(val) {
+      this.page = val;
+      this.dataSelect();
+    },
+
+    handleSizeChange1(val) {
+      this.limit1 = val;
+      this.dataSelect1();
+    },
+    handleCurrentChange1(val) {
+      this.page1 = val;
+      this.dataSelect1();
+    },
+
+    // 查询
+    select() {
+      this.page = 1;
+      this.dataSelect();
+    },
+
+    // 获取商户数据
+    dataSelect() {
+      //   this.tableDataLoading = true;
+      //   this.$http({
+      //     url: this.$http.adornUrl("admin/goods/selectAllShop"),
+      //     method: "get",
+      //     params: this.$http.adornParams({
+      //       page: this.page,
+      //       limit: this.limit,
+      //       shopName: this.shopName1,
+      //       region: this.region,
+      //       isActivity: this.isActivity
+      //     })
+      //   }).then(({ data }) => {
+      //     this.tableDataLoading = false;
+      //     for (var i in data.data.list) {
+      //       if (data.data.list[i].shopBanner) {
+      //         data.data.list[i].shopBanner = data.data.list[i].shopBanner.split(
+      //           ","
+      //         );
+      //       }
+      //     }
+      //     let returnData = data.data;
+      //     this.typeDatas = returnData;
+      //     console.log(this.typeDatas, "ll");
+      //   });
+    },
+    search() {},
+    clean() {},
+
+    //上传成功
+    handleUploadSuccess(file, fileList) {
+      // this.goodsPicture += file.data + ','
+      console.log(file, "轮播图上传成功");
+      // if(this.potost.length>=4){
+      //   this.potost.shift()
+      // }
+      this.potost.unshift(file.data);
+    },
+    onprogress1(event, file, fileList) {
+      console.log("详情图上传进度", parseInt(event.percent));
+      this.percentage1 = parseInt(event.percent);
+    },
+    handleRemove(index) {
+      this.potost.splice(index, 1);
+      console.log("this.potost", this.potost);
+    },
+
+    // 添加套餐内容
+    mealAdd() {},
+    // 删除套餐内容
+    mealRemove() {},
+
+    // 添加套餐
+    addSetmeal() {
+      this.addSetmealVisible = true;
+      this.addSetmealTitle = "添加套餐";
+    },
+    delSetmeal() {},
+    cancelSetmeal() {
+      this.addSetmealVisible = false;
+    },
+    amendSetmeal() {
+      console.log("确定");
+    },
+    setmealImp() {},
+
+    // 规则配置
+    searchRule() {},
+    cleanRule() {},
+    dataSelect1() {
+      //   this.tableDataLoading = true;
+      //   this.$http({
+      //     url: this.$http.adornUrl("admin/goods/selectAllShop"),
+      //     method: "get",
+      //     params: this.$http.adornParams({
+      //       page: this.page,
+      //       limit: this.limit,
+      //       shopName: this.shopName1,
+      //       region: this.region,
+      //       isActivity: this.isActivity
+      //     })
+      //   }).then(({ data }) => {
+      //     this.tableDataLoading = false;
+      //     for (var i in data.data.list) {
+      //       if (data.data.list[i].shopBanner) {
+      //         data.data.list[i].shopBanner = data.data.list[i].shopBanner.split(
+      //           ","
+      //         );
+      //       }
+      //     }
+      //     let returnData = data.data;
+      //     this.typeDatas = returnData;
+      //     console.log(this.typeDatas, "ll");
+      //   });
+    },
+    // 添加套餐
+    addRule() {
+      this.addRuleVisible = true;
+      this.addRuleTitle = "添加规则";
+    },
+    delRule() {},
+    cancelRule() {
+      this.addRuleVisible = false;
+    },
+    amendRule() {
+      console.log("确定");
+    },
+    setRuleImp() {}
+  },
+  mounted() {
+    this.dataSelect();
+  }
+};
+</script>
+
+<style scope>
+.imgs {
+  position: relative;
+  border-radius: 6px;
+  width: 148px;
+  height: 148px;
+  margin-right: 10px;
+  display: inline-block;
+}
+
+.dels {
+  position: absolute;
+  top: 0;
+  left: 0;
+  display: none;
+}
+
+.dels .el-icon-delete {
+  line-height: 148px;
+  padding-left: 58px;
+  font-size: 25px;
+  color: #fff;
+}
+
+.imgs:hover .dels {
+  width: 100%;
+  height: 100%;
+  background: #000;
+  display: block;
+  opacity: 0.5;
+}
+
+.bqList {
+  padding: 4px 14px;
+  margin: 4px;
+  border: 1px solid #efefef;
+  font-size: 12px;
+  color: #999;
+  border-radius: 4px;
+  margin-right: 15px;
+}
+
+.delss {
+  display: none;
+  position: relative;
+}
+
+.delss .el-icon-delete {
+  position: absolute;
+  top: 0;
+}
+
+.bqList:hover .delss {
+  display: initial;
+  opacity: 0.5;
+}
+
+.tj {
+  padding: 6px !important;
+  margin: 4px;
+  font-size: 12px;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+}
+
+.divs img {
+  width: 100%;
+}
+/* //参与活动 */
+.canquxiao {
+  margin-top: 20px;
+  margin-left: 287px;
+  width: 76px;
+  height: 35px;
+  opacity: 1;
+  border-radius: 5px;
+  border: 1px solid rgba(0, 0, 0, 1);
+  font-size: 16px;
+  font-weight: 400;
+  line-height: 35px;
+  color: rgba(0, 0, 0, 1);
+  text-align: center;
+}
+.canqueding {
+  margin-top: -35px;
+  margin-left: 407px;
+  width: 76px;
+  height: 35px;
+  opacity: 1;
+  border-radius: 5px;
+  background: rgba(62, 142, 247, 1);
+  font-size: 16px;
+  font-weight: 400;
+  line-height: 35px;
+  color: rgba(255, 255, 255, 1);
+  text-align: center;
+}
+.setmeal {
+  width: 1000px;
+  margin: 45px auto !important;
+}
+.setmeal .el-form-item {
+  display: flex;
+  margin: 0 40px 20px 0;
+}
+.setmeal .divhove {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+  left: 0;
+  top: 0;
+  opacity: 0;
+  cursor: default;
+  text-align: center;
+  padding-top: 43%;
+  border-radius: 6px;
+  background-color: rgba(0, 0, 0, 0.5);
+  -webkit-transition: opacity 0.3s;
+  transition: opacity 0.3s;
+}
+.setmeal .divhove:hover {
+  opacity: 0.8;
+}
+
+.setRule{
+  width: 600px;
+}
+</style>

Разлика између датотеке није приказан због своје велике величине
+ 1675 - 1179
src/views/shopsList/shopAdmin.vue