From 0d2024eabd0f07bc4ab3341dddc10464d31938f8 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 21 十二月 2024 18:47:12 +0800 Subject: [PATCH] #新增订单筛选物料界面 --- pages/print/qr.vue | 210 ++++++++++++++++++++++++++-------------------------- 1 files changed, 105 insertions(+), 105 deletions(-) diff --git a/pages/print/qr.vue b/pages/print/qr.vue index bffe6ca..f1d06c5 100644 --- a/pages/print/qr.vue +++ b/pages/print/qr.vue @@ -1,105 +1,105 @@ -<template> - <view class='pages'> - <view class='father_view'> - <view class='son_view'> - <view class="title-bg">闇�瑕佽浆鎹㈢殑鏂囨湰锛�</view> - <textarea class="textarea-bg" v-model="text1" @blur="inputText" placeholder="璇峰湪杩欓噷杈撳叆" /> - </view> - </view> - - <!-- 浜岀淮鐮� --> - <view class="qr-box"> - <canvas canvas-id="qrcode" v-show="qrShow" style="width: 300rpx;margin: 0 auto;"/> - </view> - - <button @click='btn'>鐢熸垚浜岀淮鐮�</button> - </view> -</template> - -<script> - import uQRCode from '@/static/js/uqrcode.js' //寮曞叆uqrcode.js - export default { - data() { - return { - qrShow: false, - text1:'' - } - }, - - methods: { - //*鑾峰彇鏂囨湰妗嗗唴瀹�*// - inputText:function (e) { - this.text1 = e.detail.value - }, - - //*鎸夐挳*// - btn: function () { - if (this.text1 == '' ) { - uni.showToast({ //鏄剧ず瀵硅瘽妗� - title: "璇疯緭鍏ユ枃鏈�", - icon: 'none', - duration: 1000, - }) - } else { - this.qrFun(this.text1) //璋冪敤浜岀淮鐮佹柟娉� - } - }, - - //**鐢熸垚浜岀淮鐮�**// - qrFun: function(text) { - this.qrShow = true - uQRCode.make({ - canvasId: 'qrcode', - componentInstance: this, - text: text, - size: 150, - margin: 0, - backgroundColor: '#ffffff', - foregroundColor: '#000000', - fileType: 'jpg', - errorCorrectLevel: uQRCode.errorCorrectLevel.H, - success: res => {} - }) - } - } - } -</script> - -<style> - .pages { - width: 98%; - margin: auto; - overflow: hidden; - } - - /* 澶氳鏂囨湰 */ - textarea { - width: 98%; - height: 250rpx; - margin-left: 10rpx; - margin-right: 10rpx; - margin-top: 10rpx; - } - - .textarea-bg { - width: 94%; - border-style: solid; - border-color: #ff007f; - font-size: 32rpx; - } - - button { - width: 80%; - margin-top: 180rpx; - background-color: #ffaa00; - } - - .qr-box { - width: 400rpx; - height: 460rpx; - margin: 0 auto; - margin-top: 20rpx; - } -</style> - - +<template> + <view class='pages'> + <view class='father_view'> + <view class='son_view'> + <view class="title-bg">闇�瑕佽浆鎹㈢殑鏂囨湰锛�</view> + <textarea class="textarea-bg" v-model="text1" @blur="inputText" placeholder="璇峰湪杩欓噷杈撳叆" /> + </view> + </view> + + <!-- 浜岀淮鐮� --> + <view class="qr-box"> + <canvas canvas-id="qrcode" v-show="qrShow" style="width: 300rpx;margin: 0 auto;"/> + </view> + + <button @click='btn'>鐢熸垚浜岀淮鐮�</button> + </view> +</template> + +<script> + import uQRCode from '@/static/js/uqrcode.js' //寮曞叆uqrcode.js + export default { + data() { + return { + qrShow: false, + text1:'' + } + }, + + methods: { + //*鑾峰彇鏂囨湰妗嗗唴瀹�*// + inputText:function (e) { + this.text1 = e.detail.value + }, + + //*鎸夐挳*// + btn: function () { + if (this.text1 == '' ) { + uni.showToast({ //鏄剧ず瀵硅瘽妗� + title: "璇疯緭鍏ユ枃鏈�", + icon: 'none', + duration: 1000, + }) + } else { + this.qrFun(this.text1) //璋冪敤浜岀淮鐮佹柟娉� + } + }, + + //**鐢熸垚浜岀淮鐮�**// + qrFun: function(text) { + this.qrShow = true + uQRCode.make({ + canvasId: 'qrcode', + componentInstance: this, + text: text, + size: 150, + margin: 0, + backgroundColor: '#ffffff', + foregroundColor: '#000000', + fileType: 'jpg', + errorCorrectLevel: uQRCode.errorCorrectLevel.H, + success: res => {} + }) + } + } + } +</script> + +<style> + .pages { + width: 98%; + margin: auto; + overflow: hidden; + } + + /* 澶氳鏂囨湰 */ + textarea { + width: 98%; + height: 250rpx; + margin-left: 10rpx; + margin-right: 10rpx; + margin-top: 10rpx; + } + + .textarea-bg { + width: 94%; + border-style: solid; + border-color: #ff007f; + font-size: 32rpx; + } + + button { + width: 80%; + margin-top: 180rpx; + background-color: #ffaa00; + } + + .qr-box { + width: 400rpx; + height: 460rpx; + margin: 0 auto; + margin-top: 20rpx; + } +</style> + + -- Gitblit v1.9.1