shish пре 4 година
родитељ
комит
18c6f24f67
2 измењених фајлова са 140 додато и 1 уклоњено
  1. 5 1
      hdApp/src/admin/home/me.vue
  2. 135 0
      hdApp/src/admin/shop/makePrint.vue

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

@@ -79,7 +79,11 @@
             </tui-list-cell>
             </tui-list-cell>
 
 
             <tui-list-cell @click="pageTo({ url: '/admin/shop/print' })" class="line-cell" :hover="false" :arrow="true">
             <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/makePrint' })" class="line-cell" :hover="false" :arrow="true">
+              <view class="tui-title">操作台小票标签机</view>
             </tui-list-cell>
             </tui-list-cell>
 
 
             <tui-list-cell @click="pageTo({ url: '/admin/shop/trumpet' })" class="line-cell" :hover="false" :arrow="true">
             <tui-list-cell @click="pageTo({ url: '/admin/shop/trumpet' })" class="line-cell" :hover="false" :arrow="true">

+ 135 - 0
hdApp/src/admin/shop/makePrint.vue

@@ -0,0 +1,135 @@
+<template>
+  <view class="app-content">
+    <view>
+      <form @submit="formSubmit" @reset="formReset">
+        <view class="module-com input-line-wrap">
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">小票机编号:</view>
+            <input v-model="form.printSn" @focus="form.printSn=''" placeholder-class="phcolor" class="tui-input" name="printSn" placeholder="请填写编号,SN码" maxlength="50" type="number" />
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">小票机密钥:</view>
+            <input v-model="form.printKey" @focus="form.printKey=''" placeholder-class="phcolor" class="tui-input" name="printKey" placeholder="请填写密钥,KEY码" maxlength="50" type="text" />
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">标签机编号:</view>
+            <input v-model="form.printLabelSn" @focus="form.printLabelSn=''"  placeholder-class="phcolor" class="tui-input" name="printLabelSn" placeholder="请填写编号,SN码" maxlength="50" type="number" />
+          </tui-list-cell>
+
+          <tui-list-cell class="line-cell" :hover="false">
+            <view class="tui-title">标签机密钥:</view>
+            <input v-model="form.printLabelKey" @focus="form.printLabelKey=''" placeholder-class="phcolor" class="tui-input" name="printLabelKey" placeholder="请填写密钥,KEY码" maxlength="50" type="text" />
+          </tui-list-cell>
+
+        </view>
+
+        <view class="confirm-btn">
+          <button class="admin-button-com big blue" formType="submit">
+            提交
+          </button>
+        </view>
+      </form>
+    </view>
+  </view>
+</template>
+
+<script>
+import TuiListCell from "@/components/plugin/list-cell";
+import AppAvatarModule from "@/components/module/app-avatar";
+const form = require("@/utils/formValidation.js");
+import { addMakeCloudPrint,getPrint } from "@/api/shop";
+export default {
+  name: "print",
+  components: {
+    TuiListCell,
+    AppAvatarModule,
+  },
+  data() {
+    return {
+      form: {
+        printKey: "",
+        printSn: "",
+        printLabelSn:"",
+        printLabelKey:""
+      },
+      roleList: [],
+      roleSelData: {},
+      miniCodeSrc: "",
+      memberData: {},
+    };
+  },
+  methods: {
+    async init() {
+      const { data } = await getPrint()
+      this.form.printKey = data.makePrintKey
+      this.form.printSn = data.makePrintSn
+      this.form.printLabelKey = data.makePrintLabelKey
+      this.form.printLabelSn = data.makePrintLabelSn
+      this.$forceUpdate()
+    },
+    confirmFn() {
+      addMakeCloudPrint(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: ["请填写小票机密钥"],
+        },
+      ];
+      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>