1.立库、平库入库修改功能调整,生产单号列前置
2.erp对接功能微调
| | |
| | | CPICMO cpicmo = select.get(0); |
| | | boolean complete = false; |
| | | if (cpicmo.getFQty() > 0) { |
| | | if (cpicmo.getFAuxCommitQty() >= cpicmo.getFQty()) { |
| | | if (cpicmo.getFAuxCommitQty() == cpicmo.getFQty()) { |
| | | complete = true; |
| | | } |
| | | } else { |
| | | if (cpicmo.getFAuxCommitQty() >= cpicmo.getFAuxQty()) { |
| | | if (cpicmo.getFAuxCommitQty() == cpicmo.getFAuxQty()) { |
| | | complete = true; |
| | | } |
| | | } |
| | |
| | | |
| | | @Override |
| | | public void pdaLocNormalIn(List<LocNormal> list) { |
| | | // 平仓入库后更新中间表数据,Fflag_finish改为1,表示平仓入库成功 |
| | | if (list.size() > 0) { |
| | | for (Integer i = 0; i < list.size(); i++) { |
| | | if (!Cools.isEmpty(list.get(i).getSupplier())) { // 存在入库单号的才进行erp更新 |
| | | String sql = "update CPICMO set FAuxCommitQty = (FAuxCommitQty + {0,number,#}) where 1=1 and Fnumber = ''{1}'' and FBillNo = ''{2}''"; |
| | | sql = MessageFormat.format(sql, list.get(i).getAnfme(), list.get(i).getMatnr(), list.get(i).getSupplier()); |
| | | if (erpSqlServer.update(sql) > 0) { |
| | | sql = "select * from CPICMO where 1=1 and Fnumber = ''{0}'' and FBillNo = ''{1}''"; |
| | | sql = MessageFormat.format(sql, list.get(i).getMatnr(), list.get(i).getSupplier()); |
| | | List<CPICMO> select = erpSqlServer.select(sql, CPICMO.class); |
| | | CPICMO cpicmo = select.get(0); |
| | | boolean complete = false; |
| | | if (cpicmo.getFQty() > 0) { |
| | | if (cpicmo.getFAuxCommitQty() == cpicmo.getFQty()) { |
| | | complete = true; |
| | | } |
| | | } else { |
| | | if (cpicmo.getFAuxCommitQty() == cpicmo.getFAuxQty()) { |
| | | complete = true; |
| | | } |
| | | } |
| | | if (complete) { |
| | | if (!completeCPakIn(list.get(i).getSupplier(), list.get(i).getMatnr())) { |
| | | log.error("{}平仓入库单标记完成失败", list.get(i).getSupplier()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | baseMapper.pdaLocNormalIn(list); |
| | | } |
| | | |
| | |
| | | CPICMO cpicmo = select.get(0); |
| | | boolean complete = false; |
| | | if (cpicmo.getFQty() > 0) { |
| | | if (cpicmo.getFAuxCommitQty() >= cpicmo.getFQty()) { |
| | | if (cpicmo.getFAuxCommitQty() == cpicmo.getFQty()) { |
| | | complete = true; |
| | | } |
| | | } else { |
| | | if (cpicmo.getFAuxCommitQty() >= cpicmo.getFAuxQty()) { |
| | | if (cpicmo.getFAuxCommitQty() == cpicmo.getFAuxQty()) { |
| | | complete = true; |
| | | } |
| | | } |
| | |
| | | <insert id="locNormalIn"> |
| | | BEGIN |
| | | <foreach collection="list" item="item" index="index"> |
| | | INSERT INTO asr_loc_normal (matnr, maktx, anfme, altme, lgnum, type, supplier, brand, warehouse, state, |
| | | INSERT INTO asr_loc_normal (matnr, maktx, anfme, altme, lgnum, type, mnemonic, supplier, brand, warehouse, state, |
| | | appe_user, appe_time) |
| | | VALUES (#{item.matnr,jdbcType=VARCHAR}, #{item.maktx,jdbcType=VARCHAR}, #{item.anfme,jdbcType=DECIMAL}, |
| | | #{item.altme,jdbcType=VARCHAR},#{item.lgnum, jdbcType=VARCHAR}, #{item.type, jdbcType=VARCHAR}, |
| | | #{item.supplier, jdbcType=VARCHAR},#{item.brand, jdbcType=VARCHAR}, |
| | | #{item.mnemonic, jdbcType=VARCHAR} ,#{item.supplier, jdbcType=VARCHAR},#{item.brand, jdbcType=VARCHAR}, |
| | | #{item.warehouse,jdbcType=VARCHAR}, '1', #{item.appeUser,jdbcType=DECIMAL}, |
| | | #{item.appeTime,jdbcType=TIMESTAMP}) |
| | | </foreach> |
| | |
| | | style: 'color: blue;font-weight: bold' |
| | | } |
| | | ]; |
| | | locNormalCols.map(function (item) { |
| | | if (item.field === 'supplier' || item.field === 'mnemonic') { |
| | | item.edit = 'text'; |
| | | } |
| | | }) |
| | | cols.push.apply(cols, locNormalCols); |
| | | var locNormalColsSelf = [ |
| | | {field: 'mnemonic', align: 'center',title: '生产单号', edit: 'text'} |
| | | ,{field: 'matnr', align: 'center',title: '物料编码'} |
| | | ,{field: 'maktx', align: 'center',title: '物料名称', width: 400} |
| | | ,{field: 'lgnum', align: 'center',title: '规格'} |
| | | ,{field: 'type', align: 'center',title: '物料类别'} |
| | | ,{field: 'supplier', align: 'center',title: '通知单号', edit: 'text'} |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'altme', align: 'center',title: '单位', hide: true} |
| | | ]; |
| | | cols.push.apply(cols, locNormalColsSelf); |
| | | // cols.push({field: 'matStatus', title: '物料状态', align: 'center', width: 120, templet: '#matStatus'}); |
| | | cols.push({fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 80}); |
| | | return cols; |
| | |
| | | if (obj.field === 'anfme') { |
| | | updateMatCodeData(obj.data.matnr, Number(obj.value), obj.data.index); |
| | | } |
| | | if (obj.field === 'supplier' || obj.field === 'mnemonic') { |
| | | updateMatCodeData2(obj.data.matnr, obj.value, obj.data.index, obj.field); |
| | | } |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | |
| | | } |
| | | if (matCodeData[i].anfme === 0) { |
| | | layer.msg("数量不能为零"); |
| | | return; |
| | | } |
| | | if (matCodeData[i].mnemonic == null || matCodeData[i].mnemonic == '' || matCodeData[i].mnemonic == undefined) { |
| | | layer.msg("请输入生产单号"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | function updateMatCodeData2(matnr, value, index, field) { |
| | | for (var i = 0; i < matCodeData.length; i++) { |
| | | if (matCodeData[i]["matnr"] === matnr && matCodeData[i]["index"] === index) { |
| | | matCodeData[i][field] = value; |
| | | } |
| | | } |
| | | |
| | | tableIns.reload({ |
| | | data: matCodeData, |
| | | }); |
| | | } |
| | | |
| | | // 获取可用入库站点 |
| | | function getInBound() { |
| | | // 获取仓库下拉 |
| | |
| | | function getCol() { |
| | | var cols = []; |
| | | cols.push( |
| | | {field: 'fbillNo', merge: true, align: 'center', title: '单据编号'} |
| | | , {field: 'fsourceBillNo', align: 'center', title: '订单单号' } |
| | | , {field: 'fnumber', align: 'center', title: '物料编号'} |
| | | {field: 'fbillNo', merge: true, align: 'center', title: '单据编号', width: 150} |
| | | , {field: 'fsourceBillNo', align: 'center', title: '订单单号', width: 100} |
| | | , {field: 'fnumber', align: 'center', title: '物料编号', width: 140} |
| | | , {field: 'fname', align: 'center', title: '物料名称'} |
| | | , {field: 'fmodel', align: 'center', title: '规格'} |
| | | , {field: 'fentryID', align: 'center', title: '分录号'} |
| | | , {field: 'fmodel', align: 'center', title: '规格', width: 200} |
| | | , {field: 'fentryID', align: 'center', title: '分录号', width: 80} |
| | | , {field: 'forderInterID', align: 'center', title: '单据编号', hide: true} |
| | | , {field: 'fauxQty', align: 'center', title: '数量'} |
| | | , {field: 'fcommitQty', align: 'center', title: '发货数量'} |
| | | , {field: 'fauxPrice', align: 'center', title: '单价'} |
| | | , {field: 'fauxQty', align: 'center', title: '数量', width: 100} |
| | | // , {field: 'fcommitQty', align: 'center', title: '发货数量'} |
| | | , {field: 'fauxPrice', align: 'center', title: '单价', width: 100} |
| | | , {field: 'fdate', align: 'center', title: '日期', hide: true} |
| | | , {field: 'fnote', align: 'center', title: '备注', hide: true} |
| | | , {field: 'fadd', align: 'center', title: '地址', hide: true} |
| | | , {merge: ['fbillNo'], title: '操作', align: 'center', toolbar: '#operate', width: 140} |
| | | , {merge: ['fbillNo'], title: '操作', align: 'center', toolbar: '#operate', width: 160} |
| | | ); |
| | | return cols; |
| | | } |
| | |
| | | style: 'color: blue;font-weight: bold' |
| | | } |
| | | ]; |
| | | matCols.map(function (item) { |
| | | if (item.field === 'str6' || item.field === 'str5') { |
| | | item.edit = 'text'; |
| | | item.style = 'color: blue;font-weight: bold'; |
| | | } |
| | | }) |
| | | cols.push.apply(cols, matCols); |
| | | var matColsSelf = [ |
| | | {field: 'str5', align: 'center',title: '生产单号', edit: 'text'} |
| | | ,{field: 'matNo', align: 'center',title: '物料编码'} |
| | | ,{field: 'barcode', align: 'center',title: '条形码', hide: true} |
| | | ,{field: 'matName', align: 'center',title: '物料名称', width: 500} |
| | | ,{field: 'str2', align: 'center',title: '物料类别'} |
| | | ,{field: 'str3', align: 'center',title: '规格型号'} |
| | | ,{field: 'str1', align: 'center',title: '基本单位', hide: true} |
| | | ,{field: 'str4', align: 'center',title: '状态', hide: true} |
| | | ,{field: 'str6', align: 'center',title: '通知单号', edit: 'text'} |
| | | ,{field: 'str7', align: 'center',title: '默认仓库', hide: true} |
| | | ,{field: 'str17', align: 'center',title: '可采购', hide: true} |
| | | ,{field: 'str18', align: 'center',title: '可为子件', hide: true} |
| | | ,{field: 'str21', align: 'center',title: '成本计算方法', hide: true} |
| | | ,{field: 'str22', align: 'center',title: '采购单位', hide: true} |
| | | ,{field: 'str23', align: 'center',title: '销售单位', hide: true} |
| | | ]; |
| | | cols.push.apply(cols, matColsSelf); |
| | | cols.push({field: 'matStatus', title: '物料状态', align: 'center', width: 120, templet: '#matStatus'}); |
| | | cols.push({fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 80}); |
| | | return cols; |
| | |
| | | if (obj.field === 'count') { |
| | | updateMatCodeData(obj.data.matNo, Number(obj.value)); |
| | | } |
| | | if (obj.field === 'str5' || obj.field === 'str6') { |
| | | updateMatCodeData2(obj.data.matnr, obj.value, obj.data.index, obj.field); |
| | | } |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | |
| | | } |
| | | if (matCodeData[i].count === 0) { |
| | | layer.msg("数量不能为零"); |
| | | return; |
| | | } |
| | | if (matCodeData[i].str5 == null || matCodeData[i].str5 == '' || matCodeData[i].str5 == undefined) { |
| | | layer.msg("请输入生产单号"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | function updateMatCodeData2(matnr, value, index, field) { |
| | | for (var i = 0; i < matCodeData.length; i++) { |
| | | if (matCodeData[i]["matnr"] === matnr && matCodeData[i]["index"] === index) { |
| | | matCodeData[i][field] = value; |
| | | } |
| | | } |
| | | |
| | | tableIns.reload({ |
| | | data: matCodeData, |
| | | }); |
| | | } |
| | | |
| | | // 获取可用入库站点 |
| | | function getInBound() { |
| | | $.ajax({ |
| | |
| | | <select id="putSiteSelect" lay-verify="required"> |
| | | <option value="">请选择库区</option> |
| | | </select> |
| | | <!-- 2.启动出库 --> |
| | | <!-- 2.启动入库 --> |
| | | <button class="layui-btn layui-btn-normal layui-btn-lg" id="btn-locIn" lay-event="comb">启动入库</button> |
| | | </div> |
| | | </div> |