18516761980
2022-01-04 2006477f294b65db6b4836ce988b4767739a43a1
#单据类型区分入库单和出库单
5个文件已修改
19个文件已添加
1 文件已重命名
3925 ■■■■■ 已修改文件
src/main/java/zy/cloud/wms/manager/controller/DocTypeController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/controller/ReceiveController.java 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/controller/ReceiveDetlController.java 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/entity/Receive.java 772 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/entity/ReceiveDetl.java 470 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/mapper/ReceiveDetlMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/mapper/ReceiveMapper.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/service/ReceiveDetlService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/service/ReceiveService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/service/impl/ReceiveDetlServiceImpl.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/service/impl/ReceiveServiceImpl.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ReceiveDetlMapper.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ReceiveMapper.xml 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/docType/docType.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/order/order.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/receive/receive.js 547 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/receiveDetl/receiveDetl.js 530 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/docType/docType_detail.html 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/order.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/receive/matQuery.html 214 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/receive/matQueryBox.html 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/receive/receive.html 261 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/receiveDetl/receiveDetl.html 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/receiveDetl/receiveDetl_detail.html 202 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
version/db/wms_saas20220104.bak 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/controller/DocTypeController.java
@@ -66,6 +66,13 @@
    @RequestMapping(value = "/docType/add/auth")
    @ManagerAuth
    public R add(DocType docType) {
        if(Cools.isEmpty(docType) || null==docType.getDocId()) {
            return R.error();
        }
        DocType one = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_id", docType.getDocId()));
        if(!Cools.isEmpty(one)){
            return R.error("单据编码已存在");
        }
        docType.setHostId(getHostId());
        docType.setCreateBy(getUserId());
        docType.setCreateTime(new Date());
src/main/java/zy/cloud/wms/manager/controller/ReceiveController.java
New file
@@ -0,0 +1,183 @@
package zy.cloud.wms.manager.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import com.core.exception.CoolException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import zy.cloud.wms.common.config.AdminInterceptor;
import zy.cloud.wms.common.utils.BarcodeUtils;
import zy.cloud.wms.common.utils.QrCode;
import zy.cloud.wms.common.web.BaseController;
import zy.cloud.wms.manager.entity.Receive;
import zy.cloud.wms.manager.service.ReceiveService;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
public class ReceiveController extends BaseController {
    @Autowired
    private ReceiveService receiveService;
    @RequestMapping(value = "/receive/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(receiveService.selectById(String.valueOf(id)));
    }
    @RequestMapping(value = "/receive/list/auth")
    @ManagerAuth
    public R list(@RequestParam(defaultValue = "1")Integer curr,
                  @RequestParam(defaultValue = "10")Integer limit,
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<Receive> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        hostEq(wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        else {
            wrapper.orderBy("update_time", false);
        }
        return R.ok(receiveService.selectPage(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
                String[] dates = val.split(RANGE_TIME_LINK);
                wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
                wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
            } else {
                wrapper.like(entry.getKey(), val);
            }
        }
    }
    @RequestMapping(value = "/receive/add/auth")
    @ManagerAuth
    public R add(Receive receive) {
        receiveService.insert(receive);
        return R.ok();
    }
    @RequestMapping(value = "/receive/update/auth")
    @ManagerAuth
    public R update(Receive receive){
        if (Cools.isEmpty(receive) || null==receive.getId()){
            return R.error();
        }
        receiveService.updateById(receive);
        return R.ok();
    }
    @RequestMapping(value = "/receive/delete/auth")
    @ManagerAuth
    public R delete(@RequestParam String param){
        List<Receive> list = JSONArray.parseArray(param, Receive.class);
        if (Cools.isEmpty(list)){
            return R.error();
        }
        for (Receive entity : list){
            receiveService.delete(new EntityWrapper<>(entity));
        }
        return R.ok();
    }
    @RequestMapping(value = "/receives/delete/auth")
    @ManagerAuth
    @Transactional
    public R deleteBatch(@RequestParam(value = "ids[]") Long[] ids){
        if (Cools.isEmpty((Object) ids)){
            return R.error();
        }
        for (Long id : ids){
            if (!receiveService.deleteById(id)) {
                throw new CoolException("服务器错误,请联系管理员");
            }
        }
        return R.ok();
    }
    @RequestMapping(value = "/receive/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        EntityWrapper<Receive> wrapper = new EntityWrapper<>();
        hostEq(wrapper);
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("order"));
        convert(map, wrapper);
        List<Receive> list = receiveService.selectList(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/receiveQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Receive> wrapper = new EntityWrapper<>();
        wrapper.like("id", condition);
        hostEq(wrapper);
        Page<Receive> page = receiveService.selectPage(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (Receive receive : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
            map.put("id", receive.getId());
            map.put("value", receive.getId());
            result.add(map);
        }
        return R.ok(result);
    }
    @RequestMapping(value = "/receive/check/column/auth")
    @ManagerAuth
    public R query(@RequestBody JSONObject param) {
        Wrapper<Receive> wrapper = new EntityWrapper<Receive>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != receiveService.selectOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(Receive.class, String.valueOf(param.get("key"))));
        }
        return R.ok();
    }
    @RequestMapping(value = "/receive/code/auth")
//    @ManagerAuth(memo = "条形码获取(type:1(条形码);2(二维码)")
    public R barcode(@RequestParam(defaultValue = "1") Integer type
                    ,@RequestParam String param
                    ,HttpServletResponse response) throws Exception {
        AdminInterceptor.cors(response);
        if (Cools.isEmpty(param)){
            return R.parse(BaseRes.EMPTY);
        }
        BufferedImage img;
        if (type == 1) {
            img = BarcodeUtils.encode(param);
        } else {
            img = QrCode.createImg(param);
        }
        if (!ImageIO.write(img, "jpg", response.getOutputStream())) {
            throw new IOException("Could not write an image of format jpg");
        }
        response.getOutputStream().flush();
        response.getOutputStream().close();
        return R.ok();
    }
}
src/main/java/zy/cloud/wms/manager/controller/ReceiveDetlController.java
New file
@@ -0,0 +1,133 @@
package zy.cloud.wms.manager.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import zy.cloud.wms.common.web.BaseController;
import zy.cloud.wms.manager.entity.ReceiveDetl;
import zy.cloud.wms.manager.service.ReceiveDetlService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
public class ReceiveDetlController extends BaseController {
    @Autowired
    private ReceiveDetlService receiveDetlService;
    @RequestMapping(value = "/receiveDetl/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
        return R.ok(receiveDetlService.selectById(String.valueOf(id)));
    }
    @RequestMapping(value = "/receiveDetl/list/auth")
    @ManagerAuth
    public R list(@RequestParam(defaultValue = "1")Integer curr,
                  @RequestParam(defaultValue = "10")Integer limit,
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<ReceiveDetl> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        hostEq(wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        return R.ok(receiveDetlService.selectPage(new Page<>(curr, limit), wrapper));
    }
    private void convert(Map<String, Object> map, EntityWrapper wrapper){
        for (Map.Entry<String, Object> entry : map.entrySet()){
            String val = String.valueOf(entry.getValue());
            if (val.contains(RANGE_TIME_LINK)){
                String[] dates = val.split(RANGE_TIME_LINK);
                wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
                wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
            } else {
                wrapper.eq(entry.getKey(), val);
            }
        }
    }
    @RequestMapping(value = "/receiveDetl/add/auth")
    @ManagerAuth
    public R add(ReceiveDetl receiveDetl) {
        receiveDetlService.insert(receiveDetl);
        return R.ok();
    }
    @RequestMapping(value = "/receiveDetl/update/auth")
    @ManagerAuth
    public R update(ReceiveDetl receiveDetl){
        if (Cools.isEmpty(receiveDetl) || null==receiveDetl.getId()){
            return R.error();
        }
        receiveDetlService.updateById(receiveDetl);
        return R.ok();
    }
    @RequestMapping(value = "/receiveDetl/delete/auth")
    @ManagerAuth
    public R delete(@RequestParam String param){
        List<ReceiveDetl> list = JSONArray.parseArray(param, ReceiveDetl.class);
        if (Cools.isEmpty(list)){
            return R.error();
        }
        for (ReceiveDetl entity : list){
            receiveDetlService.delete(new EntityWrapper<>(entity));
        }
        return R.ok();
    }
    @RequestMapping(value = "/receiveDetl/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){
        EntityWrapper<ReceiveDetl> wrapper = new EntityWrapper<>();
        hostEq(wrapper);
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("orderDetl"));
        convert(map, wrapper);
        List<ReceiveDetl> list = receiveDetlService.selectList(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    @RequestMapping(value = "/receiveDetlQuery/auth")
    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<ReceiveDetl> wrapper = new EntityWrapper<>();
        wrapper.like("id", condition);
        hostEq(wrapper);
        Page<ReceiveDetl> page = receiveDetlService.selectPage(new Page<>(0, 10), wrapper);
        List<Map<String, Object>> result = new ArrayList<>();
        for (ReceiveDetl receiveDetl : page.getRecords()){
            Map<String, Object> map = new HashMap<>();
            map.put("id", receiveDetl.getId());
            map.put("value", receiveDetl.getId());
            result.add(map);
        }
        return R.ok(result);
    }
    @RequestMapping(value = "/receiveDetl/check/column/auth")
    @ManagerAuth
    public R query(@RequestBody JSONObject param) {
        Wrapper<ReceiveDetl> wrapper = new EntityWrapper<ReceiveDetl>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
        if (null != receiveDetlService.selectOne(wrapper)){
            return R.parse(BaseRes.REPEAT).add(getComment(ReceiveDetl.class, String.valueOf(param.get("key"))));
        }
        return R.ok();
    }
}
src/main/java/zy/cloud/wms/manager/entity/Receive.java
New file
@@ -0,0 +1,772 @@
package zy.cloud.wms.manager.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import io.swagger.annotations.ApiModelProperty;
import zy.cloud.wms.manager.service.CstmrService;
import zy.cloud.wms.manager.service.DocTypeService;
import zy.cloud.wms.manager.service.ItemService;
import zy.cloud.wms.manager.service.OrderSettleService;
import zy.cloud.wms.system.entity.Host;
import zy.cloud.wms.system.entity.User;
import zy.cloud.wms.system.service.HostService;
import zy.cloud.wms.system.service.UserService;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
@TableName("man_receive")
public class Receive implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 所属项目
     */
    @ApiModelProperty(value= "所属项目")
    @TableField("host_id")
    private Long hostId;
    /**
     * 编号
     */
    @ApiModelProperty(value= "编号")
    private String uuid;
    /**
     * 订单编号
     */
    @ApiModelProperty(value= "订单编号")
    @TableField("order_no")
    private String orderNo;
    /**
     * 单据日期
     */
    @ApiModelProperty(value= "单据日期")
    @TableField("order_time")
    private String orderTime;
    /**
     * 单据类型
     */
    @ApiModelProperty(value= "单据类型")
    @TableField("doc_type")
    private Long docType;
    /**
     * 项目编号
     */
    @ApiModelProperty(value= "项目编号")
    @TableField("item_id")
    private Long itemId;
    /**
     * 项目名称
     */
    @ApiModelProperty(value= "项目名称")
    @TableField("item_name")
    private String itemName;
    /**
     * 调拨项目编号
     */
    @ApiModelProperty(value= "调拨项目编号")
    @TableField("allot_item_id")
    private Long allotItemId;
    /**
     * 初始票据号
     */
    @ApiModelProperty(value= "初始票据号")
    @TableField("def_number")
    private String defNumber;
    /**
     * 票据号
     */
    @ApiModelProperty(value= "票据号")
    private String number;
    /**
     * 客户编号
     */
    @ApiModelProperty(value= "客户编号")
    private Long cstmr;
    /**
     * 客户
     */
    @ApiModelProperty(value= "客户")
    @TableField("cstmr_name")
    private String cstmrName;
    /**
     * 联系方式
     */
    @ApiModelProperty(value= "联系方式")
    private String tel;
    /**
     * 操作人员
     */
    @ApiModelProperty(value= "操作人员")
    @TableField("oper_memb")
    private String operMemb;
    /**
     * 合计金额
     */
    @ApiModelProperty(value= "合计金额")
    @TableField("total_fee")
    private Double totalFee;
    /**
     * 优惠率
     */
    @ApiModelProperty(value= "优惠率")
    private Double discount;
    /**
     * 优惠金额
     */
    @ApiModelProperty(value= "优惠金额")
    @TableField("discount_fee")
    private Double discountFee;
    /**
     * 销售或采购费用合计
     */
    @ApiModelProperty(value= "销售或采购费用合计")
    @TableField("other_fee")
    private Double otherFee;
    /**
     * 实付金额
     */
    @ApiModelProperty(value= "实付金额")
    @TableField("act_fee")
    private Double actFee;
    /**
     * 付款类型 1: 现金  2: 记账
     */
    @ApiModelProperty(value= "付款类型 1: 现金  2: 记账  ")
    @TableField("pay_type")
    private Integer payType;
    /**
     * 业务员
     */
    @ApiModelProperty(value= "业务员")
    private String salesman;
    /**
     * 结算天数
     */
    @ApiModelProperty(value= "结算天数")
    @TableField("account_day")
    private Integer accountDay;
    /**
     * 邮费支付类型 1: 在线支付  2: 货到付款
     */
    @ApiModelProperty(value= "邮费支付类型 1: 在线支付  2: 货到付款  ")
    @TableField("post_fee_type")
    private Integer postFeeType;
    /**
     * 邮费
     */
    @ApiModelProperty(value= "邮费")
    @TableField("post_fee")
    private Double postFee;
    /**
     * 付款时间
     */
    @ApiModelProperty(value= "付款时间")
    @TableField("pay_time")
    private Date payTime;
    /**
     * 发货时间
     */
    @ApiModelProperty(value= "发货时间")
    @TableField("send_time")
    private Date sendTime;
    /**
     * 物流名称
     */
    @ApiModelProperty(value= "物流名称")
    @TableField("ship_name")
    private String shipName;
    /**
     * 物流单号
     */
    @ApiModelProperty(value= "物流单号")
    @TableField("ship_code")
    private String shipCode;
    /**
     * 订单状态
     */
    @ApiModelProperty(value= "订单状态")
    private Long settle;
    /**
     * 状态 1: 正常  0: 禁用
     */
    @ApiModelProperty(value= "状态 1: 正常  0: 禁用  ")
    private Integer status;
    /**
     * 添加人员
     */
    @ApiModelProperty(value= "添加人员")
    @TableField("create_by")
    private Long createBy;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @TableField("update_by")
    private Long updateBy;
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @TableField("update_time")
    private Date updateTime;
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    private String memo;
    public Receive() {}
    public Receive(Long hostId, 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) {
        this.hostId = hostId;
        this.uuid = uuid;
        this.orderNo = orderNo;
        this.orderTime = orderTime;
        this.docType = docType;
        this.itemId = itemId;
        this.itemName = itemName;
        this.allotItemId = allotItemId;
        this.defNumber = defNumber;
        this.number = number;
        this.cstmr = cstmr;
        this.cstmrName = cstmrName;
        this.tel = tel;
        this.operMemb = operMemb;
        this.totalFee = totalFee;
        this.discount = discount;
        this.discountFee = discountFee;
        this.otherFee = otherFee;
        this.actFee = actFee;
        this.payType = payType;
        this.salesman = salesman;
        this.accountDay = accountDay;
        this.postFeeType = postFeeType;
        this.postFee = postFee;
        this.payTime = payTime;
        this.sendTime = sendTime;
        this.shipName = shipName;
        this.shipCode = shipCode;
        this.settle = settle;
        this.status = status;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.memo = memo;
    }
//    Order order = new Order(
//            null,    // 编号[非空]
//            null,    // 订单编号
//            null,    // 单据日期
//            null,    // 单据类型
//            null,    // 项目编号
//            null,    // 调拨项目编号
//            null,    // 初始票据号
//            null,    // 票据号
//            null,    // 客户编号
//            null,    // 客户
//            null,    // 联系方式
//            null,    // 操作人员
//            null,    // 合计金额
//            null,    // 优惠率
//            null,    // 优惠金额
//            null,    // 销售或采购费用合计
//            null,    // 实付金额
//            null,    // 付款类型
//            null,    // 业务员
//            null,    // 结算天数
//            null,    // 邮费支付类型
//            null,    // 邮费
//            null,    // 付款时间
//            null,    // 发货时间
//            null,    // 物流名称
//            null,    // 物流单号
//            null,    // 订单状态
//            null,    // 状态
//            null,    // 添加人员
//            null,    // 添加时间
//            null,    // 修改人员
//            null,    // 修改时间
//            null    // 备注
//    );
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getHostId() {
        return hostId;
    }
    public void setHostId(Long hostId) {
        this.hostId = hostId;
    }
    public String getHostId$(){
        HostService service = SpringUtils.getBean(HostService.class);
        Host host = service.selectById(this.hostId);
        if (!Cools.isEmpty(host)){
            return String.valueOf(host.getName());
        }
        return null;
    }
    public String getUuid() {
        return uuid;
    }
    public void setUuid(String uuid) {
        this.uuid = uuid;
    }
    public String getOrderNo() {
        return orderNo;
    }
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
    public String getOrderTime() {
        return orderTime;
    }
    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }
    public Long getDocType() {
        return docType;
    }
    public String getDocType$(){
        DocTypeService service = SpringUtils.getBean(DocTypeService.class);
        DocType docType = service.selectById(this.docType);
        if (!Cools.isEmpty(docType)){
            return String.valueOf(docType.getDocName());
        }
        return null;
    }
    public void setDocType(Long docType) {
        this.docType = docType;
    }
    public Long getItemId() {
        return itemId;
    }
    public String getItemId$(){
        ItemService service = SpringUtils.getBean(ItemService.class);
        Item item = service.selectById(this.itemId);
        if (!Cools.isEmpty(item)){
            return String.valueOf(item.getId());
        }
        return null;
    }
    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }
    public String getItemName() {
        return itemName;
    }
    public void setItemName(String itemName) {
        this.itemName = itemName;
    }
    public Long getAllotItemId() {
        return allotItemId;
    }
    public String getAllotItemId$(){
        ItemService service = SpringUtils.getBean(ItemService.class);
        Item item = service.selectById(this.allotItemId);
        if (!Cools.isEmpty(item)){
            return String.valueOf(item.getId());
        }
        return null;
    }
    public void setAllotItemId(Long allotItemId) {
        this.allotItemId = allotItemId;
    }
    public String getDefNumber() {
        return defNumber;
    }
    public void setDefNumber(String defNumber) {
        this.defNumber = defNumber;
    }
    public String getNumber() {
        return number;
    }
    public void setNumber(String number) {
        this.number = number;
    }
    public Long getCstmr() {
        return cstmr;
    }
    public String getCstmr$(){
        CstmrService service = SpringUtils.getBean(CstmrService.class);
        Cstmr cstmr = service.selectById(this.cstmr);
        if (!Cools.isEmpty(cstmr)){
            return String.valueOf(cstmr.getId());
        }
        return null;
    }
    public void setCstmr(Long cstmr) {
        this.cstmr = cstmr;
    }
    public String getCstmrName() {
        return cstmrName;
    }
    public void setCstmrName(String cstmrName) {
        this.cstmrName = cstmrName;
    }
    public String getTel() {
        return tel;
    }
    public void setTel(String tel) {
        this.tel = tel;
    }
    public String getOperMemb() {
        return operMemb;
    }
    public void setOperMemb(String operMemb) {
        this.operMemb = operMemb;
    }
    public Double getTotalFee() {
        return totalFee;
    }
    public void setTotalFee(Double totalFee) {
        this.totalFee = totalFee;
    }
    public Double getDiscount() {
        return discount;
    }
    public void setDiscount(Double discount) {
        this.discount = discount;
    }
    public Double getDiscountFee() {
        return discountFee;
    }
    public void setDiscountFee(Double discountFee) {
        this.discountFee = discountFee;
    }
    public Double getOtherFee() {
        return otherFee;
    }
    public void setOtherFee(Double otherFee) {
        this.otherFee = otherFee;
    }
    public Double getActFee() {
        return actFee;
    }
    public void setActFee(Double actFee) {
        this.actFee = actFee;
    }
    public Integer getPayType() {
        return payType;
    }
    public String getPayType$(){
        if (null == this.payType){ return null; }
        switch (this.payType){
            case 1:
                return "现金";
            case 2:
                return "记账";
            default:
                return String.valueOf(this.payType);
        }
    }
    public void setPayType(Integer payType) {
        this.payType = payType;
    }
    public String getSalesman() {
        return salesman;
    }
    public void setSalesman(String salesman) {
        this.salesman = salesman;
    }
    public Integer getAccountDay() {
        return accountDay;
    }
    public void setAccountDay(Integer accountDay) {
        this.accountDay = accountDay;
    }
    public Integer getPostFeeType() {
        return postFeeType;
    }
    public String getPostFeeType$(){
        if (null == this.postFeeType){ return null; }
        switch (this.postFeeType){
            case 1:
                return "在线支付";
            case 2:
                return "货到付款";
            default:
                return String.valueOf(this.postFeeType);
        }
    }
    public void setPostFeeType(Integer postFeeType) {
        this.postFeeType = postFeeType;
    }
    public Double getPostFee() {
        return postFee;
    }
    public void setPostFee(Double postFee) {
        this.postFee = postFee;
    }
    public Date getPayTime() {
        return payTime;
    }
    public String getPayTime$(){
        if (Cools.isEmpty(this.payTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.payTime);
    }
    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }
    public Date getSendTime() {
        return sendTime;
    }
    public String getSendTime$(){
        if (Cools.isEmpty(this.sendTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.sendTime);
    }
    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }
    public String getShipName() {
        return shipName;
    }
    public void setShipName(String shipName) {
        this.shipName = shipName;
    }
    public String getShipCode() {
        return shipCode;
    }
    public void setShipCode(String shipCode) {
        this.shipCode = shipCode;
    }
    public Long getSettle() {
        return settle;
    }
    public String getSettle$(){
        OrderSettleService service = SpringUtils.getBean(OrderSettleService.class);
        OrderSettle orderSettle = service.selectById(this.settle);
        if (!Cools.isEmpty(orderSettle)){
            return String.valueOf(orderSettle.getSettleName());
        }
        return null;
    }
    public void setSettle(Long settle) {
        this.settle = settle;
    }
    public Integer getStatus() {
        return status;
    }
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){
            case 1:
                return "正常";
            case 0:
                return "禁用";
            default:
                return String.valueOf(this.status);
        }
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Long getCreateBy() {
        return createBy;
    }
    public String getCreateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.createBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Long getUpdateBy() {
        return updateBy;
    }
    public String getUpdateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.updateBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public String getUpdateTime$(){
        if (Cools.isEmpty(this.updateTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getMemo() {
        return memo;
    }
    public void setMemo(String memo) {
        this.memo = memo;
    }
}
src/main/java/zy/cloud/wms/manager/entity/ReceiveDetl.java
New file
@@ -0,0 +1,470 @@
package zy.cloud.wms.manager.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import io.swagger.annotations.ApiModelProperty;
import zy.cloud.wms.manager.service.OrderService;
import zy.cloud.wms.system.entity.Host;
import zy.cloud.wms.system.entity.User;
import zy.cloud.wms.system.service.HostService;
import zy.cloud.wms.system.service.UserService;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
@TableName("man_receive_detl")
public class ReceiveDetl implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @ApiModelProperty(value= "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 所属项目
     */
    @ApiModelProperty(value= "所属项目")
    @TableField("host_id")
    private Long hostId;
    /**
     * 订单内码
     */
    @ApiModelProperty(value= "订单内码")
    @TableField("order_id")
    private Long orderId;
    /**
     * 数量
     */
    @ApiModelProperty(value= "数量")
    private Double anfme;
    /**
     * 商品编码
     */
    @ApiModelProperty(value= "商品编码")
    private String matnr;
    /**
     * 商品名称
     */
    @ApiModelProperty(value= "商品名称")
    private String maktx;
    /**
     * 名称
     */
    @ApiModelProperty(value= "名称")
    private String name;
    /**
     * 规格
     */
    @ApiModelProperty(value= "规格")
    private String specs;
    /**
     * 型号
     */
    @ApiModelProperty(value= "型号")
    private String model;
    /**
     * 批号
     */
    @ApiModelProperty(value= "批号")
    private String batch;
    /**
     * 单位
     */
    @ApiModelProperty(value= "单位")
    private String unit;
    /**
     * 商品条码
     */
    @ApiModelProperty(value= "商品条码")
    private String barcode;
    /**
     * 供应商
     */
    @ApiModelProperty(value= "供应商")
    private String supplier;
    /**
     * 单价
     */
    @ApiModelProperty(value= "单价")
    @TableField("unit_price")
    private Double unitPrice;
    /**
     * 品项数
     */
    @ApiModelProperty(value= "品项数")
    @TableField("item_num")
    private Integer itemNum;
    /**
     * 数量
     */
    @ApiModelProperty(value= "数量")
    private Integer count;
    /**
     * 重量
     */
    @ApiModelProperty(value= "重量")
    private Double weight;
    /**
     * 状态 1: 正常  0: 禁用
     */
    @ApiModelProperty(value= "状态 1: 正常  0: 禁用  ")
    private Integer status;
    /**
     * 添加人员
     */
    @ApiModelProperty(value= "添加人员")
    @TableField("create_by")
    private Long createBy;
    /**
     * 添加时间
     */
    @ApiModelProperty(value= "添加时间")
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改人员
     */
    @ApiModelProperty(value= "修改人员")
    @TableField("update_by")
    private Long updateBy;
    /**
     * 修改时间
     */
    @ApiModelProperty(value= "修改时间")
    @TableField("update_time")
    private Date updateTime;
    /**
     * 备注
     */
    @ApiModelProperty(value= "备注")
    private String memo;
    public ReceiveDetl() {}
    public ReceiveDetl(Long hostId, Long orderId, Double anfme, String matnr, String maktx, String name, String specs, String model, String batch, String unit, String barcode, String supplier, Double unitPrice, Integer itemNum, Integer count, Double weight, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) {
        this.hostId = hostId;
        this.orderId = orderId;
        this.anfme = anfme;
        this.matnr = matnr;
        this.maktx = maktx;
        this.name = name;
        this.specs = specs;
        this.model = model;
        this.batch = batch;
        this.unit = unit;
        this.barcode = barcode;
        this.supplier = supplier;
        this.unitPrice = unitPrice;
        this.itemNum = itemNum;
        this.count = count;
        this.weight = weight;
        this.status = status;
        this.createBy = createBy;
        this.createTime = createTime;
        this.updateBy = updateBy;
        this.updateTime = updateTime;
        this.memo = memo;
    }
//    OrderDetl orderDetl = new OrderDetl(
//            null,    // 订单内码
//            null,    // 数量
//            null,    // 商品编码
//            null,    // 商品名称
//            null,    // 名称
//            null,    // 规格
//            null,    // 型号
//            null,    // 批号
//            null,    // 单位
//            null,    // 商品条码
//            null,    // 供应商
//            null,    // 单价
//            null,    // 品项数
//            null,    // 数量
//            null,    // 重量
//            null,    // 状态
//            null,    // 添加人员
//            null,    // 添加时间
//            null,    // 修改人员
//            null,    // 修改时间
//            null    // 备注
//    );
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public Long getHostId() {
        return hostId;
    }
    public void setHostId(Long hostId) {
        this.hostId = hostId;
    }
    public String getHostId$(){
        HostService service = SpringUtils.getBean(HostService.class);
        Host host = service.selectById(this.hostId);
        if (!Cools.isEmpty(host)){
            return String.valueOf(host.getName());
        }
        return null;
    }
    public Long getOrderId() {
        return orderId;
    }
    public String getOrderId$(){
        OrderService service = SpringUtils.getBean(OrderService.class);
        Order order = service.selectById(this.orderId);
        if (!Cools.isEmpty(order)){
            return String.valueOf(order.getId());
        }
        return null;
    }
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }
    public Double getAnfme() {
        return anfme;
    }
    public void setAnfme(Double anfme) {
        this.anfme = anfme;
    }
    public String getMatnr() {
        return matnr;
    }
    public void setMatnr(String matnr) {
        this.matnr = matnr;
    }
    public String getMaktx() {
        return maktx;
    }
    public void setMaktx(String maktx) {
        this.maktx = maktx;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSpecs() {
        return specs;
    }
    public void setSpecs(String specs) {
        this.specs = specs;
    }
    public String getModel() {
        return model;
    }
    public void setModel(String model) {
        this.model = model;
    }
    public String getBatch() {
        return batch;
    }
    public void setBatch(String batch) {
        this.batch = batch;
    }
    public String getUnit() {
        return unit;
    }
    public void setUnit(String unit) {
        this.unit = unit;
    }
    public String getBarcode() {
        return barcode;
    }
    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }
    public String getSupplier() {
        return supplier;
    }
    public void setSupplier(String supplier) {
        this.supplier = supplier;
    }
    public Double getUnitPrice() {
        return unitPrice;
    }
    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }
    public Integer getItemNum() {
        return itemNum;
    }
    public void setItemNum(Integer itemNum) {
        this.itemNum = itemNum;
    }
    public Integer getCount() {
        return count;
    }
    public void setCount(Integer count) {
        this.count = count;
    }
    public Double getWeight() {
        return weight;
    }
    public void setWeight(Double weight) {
        this.weight = weight;
    }
    public Integer getStatus() {
        return status;
    }
    public String getStatus$(){
        if (null == this.status){ return null; }
        switch (this.status){
            case 1:
                return "正常";
            case 0:
                return "禁用";
            default:
                return String.valueOf(this.status);
        }
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public Long getCreateBy() {
        return createBy;
    }
    public String getCreateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.createBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public String getCreateTime$(){
        if (Cools.isEmpty(this.createTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Long getUpdateBy() {
        return updateBy;
    }
    public String getUpdateBy$(){
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.updateBy);
        if (!Cools.isEmpty(user)){
            return String.valueOf(user.getNickname());
        }
        return null;
    }
    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public String getUpdateTime$(){
        if (Cools.isEmpty(this.updateTime)){
            return "";
        }
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getMemo() {
        return memo;
    }
    public void setMemo(String memo) {
        this.memo = memo;
    }
}
src/main/java/zy/cloud/wms/manager/mapper/ReceiveDetlMapper.java
New file
@@ -0,0 +1,17 @@
package zy.cloud.wms.manager.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import zy.cloud.wms.manager.entity.ReceiveDetl;
import java.util.List;
@Mapper
@Repository
public interface ReceiveDetlMapper extends BaseMapper<ReceiveDetl> {
    List<ReceiveDetl> selectByOrderNo(@Param("orderNo") String orderNo, @Param("hostId") Long hostId);
}
src/main/java/zy/cloud/wms/manager/mapper/ReceiveMapper.java
New file
@@ -0,0 +1,22 @@
package zy.cloud.wms.manager.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import zy.cloud.wms.manager.entity.Receive;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
public interface ReceiveMapper extends BaseMapper<Receive> {
    Boolean updateSettle(@Param("orderNo")String orderNo, @Param("settle")Long settle, @Param("hostId")Long hostId);
    List<Receive> getPage(Map<String, Object> map);
    Integer getPageCount(Map<String, Object> map);
}
src/main/java/zy/cloud/wms/manager/service/ReceiveDetlService.java
New file
@@ -0,0 +1,12 @@
package zy.cloud.wms.manager.service;
import com.baomidou.mybatisplus.service.IService;
import zy.cloud.wms.manager.entity.ReceiveDetl;
import java.util.List;
public interface ReceiveDetlService extends IService<ReceiveDetl> {
    List<ReceiveDetl> selectByOrderNo(String orderNo, Long hostId);
}
src/main/java/zy/cloud/wms/manager/service/ReceiveService.java
New file
@@ -0,0 +1,23 @@
package zy.cloud.wms.manager.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import zy.cloud.wms.manager.entity.Receive;
import java.util.List;
public interface ReceiveService extends IService<Receive> {
    Receive selectByOrderNo(String oderNo, Long hostId);
    Receive selectByUuid(String uuid);
    Boolean insertReturnId(Receive order);
    List<Receive> selectOrderBySettle(Long settle);
    Boolean updateSettle(String orderNo, Long settle, Long hostId);
    Page<Receive> getPage(Page<Receive> page);
}
src/main/java/zy/cloud/wms/manager/service/impl/ReceiveDetlServiceImpl.java
New file
@@ -0,0 +1,18 @@
package zy.cloud.wms.manager.service.impl;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import zy.cloud.wms.manager.entity.ReceiveDetl;
import zy.cloud.wms.manager.mapper.ReceiveDetlMapper;
import zy.cloud.wms.manager.service.ReceiveDetlService;
import java.util.List;
@Service("receiveDetlService")
public class ReceiveDetlServiceImpl extends ServiceImpl<ReceiveDetlMapper, ReceiveDetl> implements ReceiveDetlService {
    @Override
    public List<ReceiveDetl> selectByOrderNo(String orderNo, Long hostId) {
        return this.baseMapper.selectByOrderNo(orderNo, hostId);
    }
}
src/main/java/zy/cloud/wms/manager/service/impl/ReceiveServiceImpl.java
New file
@@ -0,0 +1,55 @@
package zy.cloud.wms.manager.service.impl;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import zy.cloud.wms.manager.entity.Receive;
import zy.cloud.wms.manager.mapper.ReceiveMapper;
import zy.cloud.wms.manager.service.ReceiveService;
import java.util.List;
@Service("receiveService")
public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> implements ReceiveService {
    @Override
    public Receive selectByOrderNo(String orderNo, Long hostId) {
        EntityWrapper<Receive> wrapper = new EntityWrapper<>();
        if (hostId != null) {
            wrapper.eq("host_id", hostId);
        }
        wrapper.eq("order_no", orderNo);
        return this.selectOne(wrapper);
    }
    @Override
    public Receive selectByUuid(String uuid) {
        Receive order = new Receive();
        order.setUuid(uuid);
        return this.selectOne(new EntityWrapper<>(order));
    }
    @Override
    public Boolean insertReturnId(Receive order) {
        return this.baseMapper.insert(order) > 0;
    }
    @Override
    public List<Receive> selectOrderBySettle(Long settle) {
        return this.selectList(new EntityWrapper<Receive>().eq("settle", settle));
    }
    @Override
    public Boolean updateSettle(String orderNo, Long settle, Long hostId) {
        return this.baseMapper.updateSettle(orderNo, settle, hostId);
    }
    @Override
    public Page<Receive> getPage(Page<Receive> page) {
        page.setRecords(baseMapper.getPage(page.getCondition()));
        page.setTotal(baseMapper.getPageCount(page.getCondition()));
        return page;
    }
}
src/main/resources/mapper/ReceiveDetlMapper.xml
New file
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="zy.cloud.wms.manager.mapper.ReceiveDetlMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="zy.cloud.wms.manager.entity.ReceiveDetl">
        <id column="id" property="id" />
        <result column="host_id" property="hostId" />
        <result column="order_id" property="orderId" />
        <result column="anfme" property="anfme" />
        <result column="matnr" property="matnr" />
        <result column="maktx" property="maktx" />
        <result column="name" property="name" />
        <result column="specs" property="specs" />
        <result column="model" property="model" />
        <result column="batch" property="batch" />
        <result column="unit" property="unit" />
        <result column="barcode" property="barcode" />
        <result column="supplier" property="supplier" />
        <result column="unit_price" property="unitPrice" />
        <result column="item_num" property="itemNum" />
        <result column="count" property="count" />
        <result column="weight" property="weight" />
        <result column="status" property="status" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="memo" property="memo" />
    </resultMap>
    <select id="selectByOrderNo" resultMap="BaseResultMap">
        select
        mod.*
        from man_order_detl mod
        left join man_order mo on mo.id = mod.order_id
        where 1=1
        and mo.order_no = #{orderNo}
        and mo.host_id = #{hostId}
    </select>
</mapper>
src/main/resources/mapper/ReceiveMapper.xml
New file
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="zy.cloud.wms.manager.mapper.ReceiveMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="zy.cloud.wms.manager.entity.Receive">
        <id column="id" property="id" />
        <result column="host_id" property="hostId" />
        <result column="uuid" property="uuid" />
        <result column="order_no" property="orderNo" />
        <result column="order_time" property="orderTime" />
        <result column="doc_type" property="docType" />
        <result column="item_id" property="itemId" />
        <result column="item_name" property="itemName" />
        <result column="allot_item_id" property="allotItemId" />
        <result column="def_number" property="defNumber" />
        <result column="number" property="number" />
        <result column="cstmr" property="cstmr" />
        <result column="cstmr_name" property="cstmrName" />
        <result column="tel" property="tel" />
        <result column="oper_memb" property="operMemb" />
        <result column="total_fee" property="totalFee" />
        <result column="discount" property="discount" />
        <result column="discount_fee" property="discountFee" />
        <result column="other_fee" property="otherFee" />
        <result column="act_fee" property="actFee" />
        <result column="pay_type" property="payType" />
        <result column="salesman" property="salesman" />
        <result column="account_day" property="accountDay" />
        <result column="post_fee_type" property="postFeeType" />
        <result column="post_fee" property="postFee" />
        <result column="pay_time" property="payTime" />
        <result column="send_time" property="sendTime" />
        <result column="ship_name" property="shipName" />
        <result column="ship_code" property="shipCode" />
        <result column="settle" property="settle" />
        <result column="status" property="status" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="memo" property="memo" />
    </resultMap>
    <update id="updateSettle">
        update man_order set settle = #{settle} where 1=1 and order_no = #{orderNo} and host_id = #{hostId}
    </update>
    <select id="getPage" resultMap="BaseResultMap">
        select * from
        (
            select *,
            ROW_NUMBER() over (order by create_time desc) as row
            from (
                select distinct mo.*
                from man_order mo
                left join man_order_detl mod on mo.id = mod.order_id
                where 1=1
                <include refid="condition"></include>
            ) r
        ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </select>
    <select id="getPageCount" parameterType="java.util.Map" resultType="java.lang.Integer">
        select count(1) from
        (
            select *,
            ROW_NUMBER() over (order by create_time desc) as row
            from (
                select distinct mo.*
                from man_order mo
                left join man_order_detl mod on mo.id = mod.order_id
                where 1=1
                <include refid="condition"></include>
            ) r
        ) t
    </select>
    <sql id="condition">
        <if test="host_id!=null and host_id!='' ">
            and mo.host_id = #{host_id}
        </if>
        <if test="bill_no!=null and bill_no!='' ">
            and mo.bill_no like '%' + #{bill_no} + '%'
        </if>
        <if test="bill_type!=null and bill_type!='' ">
            and bill_type like '%' + #{bill_type} + '%'
        </if>
        <if test="mat_name!=null and mat_name!='' ">
            and a.mat_name like '%' + #{mat_name} + '%'
        </if>
        <if test="qty!=null and qty!='' ">
            and a.qty = #{qty}
        </if>
        <if test="altme!=null and altme!='' ">
            and a.unit like '%' + #{unit} + '%'
        </if>
        <if test="startTime!=null and endTime!=null">
            and appe_time between #{startTime} and #{endTime}
        </if>
    </sql>
</mapper>
src/main/webapp/static/js/docType/docType.js
@@ -22,6 +22,7 @@
//            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
            ,{field: 'docId', align: 'center',title: '类型编号'}
            ,{field: 'docName', align: 'center',title: '类型名称'}
            ,{field: 'docClass$', align: 'center',title: '单据类别'}
            // ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
@@ -206,6 +207,8 @@
                        layer.getChildFrame('#data-detail-submit-save', index).hide();
                        setFormVal(layer.getChildFrame('#detail', index), data, false);
                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
                        top.convertDisabled(layer.getChildFrame(' #docId', index), true);
                        top.convertDisabled(layer.getChildFrame('', index), true);
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
@@ -239,6 +242,7 @@
//            id: $('#id').val(),
            docId: $('#docId').val(),
            docName: $('#docName').val(),
            docClass:$('#docClass').val(),
            status: $('#status').val(),
            createBy: $('#createBy').val(),
            createTime: top.strToDate($('#createTime\\$').val()),
src/main/webapp/static/js/order/order.js
@@ -46,6 +46,7 @@
        cols: [[
            {field: 'docId', title: '编号', width: 70, align: 'center'},
            {field: 'docName', title: '单据类型'}
            ,{field: 'docClass', title: '单据类别', hide:true}
        ]],
        done: function (res, curr, count) {
            $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
@@ -92,6 +93,10 @@
            success: function (layero, dIndex) {
                // 回显表单数据
                form.val('docTypeEditForm', mData);
                if(mData){
                    // $('#docId').addClass("layui-input").attr("disabled",true);
                    $('input[name="docId"]').addClass("layui-input").attr("disabled",true);
                }
                // 表单提交事件
                form.on('submit(docTypeEditSubmit)', function (data) {
                    var loadIndex = layer.load(2);
src/main/webapp/static/js/receive/receive.js
New file
@@ -0,0 +1,547 @@
var pageCurr;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'util', '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 util = layui.util;
    /****************************************** 左边表 *************************************************/
    /* 渲染表格 */
    var insTb = table.render({
        elem: '#docTypeTable',
        url: baseUrl + '/docType/list/auth',
        height: 'full-100',
        headers: {token: localStorage.getItem('token')},
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        where: {
            doc_class: 1,//入库单
        },
        parseData: function (res) {
            return {
                'code': res.code,
                'msg': res.msg,
                'count': res.data.total,
                'data': res.data.records
            }
        },
        response: {
            statusCode: 200
        },
        toolbar: ['<p>',
            '<button lay-event="add" class="layui-btn layui-btn-sm icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>&nbsp;',
            '<button lay-event="edit" class="layui-btn layui-btn-sm layui-btn-warm icon-btn"><i class="layui-icon">&#xe642;</i>修改</button>&nbsp;',
            '<button lay-event="del" class="layui-btn layui-btn-sm layui-btn-danger icon-btn"><i class="layui-icon">&#xe640;</i>删除</button>',
            '</p>'].join(''),
        defaultToolbar: [],
        cols: [[
            {field: 'docId', title: '编号', width: 70, align: 'center'},
            {field: 'docName', title: '单据类型'}
            ,{field: 'docClass', title: '单据类别', hide:true}
        ]],
        done: function (res, curr, count) {
            $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
        }
    });
    /* 表格搜索 */
    form.on('submit(docTypeTableSearch)', function (data) {
        insTb.reload({where: {doc_name: data.field.docName,doc_class:1}});
        return false;
    });
    /* 表格头工具栏点击事件 */
    table.on('toolbar(docTypeTable)', function (obj) {
        if (obj.event === 'add') { // 添加
            showEditModel();
        } else if (obj.event === 'edit') { // 修改
            if (selObj == null) {
                return;
            }
            showEditModel(selObj.data);
        } else if (obj.event === 'del') { // 删除
            if (selObj == null) {
                return;
            }
            doDel(selObj);
        }
    });
    /* 监听行单击事件 */
    var selObj;
    table.on('row(docTypeTable)', function (obj) {
        selObj = obj;
        obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
        insTb2.reload({where: {doc_type: obj.data.docId}, page: {curr: 1}});
    });
    /* 显示表单弹窗 */
    function showEditModel(mData) {
        admin.open({
            type: 1,
            title: (mData ? '修改' : '添加') + '单据类型',
            content: $('#docTypeEditDialog').html(),
            success: function (layero, dIndex) {
                // 回显表单数据
                form.val('docTypeEditForm', mData);
                if(mData){
                    // $('#docId').addClass("layui-input").attr("disabled",true);
                    $('input[name="docId"]').addClass("layui-input").attr("disabled",true);
                }
                // 表单提交事件
                form.on('submit(docTypeEditSubmit)', function (data) {
                    var loadIndex = layer.load(2);
                    $.ajax({
                        url: baseUrl+"/docType/"+(mData?'update':'add')+"/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: data.field,
                        method: 'POST',
                        success: function (res) {
                            layer.close(loadIndex);
                            selObj = null;
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                insTb.reload();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg, {icon: 2});
                            }
                        }
                    })
                    return false;
                });
            }
        });
    }
    /* 删除 */
    function doDel(obj) {
        layer.confirm('确定要删除此单据类型吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/docType/delete/one/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {param: JSON.stringify(obj.data)},
                method: 'POST',
                success: function (res) {
                    selObj = null;
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.closeAll();
                        insTb.reload();
                        $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    /****************************************** 右边表 *************************************************/
    /* 渲染表格2 */
    var insTb2 = table.render({
        elem: '#orderTable',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/receive/list/auth',
        page: true,
        // size: 'lg',
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#orderToolbar',
        height: 'full-100',
        cols: [[
            {type: 'checkbox'}
            // ,{field: 'uuid', align: 'center',title: '编号'}
            ,{field: 'docType$', align: 'center',title: '类别', templet: '#docTypeTpl', width: 100}
            ,{field: 'orderNo', align: 'center',title: '单据编号', minWidth: 200}
            ,{field: 'orderTime', align: 'center',title: '单据日期', width: 120}
            ,{field: 'itemName', align: 'center',title: '项目'}
            ,{field: 'allotItemId$', align: 'center',title: '调拨项目编号', hide: true}
            ,{field: 'defNumber', align: 'center',title: '初始票据号', hide: true}
            ,{field: 'number', align: 'center',title: '票据号', hide: true}
            ,{field: 'cstmrName', align: 'center',title: '客户'}
            ,{align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 140, width: 140}
            ,{field: 'tel', align: 'center',title: '联系方式', hide: true}
            ,{field: 'operMemb', align: 'center',title: '操作人员', hide: true}
            ,{field: 'totalFee', align: 'center',title: '合计金额', hide: true}
            ,{field: 'discount', align: 'center',title: '优惠率', hide: true}
            ,{field: 'discountFee', align: 'center',title: '优惠金额', hide: true}
            ,{field: 'otherFee', align: 'center',title: '销售或采购费用合计', hide: true}
            ,{field: 'actFee', align: 'center',title: '实付金额', hide: true}
            ,{field: 'payType$', align: 'center',title: '付款类型', hide: true}
            ,{field: 'salesman', align: 'center',title: '业务员', hide: true}
            ,{field: 'accountDay', align: 'center',title: '结算天数', hide: true}
            ,{field: 'postFeeType$', align: 'center',title: '邮费支付类型', hide: true}
            ,{field: 'postFee', align: 'center',title: '邮费', hide: true}
            ,{field: 'payTime$', align: 'center',title: '付款时间', hide: true}
            ,{field: 'sendTime$', align: 'center',title: '发货时间', hide: true}
            ,{field: 'shipName', align: 'center',title: '物流名称', hide: true}
            ,{field: 'shipCode', align: 'center',title: '物流单号', hide: true}
            ,{field: 'settle$', align: 'center',title: '订单状态', templet: '#settleTpl', width: 100}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate',  width: 120}
        ]],
        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) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
        }
    });
    /* 表格2搜索 */
    form.on('submit(orderTbSearch)', function (data) {
        insTb2.reload({where: data.field, page: {curr: 1}});
        return false;
    });
    /* 表格2重置 */
    form.on('submit(orderTbReset)', function (data) {
        insTb2.reload({where: null,page: {curr: 1}});
        return false;
    });
    /* 表格2头工具栏点击事件 */
    table.on('toolbar(orderTable)', function (obj) {
        if (obj.event === 'add') { // 添加
            right();
        } else if (obj.event === 'del') { // 删除
            var checkRows = table.checkStatus('orderTable');
            if (checkRows.data.length === 0) {
                layer.msg('请选择要删除的数据', {icon: 2});
                return;
            }
            var ids = checkRows.data.map(function (d) {
                return d.id;
            });
            doDelOrder({ids: ids});
        }
    });
    /* 表格2工具条点击事件 */
    table.on('tool(orderTable)', function (obj) {
        var data = obj.data;
        switch (obj.event) {
            // 拣货
            case 'stockOut':
                var loadIndex = layer.load(2);
                $.ajax({
                    url: baseUrl + "/work/stock/out/preview",
                    headers: {'token': localStorage.getItem('token')},
                    contentType: 'application/json;charset=UTF-8',
                    data: JSON.stringify({
                        orderNo: data.orderNo
                    }),
                    method: 'POST',
                    success: function (res) {
                        layer.close(loadIndex);
                        if (res.code === 200){
                            layer.open({
                                type: 1
                                ,title: false
                                ,closeBtn: false
                                ,offset: '100px'
                                ,area: '1000px'
                                ,shade: 0.5
                                ,shadeClose: true
                                ,btn: ['立即生成', '稍后处理']
                                ,btnAlign: 'c'
                                ,moveType: 1 //拖拽模式,0或者1
                                ,content: $('#stoukOutPreview')
                                ,success: function(layero, index){
                                    table.render({
                                        elem: '#stoPreTab',
                                        data: res.data,
                                        page: true,
                                        cellMinWidth: 100,
                                        height: 432,
                                        cols: [[
                                            {field: 'title', title: '商品', merge: true, align: 'center'},
                                            {field: 'anfme', title: '总数量', merge: ['title'], align: 'center', style: 'font-weight: bold', width: 90},
                                            {field: 'type', title: '仓库', merge: true, align: 'center', templet: '#typeTpl', width: 90},
                                            {field: 'locNo', title: '货位', align: 'center'},
                                            {field: 'prior$', title: '推荐货位', align: 'center', width: 100},
                                            {field: 'reduce', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'},
                                            // {field: 'remQty', title: '余量', align: 'center', width: 80},
                                            {field: 'total', title: '总量', align: 'center', width: 90},
                                        ]],
                                        done: function () {
                                            tableMerge.render(this);
                                            $('.layui-table-body.layui-table-main').css("overflow", "auto")
                                        }
                                    });
                                }
                                ,yes: function(index, layero){
                                    //按钮【马上拣货】的回调
                                    stockOut(data.orderNo);
                                }
                                ,btn2: function(index, layero){
                                    //按钮【稍后处理】的回调
                                    //return false 开启该代码可禁止点击该按钮关闭
                                }
                            });
                        } else if (res.code === 403){
                            top.location.href = baseUrl+"/";
                        } else {
                            layer.msg(res.msg, {icon: 2})
                        }
                    }
                })
                break;
            // 打印
            case 'print':
                layer.confirm('开始打印' +data.orderNo + ' 拣货单?', {shadeClose: true}, function(){
                    layer.closeAll();
                    printPakouts(data.orderNo);
                })
                break;
            // 删除
            case 'del':
                var ids = [obj.id];
                doDelOrder({ids: ids});
                break;
            // 明细
            case 'look':
                var $a = $(obj.tr).find('a[lay-event="look"]');
                var offset = $a.offset();
                layer.open({
                    type: 1,
                    title: false,
                    area: '700px',
                    offset: [offset.top + 'px', (offset.left - 530 + $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+'/receiveDetl/list/auth',
                            where: {
                                order_id: data.id
                            },
                            limit: 5,
                            page: true,
                            cellMinWidth: 100,
                            cols: [[
                                {type: 'numbers'},
                                {field: 'matnr', title: '商品编码'},
                                {field: 'maktx', title: '商品名称', width: 200},
                                {field: 'anfme', title: '数量', width: 70},
                                {
                                    field: 'createTime$', title: '创建时间', sort: true, templet: function (d) {
                                        return util.toDateString(d.createTime);
                                    },  width: 180
                                }
                            ]],
                            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 () {
                                $(layero).find('.layui-table-view').css('margin', '0');
                            },
                            size: ''
                        });
                    }
                });
                break;
        }
    });
    /* 删除订单 */
    function doDelOrder(obj) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {
            layer.close(i);
            var loadIndex = layer.load(2);
            $.ajax({
                url: baseUrl+"/receives/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: obj.ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200){
                        layer.msg(res.msg, {icon: 1});
                        $(".layui-laypage-btn")[0].click();
                    } else if (res.code === 403){
                        top.location.href = baseUrl+"/";
                    }else {
                        layer.msg(res.msg, {icon: 2});
                    }
                }
            })
        });
    }
    // 生成拣货单
    function stockOut(orderNo) {
        $.ajax({
            url: baseUrl+"/work/stock/out/create",
            headers: {'token': localStorage.getItem('token')},
            contentType:'application/json;charset=UTF-8',
            data: JSON.stringify({
                orderNo: orderNo
            }),
            method: 'POST',
            success: function (res) {
                // 成功
                if (res.code === 200){
                    layer.closeAll();
                    $(".layui-laypage-btn")[0].click();
                    layer.confirm(res.msg, {
                            shadeClose: true
                            , btn: ['打印拣货单']
                        }, function() {
                            layer.closeAll();
                            printPakouts(orderNo);
                        }
                    )
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        })
        // });
    }
    // 打印拣货单
    function printPakouts(orderNo) {
        $.ajax({
            url: baseUrl+"/work/stock/out/print",
            headers: {'token': localStorage.getItem('token')},
            data: JSON.stringify({
                orderNo: orderNo
            }),
            contentType:'application/json;charset=UTF-8',
            method: 'POST',
            success: function (res) {
                if (res.code === 200){
                    res.data["barcodeUrl"]=baseUrl+"/receive/code/auth?type=1&param="+res.data.docNum;
                    var tpl = $('#pakoutPrintTpl').html();
                    var template = Handlebars.compile(tpl);
                    var html = template(res);
                    var box = $("#pakoutPrintBox");
                    box.html(html);box.show();
                    box.print({
                        mediaPrint:true,
                        deferred: $.Deferred().done(function () {
                            layer.confirm('[重要] 打印是否成功?',  {btn: ['Yes', 'No']}, function(){
                                $.ajax({
                                    url: baseUrl+"/pakout/print/auth",
                                    headers: {'token': localStorage.getItem('token')},
                                    data: {
                                        docNumber: orderNo
                                    },
                                    method: 'POST',
                                    success: function (res) {
                                        if (res.code === 200){
                                            layer.closeAll();
                                            $(".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})
                                        }
                                    }
                                })
                            });
                        })
                    });
                    box.hide();
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                } else {
                    layer.msg(res.msg, {icon: 2})
                }
            }
        })
    }
});
function right(){
    top.popupRight = top.layui.admin.popupRight({
        id: 'LAY_adminPopupLayerTest'
        , area: '890px'
        , type: 2
        , shade: [0.5,'#000']
        , content:'receive/matQuery.html'
        , success: function(){
            // $('#'+ this.id).html('<div style="padding: 20px;">放入内容</div>');
            //admin.view(this.id).render('system/xxx')
        }
        , end: function () {
            $(".layui-laypage-btn")[0].click();
        }
    });
}
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
    });
    (child ? parent.tableIns : tableIns).reload({
        where: searchData,
        page: {
            curr: pageCurr
        }
    });
}
src/main/webapp/static/js/receiveDetl/receiveDetl.js
New file
@@ -0,0 +1,530 @@
var pageCurr;
layui.use(['table','laydate', 'form'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    // 数据渲染
    tableIns = table.render({
        elem: '#orderDetl',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/receiveDetl/list/auth',
        page: true,
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
        even: true,
        toolbar: '#toolbar',
        cellMinWidth: 50,
        cols: [[
            {type: 'checkbox'}
//            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
            ,{field: 'id', align: 'center',title: 'ID'}
            ,{field: 'orderId$', align: 'center',title: '订单内码',event: 'orderId', style: 'cursor:pointer'}
            ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'matnr', align: 'center',title: '商品编码'}
            ,{field: 'maktx', align: 'center',title: '商品名称'}
            ,{field: 'name', align: 'center',title: '名称'}
            ,{field: 'specs', align: 'center',title: '规格'}
            ,{field: 'model', align: 'center',title: '型号'}
            ,{field: 'batch', align: 'center',title: '批号'}
            ,{field: 'unit', align: 'center',title: '单位'}
            ,{field: 'barcode', align: 'center',title: '商品条码'}
            ,{field: 'supplier', align: 'center',title: '供应商'}
            ,{field: 'unitPrice', align: 'center',title: '单价'}
            ,{field: 'itemNum', align: 'center',title: '品项数'}
            ,{field: 'count', align: 'center',title: '数量'}
            ,{field: 'weight', align: 'center',title: '重量'}
            ,{field: 'status$', align: 'center',title: '状态'}
            ,{field: 'createBy$', align: 'center',title: '添加人员',event: 'createBy', style: 'cursor:pointer'}
            ,{field: 'createTime$', align: 'center',title: '添加时间'}
            ,{field: 'updateBy$', align: 'center',title: '修改人员',event: 'updateBy', style: 'cursor:pointer'}
            ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            ,{field: 'memo', align: 'center',title: '备注'}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150}
        ]],
        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) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
            form.on('checkbox(tableCheckbox)', function (data) {
                var _index = $(data.elem).attr('table-index')||0;
                if(data.elem.checked){
                    res.data[_index][data.value] = 'Y';
                }else{
                    res.data[_index][data.value] = 'N';
                }
            });
        }
    });
    // 监听排序事件
    table.on('sort(locMast)', function (obj) {
        var searchData = {};
        $.each($('#search-box [name]').serializeArray(), function() {
            searchData[this.name] = this.value;
        });
        searchData['orderByField'] = obj.field;
        searchData['orderByType'] = obj.type;
        tableIns.reload({
            where: searchData,
            page: {
                curr: 1
            },
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                limit();
            }
        });
    });
    // 监听头工具栏事件
    table.on('toolbar(orderDetl)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id);
        switch(obj.event) {
            case 'addData':
                layer.open({
                    type: 2,
                    title: '新增',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    content: 'receiveDetl_detail.html',
                    success: function(layero, index){
                        layer.getChildFrame('#data-detail-submit-edit', index).hide();
                        clearFormVal(layer.getChildFrame('#detail', index));
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                    }
                });
                break;
            case 'deleteData':
                var data = checkStatus.data;
                if (data.length === 0){
                    layer.msg('请选择数据');
                } else {
                    layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){
                        $.ajax({
                            url: baseUrl+"/receiveDetl/delete/auth",
                            headers: {'token': localStorage.getItem('token')},
                            data: {param: JSON.stringify(data)},
                            method: 'POST',
                            traditional:true,
                            success: function (res) {
                                if (res.code === 200){
                                    layer.closeAll();
                                    tableReload(false);
                                } else if (res.code === 403){
                                    top.location.href = baseUrl+"/";
                                } else {
                                    layer.msg(res.msg)
                                }
                            }
                        })
                    });
                }
                break;
            case 'exportData':
                layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
                        if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
                            titles.push(col.title);
                            fields.push(col.field);
                        }
                    });
                    var exportData = {};
                    $.each($('#search-box [name]').serializeArray(), function() {
                        exportData[this.name] = this.value;
                    });
                    var param = {
                        'orderDetl': exportData,
                        'fields': fields
                    };
                    $.ajax({
                        url: baseUrl+"/receiveDetl/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                            } else if (res.code === 403) {
                                top.location.href = baseUrl+"/";
                            } else {
                                layer.msg(res.msg)
                            }
                        }
                    });
                });
                break;
        }
    });
    // 监听行工具事件
    table.on('tool(orderDetl)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            // 详情
            case 'detail':
                layer.open({
                    type: 2,
                    title: '详情',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
                    content: 'receiveDetl_detail.html',
                    success: function(layero, index){
                        setFormVal(layer.getChildFrame('#detail', index), data, true);
                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                        layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                    }
                });
                break;
            // 编辑
            case 'edit':
                layer.open({
                    type: 2,
                    title: '修改',
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    content: 'receiveDetl_detail.html',
                    success: function(layero, index){
                        layer.getChildFrame('#data-detail-submit-save', index).hide();
                        setFormVal(layer.getChildFrame('#detail', index), data, false);
                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
                        top.convertDisabled(layer.getChildFrame('', index), true);
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                    }
                });
                break;
            case 'orderId':
                var param = top.reObject(data).orderId;
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '订单内码详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: true,
                       content: '../receive/receiveDetl_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "baseUrl+/receive/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                                   } else if (res.code === 403){
                                       top.location.href = baseUrl+"/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                }
                break;
            case 'createBy':
                var param = top.reObject(data).createBy;
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '添加人员详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: true,
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "baseUrl+/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                                   } else if (res.code === 403){
                                       top.location.href = baseUrl+"/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                }
                break;
            case 'updateBy':
                var param = top.reObject(data).updateBy;
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '修改人员详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: true,
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: "baseUrl+/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                                   } else if (res.code === 403){
                                       top.location.href = baseUrl+"/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                }
                break;
        }
    });
    // 数据保存动作
    form.on('submit(save)', function () {
        if (banMsg != null){
            layer.msg(banMsg);
            return;
        }
        method("add");
    });
    // 数据修改动作
    form.on('submit(edit)', function () {
        method("update")
    });
    function method(name){
        var index = layer.load(1, {
            shade: [0.5,'#000'] //0.1透明度的背景
        });
        var data = {
//            id: $('#id').val(),
            id: $('#id').val(),
            orderId: $('#orderId').val(),
            anfme: $('#anfme').val(),
            matnr: $('#matnr').val(),
            maktx: $('#maktx').val(),
            name: $('#name').val(),
            specs: $('#specs').val(),
            model: $('#model').val(),
            batch: $('#batch').val(),
            unit: $('#unit').val(),
            barcode: $('#barcode').val(),
            supplier: $('#supplier').val(),
            unitPrice: $('#unitPrice').val(),
            itemNum: $('#itemNum').val(),
            count: $('#count').val(),
            weight: $('#weight').val(),
            status: $('#status').val(),
            createBy: $('#createBy').val(),
            createTime: top.strToDate($('#createTime\\$').val()),
            updateBy: $('#updateBy').val(),
            updateTime: top.strToDate($('#updateTime\\$').val()),
            memo: $('#memo').val(),
        };
        $.ajax({
            url: baseUrl+"/receiveDetl/"+name+"/auth",
            headers: {'token': localStorage.getItem('token')},
            data: top.reObject(data),
            method: 'POST',
            success: function (res) {
                if (res.code === 200){
                    parent.layer.closeAll();
                    parent.$(".layui-laypage-btn")[0].click();
                    $("#data-detail :input").each(function () {
                        $(this).val("");
                    });
                } else if (res.code === 403){
                    top.location.href = baseUrl+"/";
                }else {
                    layer.msg(res.msg)
                }
                layer.close(index);
            }
        })
    }
    // 复选框事件
    form.on('checkbox(detailCheckbox)', function (data) {
        var el = data.elem;
        if (el.checked) {
            $(el).val('Y');
        } else {
            $(el).val('N');
        }
    });
    // 搜索栏搜索事件
    form.on('submit(search)', function (data) {
        pageCurr = 1;
        tableReload(false);
    });
    // 搜索栏重置事件
    form.on('submit(reset)', function (data) {
        pageCurr = 1;
        clearFormVal($('#search-box'));
        tableReload(false);
    });
    // 时间选择器
    layDate.render({
        elem: '#createTime\\$',
        type: 'datetime'
    });
    layDate.render({
        elem: '#updateTime\\$',
        type: 'datetime'
    });
});
// 关闭动作
$(document).on('click','#data-detail-close', function () {
    parent.layer.closeAll();
});
function tableReload(child) {
    var searchData = {};
    $.each($('#search-box [name]').serializeArray(), function() {
        searchData[this.name] = this.value;
    });
    (child ? parent.tableIns : tableIns).reload({
        where: searchData,
        page: {
            curr: pageCurr
        },
        done: function (res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            if (res.data.length === 0 && count !== 0) {
                tableIns.reload({
                    where: searchData,
                    page: {
                        curr: pageCurr-1
                    }
                });
                pageCurr -= 1;
            }
            limit(child);
        }
    });
}
function setFormVal(el, data, showImg) {
    for (var val in data) {
        var find = el.find(":input[id='" + val + "']");
        if (find[0]!=null){
            if (find[0].type === 'checkbox'){
                if (data[val]==='Y'){
                    find.attr("checked","checked");
                    find.val('Y');
                } else {
                    find.remove("checked");
                    find.val('N');
                }
                continue;
            }
        }
        find.val(data[val]);
        if (showImg){
            var next = find.next();
            if (next.get(0)){
                if (next.get(0).localName === "img") {
                    find.hide();
                    next.attr("src", data[val]);
                    next.show();
                }
            }
        }
    }
}
function clearFormVal(el) {
    $(':input', el)
        .val('')
        .removeAttr('checked')
        .removeAttr('selected');
}
function detailScreen(index) {
    var detail = layer.getChildFrame('#data-detail', index);
    var height = detail.height()+60;
    if (height > ($(window).height()*0.9)) {
        height = ($(window).height()*0.8);
    }
    layer.style(index, {
//        top: (($(window).height()-height)/3)+"px",
        height: height+'px'
    });
}
$('body').keydown(function () {
    if (event.keyCode === 13) {
        $("#search").click();
    }
});
src/main/webapp/views/docType/docType_detail.html
@@ -36,6 +36,16 @@
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">单据类别:</label>
            <div class="layui-input-inline">
                <select id="docClass">
