yusijie
2022-11-25 b440a2e25dcbbf4747e6dcb359b6314b4d59275a
产品与器具
3个文件已修改
169 ■■■■ 已修改文件
WebTM/WebTM.csproj 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/基础资料/Gy_MateMould.html 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/基础资料/Gy_MateMouldList.html 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj
@@ -111,6 +111,8 @@
    <Content Include="views\Baseset\基础资料\Gy_QCCheckProjectListView.html" />
    <Content Include="views\Baseset\基础资料\Gy_RoutingBillList.html" />
    <Content Include="views\Baseset\基础资料\Gy_RoutingGroup.html" />
    <Content Include="views\Baseset\基础资料\Gy_TechnologyParameterList.html" />
    <Content Include="views\Baseset\基础资料\Gy_TechParameterUnitList.html" />
    <Content Include="views\Baseset\基础资料\Gy_WarehouseListNew.html" />
    <Content Include="views\Baseset\基础资料\Gy_WasterWHList.html" />
    <Content Include="views\Baseset\基础资料\Gy_WHList.html" />
@@ -187,7 +189,7 @@
    <Content Include="views\基础资料\公用基础资料\Gy_TechnologyParameterUnit_Add_Edit_.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_TechnologyParameter_Add_Edit_.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_TechParamByProcList.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_TechParamByProcList_Add_Edit_.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_TechParamByProc.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_WorkCenterDyCol.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_WorkPayType.html" />
    <Content Include="views\基础资料\公用基础资料\Gy_WorkStationList.html" />
WebTM/views/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MateMould.html
@@ -61,6 +61,7 @@
                                                <input type="radio" name="FixedItems" value="SMater" title="物料">
                                                <input type="radio" name="FixedItems" value="SRelation" title="模具">
                                                <input type="radio" name="FixedItems" value="SUnit" title="单位" checked>
                                                <input type="radio" name="FixedItems" value="SFree" title="自由" checked>
                                            </div>
                                        </div>
                                    </div>
@@ -296,29 +297,34 @@
                    , data = checkStatus.data;
                //新增行表格数据
                var NewRow = {
                    "HMaterIDCol": "", "HMaterNumberCol": "", "HMaterNameCol": "", "HMaterModelCol": "", "HRelationIDCol": "",
                    "HRelationNumberCol": "", "HRelationNameCol": "", "HUnitIDCol": "", "HUnitNumberCol": "", "HUnitNameCol": "",
                    "HBeginDateCol": "", "HEndDateCol": "", "HRemarkCol": ""
                    "HMaterIDCol": "", "物料代码": "", "物料名称": "", "规格型号": "", "HRelationIDCol": "",
                    "模具代码": "", "模具名称": "", "HUnitIDCol": "", "单位代码": "", "单位名称": "",
                    "开始日期": "", "结束日期": "", "备注": ""
                };
                switch (obj.event) {
                    case 'btn-AddLine':
                        var FixedItems = $('input:radio[name="FixedItems"]:checked').val();
                        if (FixedItems == "SUnit") {
                        if (FixedItems == "SFree") {
                        }
                        else if (FixedItems == "SUnit") {
                            NewRow.HUnitIDCol = $("#HUnitID").val();
                            NewRow.单位名称 = $("#HUnitName").val();
                            NewRow.单位代码 = $("#HUnitNumber").val();
                        }
                        else if (FixedItems == "SMater") {
                            NewRow.HMaterIDCol = $("#HMaterID").val();
                            NewRow.HMaterNumberCol = $("#HMaterNumber").val();
                            NewRow.HMaterNameCol = $("#HMaterName").val();
                            NewRow.HMaterModelCol = $("#HMaterModel").val();
                            NewRow.物料代码 = $("#HMaterNumber").val();
                            NewRow.物料名称 = $("#HMaterName").val();
                            NewRow.规格型号 = $("#HMaterModel").val();
                        }
                        else if (FixedItems == "SRelation") {
                            NewRow.HRelationIDCol = $("#HRelationID").val();
                            NewRow.HRelationNumberCol = $("#HRelationNumber").val();
                            NewRow.HRelationNameCol = $("#HRelationName").val();
                            NewRow.模具代码 = $("#HRelationNumber").val();
                            NewRow.模具名称 = $("#HRelationName").val();
                        }
                        NewRow.HBeginDateCol = Format(new Date(), "yyyy-MM-dd");
                        NewRow.HEndDateCol = "2100-01-01";
                        NewRow.开始日期 = Format(new Date(), "yyyy-MM-dd");
                        NewRow.结束日期 = "2100-01-01";
                        table.cache["mainTable"].push(NewRow);
                        option.data = table.cache["mainTable"];
                        table.render(option);
@@ -415,16 +421,16 @@
                                    }
                                    obj.update({
                                        HMaterIDCol: checkStatus.data[0].HItemID
                                        , HMaterNumberCol: checkStatus.data[0].物料代码
                                        , HMaterNameCol: checkStatus.data[0].物料
                                        , HMaterModelCol: checkStatus.data[0].规格型号
                                        , ç‰©æ–™ä»£ç : checkStatus.data[0].物料代码
                                        , ç‰©æ–™åç§°: checkStatus.data[0].物料
                                        , è§„格型号: checkStatus.data[0].规格型号
                                    });
                                    var FixedItems = $('input:radio[name="FixedItems"]:checked').val();
                                    if (FixedItems == "SRelation") {
                                        obj.update({
                                            HRelationIDCol: $("#HRelationID").val()
                                            , HRelationNumberCol: $("#HRelationNumber").val()
                                            , HRelationNameCol: $("#HRelationName").val()
                                            , æ¨¡å…·ä»£ç : $("#HRelationNumber").val()
                                            , æ¨¡å…·åç§°: $("#HRelationName").val()
                                        });
                                    }
                                    layer.close(layer.index);
@@ -454,16 +460,16 @@
                                    }
                                    obj.update({
                                        HRelationIDCol: checkStatus.data[0].HItemID
                                        , HRelationNumberCol: checkStatus.data[0].模具代码
                                        , HRelationNameCol: checkStatus.data[0].模具
                                        , æ¨¡å…·ä»£ç : checkStatus.data[0].模具代码
                                        , æ¨¡å…·åç§°: checkStatus.data[0].模具
                                    });
                                    var FixedItems = $('input:radio[name="FixedItems"]:checked').val();
                                    if (FixedItems == "SMater") {
                                        obj.update({
                                            HMaterIDCol: $("#HMaterID").val()
                                            , HMaterNumberCol: $("#HMaterNumber").val()
                                            , HMaterNameCol: $("#HMaterName").val()
                                            , HMaterModelCol: $("#HMaterModel").val()
                                            , ç‰©æ–™ä»£ç : $("#HMaterNumber").val()
                                            , ç‰©æ–™åç§°: $("#HMaterName").val()
                                            , è§„格型号: $("#HMaterModel").val()
                                        });
                                    }
                                    layer.close(layer.index);
