打印机第四次修改

This commit is contained in:
duan 2024-10-15 09:25:51 +08:00
parent b8e694abb9
commit 479ee9a723
1 changed files with 13 additions and 24 deletions

View File

@ -113,42 +113,42 @@
<view class="u-m-t-16"> <view class="u-m-t-16">
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'printMethod')"> <radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'printMethod')">
<label class="radio u-m-r-60"> <label class="radio u-m-r-60">
<radio value="normal" :checked="form.printMethod == '1'" class="scale7" /> <radio value="all" :checked="form.printMethod == '1'" class="scale7" />
<text>普通出菜</text> <text>打印全部</text>
</label> </label>
<label class="radio u-m-r-60"> <label class="radio u-m-r-60">
<radio value="one" :checked="form.printMethod == '2'" class="scale7" /> <radio value="one" :checked="form.printMethod == '2'" class="scale7" />
<text>一菜一品</text> <text>仅打印结账单</text>
</label> </label>
<label class="radio u-m-r-60"> <label class="radio u-m-r-60">
<radio value="callTicket" :checked="form.printMethod == '2'" class="scale7" /> <radio value="normal" :checked="form.printMethod == '2'" class="scale7" />
<text>排队取号</text> <text>仅打印结账单[前台]</text>
</label> </label>
</radio-group> </radio-group>
</view> </view>
</view> </view>
<!-- <view class="u-p-b-24 u-m-b-24 border-bottom"> <view class="u-p-b-24 u-m-b-24 border-bottom">
<view class="title">打印类型</view> <view class="title">打印类型</view>
<view class="u-m-t-16" style="display: flex;"> <view class="u-m-t-16" style="display: flex;">
<up-checkbox-group v-model="form.printType"> <up-checkbox-group v-model="form.printType">
<up-checkbox :customStyle="{marginBottom: '8px'}" label="确认退款单" name="1" <up-checkbox :customStyle="{marginBottom: '8px'}" label="确认退款单" name="refund"
style="margin-right: 40rpx;font-size: 28rpx;"> style="margin-right: 40rpx;font-size: 28rpx;">
</up-checkbox> </up-checkbox>
<up-checkbox :customStyle="{marginBottom: '8px'}" label="交班单" name="2" <up-checkbox :customStyle="{marginBottom: '8px'}" label="交班单" name="handover"
style="margin-right: 40rpx;font-size: 28rpx;"> style="margin-right: 40rpx;font-size: 28rpx;">
</up-checkbox> </up-checkbox>
<up-checkbox :customStyle="{marginBottom: '8px'}" label="排队取号" name="3" <up-checkbox :customStyle="{marginBottom: '8px'}" label="排队取号" name="queue"
style="margin-right: 40rpx;font-size: 28rpx;"> style="margin-right: 40rpx;font-size: 28rpx;">
</up-checkbox> </up-checkbox>
</up-checkbox-group> </up-checkbox-group>
</view> </view>
</view> --> </view>
<view class="u-p-b-24 u-m-b-24 border-bottom"> <!-- <view class="u-p-b-24 u-m-b-24 border-bottom">
<view class="title">打印单据</view> <view class="title">打印单据</view>
<view class="u-m-t-16"> <view class="u-m-t-16">
<radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'printReceipt')"> <radio-group class="u-flex u-flex-wrap" @change="sizeChange($event,'printReceipt')">
@ -165,7 +165,7 @@
</label> </label>
</radio-group> </radio-group>
</view> </view>
</view> </view> -->
<view class="u-p-b-24 u-flex u-row-between u-m-b-24 border-bottom"> <view class="u-p-b-24 u-flex u-row-between u-m-b-24 border-bottom">
<view class="title">打印机状态</view> <view class="title">打印机状态</view>
@ -215,11 +215,9 @@
} from '@/pagePrinter/devices.js' } from '@/pagePrinter/devices.js'
import { import {
onLoad, onLoad,
onShow
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
ref, ref,
onBeforeUnmount,
reactive, reactive,
computed, computed,
watch, watch,
@ -294,14 +292,11 @@
}) })
} }
}) })
partList.value = arr partList.value = arr
} }
function sizeChange(e, name) { function sizeChange(e, name) {
form[name] = e.detail.value form[name] = e.detail.value
} }
// //
const printerNums = reactive({ const printerNums = reactive({
list: new Array(4).fill(1).map((v, index) => { list: new Array(4).fill(1).map((v, index) => {
@ -316,7 +311,6 @@
const feets = ref([0, 1, 2, 3, 4, 5, 8].map(v => { const feets = ref([0, 1, 2, 3, 4, 5, 8].map(v => {
return v + '行' return v + '行'
})) }))
let form = reactive({ let form = reactive({
sort: "0", sort: "0",
status: 0, status: 0,
@ -348,13 +342,11 @@
...form ...form
}) })
} }
go.to('/pagePrinter/index/index') go.to('/pagePrinter/index/index')
} }
// watch(() => form.config.model, (newval) => { // watch(() => form.config.model, (newval) => {
// console.log(newval); // console.log(newval);
// }) // })
// const option = reactive({}) // const option = reactive({})
async function getdetails() { async function getdetails() {
const res = await Api.printerd(userId.value) const res = await Api.printerd(userId.value)
@ -365,6 +357,7 @@
}) })
res.selectcheckbox = arrs res.selectcheckbox = arrs
form = Object.assign(form, res) form = Object.assign(form, res)
form.printType = JSON.parse(form.printType)
} }
onLoad((options) => { onLoad((options) => {
if (options.id) { if (options.id) {
@ -376,10 +369,6 @@
} }
// Object.assign(option, opt) // Object.assign(option, opt)
}) })
onBeforeUnmount(() => {
})
onShow(() => {})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>