1
沈泽
2021-11-05 0d8fa0382e13fe46b9e06763dd1bce4ce07ee1fe
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldRepairOutBillEdit.html
@@ -250,7 +250,22 @@
                        </div>
                    </div>
                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    <div class="layui-tab layui-tab-card" lay-filter="TabTest">
                        <ul class="layui-tab-title">
                            <li class="layui-this">明细信息</li>
                            <li>汇总信息</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                            </div>
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
                            </div>
                        </div>
                    </div>
                    <script type="text/html" id="toolbarDemo">
                        <div class="layui-btn-container">
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine" id="btn-AddLine"><i class="layui-icon layui-icon-form"></i>增加一行</button>
@@ -295,6 +310,7 @@
                , element = layui.element;
            //查询条件
            var option = [];
            var option1 = [];
            var sWhere = "";
            var sBillType = "3825";
            //TabRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HStockOrgID": sessionStorage["OrganizationID"],"HRemark": "" };
@@ -306,6 +322,7 @@
            set_InitFrom();
            //初始化表格
            set_InitGrid();
            set_CountGrid();
            //判断操作类型
            if (OperationType == 1) {//无源新增
                set_AddFNew();
@@ -866,6 +883,36 @@
                    }
                };
            }
            //初始汇总信息
            function set_CountGrid() {
                //表头
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: '物料代码', title: '物料代码', edit: 'text', event: 'HMaterCode', width: 100 }
                    , { field: '物料名称', title: '物料名称', edit: 'text', width: 100 }
                    , { field: '规格型号', title: '规格型号', edit: 'text', width: 100 }
                    , { field: '单据号', title: '单据号', edit: 'text', width: 100 }
                    , { field: '批次', title: '批次', edit: 'text', width: 100 }
                    , { field: '实收数量', title: '实收数量', edit: 'text', width: 100 }
                    , { field: 'hwhid', title: 'HWHID', edit: 'text', width: 100, hide: true }
                    , { field: '仓库代码', title: '仓库代码', edit: 'text', event: 'HWHCode', width: 120 }
                    , { field: '仓库', title: '仓库', edit: 'text', width: 120 }
                    , { field: '子备注', title: '备注', edit: 'text', width: 100 }
                ];
                option1 = {
                    id: 'mainTable1'
                    , elem: '#mainTable1'
                    , height: 500
                    , page: true
                    , limit: 500
                    , cellMinWidth: 120
                    , height: 500
                    , cols: [columns]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //无源单新增
            function set_AddFNew() {
                //获取最大单据号
@@ -965,8 +1012,10 @@
                    data: { "sqlWhere": "and hmainid=" + linterid },
                    success: function (result) {
                        if (result.count == 1) {
                            option.data = result.data;
                            option.data = result.list[0];
                            table.render(option);
                            option1.data = result.list[1];
                            table.render(option1);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });