black-goat-me
2023-05-20 30cc3b174a0ff8e40f25a7a0bd4e7dc53a7e5286
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²úÁ¿»ã±¨/Sc_ProductReportStepBillList.html
@@ -125,18 +125,24 @@
        var HSourceID = ""; //资源ID
        var HICMOInterID = ""; //生产订单主ID
        var HICMOEntryID = ""; //生产订单子ID
        var HMaker = ""; //当前登录人
        var Czybm = ""; //当前登录人编号
        var HSourceInterID = ""; //生产状态临时表主ID
        var HSourceBillType = ""; //源单类型
        var HProcID = ""; //工序ID
        var SchWhere = ""; //按钮查询参数
        var edit = function (data) {
            workcode = data[0].workcode;
            HSourceID = data[0].HSourceID;
            HSourceName = data[0].HSourceName;
            HICMOInterID = data[0].HICMOInterID;
            HICMOEntryID = data[0].HICMOEntryID;
            HMaker = data[0].HMaker;
            Czybm = data[0].Czybm;
            HSourceBillType = data[0].HSourceBillType;
        }
        //var edit = function (data) {
        //    workcode = data[0].workcode;
        //    HSourceID = data[0].HSourceID;
        //    HSourceName = data[0].HSourceName;
        //    HICMOInterID = data[0].HICMOInterID;
        //    HICMOEntryID = data[0].HICMOEntryID;
        //    HMaker = data[0].HMaker;
        //    Czybm = data[0].Czybm;
        //    HSourceInterID = data[0].HSourceInterID;
        //    HSourceBillType = data[0].HSourceBillType;
        //    HProcID = data[0].HProcID;
        //}
        //获取页面跳转参数  //单据编辑状态: 1.无源单新增  Â 2.有源单新增  Â 3.编辑  4.浏览  5.变更
        var params = get_UrlVars();
        if (typeof (params[params[0]]) == "undefined") {
@@ -144,7 +150,17 @@
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
            var HSBillType = params[params[2]];//源单类型
            var workcode = params[params[3]];
            var HSourceID = params[params[4]];
            var HSourceName = params[params[5]];
            var HICMOInterID = params[params[6]];
            var HICMOEntryID = params[params[7]];
            var HMaker = params[params[8]];
            var Czybm = params[params[9]];
            var HSourceInterID = params[params[10]];
            var HSourceBillType = params[params[11]];
            var HProcID = params[params[12]];
        }
      
@@ -200,11 +216,76 @@
                        , { field: 'HInterID', title: 'HInterID', sort: true, hide: true, width: 200 }
                        , { field: 'HDate', title: '日期', width: 200, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                        , { field: 'HBillNo', title: '单据号', width: 200 }
                        , { field: 'HBillType', title: '单据类型', width: 200 }
                        , { field: 'HBillStatus', title: '单据状态', width: 200}
                        , {
                            field: 'HBillType', title: '单据类型', width: 200, templet: function (d) {
                                if (d.HBillType == "3724") {
                                    return "产量汇报临时单";
                                }
                            }
                        }
                        , {
                            field: 'HBillStatus', title: '单据状态', width: 200, templet: function (d) {
                                switch (d.HBillStatus) {
                                    case 0:
                                        return "创建"
                                        break;
                                    case 1:
                                        return "未审"
                                        break;
                                    case 2:
                                        return "已审"
                                        break;
                                    case 3:
                                        return "关闭"
                                        break;
                                    case 4:
                                        return "作废"
                                        break;
                                    case 5:
                                        return "审核退回"
                                        break;
                                    case 6:
                                        return "审核中"
                                        break;
                                    case 7:
                                        return "已阅"
                                        break;
                                    case 8:
                                        return "已回复"
                                        break;
                                    case 9:
                                        return "结案"
                                        break;
                                    case 10:
                                        return "验证"
                                        break;
                                    case 11:
                                        return "下达"
                                        break;
                                    case 12:
                                        return "开工"
                                        break;
                                    case 13:
                                        return "申请审批"
                                        break;
                                    case 15:
                                        return "申请检验"
                                        break;
                                    case 16:
                                        return "判定合格"
                                        break;
                                    case 17:
                                        return "判定不合格"
                                        break;
                                    default:
                                        return d.HBillStatus
                                }
                            }
                        }
                        , { field: 'HICMOBillNo', title: '生产订单号', width: 200 }
                        , { field: 'HICMOInterID', title: '生产订单主ID', width: 200, hide: true }
                        , { field: 'HICMOEntryID', title: '生产订单子ID', width: 200, hide: true }
                        , { field: 'HProcID', title: '工序ID', width: 200, hide: true }
                        , { field: 'HProcNumber', title: '工序编码', width: 200 }
                        , { field: 'HProcName', title: '工序名称', width: 200 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 200 }
@@ -234,7 +315,8 @@
            //报工平台进入(有源单)
            function set_AddNew()
            {
                sWhere = " where b.HSourceID='" + HSourceID + "' and b.HSourceBillNo='" + workcode + "' and b.HSourceInterID='" + (HICMOInterID == "null" ? 0 : HICMOInterID) + "' and b.HSourceEntryID='" + (HICMOEntryID == "null" ? 0 : HICMOEntryID) + "' and a.HMaker='" + HMaker + "' ";
                //sWhere = " where b.HSourceID='" + HSourceID + "' and b.HSourceBillNo='" + workcode + "' and b.HSourceInterID='" + (HSourceInterID == "null" ? 0 : HSourceInterID) + "' and b.HSourceEntryID='" + (HICMOEntryID == "null" ? 0 : HICMOEntryID) + "' and a.HMaker='" + HMaker + "' ";
                sWhere = " where a.HSourceID='" + HSourceID + "' and a.HSourceBillNo='" + workcode + "' and a.HSourceInterID='" + (HSourceInterID == "null" ? 0 : HSourceInterID) + "' and a.HSourceEntryID='" + (HICMOEntryID == "null" ? 0 : HICMOEntryID) + "' and a.HMaker='" + HMaker + "' ";
                SchWhere = sWhere;
                console.log(sWhere);
                //进入页面显示的缓存列表
@@ -248,7 +330,7 @@
                            table.render(option);
                        } else {
                            layer.close(index);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                        sWhere = "";
@@ -320,7 +402,7 @@
                        type: "Get",
                        url: GetWEBURL() + "/Sc_MESBeginStepWorkBill/SaveGetMESProductReportBillList", //方法所在页面和方法名
                        async: true,
                        data: { "ScMaxWork": ScMaxWork(), "HSourceBillType": HSourceBillType, "workcode": workcode, "HSourceID": HSourceID, "HICMOInterID": (HICMOInterID == "null" ? 0 : HICMOInterID), "HICMOEntryID": (HICMOEntryID == "null" ? 0 : HICMOEntryID), "HMaker": HMaker, "Czybm": Czybm },
                        data: { "ScMaxWork": ScMaxWork(), "HSourceBillType": HSourceBillType, "workcode": workcode, "HSourceID": HSourceID, "HICMOInterID": (HICMOInterID == "null" ? 0 : HICMOInterID), "HICMOEntryID": (HICMOEntryID == "null" ? 0 : HICMOEntryID), "HMaker": HMaker, "Czybm": Czybm, "HProcID": HProcID },
                        dataType: "json",
                        beforeSend: function () {
                            $('#AskReport').addClass("layui-btn-disabled").attr("disabled", true);