WebTM/views/Éú²ú¹ÜÀí/Èռƻ®»ù´¡×ÊÁÏ/Gy_WorkWarehouseBill_Add.html
@@ -103,6 +103,7 @@
    <script>
        var HDataEmp = {};
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -169,15 +170,16 @@
                , limit: 500 //每页默认显示的数量
                , cellMinWidth: 120
                , height: 'full-170'
                , totalRow: true
                , cols: [[ //表头
                    { type: 'checkbox', totalRowText: '合计行' }
                    , { type: 'numbers', title: '序号', totalRow: true }
                    , { field: 'HWorkShopID', title: 'HWorkShopID', hide: true }
                    , { field: 'HWorkShopNumber', title: '生产车间', edit: 'text', event: "HWorkShopID" }
                    , { field: 'HWorkShopName', title: '车间名称' }
                    , { field: 'HWHID', title: 'HWHID', hide: true }
                    , { field: 'HWHNumber', title: '仓库', edit: 'text', event: "HWHID" }
                    , { field: 'HWHName', title: '仓库名称' }
                    , { field: 'HWorkShopID', title: 'HWorkShopID<label style="color:red"> * </label>', hide: true }
                    , { field: 'HWorkShopNumber', title: '生产车间<label style="color:red"> * </label>', edit: 'text', event: "HWorkShopID" }
                    , { field: 'HWorkShopName', title: '车间名称<label style="color:red"> * </label>' }
                    , { field: 'HWHID', title: 'HWHID<label style="color:red"> * </label>', hide: true }
                    , { field: 'HWHNumber', title: '仓库<label style="color:red"> * </label>', edit: 'text', event: "HWHID" }
                    , { field: 'HWHName', title: '仓库名称<label style="color:red"> * </label>' }
                    , { field: 'HRemark', title: '备注', edit: 'text' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
@@ -239,11 +241,14 @@
            //退出
            form.on('submit(Cancel)', function () {
                if ((OperationType == 1) || OperationType == 3) {
                    Pub_Close(1);
                } else {
                    Pub_Close(2);
                }
                //逻辑删除方法
                layer.confirm("退出前请确保数据已保存,是否继续退出?", { title: "退出确认" }, function (index) {
                    if((OperationType == 1) || OperationType == 3) {
                        Pub_Close(1);
                    } else {
                        Pub_Close(2);
                    }
                })
            })
            //保存提交
@@ -338,7 +343,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ["../../Baseset/基础资料/Gy_DepartmentList.html", "yes"]
                                , content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -351,10 +356,20 @@
                                    //更新表格缓存的数据
                                    obj.update({
                                        "HWorkShopID": checkStatus.data[0].HItemID
                                        , "HWorkShopNumber": checkStatus.data[0].HNumber
                                        , "HWorkShopName": checkStatus.data[0].HName
                                        , "HWorkShopNumber": checkStatus.data[0].部门代码
                                        , "HWorkShopName": checkStatus.data[0].部门名称
                                    })
                                    layer.close(index);//关闭弹窗
                                }, end: function () {
                                    if (typeof (HDataEmp.HItemID) != "undefined") {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HWorkShopID": HDataEmp.HItemID
                                            , "HWorkShopNumber": HDataEmp.部门代码
                                            , "HWorkShopName": HDataEmp.部门名称
                                        })
                                        HDataEmp = {};
                                    }
                                }
                            })
                        }
@@ -369,7 +384,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ["../../基础资料/公用基础资料/Gy_Warehouse.html", "yes"]
                                , content: ["../../基础资料/公用基础资料/Gy_Warehouse.html?type=HWHSub", "yes"]
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -400,7 +415,7 @@
                                        //在下方添加新的表格数据
                                        for (var i = 0; i < num; i++) {
                                            option.data.push({
                                                "HWorkShopID": "", "HWorkShopNumber": "", "HWorkShopName": "", "HWHID": NumData[j]["HWHID"], "HWHNumber": NumData[j]["仓库代码"], "HWHName": NumData[j]["仓库名称"], "HRemark": ""
                                                "HWorkShopID": "", "HWorkShopNumber": "", "HWorkShopName": "", "HWHID": NumData[j]["HItemID"], "HWHNumber": NumData[j]["仓库代码"], "HWHName": NumData[j]["仓库名称"], "HRemark": ""
                                            })
                                            j++;
                                        }
@@ -417,6 +432,17 @@
                                    table.render(option);
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (typeof (HDataEmp.HItemID) != "undefined") {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HWHID": HDataEmp.HItemID
                                            , "HWHNumber": HDataEmp.仓库代码
                                            , "HWHName": HDataEmp.仓库名称
                                        })
                                        HDataEmp = {};
                                    }
                                }
                            })
                        }
@@ -526,6 +552,15 @@
        });
        function GetHDeptNameValue(obj)  //返回生产车间
        {
            HDataEmp = obj[0];
        }
        //双击返回仓库
        function GetHWHSubValue(data) {
            HDataEmp = data[0]
        }
    </script>
</body>