From 171e6dc39bb085184c0e0989b7b37b129c59e6ac Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期三, 16 七月 2025 22:38:10 +0800 Subject: [PATCH] 1.样本值修改 --- H5/Js/BarCf.js | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/H5/Js/BarCf.js b/H5/Js/BarCf.js index be38d8a..449abc5 100644 --- a/H5/Js/BarCf.js +++ b/H5/Js/BarCf.js @@ -105,10 +105,18 @@ }); }, getChaiFen() { + if (this.isLoading) { + return; + } + var that = this; if (that.formData.cfNum * 1 <= 0) { that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�"); + return; + } + if (that.formData.cfNum > that.formData.sumQuantity) { + that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�"); return; } if (that.formData.barcode.length * 1 <= 0) { @@ -125,6 +133,8 @@ var json = res; if (json.status == 0) { // that.modeInfo = json.data.tbBillList; + // 鎷嗗垎鍏ㄥ眬璋冪敤鏂规硶 + that.sendPrintMessage(json.data.tbBillList); that.$refs.barcode.focus(); that.formData.barcode = null; that.formData.cfNum = null; @@ -145,5 +155,12 @@ //cleraCode() { // this.formData.sectionCode = null; //}, + handleNumberInput3(value) { + this.formData.cfNum = value.replace(/[^\d.]/g, '') // 1. 鍘婚櫎闈炴暟瀛楀拰灏忔暟鐐� + .replace(/(\..*)\./g, '$1') // 2. 绂佹澶氫釜灏忔暟鐐� + .replace(/^\./g, ''); + }, + + } }) \ No newline at end of file -- Gitblit v1.9.3