南骏 池
2025-06-06 86d06136956078d6a72183980f5a9e25d3b24e42
H5/Js/Qtck.js
@@ -17,6 +17,7 @@
            active: 0,
            show: false,
            actions: [],
            ItemDetail: [],
        }
    },
    mounted() {
@@ -40,6 +41,7 @@
                    if (json.status == 0) {
                        if (json.data.tbBillList.length <= 0) {
                            that.$toast.fail("没有可用的数据");
                            that.$playSound('error');
                        } else {
                            that.actions = json.data.tbBillList.map(item => {
                                return { name: item }
@@ -48,12 +50,14 @@
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        },
@@ -82,21 +86,26 @@
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemBlDetail = json.data.tbBillList;
                        that.ItemDetail = json.data.tbBillList;
                        //that.ItemBlDetail = json.data.tbBillList;
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        },
        getBarcode() {
            if (this.isLoading) {
                return;
            }
            //this.barcode = value;
            var that = this;
@@ -104,18 +113,21 @@
            if (!that.userInfo.loginAccount) {
                this.$toast.fail("请重新检查登录状态");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.barcode) {
                this.$toast.fail("条码不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.billNo) {
                this.$toast.fail("申请单号不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
@@ -135,48 +147,60 @@
                        that.barcode = json.data.form.barcode;
                        that.ItemBlDetail = json.data.item
                        that.$notify({ type: 'success', message: json.data.message });
                        that.$playSound('success');
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        },
        tmcf() {
            if (this.isLoading) {
                return;
            }
            var that = this;
            that.isLoading = true;
            if (!that.userInfo.loginAccount) {
                this.$toast.fail("请重新检查登录状态");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.barcode) {
                this.$toast.fail("条码不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.billNo) {
                this.$toast.fail("申请单号不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (!that.fnm) {
                this.$toast.fail("发料数量不能为空");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
            if (that.fnm <= 0) {
                this.$toast.fail("发料数量不能小于等于零");
                that.$playSound('error');
                that.isLoading = false;
                return;
            }
@@ -196,15 +220,18 @@
                        that.barcode = json.data.form.barcode;
                        that.ItemBlDetail = json.data.item
                        that.$notify({ type: 'success', message: json.data.message });
                        that.$playSound('success');
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        }