懒羊羊
2023-11-14 abb175b29054b9708af27136c035b1b7351dcd20
优化
已修改14个文件
已添加2个文件
419 ■■■■■ 文件已修改
guns-base-support/guns-sys/src/main/webapp/pages/login.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/pm/salesOrder/mapper/mapping/SalesOrderMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/resources/opcua.properties 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/bs/materialInfo/materialInfo.js 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/bs/materialInfo/materialInfo_add.js 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/bs/materialInfo/materialInfo_edit.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/bs/productBomInfo/productBomInfo_add.js 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/bulletBox/productListing.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder.js 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder_add.js 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/pm/workOrder/bulletBox/productListing.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/assets/modular/pm/workOrder/workOrder_add.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/bs/materialInfo/materialInfo_add.html 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/bs/materialInfo/materialInfo_edit.html 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/kb/formula/formulaView.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-vip-main/src/main/webapp/pages/modular/pm/salesOrder/bulletBox/productListing.html 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
guns-base-support/guns-sys/src/main/webapp/pages/login.html
@@ -201,7 +201,7 @@
        </div>-->
    </div>
</div>
<div class="login-copyright">copyright Â© 2020 stylefeng.cn all rights reserved.</div>
<!--<div class="login-copyright">copyright Â© 2020 stylefeng.cn all rights reserved.</div>-->
@/* åŠ å…¥contextPath属性和session超时的配置 */
<script type="text/javascript">
guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/pm/salesOrder/mapper/mapping/SalesOrderMapper.xml
@@ -125,6 +125,7 @@
            <if test="paramCondition.state != null and paramCondition.state != ''">
                and state like CONCAT('%',#{paramCondition.state},'%')
            </if>
        order by create_time desc
    </select>
    <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.pm.salesOrder.model.params.SalesOrderParam">
guns-vip-main/src/main/resources/opcua.properties
@@ -1,12 +1,12 @@
#opcua server
opcua.server.endpoint.url=opc.tcp://127.0.0.1:49320
opcua.server.idp.username=administrator
opcua.server.idp.password=yyt@8888888888
opcua.server.idp.username=""
opcua.server.idp.password=""
#opcua client
opcua.client.app.name=plc
opcua.client.app.uri=urn:Yyt_PC:UnifiedAutomation:UaExpert
opcua.client.cert.path=C:/Users/30672/Desktop
opcua.client.cert.path=C:/mes/
opcua.client.cert.file=Yyt_PC-client.pfx
opcua.client.cert.alias=jlclient-ai
opcua.client.cert.common.name=UaClient@Jellyleo
guns-vip-main/src/main/webapp/assets/modular/bs/materialInfo/materialInfo.js
@@ -21,17 +21,33 @@
            {field: 'id', hide: true, title: '主键id'},
            {field: 'materialCode', sort: true, title: '物料编号',width:130},
            {field: 'materialName', sort: true, title: '物料名称',width:180},
            {field: 'materialView', sort: true, title: '视图'},
            {field: 'typeZ', sort: true, title: '种类'},
            {field: 'typeL', sort: true, title: '类型'},
            // {field: 'materialView', sort: true, title: '视图'},
            // {field: 'typeZ', sort: true, title: '种类'},
            {
                field: 'typeL', align: "center", title: '类型', templet: function (d) {
                    console.log(d.typeL)
                    switch(d.typeL){
                        case "PRODUCE" :
                            return "产品";
                            break;
                        case "SEMIFINISHEDPRODUCTS" :
                            return "半成品";
                            break;
                        case "COMPONENTSANDPARTS" :
                            return "零部件";
                            break;
                        default :
                    }
                }
            },
            {field: 'unit', sort: true, title: '单位'},
            {field: 'matterVersion', sort: true, title: '版本'},
            // {field: 'matterVersion', sort: true, title: '版本'},
            {field: 'remarks', sort: true, title: '备注'},
            {field: 'createUser', sort: true, title: '创建用户',width:120},
            {field: 'createTime', sort: true, title: '创建时间',width:160},
            {field: 'updateUser', sort: true, title: '更改用户',width:120},
            {field: 'updateTime', sort: true, title: '更改时间',width:160},
            {field: 'erpSpec', sort: true, title: ''},
            // {field: 'erpSpec', sort: true, title: ''},
            {fixed: 'right',width: 125, minWidth: 125, align: 'center', toolbar: '#tableBar', title: '操作'}
        ]];
    };
