|
@@ -0,0 +1,157 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <view class="app-content">
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <form @submit="formSubmit">
|
|
|
|
|
+ <view class="module-com input-line-wrap">
|
|
|
|
|
+
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">小票机编号1:</view>
|
|
|
|
|
+ <input v-model="form.wcPrintSn" @focus="form.wcPrintSn=''" placeholder-class="phcolor" class="tui-input" name="wcPrintSn" placeholder="请填写编号,SN码" maxlength="50" type="number" />
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">小票机密钥1:</view>
|
|
|
|
|
+ <input v-model="form.wcPrintKey" @focus="form.wcPrintKey=''" placeholder-class="phcolor" class="tui-input" name="wcPrintKey" placeholder="请填写密钥,KEY码" maxlength="50" type="text" />
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+<view style="margin-top:50upx;">
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">小票机编号2:</view>
|
|
|
|
|
+ <input v-model="form.wcPrintSn2" @focus="form.wcPrintSn2=''" placeholder-class="phcolor" class="tui-input" name="wcPrintSn2" placeholder="请填写编号,SN码" maxlength="50" type="number" />
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">小票机密钥2:</view>
|
|
|
|
|
+ <input v-model="form.wcPrintKey2" @focus="form.wcPrintKey2=''" placeholder-class="phcolor" class="tui-input" name="wcPrintKey2" placeholder="请填写密钥,KEY码" maxlength="50" type="text" />
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+</view>
|
|
|
|
|
+<view style="margin-top:50upx;">
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">小票机编号3:</view>
|
|
|
|
|
+ <input v-model="form.wcPrintSn3" @focus="form.wcPrintSn3=''" placeholder-class="phcolor" class="tui-input" name="wcPrintSn3" placeholder="请填写编号,SN码" maxlength="50" type="number" />
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
|
|
+ <view class="tui-title">小票机密钥3:</view>
|
|
|
|
|
+ <input v-model="form.wcPrintKey3" @focus="form.wcPrintKey3=''" placeholder-class="phcolor" class="tui-input" name="wcPrintKey3" placeholder="请填写密钥,KEY码" maxlength="50" type="text" />
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="confirm-btn">
|
|
|
|
|
+ <button class="admin-button-com big blue" formType="submit">
|
|
|
|
|
+ 提交
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view style="padding-left:40upx;margin-top:50upx;font-size:32upx;">
|
|
|
|
|
+
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <view style="font-weight:bold;">小票机</view>
|
|
|
|
|
+ <view style="margin-top:10upx;">飞鹅小票机 4G 带切刀(自动切纸)</view>
|
|
|
|
|
+ <view style="margin-top:10upx;">热敏打印纸 57x50</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ </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 { addWcPrint,getPrint } from "@/api/shop";
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "shopPrint",
|
|
|
|
|
+ components: {
|
|
|
|
|
+ TuiListCell,
|
|
|
|
|
+ AppAvatarModule,
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ form: {
|
|
|
|
|
+ wcPrintKey: "",
|
|
|
|
|
+ wcPrintSn: "",
|
|
|
|
|
+ wcPrintKey2: "",
|
|
|
|
|
+ wcPrintSn2: "",
|
|
|
|
|
+ wcPrintKey3: "",
|
|
|
|
|
+ wcPrintSn3: ""
|
|
|
|
|
+ },
|
|
|
|
|
+ roleList: [],
|
|
|
|
|
+ roleSelData: {},
|
|
|
|
|
+ miniCodeSrc: "",
|
|
|
|
|
+ memberData: {},
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ async init() {
|
|
|
|
|
+ const { data } = await getPrint()
|
|
|
|
|
+ this.form.wcPrintKey = data.wcPrintKey
|
|
|
|
|
+ this.form.wcPrintSn = data.wcPrintSn
|
|
|
|
|
+ this.form.wcPrintKey2 = data.wcPrintKey2
|
|
|
|
|
+ this.form.wcPrintSn2 = data.wcPrintSn2
|
|
|
|
|
+ this.form.wcPrintKey3 = data.wcPrintKey3
|
|
|
|
|
+ this.form.wcPrintSn3 = data.wcPrintSn3
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmFn() {
|
|
|
|
|
+ addWcPrint(this.form).then((res) => {
|
|
|
|
|
+ this.$msg(res.msg);
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.navigateBack();
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ formSubmit(e) {
|
|
|
|
|
+ let rules = [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "wcPrintSn",
|
|
|
|
|
+ rule: ["required"],
|
|
|
|
|
+ msg: ["请填写小票机编号"],
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ name: "wcPrintKey",
|
|
|
|
|
+ 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>
|