Funny %!s(int64=3) %!d(string=hai) anos
pai
achega
3d58778841

+ 1 - 1
src/common/sider.vue

@@ -105,7 +105,7 @@ export default {
             {
               path: "/setUp/pictureManagement",
               name: "pictureManagement",
-              title: "图片管理",
+              title: "商品管理",
             },
           ],
         },

+ 58 - 14
src/components/accountCompoents/consumption.vue

@@ -18,26 +18,23 @@
         </div>
       </el-col>
     </el-row>
-    <div style="min-height: 400px;">
+    <div>
       <el-table :data="flowList">
         <el-table-column prop="shopName" label="门店"></el-table-column>
-        <!-- <el-table-column prop="" label="订单来源/编号">
+        <el-table-column prop="" label="订单来源/编号" min-width="100px">
           <template slot-scope="scope">
-            <div v-if="scope.row.payType == 1">支付宝</div>
-            <div v-if="scope.row.payType == 2">微信</div>
-            <div v-if="!scope.row.payType">--</div>
+            <div>{{showType(scope.row.orderType)}}</div>
+            <div>{{scope.row.outOrderId}}</div>
           </template>
-        </el-table-column> -->
-        <!-- <el-table-column prop="createTime" label="平台订单号"></el-table-column> -->
-        <el-table-column prop="createTime" label="消费时间"></el-table-column>
-        <el-table-column prop="remark" label="用途"></el-table-column>
-        <!-- <el-table-column prop="" label="支付方式">
+        </el-table-column>
+        <el-table-column prop="orderSn" label="平台订单号" min-width="120px"></el-table-column>
+        <el-table-column prop="createTime" label="消费时间" min-width="110px"></el-table-column>
+        <el-table-column prop="remark" label="用途" min-width="100px"></el-table-column>
+        <el-table-column prop="" label="支付方式">
           <template slot-scope="scope">
-            <div v-if="scope.row.payType == 1">支付宝</div>
-            <div v-if="scope.row.payType == 2">微信</div>
-            <div v-if="!scope.row.payType">--</div>
+            <div>{{showPayMent(scope.row.paymentType)}}</div>
           </template>
-        </el-table-column> -->
+        </el-table-column>
         <el-table-column prop="amount" label="金额">
           <template slot-scope="scope">
             <div>{{scope.row.type === 1 ? '+' : '-'}}{{ scope.row.amount.toFixed(2) }}</div>
@@ -176,6 +173,53 @@ export default {
         }
       });
     },
+    showType(type){
+      let name;
+      switch (type) {
+        case 1:
+          name="美团"
+          break;
+        case 2:
+          name="饿了么"
+          break;
+        case 3:
+          name="饿百"
+          break;
+        case 99:
+          name="手动发单"
+          break;
+      
+        default:
+          name= '--'
+          break;
+      }
+      return name
+    },
+    showPayMent(type) {
+      let name;
+      switch (type) {
+        case 1:
+          name= '支付宝支付'
+          break;
+        case 2:
+          name= '微信支付'
+          break;
+        case 3:
+          name= '银联支付'
+          break;
+        case 4:
+          name= '余额支付'
+          break;
+        case 5:
+          name= '三方运力支付'
+          break;
+
+        default:
+          name = "--";
+          break;
+      }
+      return name;
+    },
   },
 };
 </script>

+ 61 - 38
src/components/accountCompoents/recharge.vue

@@ -10,9 +10,7 @@
         </el-table-column>
         <el-table-column prop="" label="支付方式">
           <template slot-scope="scope">
-            <div v-if="scope.row.payType == 1">支付宝</div>
-            <div v-if="scope.row.payType == 2">微信</div>
-            <div v-if="!scope.row.payType">--</div>
+            <div>{{showPayMent(scope.row.paymentType)}}</div>
           </template>
         </el-table-column>
       </el-table>
@@ -25,45 +23,70 @@
 </template>
 
 <script>
