南骏 池
2025-07-16 171e6dc39bb085184c0e0989b7b37b129c59e6ac
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, '');
        },
    }
})