| | |
| | | import com.zy.asrs.entity.param.CheckTaskListParam; |
| | | import com.zy.asrs.entity.param.OrderDomainParam; |
| | | import com.zy.asrs.entity.result.CheckOrderExportDTO; |
| | | import com.zy.asrs.enums.OrderTypeEnum; |
| | | import com.zy.asrs.service.*; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.zy.common.entity.NodeExcel; |
| | |
| | | checkOrderDetl.setBatch(locDetl.getBatch()); |
| | | checkOrderDetl.setSpecs(locDetl.getSpecs()); |
| | | checkOrderDetl.setAnfme(new BigDecimal(locDetl.getAnfme().toString())); |
| | | checkOrderDetl.setQty(BigDecimal.ZERO); |
| | | checkOrderDetl.setDiffQty(BigDecimal.ZERO); |
| | | checkOrderDetl.setWorkQty(BigDecimal.ZERO); |
| | | checkOrderDetl.setStatus(1); |
| | | checkOrderDetl.setZpallet(locDetl.getZpallet()); |
| | | checkOrderDetl.setCreateBy(getUserId()); |
| | | checkOrderDetl.setCreateTime(now); |
| | | checkOrderDetl.setUpdateBy(getUserId()); |
| | | checkOrderDetl.setUpdateTime(now); |
| | | if (!checkOrderDetlService.insert(checkOrderDetl)) { |
| | | throw new CoolException("保存盘点单明细失败"); |
| | | } |
| | |
| | | checkOrderDetl1.setBatch(checkOrderDetl.getBatch()); |
| | | checkOrderDetl1.setSpecs(checkOrderDetl.getSpecs()); |
| | | checkOrderDetl1.setAnfme(checkOrderDetl.getAnfme()); |
| | | checkOrderDetl1.setQty(checkOrderDetl.getQty()); |
| | | checkOrderDetl1.setDiffQty(checkOrderDetl.getDiffQty()); |
| | | checkOrderDetl1.setWorkQty(checkOrderDetl.getWorkQty()); |
| | | checkOrderDetl1.setStatus(checkOrderDetl.getStatus()); |
| | | checkOrderDetl1.setZpallet(checkOrderDetl.getZpallet()); |
| | | checkOrderDetl1.setCreateBy(getUserId()); |
| | | checkOrderDetl1.setCreateTime(checkOrderDetl.getCreateTime() == null?now:checkOrderDetl.getCreateTime()); |
| | | checkOrderDetl1.setUpdateBy(getUserId()); |
| | | checkOrderDetl1.setUpdateTime(now); |
| | | if (!checkOrderDetlService.insert(checkOrderDetl1)) { |
| | | throw new CoolException("保存盘点单明细失败"); |
| | | } |
| | |
| | | allLike(CheckOrder.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("create_time", false); |
| | | wrapper.eq("doc_type", OrderTypeEnum.INVENTORY.type); |
| | | return R.ok(checkOrderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/adjustOrder/list/auth") |
| | | @ManagerAuth |
| | | public R adjustList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<CheckOrder> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(CheckOrder.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | wrapper.orderBy("create_time", false); |
| | | wrapper.eq("doc_type", OrderTypeEnum.ADJUSTMENT.type); |
| | | return R.ok(checkOrderService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | // return R.ok(); |
| | | // } |
| | | |
| | | @PostMapping("/order/adjustment/default/v1") |
| | | public synchronized R adjustmentOrderCreate(@RequestHeader(required = false) String appkey, |
| | | @RequestBody OpenAdjustmentOrderParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getOrderNo())) { |
| | | return R.error("单据编号[orderNo]不能为空"); |
| | | } |
| | | if (Cools.isEmpty(param.getOrderDetails())) { |
| | | return R.error("单据明细[orderDetails]不能为空"); |
| | | } |
| | | openService.adjustmentOrderCreate(param); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 添加入库单 |
| | | */ |
| | |
| | | private BigDecimal anfme; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | private BigDecimal qty; |
| | | @TableField("diff_qty") |
| | | private BigDecimal diffQty; |
| | | |
| | | /** |
| | | * 商品编码 |
| | |
| | | /** |
| | | * 状态 1: 未生成 0: 禁用 2:待盘 3:已盘 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 未生成 0: 禁用 2:待盘 3:已盘") |
| | | @ApiModelProperty(value= "状态 1: 未生成 0: 禁用 2:待盘 3:已盘 4:待调整 5:已调整") |
| | | private Integer status; |
| | | |
| | | /** |
| | |
| | | |
| | | public CheckOrderDetl() {} |
| | | |
| | | public CheckOrderDetl(Long orderId,String orderNo,BigDecimal anfme,BigDecimal qty,String matnr,String maktx,String batch,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double manLength,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,BigDecimal workQty,String qrCode,Date startDate,Date endDate,Integer pakinPakoutStatus,Long lineNumber,String locNo,Long version) { |
| | | public CheckOrderDetl(Long orderId,String orderNo,BigDecimal anfme,BigDecimal diffQty,String matnr,String maktx,String batch,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double manLength,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,BigDecimal workQty,String qrCode,Date startDate,Date endDate,Integer pakinPakoutStatus,Long lineNumber,String locNo,Long version) { |
| | | this.orderId = orderId; |
| | | this.orderNo = orderNo; |
| | | this.anfme = anfme; |
| | | this.qty = qty; |
| | | this.diffQty = diffQty; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | | this.batch = batch; |
| | |
| | | // null // [非空] |
| | | // ); |
| | | |
| | | public BigDecimal getDiffQty() { |
| | | if (null == this.status || this.status == 1 || this.status == 0 || this.status == 2) { |
| | | return BigDecimal.ZERO; |
| | | } |
| | | if (null != this.anfme && this.workQty != null) { |
| | | |
| | | BigDecimal subtract = new BigDecimal(this.workQty.toString()).subtract(new BigDecimal(this.anfme.toString())); |
| | | |
| | | return subtract; |
| | | } |
| | | // if (null != this.anfme && this.qty != null) { |
| | | // return this.anfme - this.qty; |
| | | // } |
| | | return null; |
| | | } |
| | | |
| | | public String getOrderId$(){ |
| | | OrderService service = SpringUtils.getBean(OrderService.class); |
| | |
| | | return "待盘"; |
| | | case 3: |
| | | return "已盘"; |
| | | case 4: |
| | | return "待调整"; |
| | | case 5: |
| | | return "已调整"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import com.zy.asrs.entity.CheckOrderDetl; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | @Data |
| | | public class OpenAdjustmentOrderParam { |
| | | |
| | | private String orderNo; |
| | | |
| | | private Long orderType = 10L; |
| | | |
| | | private String orderTime; |
| | | |
| | | private List<CheckOrderDetl> orderDetails; |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.enums; |
| | | |
| | | public enum OrderTypeEnum { |
| | | |
| | | MATERIAL(1, "物料档案"), |
| | | OUT_NOTICE(2, "发货通知单"), |
| | | OTHER_IN(3, "其他入库单"), |
| | | IN_NOTICE(4, "收料通知单"), |
| | | PRODUCTION(5, "生产汇报单"), |
| | | RETURN(6, "退货通知单"), |
| | | OUT_APPLY(7, "出库申请单"), |
| | | INVENTORY(8, "盘点单"), |
| | | TRANSFER_IN(9, "调拨入库单"), |
| | | ADJUSTMENT(10, "库存调整单"), |
| | | SALE_OUT(27, "发货通知单-销售出库单"), |
| | | PURCHASE_IN(28, "收料通知单-采购入库单"), |
| | | PRODUCTION_IN(29, "生产汇报单-生产入库单"), |
| | | PRODUCTION_OTHER_IN(30, "生产汇报单-其他入库单"), |
| | | SALE_RETURN(31, "退货通知单-销售退货单"), |
| | | OTHER_OUT(32, "出库申请单-其他出库单"), |
| | | PRODUCT_IN(33, "成品入库单"), |
| | | PRODUCT_OUT(34, "成品出库单"); |
| | | |
| | | public Integer type; |
| | | public String desc; |
| | | OrderTypeEnum(Integer type, String desc) { |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | public static String getDescByType(Integer type) { |
| | | for (OrderTypeEnum value : OrderTypeEnum.values()) { |
| | | if (value.type.equals(type)) { |
| | | return value.desc; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | * @param param |
| | | */ |
| | | void syncMat(MatSyncParam param); |
| | | |
| | | void adjustmentOrderCreate(OpenAdjustmentOrderParam param); |
| | | } |
| | |
| | | } |
| | | |
| | | for (CheckOrderDetl checkOrderDetl: checkTaskListParam.getCheckOrderDetlList()){ |
| | | checkOrderDetl.setDiffQty(checkOrderDetl.getWorkQty().subtract(checkOrderDetl.getAnfme())); |
| | | checkOrderDetl.setStatus(3); |
| | | if (!checkOrderDetlService.updateById(checkOrderDetl)){ |
| | | throw new CoolException("更新盘点状态失败"); |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | private TagService tagService; |
| | | @Autowired |
| | | private TagMapper tagMapper; |
| | | @Autowired |
| | | private CheckOrderDetlService checkOrderDetlService; |
| | | @Autowired |
| | | private CheckOrderService checkOrderService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void adjustmentOrderCreate(OpenAdjustmentOrderParam param) { |
| | | if(Cools.isEmpty(param.getOrderNo())){ |
| | | String prefix = ""; |
| | | DocType docType = docTypeService.selectById(param.getOrderNo()); |
| | | if(!Cools.isEmpty(docType)){ |
| | | prefix = "Adjust"; |
| | | } |
| | | param.setOrderNo(prefix + snowflakeIdWorker.nextId()); |
| | | } |
| | | CheckOrder checkOrder = checkOrderService.selectOne(new EntityWrapper<CheckOrder>().eq("order_no", param.getOrderNo()) ); |
| | | if (checkOrder != null) { |
| | | throw new CoolException("单据已存在"); |
| | | } |
| | | Date now = new Date(); |
| | | checkOrder = new CheckOrder(); |
| | | checkOrder.setOrderNo(param.getOrderNo()); |
| | | checkOrder.setUuid(String.valueOf(snowflakeIdWorker.nextId())); |
| | | checkOrder.setOrderTime( DateUtils.convert(now)); |
| | | checkOrder.setDocType(param.getOrderType()); |
| | | checkOrder.setSettle(1L); |
| | | checkOrder.setCreateBy(9527L); |
| | | checkOrder.setCreateTime(now); |
| | | checkOrder.setUpdateBy(9527L); |
| | | checkOrder.setUpdateTime(now); |
| | | checkOrder.setStatus(1); |
| | | |
| | | if (!checkOrderService.insert(checkOrder)) { |
| | | throw new CoolException("保存调整单主单失败"); |
| | | } |
| | | for (CheckOrderDetl checkOrderDetl1 : param.getOrderDetails()) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>() |
| | | .eq("matnr", checkOrderDetl1.getMatnr()) |
| | | .eq("loc_no", checkOrderDetl1.getLocNo()) |
| | | .eq("batch", checkOrderDetl1.getBatch()) |
| | | ); |
| | | if (Cools.isEmpty(locDetl)) { |
| | | throw new CoolException("未找到库存明细,请检查库存"); |
| | | } |
| | | CheckOrderDetl checkOrderDetl = new CheckOrderDetl(); |
| | | checkOrderDetl.sync(locDetl); |
| | | checkOrderDetl.setLocDetlId(locDetl.getId()); |
| | | checkOrderDetl.setOrderId(checkOrder.getId()); |
| | | checkOrderDetl.setOrderNo(checkOrder.getOrderNo()); |
| | | checkOrderDetl.setAnfme(checkOrderDetl1.getAnfme()); |
| | | checkOrderDetl.setDiffQty(checkOrderDetl1.getDiffQty()); |
| | | checkOrderDetl.setWorkQty(checkOrderDetl1.getWorkQty()); |
| | | checkOrderDetl.setStatus(4); |
| | | checkOrderDetl.setZpallet(locDetl.getZpallet()); |
| | | checkOrderDetl.setCreateTime(now); |
| | | checkOrderDetl.setUpdateTime(now); |
| | | if (!checkOrderDetlService.insert(checkOrderDetl)) { |
| | | throw new CoolException("保存调整单明细失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | <result column="order_id" property="orderId" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="anfme" property="anfme" /> |
| | | <result column="qty" property="qty" /> |
| | | <result column="diff_qty" property="diffQty" /> |
| | | <result column="matnr" property="matnr" /> |
| | | <result column="maktx" property="maktx" /> |
| | | <result column="batch" property="batch" /> |
| New file |
| | |
| | | var insTbCount = 0; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | | notice: 'notice/notice', |
| | | }).use(['layer', 'form', 'table', 'util', 'admin', 'xmSelect', 'laydate','tableMerge','notice'], function () { |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | | var util = layui.util; |
| | | var admin = layui.admin; |
| | | var xmSelect = layui.xmSelect; |
| | | var layDate = layui.laydate; |
| | | var laytpl = layui.laytpl; |
| | | var tableMerge = layui.tableMerge; |
| | | var notice = layui.notice; |
| | | |
| | | // 渲染搜索模板 |
| | | $.ajax({ |
| | | url: baseUrl+"/docType/list/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | limit: 9999 |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | let template = Handlebars.compile($('#docTypeTpl').html()); |
| | | $('#docType-query').html(template(res.data)); |
| | | layui.form.render('select'); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | // 渲染表格 |
| | | var insTb = table.render({ |
| | | elem: '#order', |
| | | url: baseUrl+'/adjustOrder/list/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号'}, |
| | | {field: 'docType$', align: 'center', title: '类型', minWidth: 160, width: 160}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate',} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function (res, curr, count) { |
| | | limit(); |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | insTbCount = count; |
| | | } |
| | | }); |
| | | |
| | | // 搜索 |
| | | form.on('submit(tbSearch)', function (data) { |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | }); |
| | | |
| | | // 添加 |
| | | $("#orderAddBtn").click(function () { |
| | | showEditModel(); |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(order)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'edit') { |
| | | showEditModel(data); |
| | | }else if (layEvent === 'adjust') { |
| | | pakoutPreview(data.id); |
| | | }else if (layEvent === 'export') { |
| | | export1(data.id); |
| | | }else if (layEvent === 'del') { |
| | | doDel(data.id); |
| | | } else if (layEvent === 'complete') { |
| | | doModify(data.id, data.orderNo, 4); |
| | | } else if (layEvent === 'look') { |
| | | var $a = $(obj.tr).find('a[lay-event="look"]'); |
| | | var offset = $a.offset(); |
| | | var top = offset.top; |
| | | var left = offset.left; |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '1000px', |
| | | offset: [top + 'px', (left - 700 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | | fixed: false, |
| | | content: '<table id="lookSSXMTable" lay-filter="lookSSXMTable"></table>', |
| | | success: function (layero) { |
| | | table.render({ |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/checkOrderDetl/list/auth', |
| | | where: { |
| | | order_id: data.id |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'locNo', title: '库位号', width: 120}, |
| | | {field: 'zpallet', title: '容器码', width: 120}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '批号'}, |
| | | {field: 'diffQty', title: '差异数量', style: 'font-weight: bold'}, |
| | | // {field: 'unit', title: '单位'}, |
| | | // { |
| | | // field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | | // return util.toDateString(d.createTime); |
| | | // }, width: 180 |
| | | // }, |
| | | // {field: 'inQty', title: '已入库量'}, |
| | | // {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'status$', title: '状态'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: (res) => { |
| | | if(res.code == 403){ |
| | | window.top.location.href = baseUrl+"/"; |
| | | } |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 显示表单弹窗 |
| | | function showEditModel(expTpe) { |
| | | admin.open({ |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '单据明细', |
| | | content: $('#editDialog').html(), |
| | | area: '1300px', |
| | | success: function (layero, dIndex) { |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | var isExpAdd = !expTpe; |
| | | // 回显数据 |
| | | form.val('editForm', expTpe); |
| | | if (expTpe) { |
| | | $('#orderNo').attr("disabled", "disabled"); |
| | | } |
| | | // 表单提交事件 |
| | | form.on('submit(orderEditSubmit)', function (data) { |
| | | // 组装数据 |
| | | if (xxDataList.length <= 0) { |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', {tips: [1, '#ff4c4c']}); |
| | | return false; |
| | | } |
| | | let nList = admin.util.deepClone(xxDataList); |
| | | layer.load(2); |
| | | if (isExpAdd){ |
| | | $.ajax({ |
| | | url: baseUrl+"/checkOrder/form/" + "add" + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | orderId: Number(data.field.id), |
| | | docType: Number(data.field.docType), |
| | | orderNo: data.field.orderNo, |
| | | locDetlList: nList |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }else { |
| | | $.ajax({ |
| | | url: baseUrl+"/checkOrder/form/" + "modify" + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | orderId: Number(data.field.id), |
| | | docType: Number(data.field.docType), |
| | | orderNo: data.field.orderNo, |
| | | checkOrderDetls: nList |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | return false; |
| | | }); |
| | | // 明细表格 |
| | | var xxDataList = []; |
| | | var tbOptions = { |
| | | elem: '#formSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | data: xxDataList, |
| | | page: true, |
| | | height: '350px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'locNo', title: '库位号'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'batch', title: '批号'}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量', minWidth: 110, width: 110}, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | ]], |
| | | done: function (res) { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | | }; |
| | | if (!isExpAdd) { |
| | | $.ajax({ |
| | | url: baseUrl+"/checkOrderDetl/select/all?orderId=" + expTpe.id, |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | xxDataList = res.data; |
| | | tbOptions.data = xxDataList; |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | var insTbSSXM = table.render(tbOptions); |
| | | // 工具条点击事件 |
| | | table.on('tool(formSSXMTable)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'del') { |
| | | if(data.workQty > 0){ |
| | | layer.msg("已存在作业数量,不能删除", {icon: 2}); |
| | | return; |
| | | } |
| | | layer.confirm('确定要删除吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | for (var j = 0; j < xxDataList.length; j++) { |
| | | if (xxDataList[j].matnr === data.matnr && xxDataList[j].batch === data.batch) { |
| | | xxDataList.splice(j, 1); |
| | | break; |
| | | } |
| | | } |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 全局函数,用于接收从库存查询页面返回的数据 |
| | | window.addCheckOrderTableData = function(data) { |
| | | // 处理选中的库存数据 |
| | | var addedCount = 0; |
| | | var duplicateCount = 0; |
| | | for (var i = 0; i < data.length; i++) { |
| | | // 判断是否已存在相同的商品编码和批号 |
| | | var isDuplicate = false; |
| | | for (var j = 0; j < xxDataList.length; j++) { |
| | | if (xxDataList[j].locNo === data[i].locNo && xxDataList[j].matnr === data[i].matnr && xxDataList[j].batch === data[i].batch) { |
| | | if (xxDataList[j].diffQty !== 0){ |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (data[j].diffQty !== 0){ |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | } |
| | | // 如果不重复,则添加到列表 |
| | | if (!isDuplicate) { |
| | | xxDataList.push({...data[i]}); |
| | | addedCount++; |
| | | } |
| | | } |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | // 提示添加结果 |
| | | if (duplicateCount > 0) { |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据,' + duplicateCount + ' 条数据已忽略', {icon: 1}); |
| | | } else if (addedCount > 0) { |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据', {icon: 1}); |
| | | } |
| | | }; |
| | | |
| | | $('#matAddBtnComment').click(function () { |
| | | showEditModel2(); |
| | | }); |
| | | |
| | | // 显示添加明细表单弹窗 - 提取库存 |
| | | function showEditModel2(exp) { |
| | | let loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false}); |
| | | layer.open({ |
| | | type: 2, |
| | | title: '提取库存', |
| | | closeBtn: 1, |
| | | maxmin: false, |
| | | area: ['90%', '85%'], |
| | | shadeClose: true, |
| | | content: 'checkOrderLocQuery.html', |
| | | success: function(layero, index){ |
| | | layer.close(loadIndex); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 删除单据 |
| | | function doDel(orderId) { |
| | | layer.confirm('确定要删除吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/checkOrder/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | } else { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 修改订单状态 |
| | | function doModify(orderId, orderNo, settle) { |
| | | layer.confirm('确定要手动完结吗?', { |
| | | shade: .1, |
| | | skin: 'layui-layer-admin' |
| | | }, function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/checkOrder/complete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | } else { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | layer.msg(res.msg, {icon: 1}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | |
| | | function pakoutPreview(id) { |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl + "/checkOrder/preview/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: id |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | function export1(id) { |
| | | notice.msg('正在导出文件......', {icon: 4}); |
| | | $.ajax({ |
| | | url: baseUrl + "/checkOrder/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: id |
| | | }, |
| | | method: 'POST', |
| | | xhrFields: { |
| | | responseType: 'blob' |
| | | }, |
| | | success: function (data, status, xhr) { |
| | | notice.destroy(); |
| | | // 从响应头获取文件名 |
| | | var disposition = xhr.getResponseHeader('Content-Disposition'); |
| | | var filename = '盘点差异单.xlsx'; |
| | | if (disposition && disposition.indexOf('filename') !== -1) { |
| | | var filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/; |
| | | var matches = filenameRegex.exec(disposition); |
| | | if (matches != null && matches[1]) { |
| | | filename = decodeURIComponent(matches[1].replace(/['"]/g, '')); |
| | | } |
| | | } |
| | | |
| | | // 创建下载链接 |
| | | var blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'}); |
| | | var link = document.createElement('a'); |
| | | link.href = window.URL.createObjectURL(blob); |
| | | link.download = filename; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |
| | | window.URL.revokeObjectURL(link.href); |
| | | |
| | | layer.msg('导出成功', {icon: 1}); |
| | | }, |
| | | error: function (xhr, status, error) { |
| | | notice.destroy(); |
| | | if (xhr.status === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg('导出失败:' + error, {icon: 2}); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function pakout(tableCache, layerIndex) { |
| | | // let loadIndex = layer.load(2); |
| | | notice.msg('正在生成盘点出库任务......', {icon: 4}); |
| | | $.ajax({ |
| | | url: baseUrl + "/out/checkPakOut/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | contentType: 'application/json;charset=UTF-8', |
| | | data: JSON.stringify(tableCache), |
| | | method: 'POST', |
| | | success: function (res) { |
| | | notice.destroy(); |
| | | if (res.code === 200) { |
| | | layer.close(layerIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | insTb.reload({where: null}); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | }); |
| New file |
| | |
| | | function getCol() { |
| | | var cols = [ |
| | | {type: 'checkbox', merge: ['locNo']} |
| | | ,{field: 'locNo', align: 'center',title: '库位号', merge: true, style: 'font-weight: bold'} |
| | | ]; |
| | | cols.push.apply(cols, detlCols); |
| | | cols.push({field: 'modiUser', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'modiTime', align: 'center',title: '修改时间'}) |
| | | return cols; |
| | | } |
| | | |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin', 'tableMerge'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | var tableMerge = layui.tableMerge; |
| | | |
| | | // 数据渲染 |
| | | var locDetlTableIns = table.render({ |
| | | elem: '#checkOrderLocQuery', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/stock/out/list/auth', |
| | | page: true, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | limit: 16, |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | } |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(checkOrderLocQuery)', function (obj) { |
| | | var checkStatus = table.checkStatus(String(obj.config.id)); |
| | | var data = checkStatus.data; |
| | | switch(obj.event) { |
| | | case 'confirm': |
| | | if (data.length === 0){ |
| | | layer.msg("请选择数据"); |
| | | return; |
| | | } |
| | | |
| | | if (data.some(obj => obj.frozen === 1)) { |
| | | layer.msg("冻结的库存不允许选择!"); |
| | | return; |
| | | } |
| | | |
| | | let locNos = []; |
| | | data.forEach(function(elem) { |
| | | locNos.push(elem.locNo); |
| | | }); |
| | | $.ajax({ |
| | | url: baseUrl+"/locDetl/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {locNos:locNos}, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | data = res.data; |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | parent.addCheckOrderTableData(data); |
| | | |
| | | // 关闭当前弹窗 |
| | | var index = parent.layer.getFrameIndex(window.name); |
| | | parent.layer.close(index); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | tableReload(); |
| | | }); |
| | | |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | |
| | | function tableReload() { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | locDetlTableIns.reload({ |
| | | where: searchData, |
| | | }); |
| | | } |
| | | }); |
| | |
| | | var isDuplicate = false; |
| | | for (var j = 0; j < xxDataList.length; j++) { |
| | | if (xxDataList[j].locNo === data[i].locNo && xxDataList[j].matnr === data[i].matnr && xxDataList[j].batch === data[i].batch) { |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | break; |
| | | if (xxDataList[j].diffQty !== 0){ |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (data[j].diffQty !== 0){ |
| | | isDuplicate = true; |
| | | duplicateCount++; |
| | | } |
| | | // 如果不重复,则添加到列表 |
| | | if (!isDuplicate) { |
| | |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | // 提示添加结果 |
| | | if (duplicateCount > 0) { |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据,' + duplicateCount + ' 条重复数据已忽略', {icon: 1}); |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据,' + duplicateCount + ' 条数据已忽略', {icon: 1}); |
| | | } else if (addedCount > 0) { |
| | | layer.msg('成功添加 ' + addedCount + ' 条数据', {icon: 1}); |
| | | } |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <!-- <link rel="stylesheet" href="../../static/css/common.css" media="all">--> |
| | | <!--[if lt IE 9]> |
| | | <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> |
| | | <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
| | | <![endif]--> |
| | | <style> |
| | | .wrk-trace { |
| | | color: green; |
| | | cursor: pointer; |
| | | margin-left: 6px; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .layui-timeline:first-child .layui-timeline-item { |
| | | margin-top: 30px; |
| | | } |
| | | .btn-add { |
| | | display: none; |
| | | } |
| | | .btn-edit { |
| | | display: none; |
| | | } |
| | | .btn-complete { |
| | | display: none; |
| | | } |
| | | .btn-delete { |
| | | display: none; |
| | | } |
| | | .layui-table-view .layui-table-cell .layui-select-title .layui-input { |
| | | height: 28px; |
| | | line-height: 28px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | |
| | | <!-- 正文开始 --> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <!-- 表格顶部工具栏 --> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline mr0"> |
| | | <input name="order_no" class="layui-input" type="text" placeholder="输入单据编号"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="doc_type" id="docType-query"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="settle"> |
| | | <option value="">选择状态</option> |
| | | <option value="1">待处理</option> |
| | | <option value="2">作业中</option> |
| | | <option value="4">已完成</option> |
| | | <option value="6">上报完成</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn icon-btn" lay-filter="tbSearch" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="orderAddBtn" class="layui-btn icon-btn btn-add"><i class="layui-icon"></i>添加 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table id="order" lay-filter="order"></table> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <!-- <div class="layui-card-body">--> |
| | | <!-- 入库通知单:由ERP提供单据编号、类型、单据时间及物料明细,生成入库作业单,为维护系统高可用,用户可自行添加入库通知单数据,完成独立的入库作业。--> |
| | | <!-- <span class="text-danger">手动添加时,请检查单据编号是否在ERP系统中已存在,避免发生数据错误问题。</span>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | </div> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="operate"> |
| | | {{# if (d.settle == 0 || d.settle == 1) { }} |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs layui-border-blue" lay-event="adjust">调整库存</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="del">删除</a> |
| | | {{# } }} |
| | | {{# if (d.settle == 2 || d.settle == 11) { }} |
| | | <a class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs btn-complete" lay-event="complete">完结</a> |
| | | {{# } }} |
| | | |
| | | |
| | | </script> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="tbLook"> |
| | | <span class="layui-text"> |
| | | <a href="javascript:;" lay-event="look"> |
| | | <i class="layui-icon" style="font-size: 12px;"></i> 查看单据明细 |
| | | </a> |
| | | </span> |
| | | </script> |
| | | <script type="text/html" id="orderNoTpl"> |
| | | {{d.orderNo}} |
| | | {{# if(d.settle > 1 && d.settle !== 3){ }} |
| | | |
| | | {{# } }} |
| | | <i class="layui-icon layui-icon-about wrk-trace" lay-tips="查看任务追溯" lay-direction="2" lay-offset="-10px,0px" lay-event="wrkTrace"></i> |
| | | </script> |
| | | |
| | | <!--<script type="text/html" id="settleTpl">--> |
| | | <!-- <span name="settle" class="layui-badge layui-badge-gray">{{d.settle$}}</span>--> |
| | | <!--</script>--> |
| | | <script type="text/html" id="settleTpl"> |
| | | <span name="settle" |
| | | {{# if( d.settle === 1){ }} |
| | | class="layui-badge layui-badge-red" |
| | | {{# }else if(d.settle === 2){ }} |
| | | class="layui-badge layui-badge-green" |
| | | {{# }else if(d.settle === 11){ }} |
| | | class="layui-badge layui-badge-green" |
| | | {{# }else if(d.settle === 3){ }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# }else if(d.settle === 4){ }} |
| | | class="layui-badge layui-badge-blue" |
| | | {{# }else if(d.settle === 5){ }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# }else if(d.settle === 6){ }} |
| | | class="layui-badge layui-badge-gray" |
| | | {{# } }} |
| | | >{{d.settle$}}</span> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="editForm" lay-filter="editForm" class="layui-form model-form"> |
| | | <input name="id" type="hidden"/> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单据类型:</label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="docType" placeholder="请输入单据类型" style="display: none"> |
| | | <input id="docType$" name="docType$" class="layui-input cool-auto-complete-div" data-condition="盘点单" onclick="autoShow(this.id)" type="text" placeholder="请输入单据类型" onfocus=this.blur() lay-verType="tips" lay-verify="required"> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="docTypeQueryBydocType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="docTypeQueryBydocTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">单据编号:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="orderNo" name="orderNo" placeholder="输入单据编号" type="text" class="layui-input" maxlength="20" lay-verType="tips" /> |
| | | <!-- lay-verify="required"--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="position: relative;"> |
| | | <label class="layui-form-label">单据明细:</label> |
| | | <div class="layui-input-block"> |
| | | <table id="formSSXMTable" lay-filter="formSSXMTable"></table> |
| | | </div> |
| | | <button class="layui-btn layui-btn-sm icon-btn" id="matAddBtnComment" |
| | | style="position: absolute; left: 20px;top: 60px;padding: 0 5px;" type="button"> |
| | | <i class="layui-icon"></i>添加明细 |
| | | </button> |
| | | </div> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | <button class="layui-btn" lay-filter="orderEditSubmit" lay-submit>保存</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="formSSXMTableBar"> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>--> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="matEditDialog"> |
| | | <form id="matEditForm" lay-filter="matEditForm" class="layui-form model-form"> |
| | | <input name="experimentId" type="hidden"/> |
| | | <div class="layui-form-item" style="float: left"> |
| | | <label class="layui-form-label">物料 - 多选</label> |
| | | <div class="layui-input-block"> |
| | | <div id="mat" name="mat"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item text-right" style="display: inline-block; margin-left: 35px"> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | <button class="layui-btn" lay-filter="matEditSubmit" lay-submit>保存</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | |
| | | <!-- 出库预览 --> |
| | | <script type="text/html" id="pakoutPreviewBox" style="display: none"> |
| | | <div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;"> |
| | | <span style="font-size: large; font-weight: bold">出库预览</span> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body" style="padding: 10px"> |
| | | <table id="stoPreTab" lay-filter="stoPreTab"></table> |
| | | </div> |
| | | <button class="layui-btn layui-btn-primary layui-border-black layui-btn-sm" lay-filter="batchModifySta" lay-submit style="display: block;float: right;margin-right: 1rem"> |
| | | 批量修改 |
| | | </button> |
| | | </div> |
| | | </script> |
| | | <script type="text/html" id="tbBasicTbStaNos"> |
| | | <div class="ew-select-fixed"> |
| | | <select class="order-sta-select" lay-filter="tbBasicTbStaNos"> |
| | | {{#if (d.staNos!=null) {}} |
| | | {{# for(let i=0; i<d.staNos.length; i++) { }} |
| | | <option value="{{d.staNos[i]}}">{{d.staNos[i]}}</option> |
| | | {{# } }} |
| | | {{# } }} |
| | | </select> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="staBatchSelectDialog"> |
| | | <form class="layui-form" style="padding: 25px 50px 30px 50px;text-align: center"> |
| | | <select id="batchSelectStaBox" name="batchSta" lay-vertype="tips" lay-verify="required" required=""> |
| | | </select> |
| | | <button style="margin-top: 30px" class="layui-btn" lay-filter="staBatchSelectConfirm" lay-submit="">确定</button> |
| | | </form> |
| | | </script> |
| | | |
| | | <script type="text/template" id="batchStaSelectTpl"> |
| | | <option value="">选择出库站</option> |
| | | {{#each list}} |
| | | <option value="{{this}}">{{this}}</option> |
| | | {{/each}} |
| | | </script> |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/tools/md5.js"></script> |
| | | <script type="text/javascript" src="../../static/js/adjustOrder/adjustOrder.js" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |
| | | {{#each records}} |
| | | <option value="{{docId}}">{{docName}}</option> |
| | | {{/each}} |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | .layui-table-box { |
| | | border-right: 1px solid #9F9F9F; |
| | | border-left: 1px solid #9F9F9F; |
| | | } |
| | | |
| | | #search-box { |
| | | padding: 30px 0 20px 0; |
| | | } |
| | | #search-box .layui-inline:first-child { |
| | | margin-left: 30px; |
| | | } |
| | | #search-box .layui-inline { |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | #data-search-btn { |
| | | margin-left: 10px; |
| | | display: inline-block; |
| | | } |
| | | #data-search-btn.layui-btn-container .layui-btn { |
| | | margin-right: 20px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <!-- <div style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;"> |
| | | <span style="font-size: large; font-weight: bold">提取库存商品</span> |
| | | </div> --> |
| | | <!-- 搜索栏 --> |
| | | <fieldset class="layui-elem-field site-demo-button" style="margin: 20px;"> |
| | | <legend>搜索栏</legend> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="crnNo" class="layui-input" name="crnNo" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="crnNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="堆垛机号" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basCrnpQueryBycrnNo" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basCrnpQueryBycrnNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="loc_no" placeholder="库位号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="specs" placeholder="规格" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="maktx" placeholder="物料描述" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="frozen" class="layui-input" type="text" autocomplete="off"> |
| | | <option value="">冻结否</option> |
| | | <option value="0">未冻结</option> |
| | | <option value="1">已冻结</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn" id="btn-confirm" lay-event="confirm">提取</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <div class="layui-form"> |
| | | <table class="layui-hide" id="checkOrderLocQuery" lay-filter="checkOrderLocQuery"></table> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/checkOrder/checkOrderLocQuery.js" charset="utf-8"></script> |
| | | |
| | | </body> |
| | | </html> |