组盘打印

This commit is contained in:
2024-02-20 16:03:06 +08:00
parent db5fe78ac3
commit e2a95cf177
7 changed files with 63 additions and 26 deletions

View File

@@ -18,14 +18,12 @@
<text class="setup-text" @tap="isUpdate">升级版本</text>
</view>
<button class="login-btn" :disabled="disabled" @tap="toLogin">确认登录</button>
<!-- <button class="login-btn" @tap="test">打印</button> -->
<view v-if="version !== ''" class="version-name">v{{version}}</view>
<Up-grade v-if="grade === true" @closeUpdate="closeUpdate" :androidUrl="androidUrl"></up-grade>
</view>
</template>
<script>
import {getCLodop, getPrinterList} from "@/utils/CLodopfuncs.js"
import { RSAencrypt } from '@/utils/jsencrypt.js'
import {handLogin, pdaUpdate} from '@/utils/getData2.js'
import UpGrade from './upgrade.vue'
@@ -50,7 +48,7 @@
//#ifdef APP-PLUS
// 获取本地应用资源版本号
plus.runtime.getProperty(plus.runtime.appid, (info) => {
console.log(JSON.stringify(info));
// console.log(JSON.stringify(info));
this.version = info.version;
this.versionCode = info.versionCode ;
})
@@ -60,18 +58,6 @@
isUpdate () {
this._pdaUpdate()
},
test() {
let LODOP = getCLodop();
// 更换为打印服务器ip 不需要加前缀
LODOP.PRINT_INIT(null, "192.168.81.198");
// 打印机序号 规则为打印服务器打印机列表倒数从0开始 -1为默认打印机
LODOP.SET_PRINTER_INDEX(-1);
// 设置打印纸大小
LODOP.SET_PRINT_PAGESIZE(1, 800, 600, "");
// 根据需求插入打印代码
LODOP.PRINT(); // 打印
// LODOP.PREVIEW()
},
toSaveUser() {
this.saveUser = !this.saveUser
},
@@ -146,7 +132,7 @@
@import '../../common/style/mixin.styl';
.p1
_font(40rpx,75rpx,#444,666)
padding-top: 90rpx
padding-top: 190rpx
.p2
_font(46rpx,1,#444,600)
padding: 10rpx 0 55rpx 0