<!--                    <option value="" style="display: none"></option>-->
                    <option value="1">入库单</option>
                    <option value="2">出库单</option>
                </select>
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">状  态:</label>
            <div class="layui-input-inline">
                <select id="status">
src/main/webapp/views/order/order.html
@@ -171,6 +171,7 @@
<script type="text/html" id="docTypeEditDialog">
    <form id="docTypeEditForm" lay-filter="docTypeEditForm" class="layui-form model-form">
        <input name="dictId" type="hidden"/>
        <input name="docClass" value="2" type="hidden"/>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">类型编码:</label>
            <div class="layui-input-block">
src/main/webapp/views/receive/matQuery.html
New file
@@ -0,0 +1,214 @@
<!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>
        html {
            height: 100%;
            /*padding: 10px;*/
            background-color: #f1f1f1;
        }
        body {
            background-color: #fff;
            /*border-radius: 5px;*/
            box-shadow: 0 0 3px rgba(0,0,0,.3);
            padding-bottom: 20px;
        }
        #staNoSpan {
            text-align: center;
            display: inline-block;
            width: 100px;
            font-size: 13px;
        }
        .layui-btn-container .layui-form-select {
            display: inline-block;
            width: 150px;
            height: 30px;
        }
        .layui-btn-container .layui-form-select.layui-form-selected {
            display: inline-block;
            width: 150px;
        }
        .layui-btn-container .layui-select-title input {
            font-size: 13px;
        }
        .layui-btn-container .layui-anim.layui-anim-upbit dd {
            font-size: 13px;
        }
        #btn-outbound {
            margin-left: 20px;
        }
        /*----------------------------------*/
        .function-area {
            padding: 20px 50px;
        }
        .function-btn {
            font-size: 16px;
            padding: 1px 1px 1px 1px;
            width: 100px;
            height: 50px;
            border-color: #2b425b;
            border-radius: 4px;
            border-width: 2px;
            background: none;
            border-style: solid;
            transition: 0.4s;
            cursor: pointer;
            letter-spacing: 3px;
        }
        .function-btn:hover {
            background-color: #2b425b;
            color: #fff;
        }
        /* 销售单编号 */
        #getOrderNo .layui-form {
            padding: 25px 30px 0 0;
        }
        #getOrderNo .layui-form-label {
            padding: 8px 15px;
            box-sizing: content-box;
            -webkit-box-sizing: content-box;
        }
        #getOrderNo .layui-form-required:before {
            content: "*";
            display: inline-block;
            font-family: SimSun,serif;
            margin-right: 4px;
            font-size: 14px;
            line-height: 1;
            color: #ed4014;
        }
        #getOrderNo .layui-input {
            height: 36px;
            border-radius: 4px;
        }
        #getOrderNo .cool-button-contain {
            text-align: right;
            margin: 20px 0;
        }
        #getOrderNo .layui-form-radio>i:hover, .layui-form-radioed>i {
            color: #007bff;
        }
        #getOrderNo .layui-btn {
            height: 36px;
            line-height: 36px;
            border-radius: 4px;
            box-shadow: 0 1px 0 rgba(0,0,0,.03);
        }
        #getOrderNo .layui-btn-primary:hover {
            border-color: #777777;
        }
    </style>
