| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private ClientService clientService; |
| | | |
| | | @RequestMapping(value = "/order/nav/list/auth") |
| | | @ManagerAuth |
| | |
| | | if (order != null) { |
| | | return R.error("单据编号已存在"); |
| | | } |
| | | Client client = clientService.selectOne(new EntityWrapper<Client>().eq("name", param.getCstmrName())); |
| | | if (null == client){ |
| | | return R.error("客户不存在"); |
| | | } |
| | | Date now = new Date(); |
| | | order = new OrderPakin( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | param.getOrderNo(), // 订单编号 |
| | | DateUtils.convert(now), // 单据日期 |
| | | param.getOrderTime(), // 单据日期 |
| | | param.getDocType(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | null, // 客户编号 |
| | | null, // 客户 |
| | | client.getCode(), // 客户编号 |
| | | client.getName(), // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | |
| | | } |
| | | Date now = new Date(); |
| | | Long userId = getUserId(); |
| | | Client client = clientService.selectOne(new EntityWrapper<Client>().eq("name", param.getCstmrName())); |
| | | if (null == client){ |
| | | return R.error("客户不存在"); |
| | | } |
| | | order.setCstmr(client.getCode()); |
| | | order.setCstmrName(client.getName()); |
| | | // 修改主档 |
| | | if (!param.getDocType().equals(order.getDocType())) { |
| | | if (!param.getDocType().equals(order.getDocType()) || !param.getOrderTime().equals(order.getOrderTime())) { |
| | | |
| | | order.setDocType(param.getDocType()); |
| | | order.setUpdateBy(userId); |
| | | order.setUpdateTime(now); |
| | | if (!orderService.updateById(order)) { |
| | | throw new CoolException("修改订单类型失败"); |
| | | } |
| | | order.setOrderTime(param.getOrderTime()); |
| | | |
| | | } |
| | | order.setUpdateBy(userId); |
| | | order.setUpdateTime(now); |
| | | if (!orderService.updateById(order)) { |
| | | throw new CoolException("修改订单类型失败"); |
| | | } |
| | | // 修改明细档 |
| | | // List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId()); |
| | |
| | | .add("list", wrkTraceVos) |
| | | .add("orderNo", order.getOrderNo()) |
| | | .add("totalQty", totalQty) |
| | | .add("wrkQty", wrkQty + endQty) |
| | | .add("wrkQty", wrkQty) |
| | | .add("lackQty", lackQty) |
| | | .add("endQty", endQty) |
| | | ); |
| | |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private ClientService clientService; |
| | | |
| | | @RequestMapping(value = "/order/nav/list/auth") |
| | | @ManagerAuth |
| | |
| | | if (order != null) { |
| | | return R.error("单据编号已存在"); |
| | | } |
| | | Client client = clientService.selectOne(new EntityWrapper<Client>().eq("name", param.getCstmrName())); |
| | | if (null == client){ |
| | | return R.error("客户不存在"); |
| | | } |
| | | Date now = new Date(); |
| | | order = new OrderPakout( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | param.getOrderNo(), // 订单编号 |
| | | DateUtils.convert(now), // 单据日期 |
| | | param.getOrderTime(), // 单据日期 |
| | | param.getDocType(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | null, // 客户编号 |
| | | null, // 客户 |
| | | client.getCode(), // 客户编号 |
| | | client.getName(), // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | |
| | | } |
| | | Date now = new Date(); |
| | | Long userId = getUserId(); |
| | | Client client = clientService.selectOne(new EntityWrapper<Client>().eq("name", param.getCstmrName())); |
| | | if (null == client){ |
| | | return R.error("客户不存在"); |
| | | } |
| | | // 修改主档 |
| | | if (!param.getDocType().equals(order.getDocType())) { |
| | | if (!param.getDocType().equals(order.getDocType()) || !param.getOrderTime().equals(order.getOrderTime())) { |
| | | order.setCstmr(client.getCode()); |
| | | order.setCstmrName(client.getName()); |
| | | order.setDocType(param.getDocType()); |
| | | order.setOrderTime(param.getOrderTime()); |
| | | order.setUpdateBy(userId); |
| | | order.setUpdateTime(now); |
| | | if (!orderService.updateById(order)) { |
| | |
| | | .add("list", wrkTraceVos) |
| | | .add("orderNo", order.getOrderNo()) |
| | | .add("totalQty", totalQty) |
| | | .add("wrkQty", wrkQty + endQty) |
| | | .add("wrkQty", wrkQty) |
| | | .add("lackQty", lackQty) |
| | | .add("endQty", endQty) |
| | | ); |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | public Order() { |
| | | } |
| | | |
| | | public Order(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public Order(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | public OrderLog() { |
| | | } |
| | | |
| | | public OrderLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | this.memo = memo; |
| | | } |
| | | |
| | | public OrderLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo, Integer pakinPakoutStatus) { |
| | | public OrderLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo, Integer pakinPakoutStatus) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | private Integer pakinPakoutStatus; |
| | | |
| | | |
| | | public OrderPakin(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderPakin(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | public OrderPakinLog() { |
| | | } |
| | | |
| | | public OrderPakinLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderPakinLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | public OrderPakout() { |
| | | } |
| | | |
| | | public OrderPakout(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderPakout(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | public OrderPakoutLog() { |
| | | } |
| | | |
| | | public OrderPakoutLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, Long cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | public OrderPakoutLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String cstmr, String cstmrName, String tel, String operMemb, Double totalFee, Double discount, Double discountFee, Double otherFee, Double actFee, Integer payType, String salesman, Integer accountDay, Integer postFeeType, Double postFee, Date payTime, Date sendTime, String shipName, String shipCode, Long settle, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | import com.zy.asrs.entity.OrderDetlPakout; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | private String orderNo; |
| | | |
| | | private String orderTime; |
| | | |
| | | private String cstmrName; |
| | | |
| | | private List<OrderDetl> orderDetlList; |
| | | private List<OrderDetlPakin> orderDetlPakinList; |
| | | private List<OrderDetlPakout> orderDetlPakoutList; |
| | |
| | | /** |
| | | * token有效期时间 |
| | | */ |
| | | private Integer tokenExpire = 1000 * 30 * 60; |
| | | private Integer tokenExpire = 100000 * 30 * 60; |
| | | /** |
| | | * token数量限制 |
| | | */ |
| | |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {field: 'orderTime', align: 'center', 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}, |
| | |
| | | |
| | | // 渲染搜索模板 |
| | | $.ajax({ |
| | | url: baseUrl+"/docType/list/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/docType/list/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | limit: 9999, |
| | | pakin: 1 |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | 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 if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | layer.msg(res.msg, { icon: 2 }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | // 渲染表格 |
| | | var insTb = table.render({ |
| | | elem: '#order', |
| | | url: baseUrl+'/order/pakin/order/head/page/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl + '/order/pakin/order/head/page/auth', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {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', width: 180} |
| | | { type: 'numbers' }, |
| | | { field: 'orderNo', title: '单据编号', templet: '#orderNoTpl' }, |
| | | { field: 'orderTime', align: 'center', title: '业务时间', }, |
| | | { field: 'cstmrName', align: 'center', 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', width: 180 } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | done: function (res, curr, count) { |
| | | limit(); |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | insTbCount = count; |
| | | } |
| | |
| | | |
| | | // 搜索 |
| | | form.on('submit(tbSearch)', function (data) { |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | insTb.reload({ where: data.field, page: { curr: 1 } }); |
| | | }); |
| | | |
| | | // 添加 |
| | |
| | | success: function (layero) { |
| | | table.render({ |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/order/pakin/orderDetl/list/auth', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | url: baseUrl + '/order/pakin/orderDetl/list/auth', |
| | | where: { |
| | | order_id: data.id |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '批号'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'workQty', title: '作业数量'}, |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'}, |
| | | { type: 'numbers' }, |
| | | { field: 'matnr', title: '商品编码', width: 160 }, |
| | | { field: 'maktx', title: '商品名称', width: 160 }, |
| | | { field: 'batch', title: '批号' }, |
| | | { field: 'anfme', title: '数量' }, |
| | | { field: 'workQty', title: '作业数量' }, |
| | | { field: 'qty', title: '完成数量', style: 'font-weight: bold' }, |
| | | // {field: 'unit', title: '单位'}, |
| | | // { |
| | | // field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | |
| | | // }, |
| | | // {field: 'inQty', title: '已入库量'}, |
| | | // {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'} |
| | | { field: 'specs', title: '规格' } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | if (expTpe) { |
| | | $('#orderNo').attr("disabled", "disabled"); |
| | | } |
| | | // 初始化业务时间日期选择器 |
| | | layDate.render({ |
| | | elem: '#orderTime', |
| | | type: 'datetime', |
| | | format: 'yyyy-MM-dd HH:mm:ss' |
| | | }); |
| | | // 初始化客户选择器 |
| | | var cstmrData = []; |
| | | $.ajax({ |
| | | url: baseUrl + "/client/list/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { limit: 9999 }, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | // 转换为 xmSelect 需要的格式 |
| | | res.data.records.forEach(function (item) { |
| | | cstmrData.push({ |
| | | name: item.name, |
| | | value: item.code |
| | | }); |
| | | }); |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }); |
| | | var cstmrXmSelect = xmSelect.render({ |
| | | el: '#cstmrSelect', |
| | | radio: true, |
| | | clickClose: true, |
| | | filterable: true, |
| | | create: function (val, arr) { |
| | | if (arr.length === 0) { |
| | | return { |
| | | name: val, |
| | | value: val |
| | | } |
| | | } |
| | | }, |
| | | model: { |
| | | icon: 'hidden', |
| | | label: { |
| | | type: 'text', |
| | | } |
| | | }, |
| | | data: cstmrData, |
| | | initValue: expTpe && expTpe.cstmr ? [expTpe.cstmr] : [] |
| | | }); |
| | | // 表单提交事件 |
| | | form.on('submit(orderEditSubmit)', function (data) { |
| | | // 验证客户必选 |
| | | if (!cstmrXmSelect.getValue()[0]) { |
| | | layer.msg('请选择客户', { icon: 2 }); |
| | | return false; |
| | | } |
| | | // 组装数据 |
| | | if (xxDataList.length <= 0) { |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', {tips: [1, '#ff4c4c']}); |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', { tips: [1, '#ff4c4c'] }); |
| | | return false; |
| | | } |
| | | let nList = admin.util.deepClone(xxDataList); |
| | | for (let xi = 0; xi < nList.length; xi++) { |
| | | if (nList[xi].anfme <= 0){ |
| | | layer.msg('明细修改数量不合法', {icon: 2}); |
| | | if (nList[xi].anfme <= 0) { |
| | | layer.msg('明细修改数量不合法', { icon: 2 }); |
| | | return false; |
| | | } |
| | | if (nList[xi].anfme < nList[xi].workQty){ |
| | | layer.msg('数量不能小于已作业数量', {icon: 2}); |
| | | if (nList[xi].anfme < nList[xi].workQty) { |
| | | layer.msg('数量不能小于已作业数量', { icon: 2 }); |
| | | return false; |
| | | } |
| | | } |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakin/order/form/" + (isExpAdd?"add":"modify") + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakin/order/form/" + (isExpAdd ? "add" : "modify") + "/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: JSON.stringify({ |
| | | orderId: Number(data.field.id), |
| | | docType: Number(data.field.docType), |
| | | orderNo: data.field.orderNo, |
| | | cstmrName: cstmrXmSelect.getValue()[0] ? cstmrXmSelect.getValue()[0].name : null, |
| | | orderTime: data.field.orderTime, |
| | | orderDetlPakinList: nList |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | 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}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | var xxDataList = []; |
| | | var tbOptions = { |
| | | elem: '#formSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | headers: { token: localStorage.getItem('token') }, |
| | | data: xxDataList, |
| | | page: true, |
| | | height: '350px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'batch', title: '批号', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'workQty', title: '作业数量', minWidth: 100, width: 100}, |
| | | { type: 'numbers', title: '#' }, |
| | | { field: 'matnr', title: '商品编码', width: 160 }, |
| | | { field: 'maktx', title: '商品名称', width: 200 }, |
| | | { field: 'batch', title: '批号', edit: true }, |
| | | { field: 'specs', title: '规格' }, |
| | | { field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110 }, |
| | | { field: 'workQty', title: '作业数量', minWidth: 100, width: 100 }, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {field: 'memo', title: '备注' , edit: true}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | { field: 'memo', title: '备注', edit: true }, |
| | | { align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right' } |
| | | ]], |
| | | done: function (res) { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | |
| | | }; |
| | | if (!isExpAdd) { |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakin/order/detl/all/auth?orderId=" + expTpe.id, |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakin/order/detl/all/auth?orderId=" + expTpe.id, |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | 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}) |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (layEvent === 'edit') { |
| | | showEditModel2(data); |
| | | } else if (layEvent === 'del') { |
| | | if(data.workQty > 0){ |
| | | layer.msg("已存在作业数量,不能删除", {icon: 2}); |
| | | if (data.workQty > 0) { |
| | | layer.msg("已存在作业数量,不能删除", { icon: 2 }); |
| | | return; |
| | | } |
| | | layer.confirm('确定要删除吗?', { |
| | |
| | | break; |
| | | } |
| | | } |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | insTbSSXM.reload({ data: xxDataList, page: { curr: 1 } }); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | table.on('edit(formSSXMTable)', function (obj) { |
| | | let index = obj.tr.attr("data-index"); |
| | | let data = xxDataList[index]; |
| | | if (obj.field === 'anfme'){ |
| | | if (obj.field === 'anfme') { |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | layer.msg("请输入数字", { icon: 2 }); |
| | | return false; |
| | | } else { |
| | | if (vle <= 0) { |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | layer.msg("数量必须大于零", { icon: 2 }); |
| | | // data[obj.field] = 0; |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | | return false; |
| | | } |
| | | if(obj.value < data.workQty){ |
| | | layer.msg("输入数量不能小于作业中数量", {icon: 2}); |
| | | if (obj.value < data.workQty) { |
| | | layer.msg("输入数量不能小于作业中数量", { icon: 2 }); |
| | | // data[obj.field] = 0; |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | | return false; |
| | |
| | | } |
| | | } |
| | | data[obj.field] = obj.value; |
| | | insTbSSXM.reload({data: xxDataList}); |
| | | insTbSSXM.reload({ data: xxDataList }); |
| | | }); |
| | | |
| | | $('#matAddBtnComment').click(function () { |
| | |
| | | // 表单提交事件 |
| | | form.on('submit(matEditSubmit)', function (data) { |
| | | let selectList = matXmSelect.getValue(); |
| | | for (let i = 0; i<selectList.length; i++) { |
| | | for (let i = 0; i < selectList.length; i++) { |
| | | let item = selectList[i]; |
| | | // 查询物料详情 |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/covert/"+item.value+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/mat/covert/" + item.value + "/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | xxDataList.push(res.data); |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | insTbSSXM.reload({ data: xxDataList, page: { curr: 1 } }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | toolbar: { show: true }, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | remoteMethod: function(val, cb, show){ |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/all/get/kv", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/mat/all/get/kv", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }); |
| | |
| | | layer.close(i); |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakin/order/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakin/order/delete/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | 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}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | console.log(orderId); |
| | | console.log(settle); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakin/order/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakin/order/update/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | id: orderId, |
| | | orderNo: orderNo, |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | 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}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | |
| | | // 任务追溯 |
| | | function showWrkTrace(orderId) { |
| | | let loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false}); |
| | | let loadIndex = layer.msg('请求中...', { icon: 16, shade: 0.01, time: false }); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakin/order/wrk/trace/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakin/order/wrk/trace/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | laytpl(wrkTraceDialog.innerHTML).render(res.data, function (html) { |
| | | admin.open({ |
| | | type: 1, |
| | |
| | | var traceOptions = { |
| | | title: { |
| | | text: '总量/作业/完成', x: 'center', y: '38%', |
| | | textStyle: {fontSize: 18, color: '#262626', fontWeight: 'normal'}, |
| | | subtextStyle: {fontSize: 36, color: '#10B4E8'}, |
| | | textStyle: { fontSize: 18, color: '#262626', fontWeight: 'normal' }, |
| | | subtextStyle: { fontSize: 36, color: '#10B4E8' }, |
| | | itemGap: 20 |
| | | }, |
| | | color: ['#10B4E8', '#E0E0E0', '#FF0000'], |
| | | tooltip: {trigger: 'item'}, |
| | | series: [{name: '数量', type: 'pie', radius: ['75%', '80%'], label: {normal: {show: false}}}] |
| | | tooltip: { trigger: 'item' }, |
| | | series: [{ name: '数量', type: 'pie', radius: ['75%', '80%'], label: { normal: { show: false } } }] |
| | | }; |
| | | traceCharts.setOption(traceOptions); |
| | | // 赋值 |
| | | traceCharts.setOption({ |
| | | title: { |
| | | subtext: res.data.totalQty+"/"+res.data.wrkQty+"/"+res.data.endQty |
| | | subtext: res.data.totalQty + "/" + res.data.wrkQty + "/" + res.data.endQty |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [ |
| | | {name: '已作业', value: res.data.wrkQty}, |
| | | {name: '未作业', value: res.data.totalQty-res.data.wrkQty-res.data.lackQty}, |
| | | {name: '库存不足', value: res.data.lackQty}, |
| | | { name: '已作业', value: res.data.wrkQty }, |
| | | { name: '未作业', value: res.data.totalQty - res.data.wrkQty - res.data.lackQty }, |
| | | { name: '库存不足', value: res.data.lackQty }, |
| | | ] |
| | | } |
| | | ] |
| | |
| | | } |
| | | }); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } 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 |
| | | , type: 'datetime' |
| | | , range: true |
| | | }); |
| | | }); |
| | |
| | | |
| | | // 渲染搜索模板 |
| | | $.ajax({ |
| | | url: baseUrl+"/docType/list/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/docType/list/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | limit: 9999, |
| | | pakout: 1 |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | 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 if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | layer.msg(res.msg, { icon: 2 }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | // 渲染表格 |
| | | var insTb = table.render({ |
| | | elem: '#order', |
| | | url: baseUrl+'/order/pakout/order/head/page/auth', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl + '/order/pakout/order/head/page/auth', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | | {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', width: 180} |
| | | { type: 'numbers' }, |
| | | { field: 'orderNo', title: '单据编号', templet: '#orderNoTpl' }, |
| | | { field: 'orderTime', align: 'center', title: '业务时间' }, |
| | | { field: 'cstmrName', align: 'center', 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', width: 180 } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | done: function (res, curr, count) { |
| | | limit(); |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | top.location.href = baseUrl + "/"; |
| | | } |
| | | insTbCount = count; |
| | | } |
| | |
| | | |
| | | // 搜索 |
| | | form.on('submit(tbSearch)', function (data) { |
| | | insTb.reload({where: data.field, page: {curr: 1}}); |
| | | insTb.reload({ where: data.field, page: { curr: 1 } }); |
| | | }); |
| | | |
| | | // 添加 |
| | |
| | | success: function (layero) { |
| | | table.render({ |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/order/pakout/orderDetl/list/auth', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | url: baseUrl + '/order/pakout/orderDetl/list/auth', |
| | | where: { |
| | | order_id: data.id |
| | | }, |
| | | page: true, |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'batch', title: '批号'}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'workQty', title: '作业数量'}, |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'}, |
| | | { type: 'numbers' }, |
| | | { field: 'matnr', title: '商品编码', width: 160 }, |
| | | { field: 'maktx', title: '商品名称', width: 160 }, |
| | | { field: 'batch', title: '批号' }, |
| | | { field: 'anfme', title: '数量' }, |
| | | { field: 'workQty', title: '作业数量' }, |
| | | { field: 'qty', title: '完成数量', style: 'font-weight: bold' }, |
| | | // {field: 'unit', title: '单位'}, |
| | | // { |
| | | // field: 'createTime$', title: '创建时间', sort: true, templet: function (d) { |
| | |
| | | // }, |
| | | // {field: 'inQty', title: '已入库量'}, |
| | | // {field: 'color', title: '颜色'}, |
| | | {field: 'specs', title: '规格'} |
| | | { field: 'specs', title: '规格' } |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | if (expTpe) { |
| | | $('#orderNo').attr("disabled", "disabled"); |
| | | } |
| | | // 初始化业务时间日期选择器 |
| | | layDate.render({ |
| | | elem: '#orderTime', |
| | | type: 'datetime', |
| | | format: 'yyyy-MM-dd HH:mm:ss' |
| | | }); |
| | | // 初始化客户选择器 |
| | | var cstmrData = []; |
| | | $.ajax({ |
| | | url: baseUrl + "/client/list/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { limit: 9999 }, |
| | | method: 'POST', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | // 转换为 xmSelect 需要的格式 |
| | | res.data.records.forEach(function (item) { |
| | | cstmrData.push({ |
| | | name: item.name, |
| | | value: item.code |
| | | }); |
| | | }); |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }); |
| | | var cstmrXmSelect = xmSelect.render({ |
| | | el: '#cstmrSelect', |
| | | radio: true, |
| | | clickClose: true, |
| | | filterable: true, |
| | | create: function (val, arr) { |
| | | if (arr.length === 0) { |
| | | return { |
| | | name: val, |
| | | value: val |
| | | } |
| | | } |
| | | }, |
| | | model: { |
| | | icon: 'hidden', |
| | | label: { |
| | | type: 'text', |
| | | } |
| | | }, |
| | | data: cstmrData, |
| | | initValue: expTpe && expTpe.cstmr ? [expTpe.cstmr] : [] |
| | | }); |
| | | // 表单提交事件 |
| | | form.on('submit(orderEditSubmit)', function (data) { |
| | | // 验证客户必选 |
| | | if (!cstmrXmSelect.getValue()[0]) { |
| | | layer.msg('请选择客户', { icon: 2 }); |
| | | return false; |
| | | } |
| | | // 组装数据 |
| | | if (xxDataList.length <= 0) { |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', {tips: [1, '#ff4c4c']}); |
| | | layer.tips('请添加单据明细', '#matAddBtnComment', { tips: [1, '#ff4c4c'] }); |
| | | return false; |
| | | } |
| | | let nList = admin.util.deepClone(xxDataList); |
| | | for (let xi = 0; xi < nList.length; xi++) { |
| | | if (nList[xi].anfme <= 0){ |
| | | layer.msg('明细修改数量不合法', {icon: 2}); |
| | | if (nList[xi].anfme <= 0) { |
| | | layer.msg('明细修改数量不合法', { icon: 2 }); |
| | | return false; |
| | | } |
| | | if (nList[xi].anfme < nList[xi].workQty){ |
| | | layer.msg('数量不能小于已作业数量', {icon: 2}); |
| | | if (nList[xi].anfme < nList[xi].workQty) { |
| | | layer.msg('数量不能小于已作业数量', { icon: 2 }); |
| | | return false; |
| | | } |
| | | } |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakout/order/form/" + (isExpAdd?"add":"modify") + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakout/order/form/" + (isExpAdd ? "add" : "modify") + "/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: JSON.stringify({ |
| | | orderId: Number(data.field.id), |
| | | docType: Number(data.field.docType), |
| | | orderNo: data.field.orderNo, |
| | | cstmrName: cstmrXmSelect.getValue()[0] ? cstmrXmSelect.getValue()[0].name : null, |
| | | orderTime: data.field.orderTime, |
| | | orderDetlPakoutList: nList |
| | | }), |
| | | contentType:'application/json;charset=UTF-8', |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | 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}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | var xxDataList = []; |
| | | var tbOptions = { |
| | | elem: '#formSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | headers: { token: localStorage.getItem('token') }, |
| | | data: xxDataList, |
| | | page: true, |
| | | height: '350px;', |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers', title: '#'}, |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 200}, |
| | | {field: 'batch', title: '批号', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'workQty', title: '作业数量', minWidth: 100, width: 100}, |
| | | { type: 'numbers', title: '#' }, |
| | | { field: 'matnr', title: '商品编码', width: 160 }, |
| | | { field: 'maktx', title: '商品名称', width: 200 }, |
| | | { field: 'batch', title: '批号', edit: true }, |
| | | { field: 'specs', title: '规格' }, |
| | | { field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110 }, |
| | | { field: 'workQty', title: '作业数量', minWidth: 100, width: 100 }, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {field: 'memo', title: '备注' , edit: true}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | { field: 'memo', title: '备注', edit: true }, |
| | | { align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right' } |
| | | ]], |
| | | done: function (res) { |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | |
| | | }; |
| | | if (!isExpAdd) { |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakout/order/detl/all/auth?orderId=" + expTpe.id, |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakout/order/detl/all/auth?orderId=" + expTpe.id, |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | 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}) |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | if (layEvent === 'edit') { |
| | | showEditModel2(data); |
| | | } else if (layEvent === 'del') { |
| | | if(data.workQty > 0){ |
| | | layer.msg("已存在作业数量,不能删除", {icon: 2}); |
| | | if (data.workQty > 0) { |
| | | layer.msg("已存在作业数量,不能删除", { icon: 2 }); |
| | | return; |
| | | } |
| | | layer.confirm('确定要删除吗?', { |
| | |
| | | break; |
| | | } |
| | | } |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | insTbSSXM.reload({ data: xxDataList, page: { curr: 1 } }); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | table.on('edit(formSSXMTable)', function (obj) { |
| | | let index = obj.tr.attr("data-index"); |
| | | let data = xxDataList[index]; |
| | | if (obj.field === 'anfme'){ |
| | | if (obj.field === 'anfme') { |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | layer.msg("请输入数字", { icon: 2 }); |
| | | return false; |
| | | } else { |
| | | if (vle <= 0) { |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | layer.msg("数量必须大于零", { icon: 2 }); |
| | | // data[obj.field] = 0; |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | | return false; |
| | | } |
| | | if(obj.value < data.workQty){ |
| | | layer.msg("输入数量不能小于作业中数量", {icon: 2}); |
| | | if (obj.value < data.workQty) { |
| | | layer.msg("输入数量不能小于作业中数量", { icon: 2 }); |
| | | // data[obj.field] = 0; |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | | return false; |
| | |
| | | } |
| | | } |
| | | data[obj.field] = obj.value; |
| | | insTbSSXM.reload({data: xxDataList}); |
| | | insTbSSXM.reload({ data: xxDataList }); |
| | | }); |
| | | |
| | | $('#matAddBtnComment').click(function () { |
| | |
| | | // 表单提交事件 |
| | | form.on('submit(matEditSubmit)', function (data) { |
| | | let selectList = matXmSelect.getValue(); |
| | | for (let i = 0; i<selectList.length; i++) { |
| | | for (let i = 0; i < selectList.length; i++) { |
| | | let item = selectList[i]; |
| | | // 查询物料详情 |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/covert/"+item.value+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/mat/covert/" + item.value + "/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | method: 'GET', |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | xxDataList.push(res.data); |
| | | insTbSSXM.reload({data: xxDataList, page: {curr: 1}}); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | insTbSSXM.reload({ data: xxDataList, page: { curr: 1 } }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | toolbar: { show: true }, |
| | | filterable: true, |
| | | remoteSearch: true, |
| | | remoteMethod: function(val, cb, show){ |
| | | remoteMethod: function (val, cb, show) { |
| | | $.ajax({ |
| | | url: baseUrl+"/mat/all/get/kv", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/mat/all/get/kv", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | condition: val |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | cb(res.data) |
| | | } else { |
| | | cb([]); |
| | | layer.msg(res.msg, {icon: 2}); |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }); |
| | |
| | | layer.close(i); |
| | | layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakout/order/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakout/order/delete/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | 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}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | console.log(orderId); |
| | | console.log(settle); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakout/order/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakout/order/update/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | id: orderId, |
| | | orderNo: orderNo, |
| | |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll('loading'); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | if (insTbCount === 0) { |
| | | insTb.reload({page: {curr: 1}}); |
| | | 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}); |
| | | layer.msg(res.msg, { icon: 1 }); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg, { icon: 2 }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | |
| | | // 任务追溯 |
| | | function showWrkTrace(orderId) { |
| | | let loadIndex = layer.msg('请求中...', {icon: 16, shade: 0.01, time: false}); |
| | | let loadIndex = layer.msg('请求中...', { icon: 16, shade: 0.01, time: false }); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/pakout/order/wrk/trace/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | url: baseUrl + "/order/pakout/order/wrk/trace/auth", |
| | | headers: { 'token': localStorage.getItem('token') }, |
| | | data: { |
| | | orderId: orderId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | if (res.code === 200) { |
| | | laytpl(wrkTraceDialog.innerHTML).render(res.data, function (html) { |
| | | admin.open({ |
| | | type: 1, |
| | |
| | | var traceOptions = { |
| | | title: { |
| | | text: '总量/作业/完成', x: 'center', y: '38%', |
| | | textStyle: {fontSize: 18, color: '#262626', fontWeight: 'normal'}, |
| | | subtextStyle: {fontSize: 36, color: '#10B4E8'}, |
| | | textStyle: { fontSize: 18, color: '#262626', fontWeight: 'normal' }, |
| | | subtextStyle: { fontSize: 36, color: '#10B4E8' }, |
| | | itemGap: 20 |
| | | }, |
| | | color: ['#10B4E8', '#E0E0E0', '#FF0000'], |
| | | tooltip: {trigger: 'item'}, |
| | | series: [{name: '数量', type: 'pie', radius: ['75%', '80%'], label: {normal: {show: false}}}] |
| | | tooltip: { trigger: 'item' }, |
| | | series: [{ name: '数量', type: 'pie', radius: ['75%', '80%'], label: { normal: { show: false } } }] |
| | | }; |
| | | traceCharts.setOption(traceOptions); |
| | | // 赋值 |
| | | traceCharts.setOption({ |
| | | title: { |
| | | subtext: res.data.totalQty+"/"+res.data.wrkQty+"/"+res.data.endQty |
| | | subtext: res.data.totalQty + "/" + res.data.wrkQty + "/" + res.data.endQty |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [ |
| | | {name: '已作业', value: res.data.wrkQty}, |
| | | {name: '未作业', value: res.data.totalQty-res.data.wrkQty-res.data.lackQty}, |
| | | {name: '库存不足', value: res.data.lackQty}, |
| | | { name: '已作业', value: res.data.wrkQty }, |
| | | { name: '未作业', value: res.data.totalQty - res.data.wrkQty - res.data.lackQty }, |
| | | { name: '库存不足', value: res.data.lackQty }, |
| | | ] |
| | | } |
| | | ] |
| | |
| | | } |
| | | }); |
| | | }); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } 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 |
| | | , type: 'datetime' |
| | | , range: true |
| | | }); |
| | | }); |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | |
| | | .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; |
| | | } |
| | | </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 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> |
| | | <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 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> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="doc_type" id="docType-query"> |
| | | </select> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="doc_type" id="docType-query"> |
| | | </select> |
| | | </div> |
| | | </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 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> |
| | | <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 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> |
| | | <table id="order" lay-filter="order"></table> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | 入库通知单:由ERP提供单据编号、类型、单据时间及物料明细,生成入库作业单,为维护系统高可用,用户可自行添加入库通知单数据,完成独立的入库作业。 |
| | | <span class="text-danger">手动添加时,请检查单据编号是否在ERP系统中已存在,避免发生数据错误问题。</span> |
| | | </div> |
| | | </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"> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="operate"> |
| | | {{# if (d.settle == 0 || d.settle == 1) { }} |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="del">删除</a> |
| | |
| | | <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"> |
| | | <!-- 表格操作列 --> |
| | | <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"> |
| | | <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"> |
| | | <!--<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" |
| | |
| | | {{# } }} |
| | | >{{d.settle$}}</span> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <!-- 表单弹窗 --> |
| | | <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"> |
| | |
| | | <!-- lay-verify="required"--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">客户:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="cstmr" name="cstmr" type="hidden" /> |
| | | <div id="cstmrSelect" ></div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">业务时间:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="orderTime" name="orderTime" placeholder="选择业务时间" type="text" class="layui-input" autocomplete="off" lay-verType="tips" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="position: relative;"> |
| | | <label class="layui-form-label">单据明细:</label> |
| | | <div class="layui-input-block"> |
| | |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="formSSXMTableBar"> |
| | | <!-- 表格操作列 --> |
| | | <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"> |
| | | </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"> |
| | |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <!-- 订单任务追溯 --> |
| | | <script id="wrkTraceDialog" type="text/html" style="position: relative"> |
| | | <!-- 订单任务追溯 --> |
| | | <script id="wrkTraceDialog" type="text/html" style="position: relative"> |
| | | <div style="position: absolute; top: 0; left: 0;"> |
| | | <div class="layui-card" style="overflow: hidden;"> |
| | | <div class="layui-card-header" style="text-align: center;width: 80%;font-weight: inherit;font-size: 18px">{{ d.orderNo }}</div> |
| | |
| | | |
| | | |
| | | </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/echarts/echarts.min.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/orderPakin/order.js" charset="utf-8"></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/echarts/echarts.min.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/orderPakin/order.js" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |
| | | {{#each records}} |
| | | <option value="{{docId}}">{{docName}}</option> |
| | |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | | |
| | | </html> |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | |
| | | .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; |
| | | } |
| | | </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 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> |
| | | <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 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> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="doc_type" id="docType-query"> |
| | | </select> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <select name="doc_type" id="docType-query"> |
| | | </select> |
| | | </div> |
| | | </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 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> |
| | | <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 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> |
| | | <table id="order" lay-filter="order"></table> |
| | | </div> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | 入库通知单:由ERP提供单据编号、类型、单据时间及物料明细,生成入库作业单,为维护系统高可用,用户可自行添加入库通知单数据,完成独立的入库作业。 |
| | | <span class="text-danger">手动添加时,请检查单据编号是否在ERP系统中已存在,避免发生数据错误问题。</span> |
| | | </div> |
| | | </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"> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="operate"> |
| | | {{# if (d.settle == 0 || d.settle == 1) { }} |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-delete" lay-event="del">删除</a> |
| | |
| | | <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"> |
| | | <!-- 表格操作列 --> |
| | | <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"> |
| | | <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"> |
| | | <!--<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" |
| | |
| | | {{# } }} |
| | | >{{d.settle$}}</span> |
| | | </script> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <!-- 表单弹窗 --> |
| | | <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"> |
| | |
| | | <!-- lay-verify="required"--> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">客户:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="cstmr" name="cstmr" type="hidden" /> |
| | | <div id="cstmrSelect" ></div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">业务时间:</label> |
| | | <div class="layui-input-block"> |
| | | <input id="orderTime" name="orderTime" placeholder="选择业务时间" type="text" class="layui-input" autocomplete="off" lay-verType="tips" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item" style="position: relative;"> |
| | | <label class="layui-form-label">单据明细:</label> |
| | | <div class="layui-input-block"> |
| | |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="formSSXMTableBar"> |
| | | <!-- 表格操作列 --> |
| | | <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"> |
| | | </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"> |
| | |
| | | </div> |
| | | </form> |
| | | </script> |
| | | <!-- 订单任务追溯 --> |
| | | <script id="wrkTraceDialog" type="text/html" style="position: relative"> |
| | | <!-- 订单任务追溯 --> |
| | | <script id="wrkTraceDialog" type="text/html" style="position: relative"> |
| | | <div style="position: absolute; top: 0; left: 0;"> |
| | | <div class="layui-card" style="overflow: hidden;"> |
| | | <div class="layui-card-header" style="text-align: center;width: 80%;font-weight: inherit;font-size: 18px">{{ d.orderNo }}</div> |
| | |
| | | |
| | | |
| | | </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/echarts/echarts.min.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/orderPakout/order.js" charset="utf-8"></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/echarts/echarts.min.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/orderPakout/order.js" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |
| | | {{#each records}} |
| | | <option value="{{docId}}">{{docName}}</option> |
| | |
| | | </script> |
| | | </body> |
| | | |
| | | </html> |
| | | |
| | | </html> |