소스 검색

代码优化;文档结构修改;

Funny 2 년 전
부모
커밋
5400c5254a

+ 1 - 1
src/common/LodopFuncs.js

@@ -145,7 +145,7 @@ export function getLodop(oOBJECT, oEMBED, fitstLogin = false) {
         }
         //===如下空白位置适合调用统一功能(如注册语句、语言选择等):==
         LODOP.SET_LICENSES("", "A4A7A0A3BA53E8548E00D14D5864728D8EA", "", "");
-        //=======================================================
+        alert("SET_LICENSES执行了");
         return LODOP;
     } catch (err) {
         alert("getLodop出错:" + err);

+ 1 - 1
src/components/manualCreate.vue

@@ -159,7 +159,7 @@
 </template>
 <script>
 import orderMap from "./orderComponents/orderAMap.vue";
-import addressManagement from "./waimaiComponents/addressManagement.vue";
+import addressManagement from "./settingComponents/addressManagement.vue";
 import { getProductList } from "../api/shop.js";
 import { getConfig } from "../api/setting.js";
 import {

+ 0 - 111
src/components/set.vue

@@ -1,111 +0,0 @@
-<template>
-  <div class="setting">
-    <el-row class="order_tab">
-      <el-col :span="15">
-        <div class="tabList">
-          <div class="tab_item" @click="changeTabs(i)" :class="{'tab_item_ac':tabNum==i?true:false}" v-for="(item,i) in tabList" :key="i">
-            <span>{{item.name}}</span>
-            <div class="tab_line"></div>
-          </div>
-        </div>
-      </el-col>
-    </el-row>
-    <el-row class="content">
-      <el-col :span="24">
-        <component v-if="renderComponent" :is="activeName"></component>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import voiceSetting from "./settingComponents/voiceSetting.vue";
-import deliverySetting from "./settingComponents/deliverySetting.vue";
-export default {
-  name: "HelloWorld",
-  data() {
-    return {
-      tabList: [
-        { name: "自动接单/语音设置", index: 0,activeName: 'voiceSetting' },
-        { name: "推荐/屏蔽运力", index: 1,activeName: 'deliverySetting' },
-      ],
-      tabNum: 0,
-      activeName: "voiceSetting",
-      renderComponent: true,
-    };
-  },
-  components: {
-    voiceSetting,
-    deliverySetting,
-  },
-  methods: {
-    forceRerender() {
-      // 从 DOM 中删除 my-component 组件
-      this.renderComponent = false;
-      this.$nextTick(() => {
-        // 在 DOM 中添加 my-component 组件
-        this.renderComponent = true;
-      });
-    },
-    changeTabs(i) {
-      if (i === this.tabNum) {
-        this.forceRerender();
-        return;
-      }
-      this.tabNum = i;
-      this.activeName = this.tabList[i].activeName;
-    },
-  },
-};
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped="scoped">
-.setting {
-  .order_tab {
-    width: 100%;
-    height: 74px;
-    background: #fff;
-
-    .tabList {
-      width: 100%;
-      height: 74px;
-      padding-top: 20px;
-      padding-left: 36px;
-      box-sizing: border-box;
-      display: flex;
-
-      .tab_item {
-        min-width: 58px;
-        margin-right: 56px;
-        font-size: 16px;
-        font-weight: 500;
-        color: #b1b1b1;
-        position: relative;
-        text-align: center;
-        cursor: pointer;
-
-        .tab_line {
-          width: 58px;
-          height: 6px;
-          background: #fff;
-          border-radius: 3px;
-          margin: 15px auto 0;
-        }
-      }
-
-      .tab_item_ac {
-        color: #fc7200;
-
-        .tab_line {
-          background: #fc7200;
-        }
-      }
-    }
-  }
-  .content {
-    width: 100%;
-    margin-top: 10px;
-  }
-}
-</style>

src/components/waimaiComponents/addressManagement.vue → src/components/settingComponents/addressManagement.vue


src/components/waimaiComponents/deliverySetting.vue → src/components/settingComponents/deliverySetting.vue


src/components/waimaiComponents/pictureManagement.vue → src/components/settingComponents/pictureManagement.vue


+ 364 - 0
src/components/settingComponents/print/a4Printer.vue

@@ -0,0 +1,364 @@
+<template>
+  <div class="shopAdd">
+    <!-- 打印机新增、编辑 -->
+    <el-dialog width="600px" :title="title" :destroy-on-close="true" 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)">
+              {{ item.name }}
+            </div>
+          </div>
+        </el-form-item>
+        <el-form-item label="关联门店">
+          <el-select v-model="form.shopId" placeholder="请选择关联门店">
+            <el-option v-for="v in shopList" :key="v.id" :label="v.name" :value="v.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="打印机名称" prop="name">
+          <el-input clearable v-model="form.name" placeholder="给这台打印机取个名字吧" autocomplete="off" style="width: 100%">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="打印机编号" prop="deviceSn">
+          <el-input clearable v-model="form.deviceSn" placeholder="查看打印机底部标签" autocomplete="off" style="width: 100%">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="打印机KEY" prop="deviceSecret" v-if="form.deviceType!==25">
+          <el-input clearable 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" 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" 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="" />
+            <div class="num">{{ form.printCustomerCount }} 份</div>
+            <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="" />
+            <div class="num">{{ form.printMerchantCount }} 份</div>
+            <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="" />
+            <div class="num">{{ form.printKitchenCount }} 份</div>
+            <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>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { deviceAdd } from "../../../api/shop.js";
+export default {
+  props: {
+    devices: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+    shopList: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      title: "添加打印机",
+      showVisible: false,
+      form: {
+        openOrderPrint: 1,
+        openOrderCancelPrint: 1,
+        printCustomerCount: 1,
+        printMerchantCount: 1,
+        printKitchenCount: 1,
+      },
+      revieweds: [],
+      loading: false,
+      isEdit: false,
+    };
+  },
+  created() {},
+  methods: {
+    changeType(v) {
+      if (this.isEdit) {
+        return;
+      }
+      this.$set(this.form, "deviceType", v.type);
+      this.$set(this.form, "name", v.name);
+      this.form.deviceId = v.id;
+    },
+    init(e) {
+      if (e) {
+        this.isEdit = true;
+        this.title = "编辑打印机";
+        this.form = e;
+      } else {
+        this.isEdit = false;
+        this.title = "添加打印机";
+        this.form = {
+          openOrderPrint: 1,
+          openOrderCancelPrint: 1,
+          printCustomerCount: 1,
+          printMerchantCount: 1,
+          printKitchenCount: 1,
+          deviceType: "",
+          name: "",
+          deviceId: "",
+          shopId: "",
+          deviceSn: "",
+        };
+      }
+      this.showVisible = true;
+    },
+    save() {
+      if (!String(this.form.deviceId).trim()) {
+        return this.$message({
+          type: "error",
+          message: "请选择打印机!",
+        });
+      }
+      if (!this.form.name.trim()) {
+        return this.$message({
+          type: "error",
+          message: "请填写打印机名称!",
+        });
+      }
+      if (!this.form.deviceSn.trim()) {
+        return this.$message({
+          type: "error",
+          message: "请填写打印机编号!",
+        });
+      }
+      if (this.form.deviceType !== 25 && !this.form.deviceSecret.trim()) {
+        return this.$message({
+          type: "error",
+          message: "请填写打印机Key!",
+        });
+      }
+      this.loading = true;
+      deviceAdd(this.form).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: "success",
+            message: `${this.form.id ? "保存" : "新增"}成功!`,
+          });
+          this.showVisible = false;
+          this.$emit("shopDeviceList");
+        } else {
+          this.$message({
+            type: "error",
+            message: res.msg,
+          });
+        }
+        this.loading = false;
+      });
+    },
+    add(type) {
+      switch (type) {
+        case 1:
+          this.form.printCustomerCount = ++this.form.printCustomerCount;
+          break;
+        case 2:
+          this.form.printMerchantCount = ++this.form.printMerchantCount;
+          break;
+        case 3:
+          this.form.printKitchenCount = ++this.form.printKitchenCount;
+          break;
+
+        default:
+          break;
+      }
+    },
+    reduce(type) {
+      switch (type) {
+        case 1:
+          this.form.printCustomerCount = this.form.printCustomerCount
+            ? --this.form.printCustomerCount
+            : this.form.printCustomerCount;
+          break;
+        case 2:
+          this.form.printMerchantCount = this.form.printMerchantCount
+            ? --this.form.printMerchantCount
+            : this.form.printMerchantCount;
+          break;
+        case 3:
+          this.form.printKitchenCount = this.form.printKitchenCount
+            ? --this.form.printKitchenCount
+            : this.form.printKitchenCount;
+          break;
+
+        default:
+          break;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.shopAdd {
+  .printer-num {
+    display: flex;
+    align-items: center;
+    .reduce {
+      width: 30px;
+      height: 30px;
+      cursor: pointer;
+    }
+    .num {
+      margin: 0 10px;
+    }
+    .add {
+      width: 30px;
+      height: 30px;
+      cursor: pointer;
+    }
+    .name {
+      margin-left: 20px;
+    }
+  }
+  .el-dialog {
+    border-radius: 16px;
+    overflow: hidden;
+  }
+
+  .el-dialog__headerbtn .el-dialog__close:hover {
+    color: #909399;
+  }
+
+  .el-dialog__header {
+    /*height: 48px;*/
+    background: #f7f7f7;
+    padding: 16px 20px;
+  }
+
+  .el-dialog__title {
+    font-size: 16px;
+    font-weight: 500;
+    color: #000000;
+  }
+
+  .el-form-item__label {
+    text-align: left;
+    color: #000000;
+  }
+
+  .el-input__inner:focus {
+    border-color: #fc7b0f;
+  }
+
+  .el-input__inner {
+    color: #222222;
+  }
+
+  .category_box {
+    display: flex;
+    flex-wrap: wrap;
+    width: 100%;
+    margin-top: -10px;
+
+    .item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 92px;
+      height: 38px;
+      margin: 10px 10px 0 0;
+      background: #f4f4f4;
+      border-radius: 2px;
+      cursor: pointer;
+
+      &.active {
+        color: #ffffff;
+        background: #fc7200;
+      }
+    }
+  }
+
+  .line {
+    position: absolute;
+    left: -103px;
+    right: 0;
+    bottom: -12px;
+    border: 0.5px dashed #e0e0e0;
+  }
+
+  .logo_box {
+    width: 100%;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    line-height: 0;
+
+    img {
+      width: 20px;
+      height: 20px;
+      border-radius: 50%;
+      margin-right: 10px;
+      vertical-align: top;
+    }
+  }
+
+  .reviewed {
+    .item {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      height: 40px;
+
+      .left {
+        display: flex;
+        align-items: center;
+        line-height: 0;
+
+        .logo {
+          width: 20px;
+          height: 20px;
+          border-radius: 50%;
+          margin-right: 10px;
+        }
+
+        .label {
+          font-size: 14px;
+          color: #000000;
+        }
+      }
+
+      .tip {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 60px;
+        height: 22px;
+        border-radius: 22px;
+        background: #f74141;
+        font-size: 12px;
+        color: #ffffff;
+      }
+    }
+  }
+
+  .btn {
+    background: #fc7200;
+    color: #ffffff;
+    width: 220px;
+  }
+}
+</style>

+ 364 - 0
src/components/settingComponents/print/greetingCardPrinter.vue

@@ -0,0 +1,364 @@
+<template>
+  <div class="shopAdd">
+    <!-- 打印机新增、编辑 -->
+    <el-dialog width="600px" :title="title" :destroy-on-close="true" 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)">
+              {{ item.name }}
+            </div>
+          </div>
+        </el-form-item>
+        <el-form-item label="关联门店">
+          <el-select v-model="form.shopId" placeholder="请选择关联门店">
+            <el-option v-for="v in shopList" :key="v.id" :label="v.name" :value="v.id"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="打印机名称" prop="name">
+          <el-input clearable v-model="form.name" placeholder="给这台打印机取个名字吧" autocomplete="off" style="width: 100%">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="打印机编号" prop="deviceSn">
+          <el-input clearable v-model="form.deviceSn" placeholder="查看打印机底部标签" autocomplete="off" style="width: 100%">
+          </el-input>
+        </el-form-item>
+        <el-form-item label="打印机KEY" prop="deviceSecret" v-if="form.deviceType!==25">
+          <el-input clearable 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" 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" 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="" />
+            <div class="num">{{ form.printCustomerCount }} 份</div>
+            <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="" />
+            <div class="num">{{ form.printMerchantCount }} 份</div>
+            <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="" />
+            <div class="num">{{ form.printKitchenCount }} 份</div>
+            <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>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { deviceAdd } from "../../../api/shop.js";
+export default {
+  props: {
+    devices: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+    shopList: {
+      type: Array,
+      default: function () {
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      title: "添加打印机",
+      showVisible: false,
+      form: {
+        openOrderPrint: 1,
+        openOrderCancelPrint: 1,
+        printCustomerCount: 1,
+        printMerchantCount: 1,
+        printKitchenCount: 1,
+      },
+      revieweds: [],
+      loading: false,
+      isEdit: false,
+    };
+  },
+  created() {},
+  methods: {
+    changeType(v) {
+      if (this.isEdit) {
+        return;
+      }
+      this.$set(this.form, "deviceType", v.type);
+      this.$set(this.form, "name", v.name);
+      this.form.deviceId = v.id;
+    },
+    init(e) {
+      if (e) {
+        this.isEdit = true;
+        this.title = "编辑打印机";
+        this.form = e;
+      } else {
+        this.isEdit = false;
+        this.title = "添加打印机";
+        this.form = {
+          openOrderPrint: 1,
+          openOrderCancelPrint: 1,
+          printCustomerCount: 1,
+          printMerchantCount: 1,
+          printKitchenCount: 1,
+          deviceType: "",
+          name: "",
+          deviceId: "",
+          shopId: "",
+          deviceSn: "",
+        };
+      }
+      this.showVisible = true;
+    },
+    save() {
+      if (!String(this.form.deviceId).trim()) {
+        return this.$message({
+          type: "error",
+          message: "请选择打印机!",
+        });
+      }
+      if (!this.form.name.trim()) {
+        return this.$message({
+          type: "error",
+          message: "请填写打印机名称!",
+        });
+      }
+      if (!this.form.deviceSn.trim()) {
+        return this.$message({
+          type: "error",
+          message: "请填写打印机编号!",
+        });
+      }
+      if (this.form.deviceType !== 25 && !this.form.deviceSecret.trim()) {
+        return this.$message({
+          type: "error",
+          message: "请填写打印机Key!",
+        });
+      }
+      this.loading = true;
+      deviceAdd(this.form).then((res) => {
+        if (res.code === 200) {
+          this.$message({
+            type: "success",
+            message: `${this.form.id ? "保存" : "新增"}成功!`,
+          });
+          this.showVisible = false;
+          this.$emit("shopDeviceList");
+        } else {
+          this.$message({
+            type: "error",
+            message: res.msg,
+          });
+        }
+        this.loading = false;
+      });
+    },
+    add(type) {
+      switch (type) {
+        case 1:
+          this.form.printCustomerCount = ++this.form.printCustomerCount;
+          break;
+        case 2:
+          this.form.printMerchantCount = ++this.form.printMerchantCount;
+          break;
+        case 3:
+          this.form.printKitchenCount = ++this.form.printKitchenCount;
+          break;
+
+        default:
+          break;
+      }
+    },
+    reduce(type) {
+      switch (type) {
+        case 1:
+          this.form.printCustomerCount = this.form.printCustomerCount
+            ? --this.form.printCustomerCount
+            : this.form.printCustomerCount;
+          break;
+        case 2:
+          this.form.printMerchantCount = this.form.printMerchantCount
+            ? --this.form.printMerchantCount
+            : this.form.printMerchantCount;
+          break;
+        case 3:
+          this.form.printKitchenCount = this.form.printKitchenCount
+            ? --this.form.printKitchenCount
+            : this.form.printKitchenCount;
+          break;
+
+        default:
+          break;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.shopAdd {
+  .printer-num {
+    display: flex;
+    align-items: center;
+    .reduce {
+      width: 30px;
+      height: 30px;
+      cursor: pointer;
+    }
+    .num {
+      margin: 0 10px;
+    }
+    .add {
+      width: 30px;
+      height: 30px;
+      cursor: pointer;
+    }
+    .name {
+      margin-left: 20px;
+    }
+  }
+  .el-dialog {
+    border-radius: 16px;
+    overflow: hidden;
+  }
+
+  .el-dialog__headerbtn .el-dialog__close:hover {
+    color: #909399;
+  }
+
+  .el-dialog__header {
+    /*height: 48px;*/
+    background: #f7f7f7;
+    padding: 16px 20px;
+  }
+
+  .el-dialog__title {
+    font-size: 16px;
+    font-weight: 500;
+    color: #000000;
+  }
+
+  .el-form-item__label {
+    text-align: left;
+    color: #000000;
+  }
+
+  .el-input__inner:focus {
+    border-color: #fc7b0f;
+  }
+
+  .el-input__inner {
+    color: #222222;
+  }
+
+  .category_box {
+    display: flex;
+    flex-wrap: wrap;
+    width: 100%;
+    margin-top: -10px;
+
+    .item {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      width: 92px;
+      height: 38px;
+      margin: 10px 10px 0 0;
+      background: #f4f4f4;
+      border-radius: 2px;
+      cursor: pointer;
+
+      &.active {
+        color: #ffffff;
+        background: #fc7200;
+      }
+    }
+  }
+
+  .line {
+    position: absolute;
+    left: -103px;
+    right: 0;
+    bottom: -12px;
+    border: 0.5px dashed #e0e0e0;
+  }
+
+  .logo_box {
+    width: 100%;
+    height: 40px;
+    display: flex;
+    align-items: center;
+    line-height: 0;
+
+    img {
+      width: 20px;
+      height: 20px;
+      border-radius: 50%;
+      margin-right: 10px;
+      vertical-align: top;
+    }
+  }
+
+  .reviewed {
+    .item {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      height: 40px;
+
+      .left {
+        display: flex;
+        align-items: center;
+        line-height: 0;
+
+        .logo {
+          width: 20px;
+          height: 20px;
+          border-radius: 50%;
+          margin-right: 10px;
+        }
+
+        .label {
+          font-size: 14px;
+          color: #000000;
+        }
+      }
+
+      .tip {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 60px;
+        height: 22px;
+        border-radius: 22px;
+        background: #f74141;
+        font-size: 12px;
+        color: #ffffff;
+      }
+    }
+  }
+
+  .btn {
+    background: #fc7200;
+    color: #ffffff;
+    width: 220px;
+  }
+}
+</style>

+ 7 - 7
src/components/waimaiComponents/printerAdd.vue

@@ -35,21 +35,21 @@
         </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>
@@ -62,7 +62,7 @@
 </template>
 
 <script>
-import { deviceAdd } from "../../api/shop.js";
+import { deviceAdd } from "../../../api/shop.js";
 export default {
   props: {
     devices: {

+ 6 - 6
src/components/waimaiComponents/printerList.vue

@@ -20,17 +20,17 @@
       </div>
       <div class="printer-list">
         <div class="item" v-for="(v,i) in printerList" :key="i">
-          <img class="img" :src="require(`../../../static/image/printer-online-${v.onlineStatus}.png`)" alt="">
+          <img class="img" :src="require(`../../../../static/image/printer-online-${v.onlineStatus}.png`)" alt="">
           <div class="name">{{v.name}}</div>
           <div class="shop-name">{{v.shopName}}</div>
           <div class="btns">
-            <img @click.stop="printTest(v)" src="../../../static/image/print-icon.png" alt="">
-            <img @click.stop="addPrinter(v)" src="../../../static/image/edit-icon.png" alt="">
-            <img @click.stop="deletePrinter(v)" src="../../../static/image/delete-icon.png" alt="">
+            <img @click.stop="printTest(v)" src="../../../../static/image/print-icon.png" alt="">
+            <img @click.stop="addPrinter(v)" src="../../../../static/image/edit-icon.png" alt="">
+            <img @click.stop="deletePrinter(v)" src="../../../../static/image/delete-icon.png" alt="">
           </div>
         </div>
         <div class="item" @click.stop="addPrinter('')">
-          <img class="img" src="../../../static/image/icon-add.png" alt="">
+          <img class="img" src="../../../../static/image/icon-add.png" alt="">
           <div class="name">添加打印机</div>
           <div class="shop-name"> </div>
         </div>
@@ -52,7 +52,7 @@ import {
   deviceStatus,
   printTest,
   shopListNew,
-} from "../../api/shop";
+} from "../../../api/shop";
 export default {
   name: "printerList",
   components: {

src/components/system.vue → src/components/settingComponents/system.vue


src/components/waimaiComponents/voiceSetting.vue → src/components/settingComponents/voiceSetting.vue


+ 12 - 8
src/components/waimai.vue

@@ -25,12 +25,14 @@
 </template>
 
 <script>
-import printerList from "./waimaiComponents/printerList.vue";
-import usbPrinter from "./shopCompoents/bindUsbPrint.vue";
-import pictureManagement from "./waimaiComponents/pictureManagement.vue";
-import addressManagement from "./waimaiComponents/addressManagement.vue";
-import deliverySetting from "./waimaiComponents/deliverySetting.vue";
-import voiceSetting from "./waimaiComponents/voiceSetting.vue";
+import printerList from "./print/printerList.vue";
+import a4Printer from "./print/a4Printer.vue";
+import greetingCardPrinter from "./print/greetingCardPrinter.vue";
+import usbPrinter from "../shopCompoents/bindUsbPrint.vue";
+import pictureManagement from "./pictureManagement.vue";
+import addressManagement from "./addressManagement.vue";
+import deliverySetting from "./deliverySetting.vue";
+import voiceSetting from "./voiceSetting.vue";
 export default {
   name: "waimai",
   components: {
@@ -52,8 +54,10 @@ export default {
           index: 2,
           activeName: "printerList",
           children: [
-            { name: "云打印机", command: "printerList" },
-            { name: "USB打印机", command: "usbPrinter" },
+            { name: "云打印", command: "printerList" },
+            { name: "有线打印", command: "usbPrinter" },
+            { name: "A4打印", command: "a4Printer" },
+            { name: "贺卡打印", command: "greetingCardPrinter" },
           ],
         },
         { name: "商品管理", index: 3, activeName: "pictureManagement" },

+ 2 - 20
src/router/index.js

@@ -37,24 +37,6 @@ const router = new Router({
           title: '手动发单',
           component: () => import('../components/manualCreate.vue')
         },
-        // {
-        //   path: '/setUp/set',
-        //   name: 'set',
-        //   title: '外卖设置',
-        //   component: () => import('../components/set.vue')
-        // },
-        // {
-        //   path: '/setUp/addressManagement',
-        //   name: 'addressManagement',
-        //   title: '常用地址',
-        //   component: () => import('../components/addressManagement.vue')
-        // },
-        // {
-        //   path: '/setUp/pictureManagement',
-        //   name: 'pictureManagement',
-        //   title: '图片管理',
-        //   component: () => import('../components/pictureManagement.vue')
-        // },
         {
           path: '/shop/shopList',
           name: 'shopList',
@@ -102,13 +84,13 @@ const router = new Router({
           path: '/set/waimai',
           name: 'waimai',
           title: '外卖设置',
-          component: () => import('../components/waimai.vue')
+          component: () => import('../components/settingComponents/waimai.vue')
         },
         {
           path: '/set/system',
           name: 'system',
           title: '系统设置',
-          component: () => import('../components/system.vue')
+          component: () => import('../components/settingComponents/system.vue')
         },
         {
           path: '/help/commonProblem',