</head>
<body>
<!-- 功能区 -->
<div class="function-area">
    <button id="mat-query" class="function-btn" onclick="getMatDetl()"><i class="layui-icon">&#xe654;</i> 商品</button>
</div>
<hr>
<!-- 表格 -->
<div style="padding-bottom: 5px; margin-bottom: 45px">
    <!-- 头部 -->
    <script type="text/html" id="toolbar">
        <div class="layui-form">
            <div class="layui-btn-container">
                <!-- 2.启动出库 -->
                <button class="layui-btn layui-btn-lg" id="btn-outbound" lay-event="createDoc">开始生成</button>
            </div>
        </div>
    </script>
    <!-- 行 -->
    <script type="text/html" id="operate">
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">移除</a>
    </script>
    <table class="layui-table" id="chooseData" lay-filter="chooseData"></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/ioWorks/matQuery.js" charset="utf-8"></script>
<div id="getOrderNo" style="display: none">
    <!-- 订单编号、单据日期、单据类型、项目编号、客户编号、 -->
    <div class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">单据类型:</label>
            <div class="layui-input-block">
                <select id="docType" name="docType" lay-verType="tips" lay-verify="required" required>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">单据编号:</label>
            <div class="layui-input-block">
                <input id="orderNo" name="orderNo" placeholder="请输入单据编号" class="layui-input" lay-verType="tips" lay-verify="required" autocomplete="off">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">单据日期:</label>
            <div class="layui-input-block">
                <input id="orderTime" name="orderTime" placeholder="请输入单据日期" class="layui-input icon-date" lay-verType="tips" lay-verify="required" autocomplete="off">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">项目:</label>
            <div class="layui-input-block">
                <div id="item" name="item">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">客户:</label>
            <div class="layui-input-block">
                <div id="cstmr" name="cstmr">
                </div>
            </div>
        </div>
        <div class="layui-form-item cool-button-contain">
            <button class="layui-btn layui-btn-primary" id="autoNo" onclick="initOrderNo()">编号自动生成</button>
            <button class="layui-btn layui-btn-normal" id="confirm" lay-filter="confirm" lay-submit="">确定</button>
        </div>
    </div>
