1
duhe
2023-10-15 2ebe0f632f53895ad153566b7fd28437035eab8a
WebTM/views/IpadIndex.html
@@ -36,6 +36,7 @@
        var HICMOInterID = "";     //生产订单主内码
        var HICMOEntryID = "";     //生产订单子内码
        var HICMOBillNo = "";      //任务单号
        var HMaterName = "";      //产品名称
        //注意:选项卡 依赖 element 模块,否则无法进行功能性操作
        layui.config({
            base: '../layuiadmin/' //静态资源所在路径
@@ -376,6 +377,7 @@
            HSourceBillType = $("#st" + i + "").html(); //通过样式ID获取html内容(源单类型)
            HICMOInterID = $("#df" + i + "").html();     //生产订单主内码
            HICMOEntryID = $("#ds" + i + "").html();     //生产订单子内码
            HMaterName = $("#ptn" + i + "").html();     //产品名称
            if (workcode != "" && workcode != null) {
@@ -573,6 +575,56 @@
                    //调用iframe弹出层内的方法
                    iframe.edit(data);
                },
            });
        }
        //快速开工
        function KSOpenWork(event, obj) {
            if (wktag == 0) {
                layer.alert("请选择工单列表", { icon: 5 });
                return false;
            }
            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "开工")) {
                layer.alert("单据状态不满足开工条件!", { icon: 5 });
                return false;
            }
           var indexOpen= layer.open({
                type: 1
                , title: "确认开工吗?"
                , closeBtn: false
                , area: '300px;'
                , shade: 0.8
                , id: 'LAY_layuipro' //设定一个id,防止重复弹出
                , btn: ['确定', '取消']
                , btnAlign: 'c'
                , moveType: 1 //拖拽模式,0或者1
                , content: '<div style="padding: 50px; line-height: 22px; font-weight: 300;text-align:center;">设备编号:' + HSourceName1 + '<br>工单号:' + workcode + '<br>产品名称:' + HMaterName+'<br></div>'
                , btn1: function (index, layero, e) {
                    //新增开工单
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESBeginWorkFrom_KS", //方法所在页面和方法名
                        data: { "HBillType": HBillType, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "HSourceBillNo": HSourceBillNo, "user": sessionStorage["HUserName"], "HSourceBillType": HSourceBillType },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // 得到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    //window.location.reload();
                                });
                                layer.close(indexOpen);
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
            });
        }
@@ -982,6 +1034,14 @@
                            </div>
                        </div>
                        <div class="layui-row layui-col-space10">
                            <div class="layui-col-sm12 layui-col-md4" onclick="KSOpenWork(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-pause imgicon"></span>
                                    <span class="imgtitle">快速开工</span>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row layui-col-space10">
                            <div class="layui-col-sm12 layui-col-md4" onclick="OpenFistCheck(event,this)">
                                <div class="cnt bottomright">
                                    <span class="layui-icon layui-icon-search imgicon"></span>