@@ -493,8 +499,8 @@
                                    }
                                    obj.update({
                                        HUnitIDCol: checkStatus.data[0].HItemID
                                        , HUnitNumberCol: checkStatus.data[0].HNumber
                                        , HUnitNameCol: checkStatus.data[0].HName
                                        , å•位代码: checkStatus.data[0].HNumber
                                        , å•位名称: checkStatus.data[0].HName
                                    });
                                    layer.close(layer.index);
                                }
@@ -531,11 +537,14 @@
                        layer.msg("第" + indexRow + "行,模具不能为空!", { icon: 7, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return;
                    }
                    if (!sSubTable[i].HUnitNumberCol) {
                    if (!sSubTable[i].单位代码) {
                        var indexRow = i + 1;
                        layer.msg("第" + indexRow + "行,单位不能为空!", { icon: 7, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return;
                    }
                }
                if (!data.field.HItemID) {
                    OperationType = 1.1
                }
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
@@ -697,9 +706,9 @@
            //初始化表格
            function set_InitGrid() {
                rowdata = [{
                    "HMaterIDCol": "", "HMaterNumberCol": "", "HMaterNameCol": "", "HMaterModelCol": "", "HRelationIDCol": "",
                    "HRelationNumberCol": "", "HRelationNameCol": "", "HUnitIDCol": "", "HUnitNumberCol": "", "HUnitNameCol": "",
                    "HBeginDateCol": "", "HEndDateCol": "", "HRemarkCol": ""
                    "HMaterIDCol": "", "物料代码": "", "物料名称": "", "规格型号": "", "HRelationIDCol": "",
                    "模具代码": "", "模具名称": "", "HUnitIDCol": "", "单位代码": "", "单位名称": "",
                    "开始日期": "", "结束日期": "", "备注": ""
                }];
                option = {
                    elem: '#mainTable'
@@ -707,54 +716,9 @@
                    , limit: 500
                    , height: 'full-250'
                    , cellMinWidth: 90
                    //, cols: [[
                    //    { type: 'checkbox' }
                    //    , { field: 'HMaterIDCol', title: '物料ID', edit: 'text', hide: true }
                    //    , { field: 'HMaterNumberCol', title: '物料代码', edit: 'text', event: "HMaterCheck", width: 200 }
                    //    , { field: 'HMaterNameCol', title: '物料名称', width: 200 }
                    //    , { field: 'HMaterModelCol', title: '规格型号', width: 200 }
                    //    , { field: 'HRelationIDCol', title: '模具ID', edit: 'text', hide: true }
                    //    , { field: 'HRelationNumberCol', title: '模具代码', edit: 'text', event: "HRelationCheck" }
                    //    , { field: 'HRelationNameCol', title: '模具名称' }
                    //    , { field: 'HUnitIDCol', title: '单位ID', edit: 'text', hide: true }
                    //    , { field: 'HUnitNumberCol', title: '单位代码', edit: 'text', event: "HUnitCheck" }
                    //    , { field: 'HUnitNameCol', title: '单位名称' }
                    //    , {
                    //        field: 'HBeginDateCol', title: '开始日期', edit: 'text', width: 110
                    //        , templet: function (d) {
                    //            if (d.HBeginDateCol == null) {
                    //                return "";
                    //            }
                    //            return util.toDateString(d.HBeginDateCol, "yyyy-MM-dd");
                    //        }
                    //    }
                    //    , {
                    //        field: 'HEndDateCol', title: '结束日期', edit: 'text', width: 110
                    //        , templet: function (d) {
                    //            if (d.HEndDateCol == null) {
                    //                return "";
                    //            }
                    //            return util.toDateString(d.HEndDateCol, "yyyy-MM-dd");
                    //        }
                    //    }
                    //    , { field: 'HRemarkCol', title: '备注', edit: 'text' }
                    //    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                    //]]
                    //, 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");
                    //    });
                    //}
                    //, text: {
                    //    none: '无数据!'
                    //}
                };
                //rowdata[0].HBeginDateCol = Format(new Date(), "yyyy-MM-dd");
                //rowdata[0].HEndDateCol = "2100-01-01";
                //rowdata[0].开始日期 = Format(new Date(), "yyyy-MM-dd");
                //rowdata[0].结束日期 = "2100-01-01";
                //option.data = rowdata;
                //table.render(option);
                ////刷新表格数据
@@ -767,24 +731,6 @@
                    url: GetWEBURL() + "/Gy_MateMould/GetMateMouldValue",
                    type: "GET",
                    data: { "HItemID": HItemID },
                    //success: function (result) {
                    //    if (result.count == 1) {
                    //        var data = result.data;
                    //        $("#HItemID").val(data[0].HItemID);
                    //        $("#HUnitID").val(data[0].HUnitID);
                    //        $("#HUnitName").val(data[0].HUnitName);
                    //        $("#模具产品对应表代码").val(data[0].模具产品对应表代码);
                    //        option.data = data;
                    //        table.render(option);
                    //        for (var i = 1; i <= option.data.length; i++) {
                    //            $('#isEntrust' + i + '').find("option[value='" + option.data[i - 1].isEntrust + "']").attr("selected", true);
                    //        }
                    //        form.render('select');
                    //    }
                    //    else {
                    //        layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    //    }
                    //}
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
@@ -807,7 +753,7 @@
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, edit: 'text' });
                                    }
                                }
                            }
