shish 4 лет назад
Родитель
Сommit
67654b3cfa

+ 3 - 0
hdApp/src/admin/home/me.vue

@@ -131,6 +131,9 @@
               <div class="tui-title">我的优惠券</div>
             </tui-list-cell>
 
+            <tui-list-cell @click="pageTo({ url: '/admin/shop/print' })" class="line-cell" :hover="false" :arrow="true">
+              <div class="tui-title">云打印</div>
+            </tui-list-cell>
 
             <tui-list-cell @click="pageTo({ url: '/admin/jc/index' })" class="line-cell" :hover="false" :arrow="true">
               <div class="tui-title">新手教程</div>

+ 5 - 0
hdApp/src/admin/home/order.vue

@@ -42,6 +42,11 @@
             </div>
 
             <div class="list-button">
+
+              <div class="admin-button-com" @click.stop>打印</div>
+              <div class="admin-button-com default" @click.stop>收花人</div>
+              <div class="admin-button-com" @click.stop>收花人</div>
+
               <template v-if="item.status == 0">
                 <div
                   class="admin-button-com default"

+ 1 - 1
hdApp/src/admin/home/workbench.vue

@@ -200,7 +200,7 @@ export default {
           url: "/admin/cg/mall"
         },
         {
-          name: "收款",
+          name: "送货地址",
           img: `${this.$constant.imgUrl}/ghs/home/icon_sk.png`,
           url: "/admin/billing/priceChange"
         },

+ 2 - 2
hdApp/src/admin/order/components/sel-order.vue

@@ -11,9 +11,9 @@
 				</template>
 				<template v-slot:content>
 					<div class="axis-slot-wrap write_button">
-						<div class="axis-title">制单</div>
+						<div class="axis-title">制作配送单</div>
 						<div class="axis-det">
-							<button class="admin-button-com big blue" @click="hasSendOrderFn">跳过</button>
+							<button class="admin-button-com big blue" @click="hasSendOrderFn">已经有了</button>
 							<button class="admin-button-com big blue" @click="pageTo({url: '/admin/order/fill-form',query: {id: orderData.id}})">填写</button>
 						</div>
 					</div>

+ 156 - 0
hdApp/src/admin/shop/print.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="app-content">
+    <div v-show="showStaffArea">
+      <form @submit="formSubmit" @reset="formReset">
+        <div class="module-com input-line-wrap">
+          
+          <tui-list-cell class="line-cell" :hover="false">
+            <div class="tui-title">编号(SN):</div>
+            <input
+              v-model="form.printSn"
+              placeholder-class="phcolor"
+              class="tui-input"
+              name="printSn"
+              placeholder="请填写编号"
+              maxlength="50"
+              type="number"
+            />
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <div class="tui-title">密钥(KEY):</div>
+            <input
+              v-model="form.printKey"
+              placeholder-class="phcolor"
+              class="tui-input"
+              name="printKey"
+              placeholder="请填写密钥"
+              maxlength="50"
+              type="text"
+            />
+          </tui-list-cell>
+
+        </div>
+
+        <!-- 提交 -->
+        <div class="confirm-btn">
+          <button class="admin-button-com big blue" formType="submit">
+            提交
+          </button>
+        </div>
+      </form>
+    </div>
+    <!-- <kd-entrance></kd-entrance> -->
+  </div>
+</template>
+
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import AppAvatarModule from "@/components/module/app-avatar";
+const form = require("@/utils/formValidation.js");
+import { addCloudPrint,getPrint } from "@/api/shop";
+export default {
+  name: "shopPrint",
+  components: {
+    TuiListCell,
+    AppAvatarModule,
+  },
+  data() {
+    return {
+      form: {
+        printKey: "",
+        printSn: ""
+      },
+      roleList: [],
+      roleSelData: {},
+      showStaffArea: true,
+      miniCodeSrc: "",
+      memberData: {},
+    };
+  },
+  onLoad() {
+    //this.init()
+  },
+  onShow() {
+    uni.setNavigationBarTitle({
+      title: `云打印`,
+    });
+  },
+  methods: {
+    async init() {
+      try {
+        const { data } = await getPrint();
+        this.form.printKey = data.printKey;
+        this.form.printSn = data.printSn;
+        this.$forceUpdate();
+      } finally {}
+    },
+    confirmFn() {
+      addCloudPrint(this.form).then((res) => {
+        this.$msg(res.msg);
+        if(res.code == 1){
+          setTimeout(() => {
+            uni.navigateBack();
+          }, 1000)
+        }
+      });
+    },
+    formSubmit(e) {
+      let rules = [
+        {
+          name: "printSn",
+          rule: ["required"],
+          msg: ["请填写编号"],
+        },
+        {
+          name: "printKey",
+          rule: ["required"],
+          msg: ["请填写密钥"],
+        },
+      ];
+      //let formData = e.detail.value;
+      //let checkRes = form.validation(formData, rules);
+      // if (checkRes) {
+      //   this.$msg(checkRes)
+      //   return false
+      // }
+      this.confirmFn();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 20px);
+  padding-top: 20px;
+}
+.prompt-text {
+  color: $fontColor3;
+  padding-left: 30px;
+  margin-bottom: 30px;
+}
+.module-com {
+  margin-bottom: 20px;
+  .member-wrap {
+    .member-det {
+      font-size: 24px;
+      margin-left: 20px;
+    }
+  }
+  .remark-wrap {
+    align-items: flex-start;
+    .remark {
+      height: 240px;
+    }
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60px);
+  margin: 60px 30px 20px;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

+ 10 - 0
hdApp/src/api/shop/index.js

@@ -52,3 +52,13 @@ export const downMemberCode = data => {
 export const currentShop = data => {
 	return https.get('/shop/current-shop', data)
 }
+
+//添加云打印机
+export const addCloudPrint = data => {
+	return https.get('/shop-ext/add-print', data)
+}
+
+//获取云打印机信息
+export const getPrint = data => {
+	return https.get('/shop-ext/get-print', data)
+}

+ 4 - 18
hdApp/src/pages.json

@@ -381,24 +381,10 @@
 		{
 			"root": "admin/shop",
 			"pages": [
-				{
-					"path": "list",
-					"style": {
-						"navigationBarTitleText": "门店"
-					}
-				},
-				{
-					"path": "downloadCode",
-					"style": {
-						"navigationBarTitleText": "收款码"
-					}
-				},
-				{
-					"path": "add",
-					"style": {
-						"navigationBarTitleText": ""
-					}
-				}
+				{"path": "list","style": {"navigationBarTitleText": "门店"}},
+				{"path": "downloadCode","style": {"navigationBarTitleText": "收款码"}},
+				{"path": "add","style": {"navigationBarTitleText": ""}},
+				{"path": "print","style": {"navigationBarTitleText": "云打印"}}
 			]
 		},
 		{