| | |
| | | <if test="paramCondition.typeL != null and paramCondition.typeL != ''"> |
| | | and type_l like CONCAT('%',#{paramCondition.typeL},'%') |
| | | </if> |
| | | <if test="paramCondition.typeZ != null and paramCondition.typeZ != ''"> |
| | | and type_Z like CONCAT('%',#{paramCondition.typeZ},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.material.model.params.MaterialInfoParam"> |
| | |
| | | </if> |
| | | <if test="paramCondition.typeL != null and paramCondition.typeL != ''"> |
| | | and type_l like CONCAT('%',#{paramCondition.typeL},'%') |
| | | </if> |
| | | <if test="paramCondition.typeZ != null and paramCondition.typeZ != ''"> |
| | | and type_Z like CONCAT('%',#{paramCondition.typeZ},'%') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | <if test="paramCondition.typeL != null and paramCondition.typeL != ''"> |
| | | and type_l like CONCAT('%',#{paramCondition.typeL},'%') |
| | | </if> |
| | | <if test="paramCondition.typeZ != null and paramCondition.typeZ != ''"> |
| | | and type_Z like CONCAT('%',#{paramCondition.typeZ},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.material.model.params.MaterialInfoParam"> |
| | |
| | | <if test="paramCondition.typeL != null and paramCondition.typeL != ''"> |
| | | and type_l like CONCAT('%',#{paramCondition.typeL},'%') |
| | | </if> |
| | | <if test="paramCondition.typeZ != null and paramCondition.typeZ != ''"> |
| | | and type_Z like CONCAT('%',#{paramCondition.typeZ},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | package cn.stylefeng.guns.modular.zsx.kb.formula.controller; |
| | | |
| | | import cn.stylefeng.guns.modular.zsx.bs.formulaChild.entity.FormulaChildInfo; |
| | | import cn.stylefeng.guns.modular.zsx.bs.formulaChild.model.params.FormulaChildInfoParam; |
| | | import cn.stylefeng.guns.modular.zsx.bs.formulaChild.service.FormulaChildInfoService; |
| | | import cn.stylefeng.guns.modular.zsx.bs.formulaChild.service.impl.FormulaChildInfoServiceImpl; |
| | | import cn.stylefeng.guns.modular.zsx.kb.utils.IPUtil; |
| | | import cn.stylefeng.guns.modular.zsx.pm.salesOrder.service.SalesOrderService; |
| | | import cn.stylefeng.roses.core.mutidatasource.annotion.DataSource; |
| | | import cn.stylefeng.roses.kernel.model.response.ResponseData; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.net.*; |
| | | import java.util.Enumeration; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | |
| | |
| | | @RequestMapping("/kb/formulaView") |
| | | public class FormulaKbController { |
| | | private String PREFIX = "/modular/kb/formula"; |
| | | |
| | | @Autowired |
| | | private FormulaChildInfoService formulaChildInfoService; |
| | | |
| | | /** |
| | | * 跳转å°ä¸»é¡µé¢ |
| | |
| | | return PREFIX + "/formulaView.html"; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces(); |
| | | while (networkInterfaces.hasMoreElements()) { |
| | | NetworkInterface networkInterface = networkInterfaces.nextElement(); |
| | | Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses(); |
| | | while (inetAddresses.hasMoreElements()) { |
| | | InetAddress inetAddress = inetAddresses.nextElement(); |
| | | if (inetAddress instanceof Inet4Address) { // è¿æ»¤IPv4å°å |
| | | System.out.println(inetAddress.getHostAddress()); |
| | | } |
| | | } |
| | | } |
| | | } catch (SocketException e) { |
| | | throw new RuntimeException(e); |
| | | /** |
| | | * æ°å¢æ¥å£ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-09 |
| | | */ |
| | | @RequestMapping("/addFormulaState") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData addFormulaState(FormulaChildInfoParam formulaChildInfoParam) { |
| | | List<FormulaChildInfo> list = this.formulaChildInfoService.list(new QueryWrapper<FormulaChildInfo>() |
| | | .eq("formula_code", formulaChildInfoParam.getFormulaCode()) |
| | | .eq("spare_field_1","") |
| | | .orderByAsc("step_sort") |
| | | ); |
| | | if(list.size()>0){ |
| | | FormulaChildInfo formulaChildInfo = list.get(0); |
| | | formulaChildInfo.setSpareField1("3"); |
| | | this.formulaChildInfoService.saveOrUpdate(formulaChildInfo); |
| | | } |
| | | return ResponseData.success(); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ¥å£ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-10-09 |
| | | */ |
| | | @RequestMapping("/clear") |
| | | @ResponseBody |
| | | @DataSource(name = "self") |
| | | public ResponseData clear(FormulaChildInfoParam formulaChildInfoParam) { |
| | | List<FormulaChildInfo> list = this.formulaChildInfoService.list(new QueryWrapper<FormulaChildInfo>() |
| | | .eq("formula_code", formulaChildInfoParam.getFormulaCode()) |
| | | ); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | FormulaChildInfo formulaChildInfo = list.get(i); |
| | | formulaChildInfo.setSpareField1(""); |
| | | this.formulaChildInfoService.saveOrUpdate(formulaChildInfo); |
| | | } |
| | | return ResponseData.success(); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 产ååè¡¨é¡µé¢ |
| | | * |
| | | * @author ruimin |
| | | * @Date 2023-08-26 |
| | | */ |
| | | @RequestMapping("/productListing") |
| | | public String productListing() { |
| | | return PREFIX + "/bulletBox/productListing.html"; |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢æ¥å£ |
| | | * |
| | | * @author ruimin |
| | |
| | | url: Feng.ctxPath + '/formulaChildInfo/list', |
| | | page: false, |
| | | // height: "full-158", |
| | | height: 460, |
| | | // height: 460, |
| | | height: 400, |
| | | cellMinWidth: 100, |
| | | where: queryData, |
| | | cols: FormulaChildInfo.initColumn(), |
| | |
| | | } |
| | | }); |
| | | |
| | | setInterval(function() { |
| | | $('input[name="sex1"][value="nan1"]').prop('checked', true); |
| | | }, 1000); |
| | | setInterval(function() { |
| | | radioElement.prop('checked', false); |
| | | }, 2000); |
| | | // //redioéªç |
| | | // setInterval(function() { |
| | | // $('input[name="sex1"][value="nan1"]').prop('checked', true); |
| | | // }, 1000); |
| | | // setInterval(function() { |
| | | // radioElement.prop('checked', false); |
| | | // }, 2000); |
| | | |
| | | //Hashå°åçå®ä½ |
| | | var layid = location.hash.replace(/^#test=/, ''); |
| | |
| | | location.hash = 'test='+ $(this).attr('lay-id'); |
| | | }); |
| | | |
| | | /** |
| | | * åºç¡BOM管ç |
| | | */ |
| | | var ProductBomChildInfo = { |
| | | tableId: "productBomChildInfoTable" |
| | | }; |
| | | |
| | | /** |
| | | * åå§åè¡¨æ ¼çå |
| | | */ |
| | | ProductBomChildInfo.initColumn = function () { |
| | | return [[ |
| | | {field: 'id', hide: true, title: '主é®id'}, |
| | | {field: 'opCode', sort: true, title: 'å·¥åºç¼ç '}, |
| | | {field: 'opName', sort: true, title: 'å·¥åºå称'}, |
| | | {field: 'materialCode', sort: true, title: 'ç©æç¼ç '}, |
| | | {field: 'costQty', sort: true, title: 'åè'}, |
| | | {field: 'bomCode', sort: true, title: 'BOMç¼ç '}, |
| | | ]]; |
| | | }; |
| | | |
| | | var queryData = {}; |
| | | queryData['bomCode'] = "301002000021"; |
| | | // 渲æè¡¨æ ¼ |
| | | table.render({ |
| | | elem: '#' + ProductBomChildInfo.tableId, |
| | | url: Feng.ctxPath + '/productBomChildInfo/list', |
| | | page: true, |
| | | height: 460, |
| | | cellMinWidth: 100, |
| | | where: queryData, |
| | | cols: ProductBomChildInfo.initColumn() |
| | | }); |
| | | |
| | | $("#scanCode").keydown(function(event) { |
| | | if (event.keyCode === 13) { |
| | | // æ§è¡æ¨æ³è¦ç代ç |
| | | var ajax = new $ax(Feng.ctxPath + "/kb/formulaView/addFormulaState?formulaCode="+msg.recipeCode); |
| | | var result = ajax.start(); |
| | | table.reload("formulaChildInfoTable") |
| | | return false; // é»æ¢é»è®¤è¡ä¸º |
| | | } |
| | | }); |
| | | |
| | | $("#clear").click(function() { |
| | | var ajax = new $ax(Feng.ctxPath + "/kb/formulaView/clear?formulaCode="+msg.recipeCode); |
| | | var result = ajax.start(); |
| | | table.reload("formulaChildInfoTable") |
| | | }); |
| | | |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | layui.use(['table'], function () { |
| | | var $ = layui.jquery; |
| | | var table = layui.table; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯ç®¡ç |
| | | */ |
| | | var MaterialInfo = { |
| | | tableId: "materialInfoTable" |
| | | }; |
| | | |
| | | var materialType = parent.materialType; |
| | | console.log(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: 'typeZ', sort: true, title: 'ç§ç±»'}, |
| | | ]]; |
| | | }; |
| | | |
| | | table = $.extend(table, {config: {checkName: 'checked'}}); |
| | | |
| | | var queryData = {}; |
| | | queryData['typeZ'] = 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=""; |
| | | } |
| | | |
| | | }); |
| | |
| | | } |
| | | }); |
| | | |
| | | $('#productCode').click(function () { |
| | | layer.open({ |
| | | type: 2, |
| | | area: ['1000px', '600px'], |
| | | title: 'ç©æä¿¡æ¯', |
| | | content: Feng.ctxPath + '/workOrder/productListing', |
| | | success: function (layero, index) { |
| | | window.materialType = '产å'; |
| | | }, |
| | | end: function () { |
| | | let msg = JSON.parse(window.localStorage.getItem('message')); |
| | | $('#productCode').val(msg.materialCode); |
| | | $('#productName').val(msg.materialName); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | //表åæ交äºä»¶ |
| | | form.on('submit(btnSubmit)', function (data) { |
| | | var ajax = new $ax(Feng.ctxPath + "/workOrder/addItem", function (data) { |
| | |
| | | <div class="layui-card-header" style="font-weight: bold"> |
| | | <i class="layui-icon layui-icon-rate-solid"></i>å·¥åä¿¡æ¯ |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-card-body" style="height: 368px"> |
| | | <div class="orderInfo"> |
| | | <span>å·¥åç¼å·</span> |
| | | <span class="mySpan" style="float: right" id="workOrder"></span> |
| | |
| | | <hr class="layui-border-orange"> |
| | | <div class="container"> |
| | | <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> |
| | | </div> |
| | | <div class="container"> |
| | | <input type="radio" name="sex" value="nan" 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> |
| | | <input style="margin-left: 150px" type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>ä¸å
许å¯å¨</span> |
| | | </div> |
| | | <div class="container"> |
| | | <input type="radio" name="sex" value="nan" title="ç·"> |
| | | <span>åæ ¼å®æ</span> |
| | | <input style="margin-left: 150px" type="radio" name="sex" value="nan" title="ç·"> |
| | | <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> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-tab" lay-filter="test"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this" lay-id="11">é¦é¡µ</li> |
| | | <li lay-id="22">å·¥åºç¶æ</li> |
| | | <li lay-id="33">è£
é
ééæ¸
å</li> |
| | | <li lay-id="44">å·¥èºåæ°</li> |
| | | <li lay-id="55">ä¸åæ ¼è´¨éæ°æ®</li> |
| | | <li lay-id="22">BOMæ¸
å</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table class="layui-table" id="formulaChildInfoTable" lay-filter="formulaChildInfoTable"></table> |
| | | <input id="scanCode" name="scanCode" placeholder="请æ«æç©ææ¡ç " type="text" class="layui-input"/> |
| | | </div> |
| | | <div class="layui-tab-item"> |
| | | å
容3 |
| | | <table class="layui-table" id="productBomChildInfoTable" lay-filter="productBomChildInfoTable"></table> |
| | | </div> |
| | | <div class="layui-tab-item">å
容3</div> |
| | | <div class="layui-tab-item">å
容4</div> |
| | | <div class="layui-tab-item">å
容5</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <img id="imgs" width="320px" height="270px"> |
| | | <button type="button" class="layui-btn layui-btn-primary" id="clear">å
¥ç«</button> |
| | | </div> |
| | | </div> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | @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"> æ交 </button> |
| | | <button type="reset" id="reset" class="layui-btn layui-btn-primary" ew-event="closeDialog"> å
³é </button> |
| | | </div> |
| | | |
| | | |
| | | @} |
| | |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">产åç¼å·<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="productCode" name="productCode" placeholder="请è¾å
¥äº§åç¼å·" type="text" class="layui-input" lay-verify="required" required/> |
| | | <input id="productCode" name="productCode" placeholder="请è¾å
¥äº§åç¼å·" type="text" class="layui-input" lay-verify="required" required autocomplete="off"/> |
| | | <input id="productName" name="productName" placeholder="请è¾å
¥äº§åå称" type="text" hidden/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">产åå称<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="productName" name="productName" placeholder="请è¾å
¥äº§åå称" type="text" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline layui-col-md6">--> |
| | | <!-- <label class="layui-form-label">产åå称<span style="color: red;">*</span></label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input id="productName" name="productName" placeholder="请è¾å
¥äº§åå称" type="text" class="layui-input" lay-verify="required" required/>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">计åæ°é<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="planQty" name="planQty" placeholder="请è¾å
¥è®¡åæ°é" type="number" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">å®ææ°é<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |
| | | <input id="produceQty" name="produceQty" placeholder="请è¾å
¥å®ææ°é" type="number" class="layui-input" lay-verify="required" required/> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-inline layui-col-md6">--> |
| | | <!-- <label class="layui-form-label">å®ææ°é<span style="color: red;">*</span></label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input id="produceQty" name="produceQty" placeholder="请è¾å
¥å®ææ°é" type="number" class="layui-input" lay-verify="required" required/>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-inline layui-col-md6"> |
| | | <label class="layui-form-label">ä¸çº¿æ°é<span style="color: red;">*</span></label> |
| | | <div class="layui-input-block"> |