WebTM/views/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Gy_MateMouldList.html
@@ -102,7 +102,7 @@
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-add-1"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-form"></i>删除</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-form"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-circle"></i>退出</button>
@@ -295,31 +295,6 @@
                    , cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    //, cols: [[
                    //    { type: 'checkbox', fixed: 'left' }
                    //    , { field: 'HItemID', title: 'HItemID', sort: true, hide: true }
                    //    , { field: 'HMaterID', title: 'HMaterID', sort: true, hide: true }
                    //    , { field: 'HRelationID', title: 'HRelationID', sort: true, hide: true }
                    //    , { field: 'HUnitID', title: 'HSourceID', sort: true, hide: true }
                    //    , { field: '模具产品对应表代码', title: '模具产品对应表代码', width: 120 }
                    //    , { field: '物料代码', title: '物料代码' }
                    //    , { field: '物料名称', title: '物料名称' }
                    //    , { field: '规格型号', title: '规格型号' }
                    //    , { field: '模具代码', title: '模具代码' }
                    //    , { field: '模具名称', title: '模具名称' }
                    //    , { field: '计量单位代码', title: '计量单位代码' }
                    //    , { field: '计量单位名称', title: '计量单位名称' }
                    //    , { field: '方案类型', title: '方案类型' }
                    //    , { field: '模穴数', title: '模穴数' }
                    //    , { field: '开始日期', title: '开始日期' }
                    //    , { field: '结束日期', title: '结束日期' }
                    //    , { field: '审核人', title: '审核人' }
                    //    , { field: '审核日期', title: '审核日期' }
                    //    , { field: '制单人', title: '制单人' }
                    //    , { field: '制单日期', title: '制单日期' }
                    //    , { field: '备注', title: '备注' }
                    //    , { field: '使用标记', title: '使用标记' }
                    //]]
                };
            }
            //#endregion
@@ -449,15 +424,13 @@
                if (checkStatus.data.length === 1) {
                    var ItemID = data[0].HItemID.toString();
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        console.log(ItemID)
                        var wait = layer.load();
                        //逻辑删除方法
                        $.ajax({
                            url: GetWEBURL() + 'DeltetGy_TechnologyParameter',
                            url: GetWEBURL() + 'DeltetGy_MateMould',
                            type: "GET",
                            data: { "HItemID": ItemID, "user": sessionStorage["HUserName"] },
                            data: { "HItemID": ItemID },
                            success: function (result) {
                                console.log('gouba' + result);
                                if (result.count == 1) {
                                    layer.msg(result.Message, { icon: 1 }, function () {
                                        // å¾—到frame索引