</div>
</body>
<script type="text/html" id="docTypeSelectTpl">
    <option value="">请选择单据类型</option>
    {{#each data}}
    <option value="{{this.docId}}">{{this.docName}}</option>
    {{/each}}
</script>
<script type="text/html" id="itemSelectTpl">
    <option value="">请选择项目</option>
    {{#each data}}
    <option value="{{this.id}}">{{this.name}}</option>
    {{/each}}
</script>
<script type="text/html" id="cstmrSelectTpl">
    <option value="">请选择客户</option>
    {{#each data}}
    <option value="{{this.id}}">{{this.name}}</option>
    {{/each}}
</script>
</html>
src/main/webapp/views/receive/matQueryBox.html
New file
@@ -0,0 +1,200 @@
<!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>
        body {
            padding: 0 20px;
        }
        .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>
<!-- 搜索栏 -->
<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">
                <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="maktx" placeholder="商品名称" autocomplete="off">
            </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>
            <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</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" style="">提取</button>
    </div>
</script>
<div class="layui-form">
    <table class="layui-hide" id="stockOut" lay-filter="stockOut"></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>
</body>
<script>
    var pageCurr;
    function getCol() {
        var cols = [
            {type: 'checkbox'}
        ];
        cols.push.apply(cols, matCols);
        cols.push(
            {field: 'stock', align: 'center',title: '库存余量', style: 'font-weight: bold'}
            ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true}
            ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true})
        return cols;
    }
    layui.use(['table','laydate', 'form'], function() {
        var table = layui.table;
        var $ = layui.jquery;
        var layer = layui.layer;
        var layDate = layui.laydate;
        var form = layui.form;
        // 数据渲染
        locDetlTableIns = table.render({
            elem: '#stockOut',
            headers: {token: localStorage.getItem('token')},
            url: baseUrl+'/mat/list/auth',
            page: true,
            limit: 8,
            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
            },
            done: function(res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
            }
        });
        // 监听头工具栏事件
        table.on('toolbar(stockOut)', function (obj) {
            var checkStatus = table.checkStatus(obj.config.id);
            var data = checkStatus.data;
            switch(obj.event) {
                case 'confirm':
                    if (data.length === 0){
                        layer.msg("请选择数据");
                        return;
                    }
                    parent.addTableData(data);
                    break;
            }
        });
        // 搜索栏搜索事件
        form.on('submit(search)', function (data) {
            pageCurr = 1;
            tableReload();
        });
        // 搜索栏重置事件
        form.on('submit(reset)', function (data) {
            pageCurr = 1;
            clearFormVal($('#search-box'));
            tableReload();
        });
        layDate.render({
            elem: '.layui-laydate-range'
            ,type: 'datetime'
            ,range: true
        });
    })
    function tableReload(child) {
        var searchData = {};
        $.each($('#search-box [name]').serializeArray(), function() {
            searchData[this.name] = this.value;
        });
        locDetlTableIns.reload({
            where: searchData,
            page: {
                curr: pageCurr
            },
            done: function (res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
            }
        });
    }
    function clearFormVal(el) {
        $(':input', el)
            .val('')
            .removeAttr('checked')
            .removeAttr('selected');
    }
</script>
</html>
src/main/webapp/views/receive/receive.html
New file
@@ -0,0 +1,261 @@
<!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">
    <style>
        body {
            color: #595959;
            background-color: #f5f7f9;
        }
        /* 左表 */
        #docTypeTable + .layui-table-view .layui-table-tool-temp {
            padding-right: 0;
        }
        #docTypeTable + .layui-table-view .layui-table-body tbody > tr td {
            cursor: pointer;
        }
        #docTypeTable + .layui-table-view .layui-table-body tbody > tr.layui-table-click {
            background-color: #fff3e0;
        }
        #docTypeTable + .layui-table-view .layui-table-body tbody > tr.layui-table-click td:last-child > div:before {
            position: absolute;
            right: 6px;
            content: "\e602";
            font-size: 12px;
            font-style: normal;
            font-family: layui-icon,serif !important;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
        #left-table .layui-table-grid-down {
            display: none;
        }
        .layui-form.layui-border-box.layui-table-view {
            border-width: 1px;
        }
        #left-table .layui-table thead th {
            /* font-weight: bold; */
            text-align: left;
        }
    </style>
