南骏 池
2025-05-24 7470b2a50a3579bff1f7cb4402f9a759190708fe
H5/Js/Cpbdsj.js
@@ -15,7 +15,17 @@
            KbBarMxInfo: [],
            GX: "G007:核对送检",
            Xvalue:4,
            XbarInfo: [],
            XbarInfo: [
                //{
                //    iteM_BARCODE: "",      // 条码
                //    item_no: "",           // 物料编号
                //    item_name: "",         // 物料名称
                //    item_model: "",        // 规格型号
                //    quantity: 0,           // 数量
                //    is_hedui: "0",          // 是否核对(1:已核对 0:未核对),
                //    weight: ""          // 产品重量
                //}
            ],
            DAA001: [],
        }
    },
@@ -131,8 +141,6 @@
                    that.$toast.fail("网络错误,请重试!");
                });
        },
        productBinding() {
            if (this.isLoading) {
@@ -204,15 +212,37 @@
                if (matchedItem.is_hedui === "1") {
                    that.$toast("已核对");
                } else {
                    that.$set(matchedItem, 'is_hedui', "1");
                    that.$playSound('success');
                    that.$notify({ type: 'success', message: "核对成功" });
                    that.LsBar = "";
                    // 检查是否所有行都已核对
                    const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
                    if (allChecked && that.XbarInfo.length > 0) {
                        that.submitAllChecked();
                    }
                    that.AxiosHttp("post", 'Womdaa/GetWeightByXt', {
                        LsBar: that.LsBar,
                        userName: that.userInfo.loginAccount
                    }, false)
                        .then(function (res) {
                            var json = res;
                            if (json.status == 0) {
                                var weigth = json.data.tbBillList.weight;
                                that.$set(matchedItem, 'is_hedui', "1");
                                that.$set(matchedItem, 'weight', weigth);
                                that.$playSound('success');
                                that.$notify({ type: 'success', message: "核对成功" });
                                that.LsBar = "";
                                // 检查是否所有行都已核对
                                const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
                                if (allChecked && that.XbarInfo.length > 0 && that.XbarInfo.length === that.Xvalue) {
                                    that.submitAllChecked();
                                }
                            }
                            else {
                                that.$playSound('error');
                                that.$toast.fail(json.message);
                            }
                            that.isLoading = false;
                        })
                        .catch(function (error) {
                            that.isLoading = false;
                            that.$playSound('error');
                            that.$toast.fail("网络错误,请重试!");
                        });
                }
            } else {
                that.$playSound('error');
@@ -222,6 +252,10 @@
            that.LsBar = ""; // 清空输入框
        },
        GetWeightByXt() {
        },
        // 新增方法:提交所有已核对的数据
        submitAllChecked() {