打印服务
This commit is contained in:
@@ -10,14 +10,14 @@
|
||||
</view>
|
||||
<view class="zd_wrapper">
|
||||
<view class="input-wrap">
|
||||
<view class="input-label">刷新时间(s)</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
||||
<view class="input-label">打印地址</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入打印地址" v-model="printip">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper">
|
||||
<view class="input-wrap">
|
||||
<view class="input-label" style="margin-right: 20upx;">客户标签打印</view>
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
<view class="input-label">刷新时间(s)</view>
|
||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -29,7 +29,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {virtualprintType} from '@/utils/getData2.js'
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
export default {
|
||||
components: {
|
||||
@@ -37,37 +36,28 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options: [],
|
||||
index: '',
|
||||
addrip: this.$store.getters.baseUrl,
|
||||
printip: this.$store.getters.printUrl,
|
||||
setTime: this.$store.getters.setTime / 1000
|
||||
};
|
||||
},
|
||||
created () {
|
||||
// this._virtualprintType()
|
||||
},
|
||||
methods: {
|
||||
goIn () {
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
/** 选择器 */
|
||||
selectChange(e) {
|
||||
this.index = e
|
||||
},
|
||||
/** 打印机类型下拉框查询 */
|
||||
async _virtualprintType () {
|
||||
let res = await virtualprintType(this.addrip)
|
||||
this.options = [...res.data]
|
||||
// if (this.$store.getters.setPrintName !== '') {
|
||||
// this.index = this.$store.getters.setPrintName
|
||||
// }
|
||||
},
|
||||
_submit () {
|
||||
if (this.addrip === '') {
|
||||
uni.showToast({
|
||||
title: '服务器地址',
|
||||
title: '请填写服务器地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.printip === '') {
|
||||
uni.showToast({
|
||||
title: '请填写打印地址',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
@@ -80,7 +70,7 @@
|
||||
return
|
||||
}
|
||||
// 存值
|
||||
this.$store.dispatch('setConfig',{baseUrl: this.addrip, setTime: this.setTime * 1000, setPrintName: this.index})
|
||||
this.$store.dispatch('setConfig',{baseUrl: this.addrip, printUrl: this.printip,setTime: this.setTime * 1000})
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user