杨乐
2022-02-15 a2f5749ef7d496ae8e1bad20deb48d87e632069b
WebTM/views/¹«¹²Ò³Ãæ/Kf_BarCodeEditDlg.html
@@ -102,7 +102,7 @@
            return vars;
        }
        //获取页面跳转参数
        var params = get_UrlVars();
        var params = getUrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
        } else {
@@ -139,7 +139,7 @@
                 ,url: GetWEBURL() + "/Web/GetHBarCodeShowBillSub"
                , where: {
                    "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HWhID": HWhID, "HSPID": HSPID, "HSCWHID": HSCWHID
                    , "HSCSPID": HSCSPID, "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HBillType": HBillType
                    , "HSCSPID": HSCSPID, "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HBillType": HBillType,sWhere: ''
                },
             cols: [[
             { type: 'radio' }
@@ -154,7 +154,7 @@
            //#region åˆ é™¤
            function set_DeleteBill() {
            form.on('submit(cmdDel)', function () {
                var checkStatus = table.checkStatus('mx-table')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
@@ -188,81 +188,79 @@
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //编辑
            form.on('submit(cmdChange)', function () {//编辑
                var checkStatus = table.checkStatus('mx-table')
                    , data = checkStatus.data;
                var sQty = data[0].HQty.toString();
                var iQty = $('#HQty').val()
                    $.ajax(
                        {
                            type: "Get",
                            //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/Delete_Json", //方法所在页面和方法名
                            url: GetWEBURL() + "/Kf_BarCodeEditDlg/GetCheckQtyByBarCodeBill",
                            async: true,
                            data: {
                                "HInterID": HInterID, "HBillType": HBillType, "sBatchNo": HBatchNo, "sBarCode": HBarCode, "sSCWhID": HSCWHID
                                , "sSCSPID": HSCSPID, "sAuxPropID": HAuxPropID, "sMTONo": HMTONo, "iQty": iQty
                                , "HMaterID": HMaterID, "sWhID": HWhID, "sSPID": HSPID, "HSourceInterID": HSourceInterID
                                , "HSourceEntryID": HSourceEntryID, "EndQty": EndQty, "sQty": sQty
                            },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                                    table.render({
                                        elem: '#mx-table'
                                        //, url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub'
                                        , url: GetWEBURL() + "/Web/GetHBarCodeShowBillSub"
                                        , where: {
                                            "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HWhID": HWhID, "HSPID": HSPID, "HSCWHID": HSCWHID
                                            , "HSCSPID": HSCSPID, "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HBillType": HBillType
                                        },
                                        cols: [[
                                            { type: 'radio' }
                                            , { field: 'HSonNo', title: '序号', width: 100 }
                                            , { field: 'HBarCode', title: '条形码', width: 200 }
                                            , { field: 'HQty', title: '数量', width: 100 }
                                            , { field: 'HBatchNo', title: '批次', width: 150 }
                                            , { field: 'HMTONo', title: '计划跟踪单号', width: 150 }
                                        ]]
                                        // , data: [linterid]
                                    });
                                    alert("编辑成功!");
                                }
                                else {
                                    layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                }
                            },
                            error: function (err) {
                                layer.msg('错误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                        });
                }
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '明细列表'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?HInterID=' + HInterID + '&HMaterID = ' + HMaterID + '&HAuxPropID = ' + HAuxPropID + '& HMTONo = ' + HMTONo + '&HWhID = ' + HWhID + '&HSPID = ' + HSPID + '&HSCWHID = ' + HSCWHID + '&HSCSPID= ' + HSCSPID + '&HBatchNo= ' + HBatchNo + '&HSourceInterID= ' + HSourceInterID + '&HSourceEntryID= ' + HSourceEntryID + '&HBillType=  ' + HBillType + '&HBarCode=  ' + HBarCode + ''
                            , 'yes']
                        , resize: false
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            })
    });
            //编辑
            //form.on('submit(cmdChange)', function () {//编辑
            //    var checkStatus = table.checkStatus('mx-table')
            //        , data = checkStatus.data;
            //    var sQty = data[0].HQty.toString();
            //    var iQty = $('#HQty').val()
            //        $.ajax(
            //            {
            //                type: "Get",
            //                //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/Delete_Json", //方法所在页面和方法名
            //                url: GetWEBURL() + "/Kf_BarCodeEditDlg/GetCheckQtyByBarCodeBill",
            //                async: true,
            //                data: {
            //                    "HInterID": HInterID, "HBillType": HBillType, "sBatchNo": HBatchNo, "sBarCode": HBarCode, "sSCWhID": HSCWHID
            //                    , "sSCSPID": HSCSPID, "sAuxPropID": HAuxPropID, "sMTONo": HMTONo, "iQty": iQty
            //                    , "HMaterID": HMaterID, "sWhID": HWhID, "sSPID": HSPID, "HSourceInterID": HSourceInterID
            //                    , "HSourceEntryID": HSourceEntryID, "EndQty": EndQty, "sQty": sQty
            //                },
            //                dataType: "json",
            //                success: function (data) {
            //                    if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
            //                        table.render({
            //                            elem: '#mx-table'
            //                            //, url: 'http://localhost:8083/Web/GetHBarCodeShowBillSub'
            //                            , url: GetWEBURL() + "/Web/GetHBarCodeShowBillSub"
            //                            , where: {
            //                                "HInterID": HInterID, "HMaterID": HMaterID, "HAuxPropID": HAuxPropID, "HMTONo": HMTONo, "HWhID": HWhID, "HSPID": HSPID, "HSCWHID": HSCWHID
            //                                , "HSCSPID": HSCSPID, "HBatchNo": HBatchNo, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HBillType": HBillType
            //                            },
            //                            cols: [[
            //                                { type: 'radio' }
            //                                , { field: 'HSonNo', title: '序号', width: 100 }
            //                                , { field: 'HBarCode', title: '条形码', width: 200 }
            //                                , { field: 'HQty', title: '数量', width: 100 }
            //                                , { field: 'HBatchNo', title: '批次', width: 150 }
            //                                , { field: 'HMTONo', title: '计划跟踪单号', width: 150 }
            //                            ]]
            //                            // , data: [linterid]
            //                        });
            //                        alert("编辑成功!");
            //                    }
            //                    else {
            //                        layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //                    }
            //                },
            //                error: function (err) {
            //                    layer.msg('错误' + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            //                }
            //            });
            //        layer.open({
            //            type: 2
            //            , area: ['100%', '100%']
            //            , title: '明细列表'
            //            , shade: 0.6 //遮罩透明度
            //            , maxmin: true //允许全屏最小化
            //            , anim: 0 //0-6的动画形式,-1不开启
            //            , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?HInterID=' + HInterID + '&HMaterID = ' + HMaterID + '&HAuxPropID = ' + HAuxPropID + '& HMTONo = ' + HMTONo + '&HWhID = ' + HWhID + '&HSPID = ' + HSPID + '&HSCWHID = ' + HSCWHID + '&HSCSPID= ' + HSCSPID + '&HBatchNo= ' + HBatchNo + '&HSourceInterID= ' + HSourceInterID + '&HSourceEntryID= ' + HSourceEntryID + '&HBillType=  ' + HBillType + '&HBarCode=  ' + HBarCode + ''
            //                , 'yes']
            //            , resize: false
            //            , cancel: function () {
            //                //$(".layui-btn").removeClass("layui-btn-disabled");
            //            }
            //        })
            //    } else {
            //        layer.msg('请选择一行数据编辑!');
            //    }
            })
    </script>
</body>
</html>