feat: 辅料消耗细化-列表和新增界面添加<物料代码>
| | |
| | | String order = schStatInput.getSchStatOutput().getSchWorkorder().getCode(); |
| | | order = order.substring(0,order.indexOf('#')); |
| | | String matCode = schStatInput.getMdMat().getCode(); |
| | | bean.setMatCode(matCode); |
| | | |
| | | List<?> inputs = schStatInputDao.queryBySql("select t1.num-t2.num num, t1.uom from (select nvl(sum(quantity),0) num,uom from SCH_WORKORDER_IO a " + |
| | | " where a.replace_material like ? and a.MATERIAL_CODE = ? and a.inout_type in ('1','4') group by uom) t1,("+ |
| | |
| | | bean = BeanConvertor.copyProperties(schStatInput, InputBean.class); |
| | | |
| | | bean.setMat(schStatInput.getMdMat().getName()); |
| | | bean.setMatCode(schStatInput.getMdMat().getCode()); |
| | | bean.setUnit(schStatInput.getMdUnit().getName()); |
| | | |
| | | //查询每个物料消耗对应标准单耗表的上限值,下限值。 |
| | |
| | | "where o.eqptype = e.equipmentPosition and o.bom_lot_id=? and o.mdMat.id not in " + |
| | | "(select i.mdMat.id from SchStatInput i where i.schStatOutput.schWorkorder.id=?) " + |
| | | "and e.id = ? "; |
| | | return BeanConvertor.copyList(schStatInputDao.query(List.class, hql, bean.getBomVersion(), bean.getId(),bean.getEquipmentId()), Combobox.class); |
| | | //return BeanConvertor.copyList(schStatInputDao.query(List.class, hql, bean.getBomVersion(), bean.getId(),bean.getEquipmentId()), Combobox.class); |
| | | //返回数据text由name更新为name(code) |
| | | List<?> mats = schStatInputDao.query(List.class, hql, bean.getBomVersion(), bean.getId(), bean.getEquipmentId()); |
| | | List<Combobox> list = new java.util.ArrayList<Combobox>(); |
| | | if (mats != null && mats.size() > 0) { |
| | | for (Object o : mats) { |
| | | com.shlanbao.tzsc.base.mapping.MdMat m = (com.shlanbao.tzsc.base.mapping.MdMat) o; |
| | | list.add(new Combobox(m.getId(), m.getName() + "(" + m.getCode() + ")")); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | |
| | | <script type="text/javascript"> |
| | | var inputGrid = null; |
| | | var outputGrid = null; |
| | | var curOutId = null; |
| | | |
| | | $(function () { |
| | | |
| | |
| | | |
| | | }, |
| | | onClickRow: function (rowIndex, rowData) { |
| | | curOutId = rowData.id; |
| | | getAllInputsByOutput(rowData.id); |
| | | } |
| | | }); |
| | |
| | | rownumbers: true, |
| | | columns: [[{ |
| | | field: 'id', |
| | | title: 'id', |
| | | width: 120, |
| | | hidden: true |
| | | title: '编号', |
| | | checkbox: true |
| | | }, { |
| | | field: 'mat', |
| | | title: '物料名称', |
| | | width: 200, |
| | | align: 'center' |
| | | }, { |
| | | field: 'matCode', |
| | | title: '物料编码', |
| | | width: 100, |
| | | align: 'center' |
| | | }, { |
| | | field: 'qty', |
| | | title: '消耗量', |
| | | align: 'right', |
| | |
| | | width: 200, |
| | | align: 'center' |
| | | }, { |
| | | field: 'matCode', |
| | | title: '物料编码', |
| | | width: 100, |
| | | align: 'center' |
| | | },{ |
| | | field: 'qty', |
| | | title: '消耗量', |
| | | align: 'right', |
| | |
| | | width: 200, |
| | | align: 'center' |
| | | }, { |
| | | field: 'matCode', |
| | | title: '物料编码', |
| | | width: 100, |
| | | align: 'center' |
| | | }, { |
| | | field: 'qty', |
| | | title: '消耗量', |
| | | align: 'right', |
| | |
| | | width: 200, |
| | | align: 'center' |
| | | }, { |
| | | field: 'matCode', |
| | | title: '物料编码', |
| | | width: 100, |
| | | align: 'center' |
| | | }, { |
| | | field: 'qty', |
| | | title: '消耗量', |
| | | align: 'right', |