Procházet zdrojové kódy

云喇叭和小票机

shish před 4 roky
rodič
revize
0f9f484aa7

+ 2 - 1
ghsApp/src/admin/home/me.vue

@@ -90,8 +90,9 @@
             </tui-list-cell> -->
 
             <tui-list-cell @click="pageTo({ url: '/admin/shop/trumpet' })" class="line-cell" :hover="false" :arrow="true">
-              <view class="tui-title">云喇叭设置</view>
+              <view class="tui-title">收款播报设置</view>
             </tui-list-cell>
+
             <tui-list-cell @click="pageTo({ url: '/pagesStore/me/expressSet' })" class="line-cell" :hover="false" :arrow="true">
               <view class="tui-title">快递设置</view>
             </tui-list-cell>

+ 1 - 1
ghsApp/src/admin/shop/trumpet.vue

@@ -51,7 +51,7 @@ export default {
   },
   onShow() {
     uni.setNavigationBarTitle({
-      title: `云喇叭设置`,
+      title: `收款播报设置`,
     });
   },
   methods: {

+ 1 - 1
ghsApp/src/pages.json

@@ -150,7 +150,7 @@
 				{"path": "list","style": {"navigationBarTitleText": "店铺管理"}},
 				{"path": "add","style": {"navigationBarTitleText": ""}},
 				{"path": "print","style": {"navigationBarTitleText": "云打印"}},
-				{"path": "trumpet","style": {"navigationBarTitleText": "云喇叭设置"}},
+				{"path": "trumpet","style": {"navigationBarTitleText": "收款播报设置"}},
 				{"path": "changeShop","style": {"navigationBarTitleText": "切换门店"}},
 				{"path": "sk","style": {"navigationBarTitleText": "我的零售店"}},
 				{"path": "password","style": {"navigationBarTitleText": "密码修改"}}

+ 5 - 1
hdApp/src/admin/home/me.vue

@@ -80,7 +80,11 @@
             </tui-list-cell>
 
             <tui-list-cell @click="pageTo({ url: '/admin/shop/print' })" class="line-cell" :hover="false" :arrow="true">
-              <view class="tui-title">打印机设置</view>
+              <view class="tui-title">小票机设置</view>
+            </tui-list-cell>
+
+            <tui-list-cell @click="pageTo({ url: '/admin/shop/trumpet' })" class="line-cell" :hover="false" :arrow="true">
+              <view class="tui-title">收款播报设置</view>
             </tui-list-cell>
 
             <tui-list-cell @click="pageTo({ url: '/admin/jc/index' })" class="line-cell" :hover="false" :arrow="true">

+ 1 - 1
hdApp/src/admin/shop/print.vue

@@ -73,7 +73,7 @@ export default {
   },
   onShow() {
     uni.setNavigationBarTitle({
-      title: `打印机设置`,
+      title: `小票机设置`,
     });
   },
   methods: {

+ 122 - 0
hdApp/src/admin/shop/trumpet.vue

@@ -0,0 +1,122 @@
+<template>
+  <div class="app-content">
+    <div>
+      <form @submit="formSubmit">
+        <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.lbSn"
+              placeholder-class="phcolor"
+              class="tui-input"
+              name="lbSn"
+              placeholder="请填写编号"
+              maxlength="50"
+              type="number"
+            />
+          </tui-list-cell>
+
+        </div>
+
+        <div class="confirm-btn">
+          <button class="admin-button-com big blue" formType="submit">
+            提交
+          </button>
+        </div>
+      </form>
+    </div>
+  </div>
+</template>
+
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import AppAvatarModule from "@/components/module/app-avatar";
+const form = require("@/utils/formValidation.js");
+import { getLb,addCloudLb } from "@/api/shop";
+export default {
+  name: "shopLb",
+  components: {
+    TuiListCell,
+    AppAvatarModule,
+  },
+  data() {
+    return {
+      form: {
+        lbSn: ""
+      }
+    };
+  },
+  onLoad() {
+  },
+  onShow() {
+    uni.setNavigationBarTitle({
+      title: `收款播报设置`,
+    });
+  },
+  methods: {
+    async init() {
+      try {
+        const { data } = await getLb();
+        this.form.lbSn = data.lbSn;
+        this.$forceUpdate();
+      } finally {}
+    },
+    confirmFn() {
+      addCloudLb(this.form).then((res) => {
+        this.$msg(res.msg);
+        if(res.code == 1){
+          setTimeout(() => {
+            uni.navigateBack();
+          }, 1000)
+        }
+      });
+    },
+    formSubmit(e) {
+      let rules = [
+        {
+          name: "lbSn",
+          rule: ["required"],
+          msg: ["请填写编号"],
+        }
+      ]
+      this.confirmFn();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.app-content {
+  min-height: calc(100vh - 20upx);
+  padding-top: 20upx;
+}
+.prompt-text {
+  color: $fontColor3;
+  padding-left: 30upx;
+  margin-bottom: 30upx;
+}
+.module-com {
+  margin-bottom: 20upx;
+  .member-wrap {
+    .member-det {
+      font-size: 24upx;
+      margin-left: 20upx;
+    }
+  }
+  .remark-wrap {
+    align-items: flex-start;
+    .remark {
+      height: 240upx;
+    }
+  }
+}
+// 按钮
+.confirm-btn {
+  width: calc(100% - 60upx);
+  margin: 60upx 30upx 20upx;
+  .admin-button-com {
+    width: 100%;
+  }
+}
+</style>

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

@@ -1,4 +1,15 @@
 import https from '@/plugins/luch-request_0.0.7/request'
+
+//添加云喇叭
+export const addCloudLb = data => {
+	return https.get('/shop-ext/add-lb', data)
+}
+
+//获取云喇叭信息
+export const getLb = data => {
+	return https.get('/shop-ext/get-lb', data)
+}
+
 /** *
  * 门店列表
  */

+ 3 - 2
hdApp/src/pages.json

@@ -177,8 +177,9 @@
 				{"path": "list","style": {"navigationBarTitleText": "门店"}},
 				{"path": "downloadCode","style": {"navigationBarTitleText": "收款码"}},
 				{"path": "add","style": {"navigationBarTitleText": ""}},
-				{"path": "print","style": {"navigationBarTitleText": "打印机设置"}},
-				{"path": "password","style": {"navigationBarTitleText": "修改密码"}}
+				{"path": "print","style": {"navigationBarTitleText": "小票机设置"}},
+				{"path": "password","style": {"navigationBarTitleText": "修改密码"}},
+				{"path": "trumpet","style": {"navigationBarTitleText": "收款播报设置"}}
 			]
 		},
 		{