| | |
| | | } |
| | | |
| | | /** |
| | | * BOMåè¡¨é¡µé¢ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-08-26 |
| | | */ |
| | | @RequestMapping("/bomListing") |
| | | public String bomListing() { |
| | | return PREFIX + "/bulletBox/bomListing.html"; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ¥å£ |
| | | * |
| | | * @author ruimin |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | layui.use(['table'], function () { |
| | | var $ = layui.jquery; |
| | | var table = layui.table; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯ç®¡ç |
| | | */ |
| | | var MaterialInfo = { |
| | | tableId: "materialInfoTable" |
| | | }; |
| | | |
| | | var productCode = parent.productCode; |
| | | |
| | | $('#serch').click(function(){ |
| | | var queryData = {}; |
| | | queryData['productCode'] = productCode; |
| | | queryData['bomCode'] = $("#bomCode").val(); |
| | | queryData['bomName'] = $("#bomName").val(); |
| | | table.reload(MaterialInfo.tableId, { |
| | | where: queryData, page: {curr: 1} |
| | | }); |
| | | }); |
| | | /** |
| | | * 缺ææ¥è¦åå§åè¡¨æ ¼çå |
| | | */ |
| | | MaterialInfo.initColumn = function () { |
| | | return [[ |
| | | {type: 'radio'}, |
| | | {field: 'id', hide: true, title: '主é®id'}, |
| | | {field: 'bomCode', sort: true, title: 'BOMç¼ç '}, |
| | | {field: 'bomName', sort: true, title: 'BOMå称'}, |
| | | {field: 'productCode', sort: true, title: '产åç¼ç '}, |
| | | {field: 'productName', sort: true, title: '产åå称'}, |
| | | ]]; |
| | | }; |
| | | |
| | | table = $.extend(table, {config: {checkName: 'checked'}}); |
| | | |
| | | var queryData = {}; |
| | | queryData['productCode'] = productCode; |
| | | var tableResult = table.render({ |
| | | elem: '#' + MaterialInfo.tableId, |
| | | url: Feng.ctxPath + '/productBomInfo/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=""; |
| | | } |
| | | |
| | | }); |
| | |
| | | {field: 'id', hide: true, title: '主é®id'}, |
| | | {field: 'materialCode', sort: true, title: '产åç¼å·'}, |
| | | {field: 'materialName', sort: true, title: '产åå称'}, |
| | | {field: 'typeL', 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 : |
| | | } |
| | | } |
| | | }, |
| | | ]]; |
| | | }; |
| | | |
| | |
| | | layer.open({ |
| | | type: 2, |
| | | area: ['1000px', '600px'], |
| | | title: 'ç©æä¿¡æ¯', |
| | | title: '产åä¿¡æ¯', |
| | | content: Feng.ctxPath + '/workOrder/productListing', |
| | | success: function (layero, index) { |
| | | window.materialType = 'PRODUCE'; |
| | |
| | | }); |
| | | }); |
| | | |
| | | $('#bomCode').click(function () { |
| | | layer.open({ |
| | | type: 2, |
| | | area: ['1000px', '600px'], |
| | | title: 'BOMä¿¡æ¯', |
| | | content: Feng.ctxPath + '/workOrder/bomListing', |
| | | success: function (layero, index) { |
| | | window.productCode = $('#productCode').val(); |
| | | }, |
| | | end: function () { |
| | | let msg = JSON.parse(window.localStorage.getItem('message')); |
| | | console.log(msg); |
| | | $('#bomCode').val(msg.bomCode); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //表åæ交äºä»¶ |
| | | form.on('submit(btnSubmit)', function (data) { |
| | | var ajax = new $ax(Feng.ctxPath + "/workOrder/addItem", function (data) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @layout("/common/_form.html",{js:["/assets/modular/pm/workOrder/bulletBox/bomListing.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">BOMç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="bomCode" name="bomCode" placeholder="请è¾å
¥äº§åç¼å·" type="text" class="layui-input"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md4"> |
| | | <label class="layui-form-label">BOMå称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="bomName" name="bomName" 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"> æ交 </button> |
| | | <button type="reset" id="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog"> å
³é </button> |
| | | </div> |
| | | |
| | | |
| | | @} |