|
|
@@ -1,47 +1,39 @@
|
|
|
<template>
|
|
|
- <div class="app-content">
|
|
|
- <div v-show="showStaffArea">
|
|
|
+ <view class="app-content">
|
|
|
+ <view>
|
|
|
<form @submit="formSubmit" @reset="formReset">
|
|
|
- <div class="module-com input-line-wrap">
|
|
|
-
|
|
|
+ <view 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"
|
|
|
- />
|
|
|
+ <view class="tui-title">小票机编号:</view>
|
|
|
+ <input v-model="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">
|
|
|
- <div class="tui-title">密钥(KEY):</div>
|
|
|
- <input
|
|
|
- v-model="form.printKey"
|
|
|
- placeholder-class="phcolor"
|
|
|
- class="tui-input"
|
|
|
- name="printKey"
|
|
|
- placeholder="请填写密钥"
|
|
|
- maxlength="50"
|
|
|
- type="text"
|
|
|
- />
|
|
|
+ <view class="tui-title">小票机密钥:</view>
|
|
|
+ <input v-model="form.printKey" placeholder-class="phcolor" class="tui-input" name="printKey" placeholder="请填写密钥,KEY码" maxlength="50" type="text" />
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- </div>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">条码机编号:</view>
|
|
|
+ <input v-model="form.printLabelSn" placeholder-class="phcolor" class="tui-input" name="printLabelSn" placeholder="请填写编号,SN码" maxlength="50" type="number" />
|
|
|
+ </tui-list-cell>
|
|
|
|
|
|
- <!-- 提交 -->
|
|
|
- <div class="confirm-btn">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">条码机密钥:</view>
|
|
|
+ <input v-model="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>
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</form>
|
|
|
- </div>
|
|
|
- <!-- <kd-entrance></kd-entrance> -->
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -50,7 +42,7 @@ import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
const form = require("@/utils/formValidation.js");
|
|
|
import { addCloudPrint,getPrint } from "@/api/shop";
|
|
|
export default {
|
|
|
- name: "shopPrint",
|
|
|
+ name: "print",
|
|
|
components: {
|
|
|
TuiListCell,
|
|
|
AppAvatarModule,
|
|
|
@@ -59,31 +51,24 @@ export default {
|
|
|
return {
|
|
|
form: {
|
|
|
printKey: "",
|
|
|
- printSn: ""
|
|
|
+ printSn: "",
|
|
|
+ printLabelSn:"",
|
|
|
+ printLabelKey:""
|
|
|
},
|
|
|
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 {}
|
|
|
+ const { data } = await getPrint()
|
|
|
+ this.form.printKey = data.printKey
|
|
|
+ this.form.printSn = data.printSn
|
|
|
+ this.form.printLabelKey = data.printLabelKey
|
|
|
+ this.form.printLabelSn = data.printLabelSn
|
|
|
+ this.$forceUpdate()
|
|
|
},
|
|
|
confirmFn() {
|
|
|
addCloudPrint(this.form).then((res) => {
|
|
|
@@ -100,20 +85,14 @@ export default {
|
|
|
{
|
|
|
name: "printSn",
|
|
|
rule: ["required"],
|
|
|
- msg: ["请填写编号"],
|
|
|
+ msg: ["请填写小票机编号"],
|
|
|
},
|
|
|
{
|
|
|
name: "printKey",
|
|
|
rule: ["required"],
|
|
|
- msg: ["请填写密钥"],
|
|
|
+ msg: ["请填写小票机密钥"],
|
|
|
},
|
|
|
];
|
|
|
- //let formData = e.detail.value;
|
|
|
- //let checkRes = form.validation(formData, rules);
|
|
|
- // if (checkRes) {
|
|
|
- // this.$msg(checkRes)
|
|
|
- // return false
|
|
|
- // }
|
|
|
this.confirmFn();
|
|
|
},
|
|
|
},
|