| | |
| | | @RequestMapping(value = "/locNormal/pda/out/query") |
| | | @ManagerAuth(memo = "pda出库查询") |
| | | @Transactional |
| | | public R locNormalPdaOutQuery(String matnr, String warehouse) { |
| | | public R locNormalPdaOutQuery(String matnr, String warehouse, String billNo) { |
| | | List<LocNormal> list = new ArrayList<>(); |
| | | list = locNormalService.pdaLocNormalQuery(matnr, warehouse); |
| | | list = locNormalService.pdaLocNormalQuery(matnr, warehouse, billNo); |
| | | return R.ok(list); |
| | | } |
| | | |
| | |
| | | @RequestMapping("/locDetl") |
| | | @ManagerAuth |
| | | public R getLocDetl(@RequestParam(required = false)String locNo, |
| | | @RequestParam(required = false)String matNo){ |
| | | @RequestParam(required = false)String matNo, |
| | | @RequestParam(required = false)String supplier |
| | | ){ |
| | | if (!Cools.isEmpty(locNo)) { |
| | | LocMast locMast = locMastService.selectById(locNo); |
| | | if (null == locMast || !"F".equals(locMast.getLocSts())) { |
| | |
| | | }); |
| | | return R.ok().add(res); |
| | | } |
| | | if (!Cools.isEmpty(supplier)) { |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | .eq("supplier", supplier).orderBy("appe_time", false)); |
| | | List<MobileLocDetlVo> res = new ArrayList<>(); |
| | | locDetls.forEach(locDetl -> { |
| | | MobileLocDetlVo vo = new MobileLocDetlVo(); |
| | | vo.setLocNo(locDetl.getLocNo()); |
| | | vo.setMatnr(locDetl.getMatnr()); |
| | | vo.setMaktx(locDetl.getMaktx()); |
| | | vo.setCount(locDetl.getAnfme()); |
| | | res.add(vo); |
| | | }); |
| | | return R.ok().add(res); |
| | | } |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | |
| | |
| | | vo.setMatName(waitPakin.getMaktx()); |
| | | vo.setCount(waitPakin.getAnfme()); |
| | | vo.setMnemonic(waitPakin.getMnemonic()); |
| | | vo.setSupplier(waitPakin.getSupplier()); |
| | | vo.setAltme(waitPakin.getAltme()); |
| | | vo.setType(waitPakin.getType()); |
| | | vo.setLgnum(waitPakin.getLgnum()); |
| | | vos.add(vo); |
| | | } |
| | | } |
| | |
| | | |
| | | private String mnemonic; |
| | | |
| | | private String supplier; |
| | | |
| | | private String lgnum; |
| | | |
| | | private String type; |
| | | |
| | | private String altme; |
| | | } |
| | |
| | | |
| | | public void pdaLocNormalIn(List<LocNormal> list); |
| | | |
| | | public List<LocNormal> pdaLocNormalQuery(@Param("matnr") String matnr, @Param("warehouse") String warehouse); |
| | | public List<LocNormal> pdaLocNormalQuery(@Param("matnr") String matnr, @Param("warehouse") String warehouse, @Param("billNo") String billNo); |
| | | |
| | | public void pdaLocNormalOut1(@Param("id") Integer id,@Param("matnr") String matnr, @Param("modiUser") Long modiUser, @Param("modiTime") Date modiTime, @Param("warehouse") String warehouse); |
| | | |
| | |
| | | |
| | | public void pdaLocNormalIn(List<LocNormal> list); |
| | | |
| | | public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse); |
| | | public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse, String billNo); |
| | | |
| | | public void pdaLocNormalOut(List<LocNormal> list); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse) { |
| | | return baseMapper.pdaLocNormalQuery(matnr, warehouse); |
| | | public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse, String billNo) { |
| | | return baseMapper.pdaLocNormalQuery(matnr, warehouse, billNo); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <insert id="pdaLocNormalIn"> |
| | | BEGIN |
| | | <foreach collection="list" item="item" index="index"> |
| | | INSERT INTO asr_loc_normal (matnr, maktx, anfme, warehouse, state, appe_user, appe_time) |
| | | INSERT INTO asr_loc_normal (matnr, maktx, anfme, mnemonic, supplier, warehouse, state, lgnum, type, altme, |
| | | appe_user, appe_time) |
| | | VALUES (#{item.matnr,jdbcType=VARCHAR}, #{item.maktx,jdbcType=VARCHAR}, #{item.anfme,jdbcType=DECIMAL}, |
| | | #{item.warehouse,jdbcType=VARCHAR}, '1', #{item.appeUser,jdbcType=DECIMAL}, |
| | | #{item.appeTime,jdbcType=TIMESTAMP}) |
| | | #{item.mnemonic, jdbcType=VARCHAR}, #{item.supplier, jdbcType=VARCHAR}, |
| | | #{item.warehouse,jdbcType=VARCHAR}, '1', |
| | | #{item.lgnum, jdbcType=VARCHAR}, #{item.type, jdbcType=VARCHAR}, |
| | | #{item.altme, jdbcType=VARCHAR}, |
| | | #{item.appeUser,jdbcType=DECIMAL},#{item.appeTime,jdbcType=TIMESTAMP}) |
| | | </foreach> |
| | | END; |
| | | </insert> |
| | | |
| | | <select id="pdaLocNormalQuery" resultMap="BaseResultMap"> |
| | | select id, matnr,maktx, warehouse,anfme from asr_loc_normal |
| | | where warehouse = #{warehouse,jdbcType=VARCHAR} and matnr =#{matnr,jdbcType=VARCHAR} |
| | | where 1 = 1 |
| | | <if test="warehouse != null and warehouse != ''"> |
| | | and warehouse = #{warehouse,jdbcType=VARCHAR} |
| | | </if> |
| | | <if test="matnr != null and matnr != ''"> |
| | | and matnr =#{matnr,jdbcType=VARCHAR} |
| | | </if> |
| | | <if test="billNo != null and billNo != ''"> |
| | | and supplier = #{billNo, jdbcType=VARCHAR} |
| | | </if> |
| | | and state = '1' COLLATE Chinese_PRC_CS_AS |
| | | </select> |
| | | |
| | |
| | | function getCol() { |
| | | var cols = []; |
| | | cols.push( |
| | | {field: 'orderNo', align: 'center', title: '订单编号'} |
| | | , {field: 'col1', align: 'center', title: '订单名称'} |
| | | , {field: 'col2', align: 'center', title: '订单详情'} |
| | | , {field: 'col3', align: 'center', title: '订单客户'} |
| | | , {field: 'col4', align: 'center', title: '订单状态'} |
| | | {field: 'orderCode', align: 'center', title: '订单编号'} |
| | | , {field: 'orderDate', align: 'center', title: '订单日期'} |
| | | , {field: 'invCode', align: 'center', title: '物料编码'} |
| | | , {field: 'invName', align: 'center', title: '物料名称'} |
| | | , {field: 'invStd', align: 'center', title: '规格型号'} |
| | | , {field: 'invUnit', align: 'center', title: '单位'} |
| | | , {field: 'orderQty', align: 'center', title: '订单数量'} |
| | | , {field: 'izMrp', align: 'center', title: '是否mrp计算', hide: true} |
| | | , {field: 'productQty', align: 'center', title: '生产任务单数量'} |
| | | , {field: 'izReceive', align: 'center', title: '是否收料', hide: true} |
| | | , {field: 'inQty', align: 'center', title: '产成品入库数量'} |
| | | , {field: 'outQty', align: 'center', title: '发货数量'} |
| | | , {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 80} |
| | | ); |
| | | return cols; |
| | |
| | | // url: baseUrl+'/matCode/list/auth', |
| | | data: [ |
| | | { |
| | | "orderNo": 20210315000001, |
| | | "col1": "西班牙xx 210315号", |
| | | "col2": "兰博基尼童车 5000台", |
| | | "col3": "西班牙xx儿童玩具公司", |
| | | "col4": "生产中", |
| | | "orderCode": 20210315000001, |
| | | "orderDate": "2021-03-26 13:40", |
| | | "invCode": "CPXXX00123", |
| | | "invName": "兰博基尼授权儿童车", |
| | | "invStd": "21×25", |
| | | "invUnit": "辆", |
| | | "orderQty": 300, |
| | | "izMrp": "否", |
| | | "productQty": 150, |
| | | "izReceive": "是", |
| | | "inQty": 50, |
| | | "outQty": 0, |
| | | } |
| | | ], |
| | | page: true, |
| | |
| | | <!-- 头部 --> |
| | | <header> |
| | | <div class="layui-input-inline" style="margin-top: 5px"> |
| | | <label class="layui-form-label"> 单号</label> |
| | | <input class="layui-input" id="billNo" oninput="find(this)" placeholder="扫码 / 输入" autocomplete="off" style="width: 70%; height: 40px; margin-right: 0;"> |
| | | <label class="layui-form-label" style="margin-left: 16px">单号</label> |
| | | <input class="layui-input" id="billNo" oninput="find(this)" placeholder="扫码 / 输入" autocomplete="off" style="width: 175px; height: 40px; margin-right: 0;"> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">托盘码</label> |
| | | <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | <input class="layui-input" style="width: 175px;" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off"> |
| | | </div> |
| | | </header> |
| | | |
| | |
| | | <header class="layui-form"> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">单号</label> |
| | | <div class="layui-input-inline" style="width: 175px"> |
| | | <input id="billNo" class="layui-input" autocomplete="off" oninput="find(this)"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库区</label> |
| | | <div class="layui-input-inline" style="margin-left: 5px;width: 180px"> |
| | | <div class="layui-input-inline" style="width: 175px"> |
| | | <select id="uuid"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | |
| | | document.getElementById("billNo").focus(); |
| | | |
| | | tableIns = table.render({ |
| | | elem: '#chooseData', |
| | |
| | | maktx: item.matName, |
| | | anfme: item.count, |
| | | warehouse: barcode, |
| | | mnemonic: item.mnemonic, |
| | | supplier: item.supplier, |
| | | lgnum: item.lgnum, |
| | | type: item.type, |
| | | altme: item.altme, |
| | | }); |
| | | }); |
| | | |
| | |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | reset(true); |
| | | tips("组托成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 根据通知单号查询物料详情 |
| | | */ |
| | | function find(el) { |
| | | var billNo = el.value; |
| | | if (isEmpty(billNo)) { |
| | | return; |
| | | } |
| | | // 赋值前清空表格 |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/mobile/bill/query/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | billNo: billNo |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | console.log('单号数据', res.data); |
| | | var data = res.data; |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | addTableData(data[i]); |
| | | } |
| | | } |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | layer.closeAll(); |
| | | $("#billNo").val(""); |
| | | $("#uuid").val(""); |
| | | layui.form.render('select'); |
| | | } |
| | | </script> |
| | | </html> |
| | |
| | | } |
| | | |
| | | function reset() { |
| | | // $('#warehouse1').val(""); |
| | | // $('#warehouse2').val(""); |
| | | $('#warehouse1').val(""); |
| | | $('#warehouse2').val(""); |
| | | $('#matnr').val(""); |
| | | layui.form.render('select'); |
| | | tableIns.reload({data: []}); |
| | | layer.closeAll(); |
| | | } |
| | |
| | | |
| | | <header class="layui-form"> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label" style="margin-left: 32px">单号</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="billNo" class="layui-input" autocomplete="off" oninput="findCode(this, 'billNo')" |
| | | style="width: 175px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料编码</label> |
| | | <input class="layui-input" id="matnr" onkeyup="findCode(this, 'matnr')" placeholder="扫码 / 输入" style="width: 65%" |
| | | <input class="layui-input" id="matnr" onkeyup="findCode(this, 'matnr')" placeholder="扫码 / 输入" |
| | | style="width: 175px" |
| | | autocomplete="off"> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label" style="margin-left: 28px">库区</label> |
| | | <div class="layui-input-inline" style="margin-left: 5px;width: 180px"> |
| | | <label class="layui-form-label" style="margin-left: 28px;">库区</label> |
| | | <div class="layui-input-inline" style="margin-left: 5px;width: 175px"> |
| | | <select id="uuid" lay-filter="uuid"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | |
| | | </div> |
| | | <div class="form-item"> |
| | | <span>名称</span> |
| | | <textarea rows="2" style="width: 70%; resize: none" id="maktx2" type="text" disabled="disabled" readonly="readonly"></textarea> |
| | | <textarea rows="2" style="width: 70%; resize: none" id="maktx2" type="text" disabled="disabled" |
| | | readonly="readonly"></textarea> |
| | | </div> |
| | | <input id="index" type="text" disabled="disabled" style="display: none;"> |
| | | <div class="form-item" style="margin-top: 5px; margin-bottom: 8px"> |
| | |
| | | // 表格数据 |
| | | var normalOutList = []; |
| | | window.onload = function () { |
| | | document.getElementById("matnr").focus(); |
| | | document.getElementById("billNo").focus(); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | var warehouseBar; |
| | | var matnrBar; |
| | | var billNo; |
| | | |
| | | /* 扫码、输入库区和物料编码 */ |
| | | function findCode(el, type) { |
| | | warehouseBar = $('#uuid').val(); |
| | | ; |
| | | billNo = $("#billNo").val(); |
| | | switch (type) { |
| | | case 'uuid': |
| | | // exist('uuid', 'locArea'); |
| | |
| | | } |
| | | |
| | | // 判断库区或者物料编码都不为空 |
| | | if (!warehouseBar || !matnrBar) { |
| | | return; |
| | | } |
| | | // if (!warehouseBar || !matnrBar) { |
| | | // return; |
| | | // } |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/locNormal/pda/out/query?matnr=" + matnrBar + "&warehouse=" + warehouseBar, |
| | | url: baseUrl + "/locNormal/pda/out/query?matnr=" + (matnrBar ? matnrBar : "") + "&warehouse=" + (warehouseBar ? warehouseBar : "") + "&billNo=" + (billNo ? billNo : ""), |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | // contentType: 'application/json;charset=UTF-8', |
| | | method: 'GET', |
| | |
| | | if (res.code === 200) { |
| | | layer.msg("出库成功"); |
| | | $("#matnr").val(null); |
| | | // $("#uuid").val(null); |
| | | $("#billNo").val(null); |
| | | warehouseBar = null; |
| | | matnrBar = null; |
| | | normalOutList = []; |
| | |
| | | function reset() { |
| | | $("#uuid").val(null); |
| | | $("#matnr").val(null); |
| | | $("#billNo").val(null); |
| | | layui.form.render('select'); |
| | | normalOutList = []; |
| | | tableIns.reload({data: normalOutList}); |
| | | layer.closeAll(); |
| | |
| | | <table class="layui-table" id="chooseData" lay-filter="chooseData"></table> |
| | | </main> |
| | | <!-- 尾部 --> |
| | | <footer> |
| | | <footer style="margin-top: -5px"> |
| | | <div class="layui-btn-container" style="text-align: center; margin-bottom: 8px"> |
| | | <button type="button" id="retrun-btn" class="layui-btn layui-btn-primary " onclick="back()" >返回</button> |
| | | </div> |
| | |
| | | <!-- 头部 --> |
| | | <header class="layui-form"> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">单号</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="text" id="billNo" onkeyup="findByBillNo(this)" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off"> |
| | |
| | | <script> |
| | | |
| | | window.onload = function(){ |
| | | document.getElementById("matNo").focus(); |
| | | document.getElementById("billNo").focus(); |
| | | getOutBound(); |
| | | } |
| | | |
| | |
| | | $("#locNo").val(""); |
| | | find(null, el.value); |
| | | } |
| | | function find(locNo, matNo) { |
| | | |
| | | /** |
| | | * 根据通知单号查找库存明细 |
| | | * */ |
| | | function findByBillNo(el) { |
| | | if (isEmpty(el.value)) { |
| | | return; |
| | | } |
| | | find(null, null, el.value); |
| | | } |
| | | |
| | | function find(locNo, matNo, billNo) { |
| | | $.ajax({ |
| | | url: baseUrl + "/mobile/locDetl", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | locNo: locNo, |
| | | matNo: matNo |
| | | matNo: matNo, |
| | | supplier: billNo, |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="orderNo" placeholder="订单号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="orderCode" placeholder="订单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline" style="width: 150px"> |
| | | <select id="orderState" name="orderState"> |
| | | <option value="">订单状态</option> |
| | | <option value="1">初始</option> |
| | | <option value="2">执行中</option> |
| | | <option value="3">结束</option> |
| | | </select> |
| | | </div> |
| | | <!--<div class="layui-inline" style="width: 150px">--> |
| | | <!--<select id="orderState" name="orderState">--> |
| | | <!--<option value="">订单状态</option>--> |
| | | <!--<option value="1">初始</option>--> |
| | | <!--<option value="2">执行中</option>--> |
| | | <!--<option value="3">结束</option>--> |
| | | <!--</select>--> |
| | | <!--</div>--> |
| | | |
| | | |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |