1
wangyi
2026-04-02 96785ebcfe1bc9210f3d9d4056f4ec29fb60d810
WebTM/views/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Gy_BarCodeBill.html
@@ -68,7 +68,7 @@
                                                <label class="layui-form-label" id="BT_HWorksNumber">工厂代码</label>
                                                <div class="layui-input-inline">
                                                    <select name="HWorksNumber" id="HWorksNumber" lay-filter="HWorksNumber" class="layui-input" value="" style="float:left;width:150px">
                                                        <!--<option value="0">舜成</option>-->
                                                    </select>
                                                </div>
                                            </div>
@@ -112,7 +112,7 @@
                                                <label class="layui-form-label" id="BT_HBarCodeType">条码类型</label>
                                                <div class="layui-input-inline">
                                                    <select name="HBarCodeType" id="HBarCodeType" lay-filter="HBarCodeType" class="layui-input" value="" style="float:left;width:150px">
                                                        <!--<option value="11">唯一条码</option>-->
                                                    </select>
                                                </div>
                                            </div>
@@ -293,7 +293,7 @@
            set_HBarCodeType();
            var rowdata = [{
                "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
                "HMaterID": 0, "HSubID": 0, "HSupID": 0, "HSupNumber": "", "HSupName": "", "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
                "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0, "HEmpID": sessionStorage["HEmpID"], "HEmpNumber": sessionStorage["HEmpNumber"], "HEmpName": sessionStorage["HEmpName"], "HGroupID": 0, "HGroupNumber": "", "HGroupName": "", "HMTONo": "", "HCusModel": "", "HCusMaterName": "", "HCheckEmpName": ""
            }];
            //初始化表格
@@ -335,7 +335,7 @@
                var AddRow = table.cache['mainTable'];
                var NewRow = {
                    "HMaterID": 0, "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
                    "HMaterID": 0, "HSubID": 0, "HSupID": 0,"HSupNumber": "", "HSupName": "", "HMaterCode": "", "HMaterNumber": "", "HMaterName": "", "HMaterModel": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HBQty": 0, "HMinQty": 0, "HPackQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "", "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
                    "HAuxQty": 0, "HheatNO": "", "HProduceDate": Format(new Date(), "yyyy-MM-dd"), "HExpiryDate": Format(new Date(), "yyyy-MM-dd"), "HExpirationDateFlag": 0, "HEmpID": sessionStorage["HEmpID"], "HEmpNumber": sessionStorage["HEmpNumber"], "HEmpName": sessionStorage["HEmpName"], "HGroupID": 0, "HGroupNumber": "", "HGroupName": "", "HMTONo": "", "HCusModel": "", "HCusMaterName": "", "HCheckEmpName": ""
                };
                //console.log(NewRow);