</head>
<body>
<!-- 正文开始 -->
<div class="layui-fluid" style="padding-bottom: 0;">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md3" id="left-table">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 10px;">
                    <!-- 表格工具栏1 -->
                    <form class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline" style="max-width: 140px;">
                                <input name="docName" class="layui-input" placeholder="输入单据类型"/>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn icon-btn" lay-filter="docTypeTableSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>
                        </div>
                    </form>
                    <!-- 数据表格1 -->
                    <table id="docTypeTable" lay-filter="docTypeTable"></table>
                </div>
            </div>
        </div>
        <div class="layui-col-md9">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 10px;">
                    <!-- 表格工具栏2 -->
                    <form class="layui-form toolbar">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">订单编号:</label>
                                <div class="layui-input-inline">
                                    <input name="order_no" class="layui-input" placeholder="输入订单编号"/>
                                </div>
                            </div>
                            <div class="layui-inline">&emsp;
                                <button class="layui-btn icon-btn" lay-filter="orderTbSearch" lay-submit>
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                                <button class="layui-btn icon-btn" lay-filter="orderTbReset" lay-submit>
                                    <i class="layui-icon">&#xe666;</i>重置
                                </button>
                            </div>
                        </div>
                    </form>
                    <!-- 数据表格2 -->
                    <table id="orderTable" lay-filter="orderTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="docTypeTpl">
    <span name="docType" class="layui-badge layui-badge-gray">{{d.docType$}}</span>
