1
wtt
2025-12-29 3425237a2b54ca28fc3e3c5f7c35a7fbef4e15fa
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת¿¨/Sc_ProcessExchangeBill_Exchange.html
@@ -162,6 +162,15 @@
                                                <input type="hidden" name="HICMOInterID" id="HICMOInterID" value="0">
                                            </div>
                                        </div>
                                        <!--
                                        <div class="layui-col-xs3 layui-inline">
                                            <label class="layui-form-label" id="BT_HICMOBillNo">生产日计划</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly>
                                                <input type="hidden" name="HICMOInterID" id="HICMOInterID" value="0">
                                            </div>
                                        </div>
                                        -->
                                        <div class="layui-col-xs3 layui-inline">
                                            <label class="layui-form-label" id="BT_HQty">流转卡数量</label>
                                            <div class="layui-input-inline">
@@ -1039,7 +1048,7 @@
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
                    type: "GET",
                    data: { "HBillType": '3772' },
                    data: { "HBillType": '5016' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
@@ -1078,7 +1087,7 @@
                            $.ajax({
                                url: GetWEBURL() + "/Web/GetMAXNumPDA",
                                type: "GET",
                                data: { "HBillType": '3772' },
                                data: { "HBillType": '5016' },
                                success: function (d) {
                                    //console.log(d.data);
                                    $("#HInterID").val(d.data[0].HInterID);
@@ -1096,11 +1105,10 @@
                                success: function (d) {
                                    if (d.data[0] != null) {
                                        $("#HWorkBillSortNo").val(d.data[0].单据号);
                                        $("#HMainSourceBillNo").val(d.data[0].单据号);
                                    }
                                }
                            })
                            GetICMOBillValue(linterid, HEntryID);
                            option.data = [{
@@ -1131,7 +1139,7 @@
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    async: false,
                    data: { "HBillType": '3772' },
                    data: { "HBillType": '5016' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
@@ -1154,7 +1162,7 @@
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    async: false,
                    data: { "HBillType": '3772' },
                    data: { "HBillType": '5016' },
                    success: function (d) {
                        var HBillNo = d.data[0].HBillNo.replace('GXLX', 'ZYK0');
                        $("#HInterID").val(d.data[0].HInterID);
@@ -1179,19 +1187,19 @@
                columns = [ //表头
                    { type: 'checkbox', totalRowText: '合计行' }
                    , { type: 'numbers', title: '序号'}
                    , { field: 'HProcNo', title: '流水号', edit: 'text' }
                    , { field: 'HProcNo', title: '流水号', edit: 'text', width:120 }
                    , { field: 'HProcID', title: '工序ID', hide: true }
                    , { field: 'HProcNumber', title: '工序代码', edit: 'text', event: "HProcCheck" }
                    , { field: 'HProcName', title: '工序名称' }
                    , { field: 'HProcNumber', title: '工序代码', edit: 'text', event: "HProcCheck", width:120 }
                    , { field: 'HProcName', title: '工序名称', width:120 }
                    , { field: 'HCenterID', title: '工作中心ID', hide: true }
                    , { field: 'HCenterNumber', title: '工作中心代码', edit: 'text', event: "HWorkCenterCheck" }
                    , { field: 'HCenterName', title: '工作中心名称' }
                    , { field: 'HCenterNumber', title: '工作中心代码', edit: 'text', event: "HWorkCenterCheck", width:120 }
                    , { field: 'HCenterName', title: '工作中心名称', width:120 }
                    , { field: 'HTechnologyParameter', title: '工艺参数', width: 500, edit: 'text' }
                    , { field: 'HRemark', title: '备注', edit: 'text' }
                    , { field: 'HSupID', title: '供应商ID', hide: true }
                    , { field: 'HSupNumber', title: '供应商代码', edit: 'text', event: "HSupCheck" }
                    , { field: 'HSupNumber', title: '供应商代码', edit: 'text', event: "HSupCheck", width:120 }
                    , { field: 'HSupName', title: '供应商' }
                    , { field: 'HSupFlag', title: '是否委外', templet: '#HSupFlag' }
                    , { field: 'HSupFlag', title: '是否委外', templet: '#HSupFlag', width:120}
                    , { field: 'HQty', title: '流转卡数量', totalRow: true, edit: 'text', width:120 }
                    , { field: 'HSNCtrl', title: 'SN过站控制', templet: "#HSNCtrl", width: 120  }
                    , { field: 'HRoutingBillMainID', title: '工艺路线ID', hide: true }
@@ -1406,7 +1414,7 @@
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../../../views/基础资料/采购基础资料/Gy_Supplier.html', 'yes'],
                                content: ['../../../views/基础资料/采购基础资料/Gy_Supplier.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
@@ -1772,6 +1780,7 @@
                        if (checkStatus.data.length === 0) {
                            return layer.msg(get_MessageError('[0000-1-020]请选择数据', sessionStorage["HTranSlate"]));
                        }
                        debugger;
                        $("#HWorkShopName").val(checkStatus.data[0].部门名称);
                        $("#HWorkShopID").val(checkStatus.data[0].HItemID);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
@@ -1833,19 +1842,77 @@
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '生产任务单列表'//标题
                    , title: '生产日计划列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../../views/Baseset/基础资料/Sc_ICMOBillListView.html', 'yes']
                    , content: ['../../../views/生产管理/生产日计划工单/JIT_DayPlanBillList1.html', 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        debugger;
                        if (checkStatus.data.length === 0) {
                            return layer.msg(get_MessageError('[0000-1-020]请选择数据', sessionStorage["HTranSlate"]));
                        }
                        GetICMOBillValue(checkStatus.data[0].hmainid, checkStatus.data[0].HEntryID)
                        linterid = checkStatus.data[0].源单主内码
                        HEntryID = checkStatus.data[0].源单子内码
                        // GetICMOBillValue(checkStatus.data[0].hmainid, checkStatus.data[0].HEntryID)
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        $("#RoutingBill").val(""); // å·¥è‰ºè·¯çº¿ç½®ç©º
                        $("#HItemID").val(linterid);//修改时主表ID
                        $("#HEntryID").val(HEntryID);//修改时子表ID
                        $.ajax({
                            type: "get",
                            url: GetWEBURL() + "/LEMS/ICMOBillCheck",
                            data: { "hmainid": linterid, "HEntryID": HEntryID, "OrganizationID": sessionStorage["OrganizationID"] },
                            async: false,
                            success: function (result) {
                                if (result.count == 0) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                    layer.alert(result.Message, { icon: 5 });
                                } else {
                                    $.ajax({
                                        url: GetWEBURL() + "/Web/GetMAXNumPDA",
                                        type: "GET",
                                        data: { "HBillType": '5016' },
                                        success: function (d) {
                                            //console.log(d.data);
                                            $("#HInterID").val(d.data[0].HInterID);
                                            $("#HBillNo").val(d.data[0].HBillNo);
                                            $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                                            $("#HMakeDate").val(Pub_Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
                                            $("#HMaker").val(sessionStorage["HUserName"]);
                                        }
                                    });
                                    $.ajax({
                                        url: GetWEBURL() + "/Sc_WorkBillSortBill/Sc_WorkBillSortBillList",
                                        type: "GET",
                                        data: { "sWhere": " and æºå•主内码='" + linterid + "' and æºå•子内码='" + HEntryID + "' ", "user": sessionStorage["HUserName"] },
                                        success: function (d) {
                                            if (d.data[0] != null) {
                                                $("#HWorkBillSortNo").val(d.data[0].单据号);
                                                $("#HMainSourceBillNo").val(d.data[0].单据号);
                                            }
                                        }
                                    })
                                    GetICMOBillValue(linterid, HEntryID);
                                    option.data = [{
                                        "HProcNo": "", "HProcID": 0, "HProcNumber": "", "HProcName": "", "HWorkRemark": "",
                                        "HCenterID": 0, "HCenterNumber": "", "HCenterName": "",
                                        "HDeptID": 0, "HDeptNumber": "", "HDeptName": "",
                                        "HSupID": 0, "HSupNumber": "", "HSupName": "", "HSupFlag": "false",
                                        "HQty": 0, "HSNCtrl": false, "HOutPrice": 0, "HRemark": "", "HRelationQty_In": 0, "HRelationQty_Out": 0,
                                        "HRelationQty_WWOrder": 0, "HRelationQty_Bad": 0, "HOverRate": 0, "HMaxQty": 0,
                                        "HPassRate": 0, "HSumPassRate": 0, "HTechnologyParameter": "", "HPicNum": "", "HProcCheckNote": "",
                                        "HRoutingBillMainID": 0, "HRoutingBillEntryID": 0
                                    }];
                                    table.render(option);
                                }
                                layer.closeAll("loading");
                            }
                        })
                    }
                    , btn2: function (index, layero) { }
                })