@@ -370,6 +370,7 @@
                        break;
                }
            });
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                set_GridDelete(obj);   //行内删除
@@ -823,6 +824,7 @@
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰æ–¹æ³•
            //初始化表单插件
            function set_InitFrom() {
                laydate.render({
@@ -853,6 +855,7 @@
                    }
                })
            }
            //获取工厂代码
            function set_HWorksNumber() {
                //获取工厂代码
@@ -878,6 +881,7 @@
                    }
                })
            }
            //获取条码类型
            function set_HBarCodeType() {
                //获取条码类型代码
@@ -924,6 +928,12 @@
                    , { field: 'HGroupNumber', title: '班组代码', edit: 'text', width: 200, event: 'HGroupNumber' }
                    , { field: 'HGroupName', title: '班组名称', width: 200 }
                    , { field: 'HCheckEmpName', title: '检验员', width: 200, edit: 'text' }
                    , { field: 'HCusID', title: '客户ID', width: 100, hide: true }
                    , { field: 'HCusNumber', title: '客户代码', edit: 'text', event: 'HCusNumber', width: 120 }
                    , { field: 'HCusName', title: '客户名称', width: 120 }
                    , { field: 'HSupID', title: '供应商id', width: 100, hide: true }
                    , { field: 'HSupNumber', title: '供应商代码', edit: 'text', event: 'HSupNumber', width: 120 }
                    , { field: 'HSupName', title: '供应商名称', width: 120 }
                    , { field: 'HBatchNo', title: '批号', edit: 'text', width: 100 }
                    , { field: 'HMTONo', title: '计划跟踪号', width: 100, edit: 'text' }
                    , { field: 'HQty', title: '数量', edit: 'text', width: 100, totalRow: true }
@@ -932,10 +942,7 @@
                    , { field: 'HPackQty', title: '外箱数', edit: 'text', width: 100, totalRow: true }
                    , { field: 'HCoilNO', title: '钢卷捆包号', edit: 'text', width: 100 }
                    , { field: 'HFurnaceNO', title: '炉号', edit: 'text', width: 100 }
                    , { field: 'HFactory', title: '厂商', edit: 'text', width: 100 }
                    , { field: 'HCusID', title: '客户ID', width: 100, hide: true }
                    , { field: 'HCusNumber', title: '客户代码', edit: 'text', event: 'HCusNumber', width: 120 }
                    , { field: 'HCusName', title: '客户名称', width: 120 }
                    , { field: 'HFactory', title: '厂商', edit: 'text', width: 100 }
                    , { field: 'HSeOrderBillNo', title: '销售订单号', width: 200 }
                    , { field: 'HRemark', title: '备注', edit: 'text', width: 100 }
                    , { field: 'HProduceDate', title: '生产日期', event: 'HProduceDate', width: 100 }
@@ -969,6 +976,7 @@
                option.data = rowdata;
                table.render(option);
            }
            //初始条码信息表格
            function set_CountGrid() {
                //表头
@@ -1008,6 +1016,7 @@
                    }
                };
            }
            //初始化档案列表信息表格
            function set_InitGrid2() {
                //表头
@@ -1077,10 +1086,11 @@
                    }
                };
            }
            //无源单新增
            function set_AddFNew() {
                option.data = [{
                    "HMainID": 0, "HSubID": 0, "HSourceBillSEQ": 0, "HBillNo": "", "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": ""
                    "HMainID": 0, "HSubID": 0, "HSupID": 0, "HSupNumber": "", "HSupName": "",  "HSourceBillSEQ": 0, "HBillNo": "", "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HMaterModel": ""
                    , "HAuxPropID": 0, "HAuxPropNumber": "", "HAuxPropName": "", "HUnitID": 0, "HUnitNumber": "", "HUnitName": "", "HBatchNo": "", "HGiveAwayFlag": 0
                    , "HQty": 0, "HMinQty": '', "HBQty": 0, "HPackQty": 0, "HDate": "", "HCusID": 0, "HCusNumber": "", "HCusName": "", "HSeOrderBillNo": "", "HRemark": ""
                    , "HCoilNO": "", "HFurnaceNO": "", "HFactory": "",
@@ -1089,8 +1099,6 @@
                table.render(option);
                //刷新表格数据
                DisPlay_HideColumn();
                //DisPlay_HideColumn1();
                //DisPlay_HideColumn2();
            }
            function set_AddFNew1() {
@@ -1102,17 +1110,13 @@
                }];
                table.render(option1);
                //刷新表格数据
                //DisPlay_HideColumn();
                DisPlay_HideColumn1();
                //DisPlay_HideColumn2();
            }
            function set_AddFNew2() {
                option2.data = [];
                table.render(option2);
                //刷新表格数据
                //DisPlay_HideColumn();
                //DisPlay_HideColumn1();
                DisPlay_HideColumn2();
            }
@@ -1128,6 +1132,7 @@
                return [year, month, day].join('-');
            }
            //增加一行
            function btnAddLine(NewRow) {
                //var tableBak = table.cache["mainTable"]; //获取之前编辑过的表格数据
@@ -1146,6 +1151,7 @@
                //rows++;
                layer.msg(get_MessageError('[3899-2-005]增加一行按钮!', sessionStorage["HTranSlate"]))
            }
            //复制一行
            function btnCopyLine(data) {
                data[0].HQty = '';
@@ -1498,6 +1504,7 @@
                    });
                }
            }
            //表格行内事件快捷键筛选
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
@@ -1605,7 +1612,7 @@
                                        childData = null;
                                    }
                                    childPage = null;
                                    currRowIndex = 0;
@@ -1614,7 +1621,6 @@
                                }
                            }
                        }
                    }
                    //#endregion
@@ -1901,6 +1907,46 @@
                                }
                            });
                        }
                        //供应商代码
                        if (obj.event === 'HSupNumber')  //供应商代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '供应商列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../基础资料/采购基础资料/Gy_Supplier.html', 'yes'],
                                btn: [get_MessageError('[0000-2-051]确定', sessionStorage["HTranSlate"]), get_MessageError('[0000-2-052]取消', sessionStorage["HTranSlate"])]
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg(get_MessageError('[0000-1-020]请选择数据', sessionStorage["HTranSlate"]));
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HSupID: checkStatus.data[0].HItemID,
                                        HSupNumber: checkStatus.data[0].供应商代码,
                                        HSupName: checkStatus.data[0].供应商名称
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        obj.event = "";
                        return false;
                    }
@@ -2125,6 +2171,7 @@
                    }
                });
            }
            //登录根据ic卡号
            function loginByICCard(HBarCode) {
                var index = layer.load();