guns-vip-main/src/main/webapp/assets/modular/bs/materialInfo/materialInfo_add.js
@@ -26,33 +26,20 @@
    var form = layui.form;
    var admin = layui.admin;
    getDictType();
    function getDictType(){
        $.ajax({
            type: "POST",
            contentType: "application/json;charset=UTF-8",
            url: Feng.ctxPath + '/dict/list?dictTypeId=1724238087352172546',
            success: function (result) {
                $.each(result.data, function (index, value) {
                    $('#typeL').append(new Option(value.name,value.code));// ä¸‹æ‹‰èœå•é‡Œæ·»åŠ å…ƒç´ 
                });
                layui.form.render("select");//重新渲染 å›ºå®šå†™æ³•
            },
        });
    }
    //表单提交事件
    form.on('submit(btnSubmit)', function (data) {
guns-vip-main/src/main/webapp/assets/modular/bs/materialInfo/materialInfo_edit.js
@@ -26,38 +26,28 @@
    var form = layui.form;
    var admin = layui.admin;
    //获取详情信息,填充表单
    var ajax = new $ax(Feng.ctxPath + "/materialInfo/detail?id=" + Feng.getUrlParam("id"));
    var result = ajax.start();
    form.val('materialInfoForm', result.data);
    var result1 = ajax.start();
    form.val('materialInfoForm', result1.data);
    getDictType();
    function getDictType(){
        $.ajax({
            type: "POST",
            contentType: "application/json;charset=UTF-8",
            url: Feng.ctxPath + '/dict/list?dictTypeId=1724238087352172546',
            success: function (result) {
                $.each(result.data, function (index, value) {
                    $('#typeL').append(new Option(value.name,value.code));// ä¸‹æ‹‰èœå•é‡Œæ·»åŠ å…ƒç´ 
                });
                $('#typeL').val(result1.data.typeL)
                layui.form.render("select");//重新渲染 å›ºå®šå†™æ³•
            },
        });
    }
    //表单提交事件
    form.on('submit(btnSubmit)', function (data) {
guns-vip-main/src/main/webapp/assets/modular/bs/productBomInfo/productBomInfo_add.js
@@ -26,33 +26,22 @@
    var form = layui.form;
    var admin = layui.admin;
    $('#productCode').click(function () {
        layer.open({
            type: 2,
            area: ['1000px', '600px'],
            title: '物料信息',
            content: Feng.ctxPath + '/workOrder/productListing',
            success: function (layero, index) {
                window.materialType = 'PRODUCE';
            },
            end: function () {
                let msg = JSON.parse(window.localStorage.getItem('message'));
                $('#productCode').val(msg.materialCode);
                $('#productName').val(msg.materialName);
            }
        });
    });
    //表单提交事件
    form.on('submit(btnSubmit)', function (data) {
guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/bulletBox/productListing.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
layui.use(['table'], function () {
    var $ = layui.jquery;
    var table = layui.table;
    /**
     * ç‰©æ–™ä¿¡æ¯ç®¡ç†
     */
    var MaterialInfo = {
        tableId: "materialInfoTable"
    };
    var materialType = parent.materialType;
    $('#serch').click(function(){
        var queryData = {};
        queryData['typeZ'] = materialType;
        queryData['materialName'] = $("#materialName").val();
        queryData['materialCode'] = $("#materialCode").val();
        table.reload(MaterialInfo.tableId, {
            where: queryData, page: {curr: 1}
        });
    });
    /**
     * ç¼ºæ–™æŠ¥è­¦åˆå§‹åŒ–表格的列
     */
    MaterialInfo.initColumn = function () {
        return [[
            {type: 'radio'},
            {field: 'id', hide: true, title: '主键id'},
            {field: 'materialCode', sort: true, title: '产品编号'},
            {field: 'materialName', sort: true, title: '产品名称'},
            {field: 'typeL', sort: true, title: '类型'},
        ]];
    };
    table =  $.extend(table, {config: {checkName: 'checked'}});
    var queryData = {};
    queryData['typeL'] = materialType;
    var tableResult = table.render({
        elem: '#' + MaterialInfo.tableId,
        url: Feng.ctxPath + '/materialInfo/list',
        page: true,
        where:queryData,
        cellMinWidth: 80,
        cols: MaterialInfo.initColumn()
    });
    let Msg='';
    table.on('row(materialInfoTable)',function (data) {
        Msg = data.data;
    })
    $('#btnSubmit').click(function(){
        clearType();
        if (Msg !=='' ){
            // åˆ¤æ–­æ˜¯å¦ç‚¹å‡»çš„是确定
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            window.localStorage.setItem('message',JSON.stringify(Msg));
            parent.layer.close(index);
        }
        else {
            Feng.error("请选择一条数据!")
        }
    });
    $('#reset').click(function(){
        clearType();
        Msg = "";
        window.localStorage.clear();
    });
    function clearType(){
        parent.materialType="";
    }
});
guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder.js
@@ -99,10 +99,25 @@
    $('#split').click(function (){
        var checkRows = table.checkStatus(SalesOrder.tableId);
        console.log(checkRows.data);
        console.log(checkRows);
        console.log(checkRows.data.state);
        if (checkRows.data.length !== 1) {
            Feng.error("请选择一条要拆分的订单");
            return;
        }
        if (checkRows.data[0].state === "1") {
        window.location.href = Feng.ctxPath + '/salesOrder/split?id=' + checkRows.data[0].id
        }else {
            Feng.error("已拆分下发订单禁止重复拆分");
            return;
        }
        // if (checkRows.data.state !== "1") {
        //     Feng.error("已拆分下发订单禁止重复拆分");
        //     return;
        // }
        // window.location.href = Feng.ctxPath + '/salesOrder/split?id=' + checkRows.data[0].id
    });
@@ -193,9 +208,13 @@
    // ç»‘定下发
    $('#distribute').click(function () {
        var checkRows = table.checkStatus(SalesOrder.tableId);
        console.log(checkRows);
        console.log("checkRows.length=========="+checkRows.data.length)
        if(checkRows.data.length === 1){
        if(checkRows.data[0].state === "3"){
            Feng.error("该工单已下发完毕!");
            return;
            }
        }
        if (checkRows.data.length !== 1) {
            Feng.error("请选择一条要下发的订单");
@@ -204,25 +223,6 @@
        var checkRows = table.checkStatus(SalesOrder.tableId);
        console.log(checkRows.data);
        window.location.href = Feng.ctxPath + '/salesOrder/bindParam?id=' + checkRows.data[0].id
        // layer.open({
        //     type: 2,
        //     area: ['1000px', '600px'],
        //     title: '下发订单',
        //     content:  Feng.ctxPath + '/salesOrder/bindParam',
        //     success: function (layero, index) {
        //         // let body = layer.getChildFrame('body', index);
        //         // body.find('form').find('#salesOrderList').val(checkRows.data);
        //         // èŽ·å–子页面的iframe
        //         var iframe = window['layui-layer-iframe'+index];
        //         // å‘子页面的全局函数child传参
        //         iframe.child(checkRows.data);
        //     },
        //     end: function () {
        //         table.reload(SalesOrder.tableId, {
        //             where: null, page: {curr: 1}
        //         });
        //     }
        // });
    });
    // å·¥å…·æ¡ç‚¹å‡»äº‹ä»¶
guns-vip-main/src/main/webapp/assets/modular/pm/salesOrder/salesOrder_add.js
@@ -38,30 +38,19 @@
    //初始化时间选择器
    laydate.render({
        elem: '#planStartTime',
        type: 'datetime'
        // type: 'datetime'
    });
    //初始化时间选择器
    laydate.render({
        elem: '#planEndTime',
        type: 'datetime'
        // type: 'datetime'
    });
    //初始化时间选择器
    laydate.render({
        elem: '#deliveryTime',
        type: 'datetime'
        // type: 'datetime'
    });
    $(document).ready(function () {
        // $.ajax({
        //     type: "POST",
        //     contentType: "application/json;charset=UTF-8",
        //     url: Feng.ctxPath + '/workshopInfo/list',
        //     success: function (result) {
        //         $.each(result.data, function (index, value) {
        //             $('#workshopCode').append(new Option(value.workshopCode));// ä¸‹æ‹‰èœå•é‡Œæ·»åŠ å…ƒç´ 
        //         });
        //         layui.form.render("select");//重新渲染 å›ºå®šå†™æ³•
        //     },
        // });
        $.ajax({
            type: "POST",
            contentType: "application/json;charset=UTF-8",
@@ -75,27 +64,22 @@
        });
    });
    // form.on("select", function (data) {
    //     switch(data.elem.id){
    //         case 'workshopCode':
    //             $.ajax({
    //                 type: "POST",
    //                 contentType: "application/json;charset=UTF-8",
    //                 url: Feng.ctxPath + '/lineInfo/list?workshopCode='+data.value,
    //                 success: function (result) {
    //                     $('#productionLineCode').empty();
    //                     $.each(result.data, function (index, value) {
    //                         $('#lineCode').append(new Option(value.lineCode));// ä¸‹æ‹‰èœå•é‡Œæ·»åŠ å…ƒç´ 
    //                     });
    //                     if($('#workshopCode').val() === ""||$('#workshopCode').val() === null){
    //                         layui.$('#lineCode').empty(); // èŽ·å–select元素
    //                     }
    //                     layui.form.render("select");//重新渲染 å›ºå®šå†™æ³•
    //                 },
    //             });
    //             break;
    //     }
    // });
    $('#productCode').click(function () {
        layer.open({
            type: 2,
            area: ['1000px', '600px'],
            title: '物料信息',
            content: Feng.ctxPath + '/workOrder/productListing',
            success: function (layero, index) {
                window.materialType = 'PRODUCE';
            },
            end: function () {
                let msg = JSON.parse(window.localStorage.getItem('message'));
                $('#productCode').val(msg.materialCode);
                $('#productName').val(msg.materialName);
            }
        });
    });
    //表单提交事件
    form.on('submit(btnSubmit)', function (data) {
guns-vip-main/src/main/webapp/assets/modular/pm/workOrder/bulletBox/productListing.js
@@ -11,7 +11,6 @@
    };
    var materialType = parent.materialType;
    console.log(materialType)
    $('#serch').click(function(){
        var queryData = {};
@@ -31,14 +30,14 @@
            {field: 'id', hide: true, title: '主键id'},
            {field: 'materialCode', sort: true, title: '产品编号'},
            {field: 'materialName', sort: true, title: '产品名称'},
            {field: 'typeZ', sort: true, title: '种类'},
            {field: 'typeL', sort: true, title: '类型'},
        ]];
    };
    table =  $.extend(table, {config: {checkName: 'checked'}});
    var queryData = {};
    queryData['typeZ'] = materialType;
    queryData['typeL'] = materialType;
    var tableResult = table.render({
        elem: '#' + MaterialInfo.tableId,
        url: Feng.ctxPath + '/materialInfo/list',
guns-vip-main/src/main/webapp/assets/modular/pm/workOrder/workOrder_add.js
@@ -107,7 +107,7 @@
            title: '物料信息',
            content: Feng.ctxPath + '/workOrder/productListing',
            success: function (layero, index) {
                window.materialType = '产品';
                window.materialType = 'PRODUCE';
            },
            end: function () {
                let msg = JSON.parse(window.localStorage.getItem('message'));
guns-vip-main/src/main/webapp/pages/modular/bs/materialInfo/materialInfo_add.html
@@ -26,16 +26,19 @@
                            <input id="materialView" name="materialView" placeholder="请输入视图" type="text" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">种类<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="typeZ" name="typeZ" placeholder="请输入种类" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
<!--                    <div class="layui-inline layui-col-md12">-->
<!--                        <label class="layui-form-label">种类<span style="color: red;">*</span></label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input id="typeZ" name="typeZ" placeholder="请输入种类" type="text" class="layui-input" lay-verify="required" required/>-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">类型<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="typeL" name="typeL" placeholder="请输入类型" type="text" class="layui-input" lay-verify="required" required/>
                            <select id="typeL" name="typeL" lay-filter="opType" lay-verify="required" required>
                                <option value="">请选择类型</option>
                            </select>
<!--                            <input id="typeL" name="typeL" placeholder="请输入类型" type="text" class="layui-input" lay-verify="required" required/>-->
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
guns-vip-main/src/main/webapp/pages/modular/bs/materialInfo/materialInfo_edit.html
@@ -26,16 +26,19 @@
                            <input id="materialView" name="materialView" placeholder="请输入视图" type="text" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">种类<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="typeZ" name="typeZ" placeholder="请输入种类" type="text" class="layui-input" lay-verify="required" required/>
                        </div>
                    </div>
<!--                    <div class="layui-inline layui-col-md12">-->
<!--                        <label class="layui-form-label">种类<span style="color: red;">*</span></label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <input id="typeZ" name="typeZ" placeholder="请输入种类" type="text" class="layui-input" lay-verify="required" required/>-->
<!--                        </div>-->
<!--                    </div>-->
                    <div class="layui-inline layui-col-md12">
                        <label class="layui-form-label">类型<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="typeL" name="typeL" placeholder="请输入类型" type="text" class="layui-input" lay-verify="required" required/>
                            <select id="typeL" name="typeL" lay-filter="opType" lay-verify="required" required>
                                <option value="">请选择类型</option>
                            </select>
<!--                            <input id="typeL" name="typeL" placeholder="请输入类型" type="text" class="layui-input" lay-verify="required" required/>-->
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md12">
guns-vip-main/src/main/webapp/pages/modular/kb/formula/formulaView.html
@@ -74,13 +74,13 @@
                        <input type="radio" id="sex1" name="sex1" value="nan1" title="男">
                        <span>工件到位</span>
                        <input style="margin-left: 150px" type="radio" name="sex" value="nan" title="男">
                        <span>工件入站</span>
                        <span>允许启动</span>
                    </div>
                    <div class="container">
                        <input type="radio" name="sex" value="nan" title="男">
                        <span>工件出站</span>
                        <span>允许放行</span>
                        <input style="margin-left: 150px" type="radio" name="test" value="test1" title="男">
                        <span>工件完成</span>
                        <span>工作完成</span>
                    </div>
                </div>
            </div>
guns-vip-main/src/main/webapp/pages/modular/pm/salesOrder/bulletBox/productListing.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
@layout("/common/_form.html",{js:["/assets/modular/pm/workOrder/bulletBox/productListing.js"]}){
    <div class="layui-fluid" style="padding-bottom: 75px;">
        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-form-item layui-row">
                    <input id= "id" name="id" type="hidden"/>
                    <input id= "materialType" name="materialType" type="hidden"/>
                    <div class="layui-inline layui-col-md4">
                        <label class="layui-form-label">物料编号<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="materialCode" name="materialCode" placeholder="请输入产品编号" type="text" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md4">
                        <label class="layui-form-label">物料名称<span style="color: red;">*</span></label>
                        <div class="layui-input-block">
                            <input id="materialName" name="materialName" placeholder="请输入物料名称" type="text" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-inline layui-col-md-offset3">
                        <button class="layui-btn" id="serch">搜索</button>
                    </div>
                </div>
                <table class="layui-table" id="materialInfoTable" lay-filter="materialInfoTable"></table>
            </div>
        </div>
    </div>
<div class="form-group-bottom text-center">
    <button class="layui-btn" id="btnSubmit">&emsp;提交&emsp;</button>
    <button type="reset" id="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog">&emsp;关闭&emsp;</button>
</div>
@}