1
wangbin
2024-07-08 3dfe7dfe993869c8a44e9ccf177849abe98ca8d0
WebTM/views/ÖÊÁ¿¹ÜÀí/À´ÁϼìÑéµ¥/QC_Add_Edit_POStockInCheckBillList.html
@@ -317,14 +317,15 @@
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                , totalRow: true
                , height: 500
                , limit: 500 //每页默认显示的数量
                //,url: '/demo/table/user/' //数据接口
                , page: true //开启分页
                , cols: [[ //表头
                    { type: 'checkbox', fixed: 'left' }
                    { type: 'checkbox', fixed: 'left', totalRowText: '合计行'}
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HQCCheckClassID', title: 'HQCCheckClassID', edit: 'text', width: 100, hide: true }
                    , { field: 'HQCCheckClassID', title: 'HQCCheckClassID', edit: 'text', width: 100, hide: true, totalRow: true }
                    , { field: 'HQCCheckClassNumber', title: '检验项目类别', edit: 'text', event: "HQCCheckClassCheck", width: 100 }
                    , { field: 'HQCCheckClassName', title: '检验项目类别名称', edit: 'text', width: 100, hide: true }
                    , { field: 'HQCCheckItemID', title: 'HQCCheckItemID', edit: 'text', hide: true }
@@ -490,13 +491,13 @@
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../../views/Baseset/基础资料/Gy_QCCheckItemListView.html', 'yes'],
                                content: ['../../基础资料/公用基础资料/Gy_CheckItem.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index];
                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
@@ -528,22 +529,22 @@
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html ','yes'],
                                content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HProcCheckEmpName: checkStatus.data[0].HName
                                        HProcCheckEmpName: checkStatus.data[0].职员名称
                                        , HProcCheckEmpID: checkStatus.data[0].HItemID
                                        , HProcCheckEmpNumber: checkStatus.data[0].HNumber
                                        , HProcCheckEmpNumber: checkStatus.data[0].职员代码
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
@@ -715,17 +716,17 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_SupplierList.html', 'yes'],
                    content: ['../../基础资料/采购基础资料/Gy_Supplier.html?Type=HSup', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HSupName").val(checkStatus.data[0].HName);
                        $("#HSupName").val(checkStatus.data[0].供应商名称);
                        $("#HSupID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -754,17 +755,17 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_MaterialList.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_Material.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HMaterName").val(checkStatus.data[0].HName);
                        $("#HMaterName").val(checkStatus.data[0].物料名称);
                        $("#HMaterID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -792,17 +793,17 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html', 'yes'],
                    content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HEmp', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HFirstCheckEmpName").val(checkStatus.data[0].HName);
                        $("#HFirstCheckEmpName").val(checkStatus.data[0].职员名称);
                        $("#HFirstCheckEmpID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
@@ -842,7 +843,9 @@
                return [year, month, day].join('-');
            }
            form.on('submit(Saver)', function (data) {//保存
            //保存
            form.on('submit(Saver)', function (data) {
                //debugger;
                data.field.HMaker = sessionStorage["HUserName"];//制单人
                var sMainStr = JSON.stringify(data.field);
@@ -995,6 +998,20 @@
            return Result;
        }
        function GetHSupNameValue(obj) {   //供应商
            $("#HSupName").val(obj[0].供应商名称);
            $("#HSupID").val(obj[0].HItemID);
        }
        function GetMaterValue(obj) {  //物料
            $("#HMaterName").val(obj[0].物料名称);
            $("#HMaterID").val(obj[0].HItemID);
        }
        function GetHEmpValue(obj) {  //质检员
            $("#HFirstCheckEmpName").val(obj[0].职员名称);
            $("#HFirstCheckEmpID").val(obj[0].HItemID);
        }
    </script>
</body>