智云srmLayUi(安瑞和瑞琪)(通用版本)
1
yusijie
2024-06-07 b28acfba24adf4f1d2b567d0e2d99c29bd8c6d03
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html
@@ -154,25 +154,26 @@
            //计算有效期至
            if (HExpUnit == "Y") {//年
                date = new Date(date);
                console.log(date.getFullYear(date));
                date.setYear(date.getFullYear(date) + HKFPeriod);
                console.log(Format(date, "yyyy-MM-dd"));
                date.setDate(date.getDate(date) - 1);
                return Format(date, "yyyy-MM-dd");
            }
            if (HExpUnit == "M") {//月
                date = new Date(date);
                date.setMonth(date.getMonth(date) + HKFPeriod);
                date.setDate(date.getDate(date) - 1);
                return Format(date, "yyyy-MM-dd");
            }
            if (HExpUnit == "D") {//日
                date = new Date(date);
                date.setDate(date.getDate(date) + HKFPeriod);
                console.log(Format(date, "yyyy-MM-dd"));
                date.setDate(date.getDate(date) - 1);
                return Format(date, "yyyy-MM-dd");
            }
            else { //安瑞计算方式
            else { //安瑞计算方式
                if (days == undefined || days == '') {
                    days = 1;
                }
@@ -459,7 +460,7 @@
                    }
                    //获取下标
                    index = findIndex(_sSubStr[i].HMaterNumber, _sSubStr[i].HMaterModel, newArray);
                    if (index === -1) {
                    if (index === -1 || _sSubStr[i].HIsSplit == 0) {
                        //如果数组中没有当前数据,则将数据添加进数组中
                        newArray.push(_sSubStr[i]);
@@ -467,7 +468,7 @@
                        if (newArray[index].HPOOrderBillNo == _sSubStr[i].HPOOrderBillNo) {
                            //如果数组中有和当前数据中物料代码、规格型号一致的信息,则将他们的数量累加
                            newArray[index].HQty = Number(newArray[index].HQty) + Number(_sSubStr[i].HQty);
                        }
                        }
                    }
                }
@@ -701,6 +702,7 @@
                    , { field: 'HSourceInterID', title: '源单主内码', width: 150, hide: true }
                    , { field: 'HSupID', title: '供应商ID', width: 150, hide: true }
                    , { field: 'HSupName', title: '供应商名称', width: 150, hide: true }
                    , { field: 'HIsSplit', title: '是否拆分', width: 150, hide: true } //0否,1是
                ]]
                , done: function (res, curr, count) {
@@ -789,9 +791,11 @@
                                                        , "HSupName": data[i].HSupName
                                                        , "HSupBatchNo": data[i].HSupBatchNo
                                                        , "HSupMaterNumber": data[i].HSupMaterNumber
                                                        , "HEXPUNIT": data[i].HEXPUNIT
                                                        , "HIsSplit": 1
                                                    }
                                                    //oldData.push(data1);
                                                    oldData.splice(dataindex, 0, data1);
                                                    oldData.push(data1);
                                                    //oldData.splice(dataindex, 0, data1);
                                                };
                                                break;
                                            }