1
zrg
2025-06-09 f0892b93ea156d99b908d2620d330c4b765fa50d
WebTM/views/Éú²ú¹ÜÀí/Èռƻ®»ù´¡×ÊÁÏ/Gy_WorkWarehouseBill_Add.html
@@ -103,6 +103,7 @@
    <script>
        var HDataEmp = {};
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -173,12 +174,12 @@
                , 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' }
                ]]
@@ -240,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);
                    }
                })
            })
            //保存提交
@@ -356,6 +360,16 @@
                                        , "HWorkShopName": checkStatus.data[0].部门名称
                                    })
                                    layer.close(index);//关闭弹窗
                                }, end: function () {
                                    if (typeof (HDataEmp.HItemID) != "undefined") {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HWorkShopID": HDataEmp.HItemID
                                            , "HWorkShopNumber": HDataEmp.部门代码
                                            , "HWorkShopName": HDataEmp.部门名称
                                        })
                                        HDataEmp = {};
                                    }
                                }
                            })
                        }
@@ -370,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) {
                                    //按钮一  çš„回调
@@ -418,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 = {};
                                    }
                                }
                            })
                        }
@@ -527,6 +552,15 @@
        });
        function GetHDeptNameValue(obj)  //返回生产车间
        {
            HDataEmp = obj[0];
        }
        //双击返回仓库
        function GetHWHSubValue(data) {
            HDataEmp = data[0]
        }
    </script>
</body>