</script>
<script type="text/html" id="operate">
    {{#if (d.settle == 1){ }}
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="stockOut" style="font-size: 16px">拣货单</a>
    {{# } }}
    {{#if (d.settle == 2 || d.settle == 4){ }}
    <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="print" style="font-size: 16px">打印</a>
    {{# } }}
</script>
<script type="text/html" id="settleTpl">
    <span name="settle"
          {{# if( d.settle === 1){ }}
          class="layui-badge layui-badge-blue"
          {{# } else if(d.settle === 2){ }}
          class="layui-badge layui-badge-red"
          {{# } else if(d.settle === 3){ }}
          class="layui-badge layui-badge-gray"
          {{# } else if(d.settle === 4){ }}
          class="layui-badge layui-badge-green"
          {{# } else { }}
          class="layui-badge layui-badge-gray"
          {{# } }}
    >{{d.settle$}}</span>
</script>
<script type="text/html" id="typeTpl">
    <span name="type"
          {{# if( d.type === 1){ }}
          class="layui-badge layui-badge-blue" ><span style="display: none">{{d.number}}</span>平仓</span>
    {{# } else if(d.type === 2){ }}
    class="layui-badge layui-badge-green" ><span style="display: none">{{d.number}}</span>立库</span>
    {{# } else if(d.type === 0){ }}
    class="layui-badge layui-badge-red" ><span style="display: none">{{d.number}}</span>缺货</span>
    {{# } }}
</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;">&#xe61a;</i> 查看明细
        </a>
    </span>
</script>
<!-- 打印容器 -->
<div id="pakoutPrintBox" style="display: none"></div>
<!-- 出库预览容器 -->
<div id="stoukOutPreview" 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>
    <table id="stoPreTab" lay-filter="stoPreTab"></table>
</div>
<!-- 单据类型表单 -->
<script type="text/html" id="docTypeEditDialog">
    <form id="docTypeEditForm" lay-filter="docTypeEditForm" class="layui-form model-form">
        <input name="dictId" type="hidden"/>
        <input name="docClass" value="1" type="hidden"/>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">类型编码:</label>
            <div class="layui-input-block">
                <input name="docId" placeholder="请输入类型编码" class="layui-input"
                       lay-verType="tips" lay-verify="required" required/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label layui-form-required">类型名称:</label>
            <div class="layui-input-block">
                <input name="docName" placeholder="请输入类型名称" class="layui-input"
                       lay-verType="tips" lay-verify="required" required/>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注:</label>
            <div class="layui-input-block">
                <textarea name="memo" placeholder="请输入备注" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item text-right">
            <button class="layui-btn" lay-filter="docTypeEditSubmit" lay-submit>保存</button>
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        </div>
    </form>
</script>
<!-- 订单表头操作 -->
<script type="text/html" id="orderToolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm layui-btn-normal" id="btn-add" lay-event="add"><i class="layui-icon">&#xe654;</i>新增</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="del"><i class="layui-icon">&#xe640;</i>删除</button>
    </div>
</script>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/js/jquery/jQuery.print.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/receive/receive.js" charset="utf-8"></script>
</body>
<script type="text/template" id="pakoutPrintTpl">
    <!-- 头 -->
    <div id="print-header" style="margin: 20px 0">
        <div style="text-align: center">
            <div style="text-align: center;margin-bottom: 10px">
                <span style="font-family: 宋体"> 拣货单 </span>
            </div>
            <img class="template-code template-qrcode" src="{{data.barcodeUrl}}" style="width: 80%">
            <p style="letter-spacing: 2px;margin-top: 5px">{{data.docNum}}</p>
        </div>
        <div style="font-size: xx-small; text-align: left; margin-top: 10px">
            <span style="font-family: 宋体">客户:{{data.cstmrName}}</span>
        </div>
        <div style="margin-top: 10px">
            <div style="float: left;width: 50%; text-align: left">
                <span style="font-size: xx-small;font-family: 宋体">拣货数量:{{data.total}}</span>
            </div>
            <div style="float: left; width: 50%; text-align: right">
                <span style="font-size: xx-small;font-family: 宋体">拣货人:{{data.workerName}}</span>
            </div>
            <div style="clear:both;"></div>
        </div>
    </div>
    <!-- 主体 -->
    <div style="margin-top: 10px">
        {{#each data.list}}
        <div class="pakout-item" style="padding: 10px 5px 10px 5px;border-top: 1px solid #525252">
            <div class="item-header" style="margin-top: 10px;font-family: 宋体; font-size: x-small">
                {{maktx}}
            </div>
            <div class="item-content" style="margin: 10px 0 ">
                <div style="float: left;font-family: 宋体; font-size: xx-small">{{anfme}}{{unit}}</div>
                <div style="float: right;font-family: 宋体; font-size: xx-small">货位:{{locNo}}</div>
                <div style="clear: both;"></div>
            </div>
        </div>
        {{/each}}
    </div>
</script>
</html>
src/main/webapp/views/receiveDetl/receiveDetl.html
New file
@@ -0,0 +1,91 @@
<!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">
</head>
<body>
<!-- 搜索栏 -->
<div id="search-box" class="layui-form layui-card-header">
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline cool-auto-complete">
            <input id="orderId" class="layui-input" name="order_id" type="text" placeholder="请输入" autocomplete="off" style="display: none">
            <input id="orderId$" 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="receiveQueryByorderId" onkeyup="autoLoad(this.getAttribute('data-key'))">
                <select class="cool-auto-complete-window-select" data-key="receiveQueryByorderIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                </select>
            </div>
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline cool-auto-complete">
            <input id="createBy" class="layui-input" name="create_by" type="text" placeholder="请输入" autocomplete="off" style="display: none">
            <input id="createBy$" 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="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
                <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                </select>
            </div>
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline cool-auto-complete">
            <input id="updateBy" class="layui-input" name="update_by" type="text" placeholder="请输入" autocomplete="off" style="display: none">
            <input id="updateBy$" 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="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
                <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                </select>
            </div>
        </div>
    </div>
    <!-- 待添加 -->
    <div id="data-search-btn" class="layui-btn-container layui-form-item">
        <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button>
        <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button>
    </div>
</div>
<!-- 表格 -->
<div class="layui-form">
    <table class="layui-hide" id="receiveDetl" lay-filter="receiveDetl"></table>
</div>
<script type="text/html" id="toolbar">
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>
        <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button>
        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button>
    </div>
</script>
<script type="text/html" id="operate">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a>
    <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">编辑</a>
</script>
<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/receiveDetl/receiveDetl.js" charset="utf-8"></script>
<iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe>
</body>
</html>
src/main/webapp/views/receiveDetl/receiveDetl_detail.html
New file
@@ -0,0 +1,202 @@
<!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/cool.css" media="all">
    <link rel="stylesheet" href="../../static/css/common.css" media="all">
</head>
<body>
<!-- 详情 -->
<div id="data-detail" class="layer_self_wrap">
    <form id="detail" class="layui-form">
    <!--
        <div class="layui-inline"  style="display: none">
            <label class="layui-form-label"><span class="not-null">*</span>编  号:</label>
            <div class="layui-input-inline">
                <input id="id" class="layui-input" type="text" placeholder="编号">
            </div>
        </div>
    -->
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">I  D:</label>
            <div class="layui-input-inline">
                <input id="id" class="layui-input" type="text" lay-verify="number" >
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">订单内码:</label>
            <div class="layui-input-inline cool-auto-complete">
                <input id="orderId" class="layui-input" type="text" lay-verify="number"  style="display: none">
                <input id="orderId$" 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="receiveQueryByorderId" onkeyup="autoLoad(this.getAttribute('data-key'))">
                    <select class="cool-auto-complete-window-select" data-key="receiveQueryByorderIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">数  量:</label>
            <div class="layui-input-inline">
                <input id="anfme" class="layui-input" type="text" lay-verify="number" >
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">商品编码:</label>
            <div class="layui-input-inline">
                <input id="matnr" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">商品名称:</label>
            <div class="layui-input-inline">
                <input id="maktx" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">名  称:</label>
            <div class="layui-input-inline">
                <input id="name" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">规  格:</label>
            <div class="layui-input-inline">
                <input id="specs" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">型  号:</label>
            <div class="layui-input-inline">
                <input id="model" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">批  号:</label>
            <div class="layui-input-inline">
                <input id="batch" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">单  位:</label>
            <div class="layui-input-inline">
                <input id="unit" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">商品条码:</label>
            <div class="layui-input-inline">
                <input id="barcode" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">供 应 商:</label>
            <div class="layui-input-inline">
                <input id="supplier" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">单  价:</label>
            <div class="layui-input-inline">
                <input id="unitPrice" class="layui-input" type="text" lay-verify="number" >
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">品 项 数:</label>
            <div class="layui-input-inline">
                <input id="itemNum" class="layui-input" type="text" lay-verify="number" >
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">数  量:</label>
            <div class="layui-input-inline">
                <input id="count" class="layui-input" type="text" lay-verify="number" >
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">重  量:</label>
            <div class="layui-input-inline">
                <input id="weight" class="layui-input" type="text" lay-verify="number" >
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">状  态:</label>
            <div class="layui-input-inline">
                <select id="status">
                    <option value="" style="display: none"></option>
                    <option value="1">正常</option>
                    <option value="0">禁用</option>
                </select>
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">添加人员:</label>
            <div class="layui-input-inline cool-auto-complete">
                <input id="createBy" class="layui-input" type="text" lay-verify="number"  style="display: none">
                <input id="createBy$" 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="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
                    <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">添加时间:</label>
            <div class="layui-input-inline">
                <input id="createTime$" class="layui-input" type="text" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">修改人员:</label>
            <div class="layui-input-inline cool-auto-complete">
                <input id="updateBy" class="layui-input" type="text" lay-verify="number"  style="display: none">
                <input id="updateBy$" 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="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
                    <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                    </select>
                </div>
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">修改时间:</label>
            <div class="layui-input-inline">
                <input id="updateTime$" class="layui-input" type="text" autocomplete="off">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">备  注:</label>
            <div class="layui-input-inline">
                <input id="memo" class="layui-input" type="text">
            </div>
        </div>
        <hr class="layui-bg-gray">
        <div id="data-detail-btn" class="layui-btn-container layui-form-item">
            <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">保存</div>
            <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">修改</div>
            <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">关闭</div>
        </div>
        <div id="prompt">
            温馨提示:请仔细填写相关信息,<span class="extrude"><span class="not-null">*</span> 为必填选项。</span>
        </div>
    </form>
</div>
</body>
<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/receiveDetl/receiveDetl.js" charset="utf-8"></script>
</html>
version/db/wms_saas20220104.bak
Binary files differ