yusijie
2024-01-25 f5fef647ef9026a1ed92de89383083f38698c48f
工作任务列表添加判断打开方式;PDA首件检验单
2个文件已修改
240 ■■■■ 已修改文件
WebTM/views/车间管理/工序流转/MES_ColorRecordBill_PDA.html 223 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/项目管理/工作任务/PM_WorkTaskBillList.html 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת/MES_ColorRecordBill_PDA.html
@@ -17,62 +17,6 @@
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <!--自定义样式-->
    <style>
        /* .maintitle {
            background-color: #1492ff;
            color: #fff;
            padding: 5px 10px;
            border: none;
            border-radius: 4px;
        }
        .title {
            border-left: 4px solid #1492ff;
            padding-left: 6px;
            margin: 20px 10px 4px;
            font-size: 16px;
            color: #333;
        }
        .buttom_box_little {
            width: 60px;
            height: 36px;
            color: #fff;
            background-color: #1492ff;
            border-radius: 4px;
            border: none;
            margin: 10px;
        }
        .layui-input {
            width: 93%;
        }
        .layui-inline, img {
            display: block;
            vertical-align: middle
        }
        .layui-input, .layui-textarea {
            display: inline-block;
            width: 100%;
            padding-left: 10px;
        }
        .laydate-time-list ol {
            overflow-x: hidden !important;
            overflow-y: auto !important;
        }
        .layui-form-label {
            padding: 9px 5px;
            width: 85px;
        }
        .layui-input-block {
            margin-left: 85px;
            min-height: 36px;
        }*/
        .layui-form-label {
            font-size: 14px;
            width: 85px;
@@ -101,6 +45,17 @@
        th {
            width: 70px;
            text-align: left;
        }
        /* é˜²æ­¢ä¸‹æ‹‰æ¡†çš„下拉列表被隐藏---必须设置--- */
        .layui-table-cell {
            overflow: visible !important;
        }
        /* ä½¿å¾—下拉框与单元格刚好合适 */
        td .layui-form-select {
            margin-top: -10px;
            margin-left: -15px;
            margin-right: -15px;
        }
    </style>
</head>
@@ -227,6 +182,21 @@
                                    <table style="width:80%;">
                                        <tbody>
                                            <tr>
                                                <th>检验方案</th>
                                                <td class="bz_td">
                                                    <input type="text" name="HQCSchemeName" class="layui-input" id="HQCSchemeName" placeholder="选择检验方案" style="border-radius: 50px; background-color: #efefef4d;">
                                                    <input type="hidden" name="HQCSchemeID" id="HQCSchemeID" value="0" autocomplete="off" class="layui-input">
                                                    <button type="button" lay-submit="" class="layui-btn layui-col-xs2 bz_btu" lay-filter="btnSearchQCScheme" id="btnSearchQCScheme" style="font-weight:bolder;">...</button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <table class="" id="mainTable" lay-filter="mainTable"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table style="width:80%;">
                                        <tbody>
                                            <tr>
                                                <th>制单人</th>
                                                <td class="bz_td">
                                                    <input type="text" name="HMaker" class="layui-input" id="HMaker" style="border-radius: 50px;background-color:#efefef4d;" readonly>
@@ -280,6 +250,7 @@
                            </div>
                            <ul class="layui-tab-title">
                                <li class="layui-this">单据信息</li>
                                <li>检验项目</li>
                                <li>制单信息</li>
                            </ul>
                        </div>
@@ -296,6 +267,28 @@
    </div>
</body>
</html>
<!--行按钮-->
<script type="text/html" id="barDemo">
    <!--<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<!--复选框(检验结论)-->
<script type="text/html" id="HResult">
    <input type="checkbox" value="{{d.HResult}}" lay-skin="primary" id="HResult{{d.LAY_TABLE_INDEX+1}}" lay-filter="HResult" {{ d.HResult == 1 ? 'checked' : '' }}>
</script>
<!--复选框(重点检查)-->
<script type="text/html" id="HKeyInspect">
    <input type="checkbox" value="{{d.HKeyInspect}}" lay-skin="primary" id="HKeyInspect{{d.LAY_TABLE_INDEX+1}}" lay-filter="HKeyInspect" {{ d.HKeyInspect == 1 ? 'checked' : '' }}>
</script>
<!--行下拉选择(分析方法)-->
<script type="text/html" id="HAnalysisMethod">
    <select name="HAnalysisMethod" lay-filter="HAnalysisMethod" id="HAnalysisMethod{{d.LAY_TABLE_INDEX+1}}">
        <option value="">请选择</option>
        <option value="1">定性分析</option>
        <option value="2">定量分析</option>
        <option value="3">其他分析</option>
    </select>
</script>
<script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -398,6 +391,43 @@
                })
            });
        //表头信息检验方案弹窗
        form.on('submit(btnSearchQCScheme)', function () {
            //页面层-自定义
            layer.open({
                type: 2,
                skin: 'layui-layer-rim', //加上边框
                area: ['90%', '90%'],
                title: '检验方案列表',
                shift: 2,//弹出动画,
                maxmin: true,
                content: ['../../../views/Baseset/基础资料/Gy_QCCheckProjectListView.html', 'yes'],
                btn: ['确定', '取消']
                , btn1: function (index, layero) {
                    //按钮【按钮一】的回调
                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                    if (checkStatus.data.length === 0) {
                        return layer.msg('请选择数据');
                    }
                    $("#HQCSchemeID").val(checkStatus.data[0].HItemID);
                    $("#HQCSchemeName").val(checkStatus.data[0].方案名称);
                    get_CheckItem();
                    layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                }
                , btn2: function (index, layero) {
                    //按钮【按钮二】的回调
                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                },
                end: function () {
                },
                success: function (layero, index) {
                }
            });
        });
            //选择计量单位
            form.on('submit(BtnHUnit)', function () {//生产资源
                layer.open({
@@ -451,6 +481,87 @@
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰çš„æ–¹æ³•
        //初始化表格
        set_InitGrid();
        function set_InitGrid() {
            rowdata = [{
                "HQCCheckItemID": "", "检验项目": "", "HInspectInstruMentID": 0, "检验仪器": "", "HQCStd": "", "HUnit": "", "HQCNote": "", "HAnalysisMethod": "", "HResult": "", "HMax": "", "HMin": "", "HAvg": "", "HKeyInspect": false
            }];
            option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                , limit: 500 //每页默认显示的数量
                , height: 'full-50'
                , cellMinWidth: 150
                , cols: [[ //表头
                    { type: 'checkbox', totalRowText: '合计行' }
                    , { type: 'numbers', title: '序号', totalRow: true }
                    , { field: 'HQCCheckItemID', title: 'HQCCheckItemID', hide: true }
                    , { field: '检验项目', title: '检验项目', edit: 'text', event: 'HQCCheckItemID' }
                    , { field: 'HInspectInstruMentID', title: 'HInspectInstruMentID', hide: true }
                    , { field: '检验仪器', title: '检验仪器', edit: 'text', event: 'HInspectInstruMentID' }
                    , { field: 'HResult', title: '结论', width: 70, templet: '#HResult' }
                    , { field: 'HAnalysisMethod', title: '分析方法', templet: '#HAnalysisMethod', event: 'HAnalysisMethod' }
                    , { field: 'HKeyInspect', title: '重点检查', templet: '#HKeyInspect', unresize: false }
                    , { field: 'HQCStd', title: '检验标准', edit: 'text' }
                    , { field: 'HUnit', title: '单位', edit: 'text' }
                    , { field: 'HQCNote', title: '检验记录', edit: 'text' }
                    , { field: 'HMax', title: '最大值', edit: 'text' }
                    , { field: 'HMin', title: '最小值', edit: 'text' }
                    , { field: 'HAvg', title: '平均值', edit: 'text', totalRow: true }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                ]]
                , done: function (res, curr, count) {
                    option.data = res.data;
                    //去掉下拉框失焦事件否则在下拉框里输入值
                    $('.layui-form-select').find('input').unbind("blur");
                    //表格重载回显下拉框里的数据
                    $('tr').each(function (e) {
                        var $cr = $(this);
                        var dataIndex = $cr.attr("data-index");
                        $.each(option.data, function (index, value) {
                            if (value.LAY_TNDEX == dataIndex) {
                                $cr.find('input').val(value.HResult);
                            }
                        });
                    });
                }
                , text: {
                    none: '无数据!'
                }
            };
            //加载空表格
            option.data = rowdata;
            table.render(option);
        }
        function get_CheckItem() {
            $.ajax({
                url: GetWEBURL() + "/Web/GetCheckItemByCheckProjectID",
                type: "GET",
                data: { "CheckProjectID": $("#HQCSchemeID").val() == '' ? 0 : $("#HQCSchemeID").val(), "HBatchQty": 0 },
                success: function (result) {
                    if (result.code == 1) {
                        var rowdata = [];
                        rowdata_Value = [];
                        var data = result.data;
                        for (var i = 0; i < result.data.length; i++) {
                            //子表  èµ‹å€¼
                            rowdata.push(
                                {
                                    "HQCCheckItemID": data[i]["HQCCheckItemID"], "检验项目": data[i]["检验项目"], "HInspectInstruMentID": data[i]["HInspectInstruMentID"], "检验仪器": data[i]["检验仪器"], "HQCStd": data[i]["HQCStd"], "HUnit": data[i]["单位名称"], "HQCNote": "", "HAnalysisMethod": data[i]["分析方法"], "HResult": data[i]["默认结论"],
                                    "HMax": "", "HMin": "", "HAvg": "", "HKeyInspect": data[i]["重点检查"] == 1 ? true : false,
                                }
                            );
                        }
                        //检验项目
                        option.data = rowdata;
                        table.render(option);
                    }
                }
            })
        }
            function txtHBarCode_KeyDown(HBarCode) {
                //扫码类型2
WebTM/views/ÏîÄ¿¹ÜÀí/¹¤×÷ÈÎÎñ/PM_WorkTaskBillList.html
@@ -321,11 +321,13 @@
                //查询
                if (addSWhereByOpenType()) {          //addSWhereByOpenType()方法判断是否其它页面打开本页面,若是则处理过滤条件,并返回true
                    get_FastQuery(2);
                } else {
                    get_FastQuery(1);
                }
                //查询当前登录用户有没有在当前模块设置默认过滤方案
                get_DefaultModule();
            }
            //#endregion
@@ -1094,15 +1096,24 @@
                                    $("#" + data[i].过滤字段ID).find("option[value='" + data[i].过滤值 + "']").attr("selected", true);
                                }
                            }
                            //执行查询方法
                            get_FastQuery();
                            //查询
                            if (addSWhereByOpenType()) {          //addSWhereByOpenType()方法判断是否其它页面打开本页面,若是则处理过滤条件,并返回true
                                get_FastQuery(2);
                            } else {
                                get_FastQuery(1);
                            }
                            form.render("select");
                        } else {
                            //当前用户没有设置默认的过滤方案
                            //隐藏显示过滤方案的标签信息
                            document.getElementById("HFilterScheme_Now").style.display = "none";
                            //执行查询方法
                            get_FastQuery();
                            //查询
                            if (addSWhereByOpenType()) {          //addSWhereByOpenType()方法判断是否其它页面打开本页面,若是则处理过滤条件,并返回true
                                get_FastQuery(2);
                            } else {
                                get_FastQuery(1);
                            }
                            form.render("select");
                        }
                    }, error: function () {