-  import { balanceLogs } from '../../api/amount.js';
-  export default {
-    data() {
-      return {
-        rechargeList: [],
-        query: {
-          source: 1,
-          pageNum: 1,
-          pageSize: 10
-        },
-        total: 0
-      }
+import { balanceLogs } from "../../api/amount.js";
+export default {
+  data() {
+    return {
+      rechargeList: [],
+      query: {
+        source: 1,
+        pageNum: 1,
+        pageSize: 10,
+      },
+      total: 0,
+    };
+  },
+  created() {
+    this.getBalanceLogs();
+  },
+  methods: {
+    handleSizeChange(val) {
+      this.query.pageNum = 1;
+      this.query.pageSize = val;
+      this.rechargeList = [];
+      this.getBalanceLogs();
     },
-    created() {
+    handleCurrentChange(val) {
+      this.query.pageNum = val;
+      this.rechargeList = [];
       this.getBalanceLogs();
     },
-    methods: {
-      handleSizeChange(val) {
-        this.query.pageNum = 1;
-        this.query.pageSize = val;
-        this.rechargeList = [];
-        this.getBalanceLogs();
-      },
-      handleCurrentChange(val) {
-        this.query.pageNum = val;
-        this.rechargeList = [];
-        this.getBalanceLogs();
-      },
-      getBalanceLogs() {
-        let params  = { ...this.query };
-        balanceLogs( params ).then(res=> {
-          if ( res.code == 200 ) {
-            this.rechargeList = res.data.data || [];
-            this.total = res.data.totalNums || 0;
-          }
-        })
+    getBalanceLogs() {
+      let params = { ...this.query };
+      balanceLogs(params).then((res) => {
+        if (res.code == 200) {
+          this.rechargeList = res.data.data || [];
+          this.total = res.data.totalNums || 0;
+        }
+      });
+    },
+    showPayMent(type) {
+      let name;
+      switch (type) {
+        case 1:
+          name= '支付宝支付'
+          break;
+        case 2:
+          name= '微信支付'
+          break;
+        case 3:
+          name= '银联支付'
+          break;
+        case 4:
+          name= '余额支付'
+          break;
+        case 5:
+          name= '三方运力支付'
+          break;
+
+        default:
+          name = "--";
+          break;
       }
-    }
-  }
+      return name;
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/components/addressManagement.vue

@@ -36,7 +36,7 @@
           <el-input v-model="form.phone" placeholder="请填写联系人电话!"></el-input>
         </el-form-item>
         <el-form-item label="设为默认地址">
-          <el-switch v-model="form.isDefault" :active-value="1" :inactive-value="0"></el-switch>
+          <el-switch v-model="form.isDefault" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999"></el-switch>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">

+ 39 - 14
src/components/help.vue

@@ -2,23 +2,26 @@
   <div class="help">
     <div class="help-content">
       <div class="menu">
-        <el-menu :default-openeds="openeds"  default-active="0" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
-          <el-submenu :index="i" v-for="(v,i) in helpList" :key="i">
+        <el-menu :default-openeds="openeds" :default-active="defaultActive" class="el-menu-vertical-demo" @select="select">
+          <el-submenu :index="String(i)" v-for="(v,i) in helpList" :key="i">
             <template slot="title">
               <span>{{v.firstColumnNames}}</span>
             </template>
             <el-menu-item-group v-for="(item,index) in v.helpSeconds" :key="index">
-              <template slot="title">
-                <span class="title">{{item.secondColumnNames}}</span>
-              </template>
+              <el-menu-item :index="i+'-'+index">{{item.secondColumnNames}}</el-menu-item>
             </el-menu-item-group>
           </el-submenu>
         </el-menu>
       </div>
       <div class="content">
-
+        <el-tabs v-model="activeName">
+          <el-tab-pane v-for="(v,i) in detailList" :key="i" :label="v.title" :name="v.title" v-html="v.content"></el-tab-pane>
+        </el-tabs>
       </div>
     </div>
+    <template>
+      <el-backtop>返回顶部</el-backtop>
+    </template>
   </div>
 </template>
 
@@ -30,7 +33,9 @@ export default {
     return {
       helpList: [],
       detailList: [],
-      openeds: []
+      openeds: [],
+      activeName: "",
+      defaultActive: "0",
     };
   },
   // 监听属性 类似于data概念
@@ -51,9 +56,9 @@ export default {
         console.log(res);
         if (res.code === 200) {
           this.helpList = res.data;
-          this.openeds = this.helpList.map((v,i)=>{
-            return i
-          })
+          this.openeds = this.helpList.map((v, i) => {
+            return String(i);
+          });
           this.getDetail(this.helpList[0].helpSeconds[0].secondColumnId);
         } else {
           this.$message({
@@ -67,6 +72,9 @@ export default {
       helpDetail({ secondColumnId }).then((res) => {
         if (res.code === 200) {
           this.detailList = res.data;
+          this.activeName = this.detailList.length
+            ? this.detailList[0].title
+            : "";
         } else {
           this.$message({
             type: "error",
@@ -75,29 +83,46 @@ export default {
         }
       });
     },
+    select() {
+      console.log("object", arguments);
+      let nums = arguments[0].split("-");
+      let num1 = Number(nums[0]);
+      let num2 = Number(nums[1]);
+      let id = this.helpList[num1].helpSeconds[num2].secondColumnId;
+      this.getDetail(id);
+    },
   },
 };
 </script>
 
 <style lang="scss" scoped  type="text/css">
 .help {
-  height:100%;
+  height: 100%;
   .help-content {
     display: flex;
     justify-content: space-between;
-    height:100%;
+    height: 100%;
     .menu {
-      height:100%;
+      height: 100%;
       width: 250px;
       /deep/ ul {
         height: 100%;
+        overflow: auto;
       }
       .title {
         cursor: pointer;
       }
     }
     .content {
-      width: calc(100% - 260px)
+      width: calc(100% - 260px);
+      background: #fff;
+      overflow: auto;
+      /deep/ .el-tabs__item {
+        padding-left: 20px;
+      }
+      /deep/ .el-tab-pane {
+        padding: 0 20px;
+      }
     }
   }
 }

+ 46 - 2
src/components/pictureManagement.vue

@@ -1,12 +1,30 @@
 <template>
-  <div>11111111</div>
+  <div class="picture-management">
+    <div class="set">
+      <div class="title">
+        <div class="name">同步商品图片</div>
+        <div class="tips">(同步后显示最新的商品图片)</div>
+      </div>
+      <img class="img" src="../../static/image/update.png" alt="">
+    </div>
+    <div class="set">
+      <div class="title">
+        <div class="name">订单详情显示出商品图片</div>
+        <div class="tips">(在订单详情的商品显示图片,方便制作时确认)</div>
+      </div>
+      <el-switch v-model="value" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999">
+      </el-switch>
+    </div>
+  </div>
 </template>
 
 <script>
 export default {
   name: "pictureManagement",
   data() {
-    return {};
+    return {
+      value:1
+    };
   },
   // 监听属性 类似于data概念
   computed: {},
@@ -23,4 +41,30 @@ export default {
 </script>
 
 <style lang="scss" scoped  type="text/css">
+.picture-management {
+  .set {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 20px;
+    background: #fff;
+    margin-bottom: 20px;
+    border-radius: 5px;
+    .title {
+      display: flex;
+      align-items: center;
+      .name {
+        font-size: 14px;
+      }
+      .tips {
+        font-size: 12px;
+        color: #999;
+      }
+    }
+    .img {
+      width: 20px;
+      height: 20px;
+    }
+  }
+}
 </style>

+ 5 - 9
src/components/settingComponents/voiceSetting.vue

@@ -6,7 +6,7 @@
           自动接单
         </div>
         <div class="t-right">
-          <el-switch @change="updateConfig" v-model="openAutoorder" :active-value="1" :inactive-value="0" />
+          <el-switch @change="updateConfig" v-model="openAutoorder" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
         </div>
       </div>
       <div class="top-set">
@@ -16,7 +16,7 @@
         </div>
         <div class="t-right">
           <span>默认下单{{autodeliveryOrderTime}}分钟后</span>
-          <el-switch @change="autodelivery" v-model="openAutodelivery" :active-value="1" :inactive-value="0" />
+          <el-switch @change="autodelivery" v-model="openAutodelivery" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
         </div>
       </div>
       <div class="top-set">
@@ -25,7 +25,7 @@
           <span style="color: #999;">(开启后将为您自动打印小票)</span>
         </div>
         <div class="t-right">
-          <el-switch @change="updateConfig" v-model="openPrintSwitch" :active-value="1" :inactive-value="0" />
+          <el-switch @change="updateConfig" v-model="openPrintSwitch" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
         </div>
       </div>
     </template>
@@ -36,7 +36,7 @@
         </div>
         <div class="t-right">
           <span>一键开启</span>
-          <el-switch @change="changeMessageStatus" v-model="msasterSwitch" :active-value="1" :inactive-value="0" />
+          <el-switch @change="changeMessageStatus" v-model="msasterSwitch" :active-value="1" :inactive-value="0"  active-color="#FC7200" inactive-color="#999" />
         </div>
       </div>
       <div class="voice-list">
@@ -48,7 +48,7 @@
                 <span>{{ item.name }}</span>
               </div>
               <div class="right">
-                <el-switch @change="updateSavePushMessageStatus" v-model="item.msasterSwitch" :active-value="1" :inactive-value="0" />
+                <el-switch @change="updateSavePushMessageStatus" v-model="item.msasterSwitch" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
               </div>
             </div>
           </el-col>
@@ -264,10 +264,6 @@ export default {
 
 <style lang="scss" scoped>
 .voice {
-  /deep/ .el-switch.is-checked .el-switch__core {
-    border-color: #fc7200;
-    background-color: #fc7200;
-  }
   /deep/ .el-checkbox__input.is-checked .el-checkbox__inner,
   /deep/ .el-checkbox__input.is-indeterminate .el-checkbox__inner {
     background-color: #fc7200;

+ 5 - 1
src/components/shopCompoents/bindDelivery.vue

@@ -9,7 +9,7 @@
           </div>
           <div v-if="v.bindStatus === 1 && memberType === 2" class="top-right">
             <span>开启后首选该账号平台为配送平台</span>
-            <el-switch @change="statusDelivery(v)" v-model="v.preferredDelivery" :active-value="1" :inactive-value="0" />
+            <el-switch @change="statusDelivery(v)" v-model="v.preferredDelivery" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
           </div>
         </div>
         <div class="item-bottom">
@@ -269,6 +269,10 @@ export default {
             if (res.data) {
               this.jumpUrl = res.data;
             } else {
+              this.$message({
+                type: 'success',
+                message: '已成功绑定!'
+              })
               this.getDeliveryList();
             }
           } else {

+ 15 - 89
src/components/shopCompoents/printerAdd.vue

@@ -1,129 +1,56 @@
 <template>
   <div class="shopAdd">
     <!-- 打印机新增、编辑 -->
-    <el-dialog
-      width="40%"
-      :title="title"
-      destroy-on-close
-      center
-      :visible.sync="showVisible"
-    >
+    <el-dialog width="40%" :title="title" destroy-on-close center :visible.sync="showVisible">
       <el-form :model="form" ref="form" label-width="120px">
         <el-form-item label="选择打印机" prop="deviceType">
           <div class="category_box">
-            <div
-              class="item"
-              :class="form.deviceType == item.type ? 'active' : ''"
-              v-for="(item, i) in devices"
-              :key="i"
-              @click="changeType(item)"
-            >
+            <div class="item" :class="form.deviceType == item.type ? 'active' : ''" v-for="(item, i) in devices" :key="i" @click="changeType(item)">
               {{ item.name }}
             </div>
           </div>
         </el-form-item>
         <el-form-item label="打印机名称" prop="name">
-          <el-input
-            v-model="form.name"
-            placeholder="给这台打印机取个名字吧"
-            autocomplete="off"
-            style="width: 100%"
-          >
+          <el-input v-model="form.name" placeholder="给这台打印机取个名字吧" autocomplete="off" style="width: 100%">
           </el-input>
         </el-form-item>
         <el-form-item label="打印机编号" prop="deviceSn">
-          <el-input
-            v-model="form.deviceSn"
-            placeholder="查看打印机底部标签"
-            autocomplete="off"
-            style="width: 100%"
-          >
+          <el-input v-model="form.deviceSn" placeholder="查看打印机底部标签" autocomplete="off" style="width: 100%">
           </el-input>
         </el-form-item>
         <el-form-item label="打印机KEY" prop="deviceSecret">
-          <el-input
-            v-model="form.deviceSecret"
-            placeholder="查看打印机底部标签"
-            autocomplete="off"
-            style="width: 100%"
-          >
+          <el-input v-model="form.deviceSecret" placeholder="查看打印机底部标签" autocomplete="off" style="width: 100%">
           </el-input>
         </el-form-item>
         <el-form-item label="自动打印接单" prop="deviceSecret">
-          <el-switch
-            v-model="form.openOrderPrint"
-            :active-value="1"
-            :inactive-value="0"
-          />
+          <el-switch v-model="form.openOrderPrint" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
         </el-form-item>
         <el-form-item label="自动打印取消单" prop="deviceSecret">
-          <el-switch
-            v-model="form.openOrderCancelPrint"
-            :active-value="1"
-            :inactive-value="0"
-          />
+          <el-switch v-model="form.openOrderCancelPrint" :active-value="1" :inactive-value="0" active-color="#FC7200" inactive-color="#999" />
         </el-form-item>
         <el-form-item label="打印份数">
           <div class="printer-num">
-            <img
-              @click="reduce(1)"
-              src="../../../static/image/icon_reduce.png"
-              class="reduce"
-              alt=""
-              srcset=""
-            />
+            <img @click="reduce(1)" src="../../../static/image/icon_reduce.png" class="reduce" alt="" srcset="" />
             <div class="num">{{ form.printCustomerCount }} 份</div>
-            <img
-              @click="add(1)"
-              src="../../../static/image/icon_add.png"
-              class="add"
-              alt=""
-              srcset=""
-            />
+            <img @click="add(1)" src="../../../static/image/icon_add.png" class="add" alt="" srcset="" />
             <div class="name">客户联</div>
           </div>
           <div class="printer-num">
-            <img
-              @click="reduce(2)"
-              src="../../../static/image/icon_reduce.png"
-              class="reduce"
-              alt=""
-              srcset=""
-            />
+            <img @click="reduce(2)" src="../../../static/image/icon_reduce.png" class="reduce" alt="" srcset="" />
             <div class="num">{{ form.printMerchantCount }} 份</div>
-            <img
-              @click="add(2)"
-              src="../../../static/image/icon_add.png"
-              class="add"
-              alt=""
-              srcset=""
-            />
+            <img @click="add(2)" src="../../../static/image/icon_add.png" class="add" alt="" srcset="" />
             <div class="name">商家联</div>
           </div>
           <div class="printer-num">
-            <img
-              @click="reduce(3)"
-              src="../../../static/image/icon_reduce.png"
-              class="reduce"
-              alt=""
-              srcset=""
-            />
+            <img @click="reduce(3)" src="../../../static/image/icon_reduce.png" class="reduce" alt="" srcset="" />
             <div class="num">{{ form.printKitchenCount }} 份</div>
-            <img
-              @click="add(3)"
-              src="../../../static/image/icon_add.png"
-              class="add"
-              alt=""
-              srcset=""
-            />
+            <img @click="add(3)" src="../../../static/image/icon_add.png" class="add" alt="" srcset="" />
             <div class="name">厨房联</div>
           </div>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button :loading="loading" size="medium" class="btn" @click="save"
-          >保存</el-button
-        >
+        <el-button :loading="loading" size="medium" class="btn" @click="save">保存</el-button>
       </div>
     </el-dialog>
   </div>
@@ -149,8 +76,7 @@ export default {
       loading: false,
     };
   },
-  created(){
-  },
+  created() {},
   methods: {
     changeType(v) {
       this.$set(this.form, "deviceType", v.type);

BIN=BIN
static/image/update.png