czt
9 天以前 db67639449287bcec461916a7dca6003ee5dd03c
出入库详单及补单页面及逻辑
已修改17个文件
已添加6个文件
3633 ■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/FileInfo.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutRecord.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/FileMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java 361 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/pom.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/FilePR.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutDataPR.java 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutHand.view.xml 944 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml 1165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/models/core.model.xml 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/file/FileManager.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/inout/InoutManager.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/print/PrintManager.java 281 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/weight.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-web/src/main/resources/templates/inout/weight2.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java
@@ -119,6 +119,14 @@
    // æµç¨‹-备案(表示流程整体完成后备案)
    public static final String PROGRESS_RECORD = "RECORD";
    // æ•°æ®çŠ¶æ€-正常
    public static final String RECORD_STATUS_NORMAL = "NORMAL";
    // æ•°æ®çŠ¶æ€-补录
    public static final String RECORD_STATUS_ADD = "ADD";
    // æ•°æ®çŠ¶æ€-已删除
    public static final String RECORD_STATUS_DEL = "DEL";
    /**
     * å‡ºå…¥åº“配置的类型 10 = è½¦ç‰Œè¯†åˆ«
     */
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java
@@ -86,6 +86,6 @@
    /**
     * æ‰€å±žåˆåŒ
     */
    private String contractName;
    private String contract;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java
@@ -19,6 +19,8 @@
    private String depotId;
    private String key;
    private String deptId;// æ‰€å±žåˆ†åº“
    private String customerName;// å®¢æˆ·åç§°
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/FileInfo.java
@@ -30,7 +30,7 @@
    @Id
    @Column(name = "id", columnDefinition = "varchar(40) COMMENT '附件ID'")
    @TableField("id")
    private String fileId;
    private String id;
    @Column(name = "dept_id", columnDefinition = "varchar(40) COMMENT '所属库区'")
    @TableField("dept_id")
@@ -48,4 +48,8 @@
    @TableField("file_name")
    private String fileName;
    @Column(name = "file_path", columnDefinition = "varchar(200) COMMENT '文件全路径'")
    @TableField("file_path")
    private String filePath;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutRecord.java
@@ -196,10 +196,6 @@
    @TableField("settle_money")
    private Double settleMoney = 0.00;
    @Column(name = "settle_id", columnDefinition = "varchar(40) COMMENT '结算单号'")
    @TableField("settle_id")
    private String settleId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "settle_time", columnDefinition = "datetime COMMENT '结算时间'")
    @TableField("settle_time")
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/FileMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
package com.fzzy.igds.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzzy.igds.domain.FileInfo;
import org.apache.ibatis.annotations.Mapper;
/**
 * @Description
 * @Author CZT
 * @Date 2025/12/05 15:48
 */
@Mapper
public interface FileMapper extends BaseMapper<FileInfo> {
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/FileService.java
@@ -1,12 +1,22 @@
package com.fzzy.igds.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fzzy.igds.domain.FileInfo;
import com.fzzy.igds.mapper.FileMapper;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.config.FrameworkConfig;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;
/**
 * @Description
@@ -16,14 +26,120 @@
@Service
public class FileService {
    @Resource
    private FileMapper fileMapper;
    /**
     * èŽ·å–å‡ºå…¥åº“æ–‡ä»¶è·¯å¾„
     * @param date
     * å¼‚步执行附件保存
     * @param files     é™„件信息
     * @param bizId     ä¸šåŠ¡id
     * @param bizTag    æ ‡ç­¾
     * @param pathTag   æ–‡ä»¶è·¯å¾„标识
     */
    @Async
    public void saveInoutFiles(List<FileInfo> files, String bizId, String bizTag, String pathTag) {
        if (null == files || files.isEmpty()) {
            return;
        }
        for (FileInfo data : files) {
            // å¦‚果没有附件名称,则不保存附件信息
            if (StringUtils.isBlank(data.getFileName())) {
                continue;
            }
            data.setId(ContextUtil.generateId());
            data.setCompanyId(ContextUtil.getCompanyId());
            //文件全路径
            String filePath = getFileSavePath(pathTag) + data.getFileName();
            filePath = filePath.replace(FrameworkConfig.getProfile(), "/profile/");
            data.setFilePath(filePath);
            if (StringUtils.isNotEmpty(bizId)) {
                data.setBizId(bizId);
            }
            if (StringUtils.isNotEmpty(bizTag)) {
                data.setBizTag(bizTag);
            }
            data.setCreateTime(new Date());
            data.setCreateBy(ContextUtil.getLoginUserName());
            data.setUpdateTime(new Date());
            data.setUpdateBy(ContextUtil.getLoginUserName());
            fileMapper.insert(data);
        }
    }
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @param deptId
     * @param bizId
     * @return
     */
    public String getInoutFilePath(Date date) {
        if (null == date) date = new Date();
        String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(date, "yyyyMM") + "/";
    public List<FileInfo> listFile(String companyId, String deptId, String bizId, String bizTag) {
        QueryWrapper<FileInfo> queryWrapper = new QueryWrapper<>();
        if (StringUtils.isNotBlank(companyId)) {
            queryWrapper.eq("company_id", companyId);
        }
        if (StringUtils.isNotBlank(deptId)) {
            queryWrapper.eq("dept_id", deptId);
        }
        if (StringUtils.isNotBlank(bizId)) {
            queryWrapper.eq("biz_id", bizId);
        }
        if (StringUtils.isNotBlank(bizTag)) {
            queryWrapper.eq("biz_tag", bizTag);
        }
        return fileMapper.selectList(queryWrapper);
    }
    /**
     *
     * @param id
     */
    public void delFile(String id) {
        fileMapper.deleteById(id);
    }
    /**
     * èŽ·å–å‡ºå…¥åº“æ–‡ä»¶è·¯å¾„
     * @param pathTag
     * @return
     */
    public String getFileSavePath(String pathTag) {
        if(StringUtils.isBlank(pathTag)){
            pathTag = "COMMON";
        }
        if("INOUT".equals(pathTag)) return getInoutFilePath();
        if("PATROL".equals(pathTag)) return getPatrolFilePath();
        if("DEPT".equals(pathTag)) return getDeptFilePath();
        return getCommonFilePath();
    }
    /**
     * èŽ·å–å‡ºå…¥åº“æ–‡ä»¶è·¯å¾„
     * @return
     */
    public String getPatrolFilePath() {
        String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
        }
        return basePath;
    }
    /**
     * èŽ·å–å‡ºå…¥åº“æ–‡ä»¶è·¯å¾„
     * @return
     */
    public String getInoutFilePath() {
        String basePath = FrameworkConfig.getProfile() + "INOUT/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
@@ -33,15 +149,11 @@
    /**
     * èŽ·å–åº“åŒºè·¯å¾„ä¸‹æ–‡ä»¶
     * @param companyId
     * @return
     */
    public String getDeptFilePath(String companyId) {
        if (StringUtils.isEmpty(companyId)){
            companyId = FrameworkConfig.getCompanyId();
        }
    public String getDeptFilePath() {
        String basePath = FrameworkConfig.getProfile() + "IMG/"+ companyId + "/SECURITY/";
        String basePath = FrameworkConfig.getProfile() + "IMG/"+ FrameworkConfig.getCompanyId() + "/SECURITY/";
        File file = new File(basePath);
        if (!file.exists()) {
@@ -49,4 +161,44 @@
        }
        return basePath;
    }
    /**
     * èŽ·å–å…¬å…±è·¯å¾„
     * @return
     */
    public String getCommonFilePath() {
        String basePath = FrameworkConfig.getProfile() + "COMMON/" + DateFormatUtils.format(new Date(), "yyyyMM") + "/";
        File file = new File(basePath);
        if (!file.exists()) {
            file.mkdirs();
        }
        return basePath;
    }
    /**
     * åŽ‹ç¼©å›¾ç‰‡
     *
     * @param filePath   åŽ‹ç¼©å‰è·¯å¾„
     * @param scale      åŽ‹ç¼©æ¯”ä¾‹
     * @param outputPath åŽ‹ç¼©åŽè·¯å¾„
     * @throws IOException
     */
    public void compressedImage(String filePath, double scale, String outputPath) throws IOException {
        BufferedImage bufferedImage = ImageIO.read(new File(filePath));
        int newWidth = (int) (bufferedImage.getWidth() * scale);
        int newHeight = (int) (bufferedImage.getHeight() * scale);
        //创建压缩后的图片
        BufferedImage compressedImage = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
        Graphics2D graphics2D = compressedImage.createGraphics();
        //绘制原始图片到压缩后的图片上
        graphics2D.drawImage(bufferedImage, 0, 0, newWidth, newHeight, null);
        graphics2D.dispose();
        ImageIO.write(compressedImage, "jpg", new File(outputPath));
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutNoticeService.java
@@ -62,22 +62,22 @@
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    public List<InoutNoticeIn> getNoticeIn(String companyId, String deptId, String completeStatus) {
    public List<InoutNoticeIn> getNoticeIn(NoticeParam param) {
        QueryWrapper<InoutNoticeIn> queryWrapper = new QueryWrapper<>();
        if(StringUtils.isNotBlank(companyId)){
            queryWrapper.eq("company_id", companyId);
        if(StringUtils.isNotBlank(param.getCompanyId())){
            queryWrapper.eq("company_id", param.getCompanyId());
        }
        if(StringUtils.isNotBlank(deptId)){
            queryWrapper.eq("dept_id", deptId);
        if(StringUtils.isNotBlank(param.getDeptId())){
            queryWrapper.eq("dept_id", param.getDeptId());
        }
        if(StringUtils.isNotBlank(completeStatus)){
            queryWrapper.eq("complete_status", completeStatus);
        if(StringUtils.isNotBlank(param.getCompleteStatus())){
            queryWrapper.eq("complete_status", param.getCompleteStatus());
        }
        if(StringUtils.isNotBlank(param.getKey())){
            queryWrapper.like("name", param.getKey());
        }
        queryWrapper.orderByDesc("create_time");
        
@@ -99,23 +99,16 @@
    /**
     * æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @param deptId
     * @return
     */
    public List<InoutNoticeIn> listNoticeIn(String companyId, String deptId) {
        return this.getNoticeIn(companyId, deptId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     *  æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @return
     */
    public List<InoutNoticeIn> getUnComNoticeIn(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return this.getNoticeIn(companyId, null, Constant.COMPLETE_STATUS_NONE);
        NoticeParam param = new NoticeParam();
        param.setCompanyId(companyId);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        return this.getNoticeIn(param);
    }
    /**
@@ -183,22 +176,21 @@
    /**
     * æ ¹æ®æ¡ä»¶æŸ¥è¯¢
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    public List<InoutNoticeOut> getNoticeOut(String companyId, String deptId, String completeStatus) {
    public List<InoutNoticeOut> getNoticeOut(NoticeParam param) {
        QueryWrapper<InoutNoticeOut> queryWrapper = new QueryWrapper<>();
        if(StringUtils.isNotBlank(companyId)){
            queryWrapper.eq("company_id", companyId);
        if(StringUtils.isNotBlank(param.getCompanyId())){
            queryWrapper.eq("company_id", param.getCompanyId());
        }
        if(StringUtils.isNotBlank(deptId)){
            queryWrapper.eq("dept_id", deptId);
        if(StringUtils.isNotBlank(param.getDeptId())){
            queryWrapper.eq("dept_id", param.getDeptId());
        }
        if(StringUtils.isNotBlank(completeStatus)){
            queryWrapper.eq("complete_status", completeStatus);
        if(StringUtils.isNotBlank(param.getCompleteStatus())){
            queryWrapper.eq("complete_status", param.getCompleteStatus());
        }
        if(StringUtils.isNotBlank(param.getKey())){
            queryWrapper.like("name", param.getKey());
        }
        queryWrapper.orderByDesc("create_time");
@@ -218,16 +210,6 @@
    }
    /**
     * æŸ¥è¯¢æ•°æ®
     * @param companyId
     * @param deptId
     * @return
     */
    public List<InoutNoticeOut> listNoticeOut(String companyId, String deptId) {
        return this.getNoticeOut(companyId, deptId, Constant.COMPLETE_STATUS_NONE);
    }
    /**
     * Mybatis-plus èŽ·å–ä¿¡æ¯
     * @param companyId
     * @return
@@ -236,7 +218,10 @@
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return this.getNoticeOut(companyId, null,Constant.COMPLETE_STATUS_NONE);
        NoticeParam param = new NoticeParam();
        param.setCompanyId(companyId);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        return this.getNoticeOut(param);
    }
    /**
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutRecordService.java
@@ -2,19 +2,28 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzzy.igds.bill.InoutBill;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.FoodVariety;
import com.fzzy.igds.constant.RedisConst;
import com.fzzy.igds.data.InoutData;
import com.fzzy.igds.data.InoutParam;
import com.fzzy.igds.data.InoutPrintBill;
import com.fzzy.igds.domain.Depot;
import com.fzzy.igds.domain.InoutRecord;
import com.fzzy.igds.mapper.InoutRecordMapper;
import com.fzzy.igds.utils.ContextUtil;
import com.fzzy.igds.utils.DateUtil;
import com.fzzy.igds.utils.NumberUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.DecimalFormat;
import java.util.Date;
import java.util.List;
@@ -29,6 +38,12 @@
    @Resource
    private InoutRecordMapper inoutRecordMapper;
    @Resource
    private FileService fileService;
    @Resource
    private SysDeptService sysDeptService;
    @Resource
    private DepotService depotService;
    @Resource
    private RedisCache redisCache;
@@ -84,7 +99,7 @@
            queryWrapper.eq("id", param.getId());
        }
        if (StringUtils.isNotBlank(param.getPlateNum())) {
            queryWrapper.eq("plate_num", param.getPlateNum());
            queryWrapper.like("plate_num", param.getPlateNum());
        }
        if (StringUtils.isNotBlank(param.getWeightTag())) {
            //查询待称重的
@@ -115,7 +130,9 @@
        if (null != param.getEnd()) {
            queryWrapper.le("create_time", DateUtil.getNextZero(param.getEnd()));
        }
        queryWrapper.eq("record_status", "NORMAL"); //正常状态的单子
        queryWrapper.eq("record_status", Constant.RECORD_STATUS_NORMAL); //正常状态的单子
        queryWrapper.or();
        queryWrapper.eq("record_status", Constant.RECORD_STATUS_ADD); //补录单子的单子
        queryWrapper.orderByDesc("create_time");
        return queryWrapper;
@@ -152,8 +169,59 @@
        queryWrapper.eq("plate_num", plateNum);
        queryWrapper.ne("progress", Constant.PROGRESS_RECORD);
        queryWrapper.eq("record_status", "NORMAL");
        queryWrapper.or();
        queryWrapper.eq("record_status", Constant.RECORD_STATUS_ADD); //补录单子的单子
        return inoutRecordMapper.selectCount(queryWrapper);
    }
    /**
     * æ‰‹åŠ¨è¡¥å•
     * @param data
     * @return
     */
    public String handAddInoutRecord(InoutData data) {
        //补单数据直接到结果状态
        data.setRecordStatus(Constant.RECORD_STATUS_ADD);
        data.setProgress(Constant.PROGRESS_RECORD);
        if(null != data.getPerWet() && data.getPerWet() > 0){
            data.setCheckStatus(Constant.STATUS_CHECK);
        }
        String loginUser = ContextUtil.getLoginUserName();
        if (StringUtils.isEmpty(data.getRegisterUser())) {
            data.setRegisterUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getFullWeightUser())) {
            data.setFullWeightUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getEmptyWeightUser())) {
            data.setEmptyWeightUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getHandleUser())) {
            data.setHandleUser(loginUser);
        }
        if (StringUtils.isEmpty(data.getCompleteUser())) {
            data.setCompleteUser(loginUser);
        }
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
        }
        InoutRecord record = new InoutRecord();
        BeanUtils.copyProperties(data, record);
        //保存
        int num = this.addInoutRecord(record);
        //附件处理
        fileService.saveInoutFiles(data.getFiles(), record.getId(), null, "INOUT");
        if (num > 0) {
            return null;
        } else {
            return "保存失败!";
        }
    }
    /**
@@ -202,6 +270,38 @@
        //updateInoutCache(data);
        return num;
    }
    /**
     * å¼‚常终止
     * @param data
     * @return
     */
    public String errorInoutData(InoutRecord data) {
        InoutParam param = new InoutParam();
        param.setId(data.getId());
        data = this.selectOne(param);
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "当前信息已做异常处理,不支持重复执行!";
        }
        String msg = " äºŽ" + DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm") + " è¢« " + ContextUtil.getLoginUserName() + " æ‰§è¡Œç»ˆæ­¢ï¼ŒåŽŸå› ï¼š" + data.getRemarks();
        data.setRemarks(msg);
        data.setProgress(Constant.PROGRESS_RECORD);
        data.setRecordStatus(Constant.RECORD_STATUS_DEL);
        data.setCompleteTime(new Date());
        int i = this.updateInoutRecord(data);
        //TODO åˆ é™¤ç¼“å­˜
        if(i > 0){
            return null;
        }else {
            return "操作失败!";
        }
    }
    /**
@@ -292,4 +392,261 @@
        }
    }
    /**
     * èŽ·å–å…¥åº“è¿‡ç£…å•æ•°æ®ä¿¡æ¯
     *
     * @param data
     * @return
     */
    public String inWeightBill(InoutRecord data) {
        // èŽ·å–è¡¨å•æ•°æ®
        InoutPrintBill bill = this.createBillData(data, "入库划码单");
        // è°ƒæ•´æ¨¡ç‰ˆæ•°æ®å¹¶è¿”回
        String htmlStr = InoutBill.IN_WEIGHT_DEFAULT;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
        htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime());
        htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime());
        htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
        htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
        htmlStr = htmlStr.replace("serId", bill.getSerId());
        htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
        htmlStr = htmlStr.replace("deptName", bill.getUnitName());
        htmlStr = htmlStr.replace("driverName", bill.getDriverName());
        htmlStr = htmlStr.replace("userNumberId", bill.getUserId());
        htmlStr = htmlStr.replace("userContact", bill.getUserContact());
        htmlStr = htmlStr.replace("userAddress", bill.getUserAddress());
        htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety());
        htmlStr = htmlStr.replace("depotName", bill.getDepotName());
        htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation());
        htmlStr = htmlStr.replace("plateNum", bill.getPlateNum());
        htmlStr = htmlStr.replace("fullWeight",
                new DecimalFormat("0.00").format(bill.getFullWeight()));
        htmlStr = htmlStr.replace("emptyWeight",
                new DecimalFormat("0.00").format(bill.getEmptyWeight()));
        htmlStr = htmlStr.replace("netWeight",
                new DecimalFormat("0.00").format(bill.getNetWeight()));
        htmlStr = htmlStr.replace("deImpurity", bill.getDeImpurity() + "");
        htmlStr = htmlStr.replace("deWet", bill.getDeWet() + "");
        htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight()));
        htmlStr = htmlStr.replace("deCheck", bill.getDeCheck() + "");
        htmlStr = htmlStr.replace("addCheck", bill.getAddCheck() + "");
        htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
        htmlStr = htmlStr.replace("settleWeight",
                new DecimalFormat("0.00").format(bill.getSettleWeight()));
        htmlStr = htmlStr.replace("dePackage", bill.getDePackage() + "");
        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
        htmlStr = htmlStr.replace("price", bill.getPrice());
        htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
        htmlStr = htmlStr.replace("wet", bill.getWet() + "");
        htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
        htmlStr = htmlStr.replace("checkStatus", bill.getCheckStatus());
        htmlStr = htmlStr.replace("remark", bill.getRemark());
        htmlStr = htmlStr.replace("moneyName", bill.getMoneyName());
        htmlStr = htmlStr.replace("unitName", bill.getUnitName());
        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
        htmlStr = htmlStr.replace("handleStart", "");
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replaceAll("weightUser",
                bill.getWeightUser() == null ? "" : bill.getWeightUser());
        htmlStr = htmlStr.replaceAll("handleUser",
                bill.getHandleUser() == null ? "" : bill.getHandleUser());
        htmlStr = htmlStr.replaceAll("keeperName",
                bill.getKeeperUser() == null ? "" : bill.getKeeperUser());
        return htmlStr;
    }
    /**
     * èŽ·å–å‡ºåº“è¿‡ç£…å•
     *
     * @param data
     * @return
     */
    public String outWeightBill(InoutRecord data) {
        // èŽ·å–è¡¨å•æ•°æ®
        InoutPrintBill bill = this.createBillData(data, "出库划码单");
        //默认模版
        String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
        htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime());
        htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime());
        htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
        htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
        htmlStr = htmlStr.replace("serId", bill.getSerId());
        htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
        htmlStr = htmlStr.replace("deptName", bill.getUnitName());
        htmlStr = htmlStr.replace("driverName", bill.getDriverName());
        htmlStr = htmlStr.replace("userNumberId", bill.getUserId());
        htmlStr = htmlStr.replace("userContact", bill.getUserContact());
        htmlStr = htmlStr.replace("userAddress", bill.getUserAddress());
        htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety());
        htmlStr = htmlStr.replace("depotName", bill.getDepotName());
        htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation());
        htmlStr = htmlStr.replace("plateNum", bill.getPlateNum());
        htmlStr = htmlStr.replace("fullWeight",
                new DecimalFormat("0.00").format(bill.getFullWeight()));
        htmlStr = htmlStr.replace("emptyWeight",
                new DecimalFormat("0.00").format(bill.getEmptyWeight()));
        htmlStr = htmlStr.replace("netWeight",
                new DecimalFormat("0.00").format(bill.getNetWeight()));
        htmlStr = htmlStr.replace("dePackage",
                new DecimalFormat("0.00").format(bill.getDePackage()));
        htmlStr = htmlStr.replace("remark", bill.getRemark());
        htmlStr = htmlStr.replace("settleWeight",
                new DecimalFormat("0.00").format(bill.getSettleWeight()));
        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
        htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight()));
        htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
        htmlStr = htmlStr.replace("price", bill.getPrice());
        htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
        htmlStr = htmlStr.replace("wet", bill.getWet() + "");
        htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
        htmlStr = htmlStr.replace("unitName", getValue(bill.getUnitName()));
        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
        htmlStr = htmlStr.replace("handleStart", "");
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replaceAll("weightUser", getValue(bill.getWeightUser()));
        htmlStr = htmlStr.replace("handleUser", getValue(bill.getHandleUser()));
        htmlStr = htmlStr.replaceAll("keeperName", getValue(bill.getKeeperUser()));
        return htmlStr;
    }
    public String getValue(String value) {
        if (null == value) return "";
        return value;
    }
    /**
     * å°è£…过磅单数据
     *
     * @param data
     * @param billTitle
     * @return
     */
    private InoutPrintBill createBillData(InoutRecord data, String billTitle) {
        InoutPrintBill bill = new InoutPrintBill();
        bill.setBillTitle(billTitle);
        SysDept dept = sysDeptService.getCacheDept(data.getCompanyId(), data.getDeptId());
        if (null != dept && StringUtils.isNotEmpty(dept.getDeptName())) {
            bill.setBillTitle(dept.getDeptName() + billTitle);
            bill.setDeptId(dept.getDeptId() + "");
            bill.setDeptName(dept.getDeptName() + "");
            bill.setUnitName(dept.getDeptName());
        }
        bill.setCompanyId(data.getCompanyId() == null ? "" : data
                .getCompanyId());
        if (null == data.getRegisterTime()) {
            data.setRegisterTime(new Date());
        }
        bill.setRegisterTime(DateFormatUtils.format(data.getRegisterTime(),
                "yyyy-MM-dd HH:mm"));
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
        }
        bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(),
                "yyyy-MM-dd HH:mm"));
        bill.setEmptyTime(DateFormatUtils.format(data.getEmptyWeightTime(),
                "yyyy-MM-dd HH:mm:ss"));
        bill.setFullTime(DateFormatUtils.format(data.getFullWeightTime(),
                "yyyy-MM-dd HH:mm:ss"));
        bill.setSerId(data.getId());
        if ("5016".equals(data.getCompanyId()) || "5347".equals(data.getCompanyId()) || "5352".equals(data.getCompanyId())) {
            bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd"));
            bill.setSerId(data.getId().substring(2));
        }
        //客户信息
        bill.setCustomerName(data.getCustomerName() == null ? "" : data.getCustomerName());
        bill.setUserId(data.getUserId() == null ? "" : data.getUserId());
        bill.setUserAddress(data.getUserAddress() == null ? "" : data.getUserAddress());
        bill.setUserContact(data.getUserContact() == null ? "" : data.getUserContact());
        bill.setNoticeId(data.getNoticeId());
        bill.setDriverName(data.getUserName() == null ? "" : data.getUserName());
        // èŽ·å–ä»“åº“ä¿¡æ¯
        Depot depot = depotService.getCacheDepot(data.getCompanyId(),
                data.getDepotId());
        if (depot != null) {
            bill.setDepotName(depot.getName() == null ? "" : depot.getName());
            bill.setHandleUser(depot.getStoreKeeperName() == null ? "" : depot
                    .getStoreKeeperName());
        }
        bill.setFoodVariety(FoodVariety.getMsg(data.getFoodVariety()));
        bill.setFoodLocation(data.getFoodLocation() == null ? "" : data
                .getFoodLocation());
        bill.setPlateNum(data.getPlateNum());
        bill.setFullWeight(data.getFullWeight());
        bill.setEmptyWeight(data.getEmptyWeight());
        bill.setNetWeight(data.getNetWeight());
        bill.setRecordWeight(data.getRecordWeight());
        bill.setCheckStatus(data.getCheckStatus().equals(Constant.STATUS_CHECK) ? "合格" : "不合格");
        bill.setDeOther(data.getDeOther());
        bill.setSettleWeight(data.getSettleWeight());
        bill.setPrice(data.getPrice() == null ? "" : data.getPrice() + "");
        if (data.getSettleMoney() <= 0) {
            if (null != data.getPrice() && null != data.getRecordWeight()) {
                data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2));
            }
        }
        bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + "");
        bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks());
        if (Constant.TYPE_IN.equals(data.getType())) {
            bill.setWeightUser(data.getFullWeightUser());
        }
        if (Constant.TYPE_OUT.equals(data.getType())) {
            bill.setWeightUser(data.getEmptyWeightUser());
        }
        bill.setHandleUser(data.getHandleUser());
        bill.setKeeperUser(depot.getStoreKeeperName());
        return bill;
    }
}
fzzy-igdss-view/pom.xml
@@ -96,11 +96,29 @@
            </exclusions>
        </dependency>
<!--        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>-->
        <dependency>
            <groupId>com.bstek.dorado</groupId>
            <artifactId>dorado-uploader</artifactId>
            <version>1.0.20</version>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-jcl</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-log4j12</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>log4j</artifactId>
                    <groupId>log4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>slf4j-jdk14</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
fzzy-igdss-view/src/main/java/com/fzzy/igds/FilePR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,78 @@
package com.fzzy.igds;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.common.utils.Base64Util;
import com.fzzy.igds.domain.FileInfo;
import com.fzzy.igds.service.FileService;
import com.fzzy.igds.utils.ContextUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Description æ–‡ä»¶ä¸Šä¼ 
 * @Author CZT
 * @Date 2025/11/29 11:02
 */
@Slf4j
@Component
public class FilePR {
    @Resource
    private FileService fileService;
    /**
     * filePR#parseExcel
     *
     * @param fileName
     * @return
     */
    @Expose
    public String parseExcel(String fileName) {
        return fileName;
    }
    /**
     * filePR#listFile æ ¹æ®æ¡ä»¶èŽ·å–åˆ—è¡¨æ•°æ®
     *
     * @param bizId
     * @param bizId
     * @return
     */
    @DataProvider
    public List<FileInfo> listFile(String bizId) {
        if (null == bizId){
            return null;
        }
        return fileService.listFile(ContextUtil.getCompanyId(),ContextUtil.subDeptId(null), bizId, null);
    }
    /**
     *
     * filePR#getImg
     * èŽ·å–å›¾ç‰‡ä¿¡æ¯
     *
     * @param file
     * @return
     */
    @Expose
    public Map<String, String> getImg(FileInfo file) {
        Map<String, String> result = new HashMap<String, String>();
        result.put("code", "SUCCESS");
        String basePath = fileService.getFileSavePath("COMMON");
        String imgData = Base64Util.getImageStr(basePath + file.getFileName());
        if (null == imgData) {
            result.put("code", "ERROR");
        }
        result.put("data", imgData);
        return result;
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/FileUploadManage.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,94 @@
package com.fzzy.igds;
import com.bstek.dorado.uploader.UploadFile;
import com.bstek.dorado.uploader.annotation.FileResolver;
import com.fzzy.igds.service.FileService;
import com.fzzy.igds.utils.ContextUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateFormatUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.Map;
/**
 * @Description Dorado7 é™„件上传公共管理层
 * @Author CZT
 * @Date 2025/12/05 10:05
 */
@Slf4j
@Component
public class FileUploadManage {
    @Resource
    private FileService fileService;
    /**
     * ä¸Šä¼ åº“区鸟瞰图
     * fileUploadManage#imgFile
     *
     * @param file
     * @param parameter
     * @return
     */
    @FileResolver
    public String imgFile(UploadFile file, Map<String, Object> parameter) {
        String fileId = null;
        try {
            String basePath = fileService.getFileSavePath("DEPT");
            fileId = "aerial-" + ContextUtil.subDeptId(null)
                    + file.getFileName().substring(
                    file.getFileName().lastIndexOf("."));
            file.transferTo(new File(basePath + fileId));
        } catch (IllegalStateException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return fileId;
    }
    /**
     * ä¸Šä¼ å‡ºå…¥åº“附件
     * fileUploadManage#inoutFile
     *
     * @param file
     * @param parameter
     * @return
     */
    @FileResolver
    public String inoutFile(UploadFile file, Map<String, Object> parameter) {
        //流程
        String bizTag = (String) parameter.get("bizTag");
        String newFileName = null;
        try {
            String basePath = fileService.getFileSavePath("INOUT");
            // èŽ·å–æ–°çš„ID
            newFileName = DateFormatUtils.format(new Date(), "yyyyMMddHHmmss");
            if(StringUtils.isNotEmpty(bizTag)){
                newFileName = bizTag + "_" + newFileName;
            }
            // æ–‡ä»¶åŽç¼€å
            String suffixName = file.getFileName().substring(file.getFileName().lastIndexOf("."));
            // åˆæˆæ–°çš„æ–‡ä»¶å
            newFileName = newFileName + suffixName;
            file.transferTo(new File(basePath + newFileName));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return newFileName;
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutDataPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,161 @@
package com.fzzy.igds;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.data.InoutData;
import com.fzzy.igds.data.InoutParam;
import com.fzzy.igds.domain.InoutRecord;
import com.fzzy.igds.service.InoutRecordService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
/**
 * @Description å‡ºå…¥åº“详单页面管理
 * @Author CZT
 * @Date 2025/12/05 10:40
 */
@Component
public class InoutDataPR {
    @Resource
    private InoutRecordService inoutRecordService;
    /**
     * inoutDataPR#pageInoutData
     *
     * @param page
     * @param param
     * @throws Exception
     */
    @DataProvider
    public void pageInoutData(Page<InoutRecord> page, InoutParam param) {
        com.baomidou.mybatisplus.extension.plugins.pagination.Page<InoutRecord> corePage = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(page.getPageNo(), page.getPageSize());
        if(null == param) {
            param = new InoutParam();
        }
        inoutRecordService.listPageInout(corePage, param);
        // é‡æ–°å°è£…
        page.setEntities(corePage.getRecords());
        page.setEntityCount(Integer.parseInt(String.valueOf(corePage.getTotal())));
    }
    /**
     * ä¿å­˜å‡ºå…¥åº“数据 inoutDataPR#saveInoutData
     */
    @DataResolver
    public String saveInoutData(InoutRecord data) {
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "系统:已经删除的数据不支持修改!";
        }
        if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "系统:未结束流程的数据不支持修改!";
        }
        int i = inoutRecordService.updateInoutRecord(data);
        if (i > 0) {
            return null;
        } else {
            return "保存失败!";
        }
    }
    /**
     * inoutDataPR#errorInoutData å‡ºå…¥åº“数据执行 å¼‚常终止
     *
     * @param data
     * @return
     * @throws Exception
     */
    @DataResolver
    @Transactional
    public String errorInoutData(InoutRecord data) {
        return inoutRecordService.errorInoutData(data);
    }
    /**
     * inoutDataPR#printWeightBill èŽ·å–æ‰“å°å•ä¿¡æ¯
     *
     * @param data
     * @return
     * @throws Exception
     */
    @Expose
    public String printWeightBill(InoutRecord data) {
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "删除的数据不支持打印!";
        }
        if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "未完成的数据不支持打印!";
        }
        if (Constant.TYPE_IN.equals(data.getType())) {
            return inoutRecordService.inWeightBill(data);
        } else {
            return inoutRecordService.outWeightBill(data);
        }
    }
    /**
     * inoutDataPR#initDataByHand æ–°å¢ž
     *
     * @return
     */
    @DataProvider
    public InoutData initDataByHand(String type) {
        SysUser user = ContextUtil.getLoginUser();
        InoutData data = new InoutData();
        data.setCompanyId(user.getCompanyId());
        data.setRegisterTime(new Date());
        data.setType(type);
        data.setRegisterUser(user.getUserName());
        data.setDeptId(ContextUtil.subDeptId(user));
        data.setCheckUser(user.getUserName());
        data.setProgress(Constant.PROGRESS_RECORD);
        data.setRecordStatus(Constant.RECORD_STATUS_ADD);
        return data;
    }
    /**
     * è¡¥å• inoutDataPR#addData
     */
    @DataResolver
    public String addData(InoutData data) {
        if (data.getSettleWeight() <= 0.0) {
            return "系统:结算重量必须大于0";
        }
        return inoutRecordService.handAddInoutRecord(data);
    }
    /**
     * inoutDataPR#printWeightBill èŽ·å–æ‰“å°å•ä¿¡æ¯
     *
     * @param data
     * @return
     * @throws Exception
     */
    @Expose
    public String printWeightBillHand(InoutData data) {
        if (Constant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "删除的数据不支持打印!";
        }
        if (!Constant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "未完成的数据不支持打印!";
        }
        if (Constant.TYPE_IN.equals(data.getType())) {
            return inoutRecordService.inWeightBill(data);
        } else {
            return inoutRecordService.outWeightBill(data);
        }
    }
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutHand.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,944 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.data.InoutData</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">单据号</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="progress">
        <Property></Property>
        <Property name="label">流程进度</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PROCESS_STATUS_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="recordStatus">
        <Property></Property>
        <Property name="label">数据状态</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;RECORD_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="checkStatus">
        <Property></Property>
        <Property name="label">扦样结果</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;CHECK_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="registerTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">登记时间</Property>
      </PropertyDef>
      <PropertyDef name="registerUser">
        <Property></Property>
        <Property name="label">登记人员</Property>
      </PropertyDef>
      <PropertyDef name="userName">
        <Property></Property>
        <Property name="label">承运人</Property>
      </PropertyDef>
      <PropertyDef name="userId">
        <Property></Property>
        <Property name="label">身份证号</Property>
      </PropertyDef>
      <PropertyDef name="userContact">
        <Property></Property>
        <Property name="label">联系方式</Property>
      </PropertyDef>
      <PropertyDef name="userAddress">
        <Property></Property>
        <Property name="label">承运人地址</Property>
      </PropertyDef>
      <PropertyDef name="plateNum">
        <Property></Property>
        <Property name="label">车牌号</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">往来单位</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocation">
        <Property></Property>
        <Property name="label">粮食产地</Property>
      </PropertyDef>
      <PropertyDef name="foodYear">
        <Property></Property>
        <Property name="label">粮食年份</Property>
      </PropertyDef>
      <PropertyDef name="deOther">
        <Property name="dataType">Double</Property>
        <Property name="label">扣重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">满车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">满车称时间</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightUser">
        <Property></Property>
        <Property name="label">满车称重人</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">空车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">空车称时间</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightUser">
        <Property></Property>
        <Property name="label">空车称重人</Property>
      </PropertyDef>
      <PropertyDef name="netWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">净重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="settleWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">结算净重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="recordWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">入库重量</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="handleStart">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓开始时间</Property>
      </PropertyDef>
      <PropertyDef name="handleEnd">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓结束时间</Property>
      </PropertyDef>
      <PropertyDef name="handleUser">
        <Property></Property>
        <Property name="label">值仓操作人</Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="completeUser">
        <Property></Property>
        <Property name="label">完成确认人</Property>
      </PropertyDef>
      <PropertyDef name="remarks">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属分库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getAllData&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">kqmc</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property name="label">出入库类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">出库</Property>
                <Property name="value">OUT</Property>
              </Entity>
              <Entity>
                <Property name="name">入库</Property>
                <Property name="value">IN</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodLevel">
        <Property></Property>
        <Property name="label">粮食等级</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerFoodLevel&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="checkUser">
        <Property></Property>
        <Property name="label">质检人</Property>
      </PropertyDef>
      <PropertyDef name="price">
        <Property name="dataType">double</Property>
        <Property name="label">粮食定价</Property>
        <Property name="displayFormat">0.00 å…ƒ/公斤</Property>
      </PropertyDef>
      <PropertyDef name="noticeId">
        <Property></Property>
        <Property name="label">通知单编码</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocationId">
        <Property></Property>
        <Property name="label">产地名称代码</Property>
      </PropertyDef>
      <PropertyDef name="checkTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">质检时间</Property>
      </PropertyDef>
      <PropertyDef name="perWet">
        <Property name="dataType">Double</Property>
        <Property name="label">水分</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="perImpurity">
        <Property name="dataType">Double</Property>
        <Property name="label">杂质</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="settleMoney">
        <Property name="dataType">Double</Property>
        <Property name="label">结算金额</Property>
        <Property name="displayFormat">0.00 å…ƒ</Property>
      </PropertyDef>
      <PropertyDef name="settleTag">
        <Property></Property>
        <Property name="label">是否结算</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未结算</Property>
                <Property name="value">N</Property>
              </Entity>
              <Entity>
                <Property name="name">已结算</Property>
                <Property name="value">Y</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="settleTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">结算时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">创建时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="createBy">
        <Property></Property>
        <Property name="label">创建人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="updateBy">
        <Property></Property>
        <Property name="label">更新人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <Reference name="files">
        <Property name="dataProvider">filePR#listFile</Property>
        <Property name="dataType">[dtFileData]</Property>
        <Property name="parameter">$${this.id}</Property>
      </Reference>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">var TYPE = &quot;${request.getParameter('type')}&quot;;&#xD;
var PROGRESS = &quot;WEIGHT_TAG&quot;;&#xD;
      &#xD;
      /**&#xD;
      * åˆ·æ–°é¡µé¢&#xD;
      */&#xD;
      flush = function(){&#xD;
      view.get(&quot;#btnSave&quot;).set(&quot;disabled&quot;,false);&#xD;
      view.get(&quot;#btnPrintWeigh&quot;).set(&quot;disabled&quot;,true);&#xD;
      view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,TYPE).flushAsync();&#xD;
      };&#xD;
      flush();&#xD;
      &#xD;
      /**&#xD;
      * æ•°æ®ä¿å­˜æäº¤&#xD;
      */&#xD;
      save = function(){&#xD;
      var data = view.get(&quot;#dsMain.data&quot;);&#xD;
      if(data.validate() != 'ok'){&#xD;
      $alert(&quot;数据验证失败,请查看【基础信息】【扦样化验信息】中红色提醒!&quot;);&#xD;
      return;&#xD;
      }&#xD;
      var netWeight = data.get(&quot;netWeight&quot;);&#xD;
      if(netWeight &lt;= 0){&#xD;
      $alert(&quot;数据验证失败,【基础信息】-结算重量必须大于0!&quot;);&#xD;
      return;&#xD;
    }&#xD;
    view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
      if(result){&#xD;
      $alert(&quot;保存失败:&quot;+result);&#xD;
      }else{&#xD;
      view.get(&quot;#btnSave&quot;).set(&quot;disabled&quot;,true);&#xD;
      view.get(&quot;#btnPrintWeigh&quot;).set(&quot;disabled&quot;,false);&#xD;
      $alert(&quot;保存成功,可以进行打印和重新提新表单!&quot;);&#xD;
      flush();&#xD;
      &#xD;
      }&#xD;
      });&#xD;
      }&#xD;
      &#xD;
      /**&#xD;
      * è‡ªåŠ¨è®¡ç®—&#xD;
      * @param name&#xD;
      */&#xD;
      deAutoByWeight = function () {&#xD;
      &#xD;
      var curData = view.get(&quot;#dsMain.data:#&quot;);&#xD;
      var fullWeight = curData.get(&quot;fullWeight&quot;);&#xD;
      var emptyWeight = curData.get(&quot;emptyWeight&quot;);&#xD;
      //扣重信息&#xD;
      var deOther = curData.get(&quot;deOther&quot;);&#xD;
      &#xD;
      if (fullWeight == 0 || emptyWeight == 0) {&#xD;
      return;&#xD;
      }&#xD;
      // å‡€é‡&#xD;
      var netWeight = Number(fullWeight) - Number(emptyWeight);&#xD;
      &#xD;
      if (netWeight &lt;= 0) {&#xD;
      $notify(&quot;净重小于0,当前称重存在逻辑问题&quot;);&#xD;
      return;&#xD;
      }&#xD;
      &#xD;
      /** å…¥åº“重量 = å‡€é‡ - æ€»æ‰£é‡  */&#xD;
      recordWeight = Number(netWeight) - Number(deOther);&#xD;
      &#xD;
      /** ç»“算重量 = å‡€é‡ - æ€»æ‰£é‡ + å¢žé‡ */&#xD;
      settleWeight = Number(recordWeight);&#xD;
      &#xD;
      curData.set(&quot;netWeight&quot;, netWeight);&#xD;
      curData.set(&quot;settleWeight&quot;, settleWeight);&#xD;
      curData.set(&quot;recordWeight&quot;, recordWeight);&#xD;
      };&#xD;
      //删除附件&#xD;
      delFile = function(){&#xD;
      var entity = view.get(&quot;#dgFiles&quot;).getCurrentItem();&#xD;
      view.get(&quot;#ajaxDelFile&quot;).set(&quot;parameter&quot;,{&#xD;
      fileName:entity.get(&quot;fileName&quot;),&#xD;
      createTime:entity.get(&quot;createTime&quot;)&#xD;
      }).execute(function(result){&#xD;
      if(result){&#xD;
      $alert(result);&#xD;
      }else{&#xD;
      entity.remove();&#xD;
      $alert(&quot;删除成功!&quot;);&#xD;
      }&#xD;
      });&#xD;
      }</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property>
    <DataSet id="dsMain">
      <Property name="dataType">dtMain</Property>
      <Property name="dataProvider">inoutDataPR#initDataByHand</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <Container>
      <Property name="className">c-data</Property>
      <ToolBar>
        <ToolBarButton id="btnSave">
          <ClientEvent name="onClick">save();</ClientEvent>
          <Property name="caption">提交保存</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton id="btnPrintWeigh">
          <ClientEvent name="onClick">printWeight();</ClientEvent>
          <Property name="caption">打印过磅单</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-print</Property>
          <Property name="disabled">true</Property>
          <Property name="width">120</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">flush();</ClientEvent>
          <Property name="caption">刷新页面</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </ToolBarButton>
      </ToolBar>
    </Container>
    <Container>
      <Property name="className">c-data</Property>
      <TabControl id="tabControlMain" layoutConstraint="left">
        <Property name="width">1300</Property>
        <ControlTab>
          <Property name="caption">基础信息</Property>
          <Property name="iconClass">fa fa-download</Property>
          <Property name="width">150</Property>
          <Property name="name">tabCommon</Property>
          <Container>
            <FieldSet layoutConstraint="padding:2" layout="padding:5">
              <Property name="caption">基本信息</Property>
              <Buttons/>
              <Children>
                <AutoForm>
                  <Property name="dataSet">dsMain</Property>
                  <Property name="cols">*,*,*</Property>
                  <Property name="labelAlign">right</Property>
                  <Property name="labelSeparator">:</Property>
                  <Property name="labelWidth">100</Property>
                  <AutoFormElement>
                    <Property name="name">id</Property>
                    <Property name="property">id</Property>
                    <Editor>
                      <TextEditor>
                        <Property name="blankText">-- ç³»ç»Ÿè‡ªåŠ¨ç”Ÿæˆ --</Property>
                      </TextEditor>
                    </Editor>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">plateNum</Property>
                    <Property name="property">plateNum</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">depotId</Property>
                    <Property name="property">depotId</Property>
                    <Property name="label">装卸仓库</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">userName</Property>
                    <Property name="property">userName</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">userId</Property>
                    <Property name="property">userId</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodVariety</Property>
                    <Property name="property">foodVariety</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">perWet</Property>
                    <Property name="property">perWet</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">userContact</Property>
                    <Property name="property">userContact</Property>
                    <Property name="label">联系电话</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodLevel</Property>
                    <Property name="property">foodLevel</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">perImpurity</Property>
                    <Property name="property">perImpurity</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodYear</Property>
                    <Property name="property">foodYear</Property>
                    <Property name="trigger">yearDropDown</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">foodLocation</Property>
                    <Property name="property">foodLocation</Property>
                    <Property name="trigger">ddDicArea</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="label">客户名称</Property>
                    <Property name="property">customerName</Property>
                    <Property name="editable">false</Property>
                    <Property name="trigger">ddNotice</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">noticeId</Property>
                    <Property name="property">noticeId</Property>
                    <Editor/>
                  </AutoFormElement>
                </AutoForm>
              </Children>
            </FieldSet>
            <FieldSet layoutConstraint="padding:2" layout="padding:5">
              <Property name="caption">称重信息(单位:KG)</Property>
              <Buttons/>
              <Children>
                <AutoForm>
                  <Property name="dataSet">dsMain</Property>
                  <Property name="cols">*,50,*,50,*,50</Property>
                  <Property name="labelAlign">right</Property>
                  <Property name="labelWidth">100</Property>
                  <Property name="labelSeparator">:</Property>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                    <Property name="name">fullWeight</Property>
                    <Property name="property">fullWeight</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">fullWeightTime</Property>
                    <Property name="property">fullWeightTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">fullWeightUser</Property>
                    <Property name="property">fullWeightUser</Property>
                    <Property name="label">满车称重人</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                    <Property name="name">emptyWeight</Property>
                    <Property name="property">emptyWeight</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">emptyWeightTime</Property>
                    <Property name="property">emptyWeightTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">emptyWeightUser</Property>
                    <Property name="property">emptyWeightUser</Property>
                    <Property name="label">空车称重人</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">netWeight</Property>
                    <Property name="property">netWeight</Property>
                    <Property name="readOnly">true</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                    <Property name="name">deOther</Property>
                    <Property name="property">deOther</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">registerTime</Property>
                    <Property name="property">registerTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">settleWeight</Property>
                    <Property name="property">settleWeight</Property>
                    <Property name="readOnly">true</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">recordWeight</Property>
                    <Property name="property">recordWeight</Property>
                    <Property name="readOnly">true</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:2">
                    <Property name="name">completeTime</Property>
                    <Property name="property">completeTime</Property>
                    <Editor/>
                  </AutoFormElement>
                </AutoForm>
              </Children>
            </FieldSet>
            <FieldSet layoutConstraint="padding:2" layout="padding:5">
              <Property name="caption">其他信息</Property>
              <Buttons/>
              <Children>
                <AutoForm>
                  <Property name="dataSet">dsMain</Property>
                  <Property name="cols">*,*,*</Property>
                  <Property name="labelAlign">right</Property>
                  <Property name="labelSeparator">:</Property>
                  <Property name="labelWidth">100</Property>
                  <AutoFormElement>
                    <Property name="name">price</Property>
                    <Property name="property">price</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">settleMoney</Property>
                    <Property name="property">settleMoney</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement>
                    <Property name="name">settleTime</Property>
                    <Property name="property">settleTime</Property>
                    <Editor/>
                  </AutoFormElement>
                  <AutoFormElement layoutConstraint="colSpan:3">
                    <Property name="name">remarks</Property>
                    <Property name="property">remarks</Property>
                    <Editor/>
                  </AutoFormElement>
                </AutoForm>
              </Children>
            </FieldSet>
          </Container>
        </ControlTab>
      </TabControl>
      <TabControl id="tabControlImage" layoutConstraint="left">
        <Property name="width">370</Property>
        <ControlTab id="tabImage">
          <Property name="name">tabImage</Property>
          <Property name="caption">出入库过程记录</Property>
          <FieldSet layoutConstraint="padding:10" layout="padding:5">
            <Buttons>
              <Button layoutConstraint="left">
                <ClientEvent name="onClick">view.PROGRESS = &quot;WEIGHT_EMPTY&quot;;&#xD;
                </ClientEvent>
                <Property name="exClassName">btn1</Property>
                <Property name="iconClass">fa fa-cloud-upload</Property>
                <Property name="action">uploadImg</Property>
                <Property name="caption">空车称照片</Property>
                <Property name="width">110</Property>
              </Button>
              <Button layoutConstraint="left">
                <ClientEvent name="onClick">view.PROGRESS = &quot;WEIGHT_FULL&quot;;&#xD;
                </ClientEvent>
                <Property name="exClassName">btn2</Property>
                <Property name="iconClass">fa fa-cloud-upload</Property>
                <Property name="action">uploadImg1</Property>
                <Property name="caption">满车称照片</Property>
                <Property name="width">110</Property>
              </Button>
              <Button layoutConstraint="left">
                <ClientEvent name="onClick">view.PROGRESS = &quot;HANDLE&quot;;</ClientEvent>
                <Property name="caption">值仓照片</Property>
                <Property name="exClassName">btn4</Property>
                <Property name="iconClass">fa fa-cloud-upload</Property>
                <Property name="action">uploadImg2</Property>
                <Property name="width">110</Property>
              </Button>
            </Buttons>
            <Children>
              <DataGrid id="dgFiles">
                <Property name="dataSet">dsMain</Property>
                <Property name="readOnly">true</Property>
                <Property name="selectionMode">singleRow</Property>
                <Property name="dataPath">#.files</Property>
                <RowNumColumn/>
                <DataColumn name="bizTag">
                  <Property name="property">bizTag</Property>
                  <Property name="visible">false</Property>
                </DataColumn>
                <DataColumn name="fileName">
                  <Property name="property">fileName</Property>
                </DataColumn>
                <DataColumn>
                  <ClientEvent name="onRenderCell">arg.dom.innerHTML = &quot;&lt;a href='javascript:;' onClick='delFile()'>删除&lt;/a>&quot;;&#xD;
                  </ClientEvent>
                  <Property name="property">fileId</Property>
                  <Property name="name">fileId</Property>
                  <Property name="align">center</Property>
                  <Property name="caption">操作</Property>
                  <Property name="readOnly">true</Property>
                  <Property name="width">80</Property>
                </DataColumn>
              </DataGrid>
            </Children>
          </FieldSet>
        </ControlTab>
      </TabControl>
    </Container>
    <YearDropDown id="yearDropDown"/>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">inoutDataPR#addData</Property>
      <Property name="confirmMessage">确定要提交么?</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxPrint">
      <Property name="service">inoutDataPR#printWeightBillHand</Property>
      <Property name="executingMessage">正在执行打印……</Property>
      <Property name="async">false</Property>
    </AjaxAction>
    <CustomDropDown id="ddNotice">
      <Property name="minHeight">400</Property>
      <Property name="assignmentMap">noticeId=id,customerName=customerName</Property>
      <Property name="minWidth">1000</Property>
      <Property name="autoOpen">true</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsNotice">
          <Property name="dataProvider">inoutNoticePR#queryNoticeByKey</Property>
          <Property name="parameter">
            <Entity>
              <Property name="type">${request.getParameter('type')}</Property>
            </Entity>
          </Property>
          <Property name="dataType">[dtNoticeDto]</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key3">
            <Property name="blankText"> -- å®¢æˆ·åç§°æˆ–编码 --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key3.value&quot;);&#xD;
              var type = &quot;${request.getParameter('type')}&quot;;&#xD;
              view.get(&quot;#dsNotice&quot;).set(&quot;parameter&quot;,{key: key,type: type}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn1</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
              if(data){&#xD;
              view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
              }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
            }</ClientEvent>
          <Property name="dataSet">dsNotice</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="name">
            <Property name="property">name</Property>
            <Property name="align">center</Property>
            <Property name="width">100</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">customerName</Property>
            <Property name="align">center</Property>
            <Property name="name">customerName</Property>
            <Property name="width">240</Property>
          </DataColumn>
          <DataColumn name="foodVariety">
            <Property name="property">foodVariety</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="year">
            <Property name="property">year</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="contract">
            <Property name="property">contract</Property>
            <Property name="align">center</Property>
            <Property name="width">300</Property>
          </DataColumn>
        </DataGrid>
      </Container>
    </CustomDropDown>
    <CustomDropDown id="ddDicArea">
      <Property name="minHeight">500</Property>
      <Property name="minWidth">500</Property>
      <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsDicArea">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="parameter"></Property>
          <Property name="dataType">[dtArea]</Property>
          <Property name="pageSize">1000</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -名称或简拼,北京市  bjs -</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
              view.get(&quot;#dsDicArea&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
            <Property name="exClassName">btn1</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
              if(data){&#xD;
              view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
              }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
            }</ClientEvent>
          <Property name="dataSet">dsDicArea</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
              arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsDicArea</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
    <UploadAction id="uploadImg">
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;;
        var bizTag = &quot;EMPTY&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag: bizTag&#xD;
        })</ClientEvent>
      <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据&#xD;
        var mainData = view.get(&quot;#dsMain.data&quot;);&#xD;
        var fileName = arg.returnValue;&#xD;
        var files = mainData.get(&quot;files&quot;);&#xD;
        files.insert({bizTag:view.PROGRESS,fileName:fileName,createTime:new Date()});</ClientEvent>
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        if(data){&#xD;
        var plateNum = data.get(&quot;plateNum&quot;);&#xD;
        var bizTag = &quot;EMPTY&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag:bizTag&#xD;
        })&#xD;
        }</ClientEvent>
      <Property name="maxFileSize">20MB</Property>
      <Property name="successMessage">上传成功</Property>
      <Property name="parameter"></Property>
      <Property name="fileResolver">fileUploadManage#inoutFile</Property>
      <Filters/>
    </UploadAction>
    <UploadAction id="uploadImg1">
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        &#xD;
        var bizTag = &quot;FULL&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag: bizTag&#xD;
        })</ClientEvent>
      <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据&#xD;
        var mainData = view.get(&quot;#dsMain.data&quot;);&#xD;
        var fileName = arg.returnValue;&#xD;
        var files = mainData.get(&quot;files&quot;);&#xD;
        files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent>
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        if(data){&#xD;
        var bizTag = &quot;FULL&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag:bizTag&#xD;
        })&#xD;
        }</ClientEvent>
      <Property name="maxFileSize">20MB</Property>
      <Property name="successMessage">上传成功</Property>
      <Property name="parameter"></Property>
      <Property name="fileResolver">fileUploadManage#inoutFile</Property>
      <Filters/>
    </UploadAction>
    <UploadAction id="uploadImg2">
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        &#xD;
        var plateNum = data.get(&quot;plateNum&quot;);&#xD;
        var bizTag = &quot;HANDLE&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag: bizTag&#xD;
        })</ClientEvent>
      <ClientEvent name="onFileUploaded">//附件上传完成后添加业务数据&#xD;
        var mainData = view.get(&quot;#dsMain.data&quot;);&#xD;
        var fileName = arg.returnValue;&#xD;
        var files = mainData.get(&quot;files&quot;);&#xD;
        files.insert({bizTag:view.PROGRESS,fileName:fileName});</ClientEvent>
      <ClientEvent name="beforeFileUploaded">var data = view.get(&quot;#dsMain.data:#&quot;)&#xD;
        if(data){&#xD;
        var plateNum = data.get(&quot;plateNum&quot;);&#xD;
        var bizTag = &quot;HANDLE&quot;;&#xD;
        self.set(&quot;parameter&quot;,{&#xD;
        bizTag:bizTag&#xD;
        })&#xD;
        }</ClientEvent>
      <Property name="maxFileSize">20MB</Property>
      <Property name="successMessage">上传成功</Property>
      <Property name="parameter"></Property>
      <Property name="fileResolver">fileUploadManage#inoutFile</Property>
      <Filters/>
    </UploadAction>
    <AjaxAction id="ajaxDelFile">
      <Property name="service">fileUploadManage#delInoutFile</Property>
      <Property name="async">true</Property>
      <Property name="confirmMessage">确定要删除么?</Property>
    </AjaxAction>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutList.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1165 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.domain.InoutRecord</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">单据号</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="progress">
        <Property></Property>
        <Property name="label">流程进度</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PROCESS_STATUS_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="recordStatus">
        <Property></Property>
        <Property name="label">数据状态</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;RECORD_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="checkStatus">
        <Property></Property>
        <Property name="label">扦样结果</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;CHECK_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="registerTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">登记时间</Property>
      </PropertyDef>
      <PropertyDef name="registerUser">
        <Property></Property>
        <Property name="label">登记人员</Property>
      </PropertyDef>
      <PropertyDef name="userName">
        <Property></Property>
        <Property name="label">承运人</Property>
      </PropertyDef>
      <PropertyDef name="userId">
        <Property></Property>
        <Property name="label">身份证号</Property>
      </PropertyDef>
      <PropertyDef name="userContact">
        <Property></Property>
        <Property name="label">联系方式</Property>
      </PropertyDef>
      <PropertyDef name="userAddress">
        <Property></Property>
        <Property name="label">承运人地址</Property>
      </PropertyDef>
      <PropertyDef name="plateNum">
        <Property></Property>
        <Property name="label">车牌号</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">往来单位</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocation">
        <Property></Property>
        <Property name="label">粮食产地</Property>
      </PropertyDef>
      <PropertyDef name="foodYear">
        <Property></Property>
        <Property name="label">粮食年份</Property>
      </PropertyDef>
      <PropertyDef name="deOther">
        <Property name="dataType">Double</Property>
        <Property name="label">扣重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">满车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">满车称时间</Property>
      </PropertyDef>
      <PropertyDef name="fullWeightUser">
        <Property></Property>
        <Property name="label">满车称重人</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">空车称重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">空车称时间</Property>
      </PropertyDef>
      <PropertyDef name="emptyWeightUser">
        <Property></Property>
        <Property name="label">空车称重人</Property>
      </PropertyDef>
      <PropertyDef name="netWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">净重</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="settleWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">结算净重</Property>
        <Property name="required">true</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="recordWeight">
        <Property name="dataType">Double</Property>
        <Property name="label">入库重量</Property>
        <Property name="displayFormat">0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="handleStart">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓开始时间</Property>
      </PropertyDef>
      <PropertyDef name="handleEnd">
        <Property name="dataType">Date</Property>
        <Property name="label">值仓结束时间</Property>
      </PropertyDef>
      <PropertyDef name="handleUser">
        <Property></Property>
        <Property name="label">值仓操作人</Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="completeUser">
        <Property></Property>
        <Property name="label">完成确认人</Property>
      </PropertyDef>
      <PropertyDef name="remarks">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属分库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#getAllData&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">kqmc</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property name="label">出入库类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">出库</Property>
                <Property name="value">OUT</Property>
              </Entity>
              <Entity>
                <Property name="name">入库</Property>
                <Property name="value">IN</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodLevel">
        <Property></Property>
        <Property name="label">粮食等级</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerFoodLevel&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="checkUser">
        <Property></Property>
        <Property name="label">质检人</Property>
      </PropertyDef>
      <PropertyDef name="price">
        <Property name="dataType">double</Property>
        <Property name="label">粮食定价</Property>
        <Property name="displayFormat">0.00 å…ƒ/公斤</Property>
      </PropertyDef>
      <PropertyDef name="noticeId">
        <Property></Property>
        <Property name="label">通知单编码</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="foodLocationId">
        <Property></Property>
        <Property name="label">产地名称代码</Property>
      </PropertyDef>
      <PropertyDef name="checkTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">质检时间</Property>
      </PropertyDef>
      <PropertyDef name="perWet">
        <Property name="dataType">Double</Property>
        <Property name="label">水分</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="perImpurity">
        <Property name="dataType">Double</Property>
        <Property name="label">杂质</Property>
        <Property name="displayFormat">0.00 %</Property>
      </PropertyDef>
      <PropertyDef name="settleMoney">
        <Property name="dataType">Double</Property>
        <Property name="label">结算金额</Property>
        <Property name="displayFormat">0.00 å…ƒ</Property>
      </PropertyDef>
      <PropertyDef name="settleTag">
        <Property></Property>
        <Property name="label">是否结算</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未结算</Property>
                <Property name="value">N</Property>
              </Entity>
              <Entity>
                <Property name="name">已结算</Property>
                <Property name="value">Y</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="settleTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">结算时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">创建时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="createBy">
        <Property></Property>
        <Property name="label">创建人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
      <PropertyDef name="updateBy">
        <Property></Property>
        <Property name="label">更新人</Property>
        <Property name="readOnly">true</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQuery">
      <Property name="creationType">com.fzzy.igds.data.InoutParam</Property>
      <PropertyDef name="type">
        <Property name="label">出入库类型</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">所属分库</Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">装卸仓库</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="plateNum">
        <Property name="label">车牌号号</Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="progress">
        <Property></Property>
        <Property name="label">流程进度</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PROCESS_STATUS_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="recordStatus">
        <Property></Property>
        <Property name="label">单据状态</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;RECORD_STATUS&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="start">
        <Property name="label">开始时间</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="end">
        <Property name="label">截止时间</Property>
        <Property name="dataType">Date</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">var TYPE = &quot;${request.getParameter('type')}&quot;;&#xD;
var EDIT = &quot;${request.getParameter('edit')}&quot;;&#xD;
var deptId = window.parent.DEPT_ID;//父页面中的分库编码&#xD;
&#xD;
//如果edit有值表示隐藏ADD和编辑按钮&#xD;
if(EDIT){&#xD;
    view.get(&quot;#btnEdit&quot;).set(&quot;visible&quot;,false);&#xD;
    view.get(&quot;#btnDel&quot;).set(&quot;visible&quot;,false);&#xD;
}&#xD;
&#xD;
if(&quot;OUT&quot; == TYPE){&#xD;
    view.get(&quot;#recordWeight&quot;).set(&quot;caption&quot;,&quot;出库重量&quot;);&#xD;
}else{&#xD;
    view.get(&quot;#recordWeight&quot;).set(&quot;caption&quot;,&quot;入库重量&quot;);&#xD;
}&#xD;
&#xD;
//默认查询查询提条件&#xD;
view.get(&quot;#dsQuery&quot;).insert({&#xD;
    type:TYPE,&#xD;
    deptId:deptId&#xD;
});&#xD;
&#xD;
//查询&#xD;
query = function(){&#xD;
    var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
    view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data).flushAsync();&#xD;
};&#xD;
query();&#xD;
&#xD;
&#xD;
//编辑,只有流程结束的才可以修改&#xD;
edit = function(){&#xD;
    &#xD;
    var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if(select){&#xD;
        console.log(select);&#xD;
        view.get(&quot;#dialogMain&quot;).show();;&#xD;
    }else{&#xD;
        $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
    }        &#xD;
};&#xD;
&#xD;
&#xD;
//异常操作&#xD;
showAbnormal = function(){    &#xD;
    var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if(select){&#xD;
        view.get(&quot;#dialogAbnormal&quot;).show();&#xD;
        view.get(&quot;#textAbnormal&quot;).set(&quot;value&quot;,null);&#xD;
    }else{&#xD;
        $notify(&quot;请选择数据……&quot;);&#xD;
    }    &#xD;
};&#xD;
&#xD;
//追踪&#xD;
showImg = function(){&#xD;
    &#xD;
    var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if(select){&#xD;
        var user = encodeURIComponent(select.get(&quot;userName&quot;));&#xD;
        var plateNum = encodeURIComponent(select.get(&quot;plateNum&quot;));&#xD;
    &#xD;
        view.get(&quot;#iFrameImg&quot;).set(&quot;path&quot;, &quot;./basic/inout/inout-img?id=&quot; + select.get(&quot;id&quot;)+&quot;&amp;plateNum=&quot;+plateNum+&quot;&amp;user=&quot;+user);&#xD;
        view.get(&quot;#dialogImg&quot;).show();&#xD;
    }else{&#xD;
        $notify(&quot;请选择数据……&quot;);&#xD;
    }&#xD;
};&#xD;
&#xD;
//异常执行&#xD;
todoError = function(){&#xD;
    var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
    if(!data) return;&#xD;
    &#xD;
    var textError = view.get(&quot;#textAbnormal.text&quot;);&#xD;
    if(!textError){&#xD;
        $alert(&quot;请说明异常终止原因!!&quot;);&#xD;
        return;&#xD;
    }&#xD;
    data.set(&quot;remarks&quot;,textError);&#xD;
    view.get(&quot;#ajaxError&quot;).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
            return;&#xD;
        }else{&#xD;
            data.remove();&#xD;
            view.get(&quot;#dialogAbnormal&quot;).close();&#xD;
            $alert(&quot;执行成功,自动刷新数据!&quot;);&#xD;
        }&#xD;
    });&#xD;
};&#xD;
&#xD;
/**&#xD;
 * æ‰“印过磅单&#xD;
 */&#xD;
printBill = function (htmlStr) {&#xD;
    var LODOP = CLODOP;&#xD;
    LODOP.PRINT_INIT(&quot;称重单&quot;);&#xD;
    LODOP.SET_PRINT_PAGESIZE(1, 2100, 1400, &quot;A4&quot;);&#xD;
    //LODOP.SET_PRINT_PAGESIZE(1, 0, '90mm', &quot;A4&quot;);&#xD;
    LODOP.ADD_PRINT_HTM(0, 0, &quot;100%&quot;, &quot;100%&quot;, htmlStr);&#xD;
    LODOP.PREVIEW();&#xD;
};&#xD;
&#xD;
//打印过磅单&#xD;
printWeight = function () {&#xD;
    var data = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
    if (!data) return;&#xD;
    if (&quot;DEL&quot; == data.get(&quot;recordStatus&quot;)) {&#xD;
        $alert(&quot;异常处理的信息不支持打印!&quot;);&#xD;
        return;&#xD;
    }&#xD;
    if (&quot;RECORD&quot; != data.get(&quot;progress&quot;)) {&#xD;
        $alert(&quot;流程未完成不支持打印!&quot;);&#xD;
        return;&#xD;
    }&#xD;
    view.get(&quot;#ajaxPrint&quot;).set(&quot;parameter&quot;, data).execute(function (result) {&#xD;
      printBill(result);&#xD;
    });&#xD;
};&#xD;
&#xD;
/**&#xD;
 * è‡ªåŠ¨è®¡ç®—&#xD;
 * @param name&#xD;
 */&#xD;
deAutoByWeight = function () {&#xD;
&#xD;
    var curData = view.get(&quot;#dsMain.data:#&quot;);&#xD;
    var fullWeight = curData.get(&quot;fullWeight&quot;);&#xD;
    var emptyWeight = curData.get(&quot;emptyWeight&quot;);&#xD;
    //扣重信息&#xD;
    var deOther = curData.get(&quot;deOther&quot;);&#xD;
&#xD;
    if (fullWeight == 0 || emptyWeight == 0) {&#xD;
        return;&#xD;
    }&#xD;
    // å‡€é‡&#xD;
    var netWeight = Number(fullWeight) - Number(emptyWeight);&#xD;
&#xD;
    if (netWeight &lt;= 0) {&#xD;
        $notify(&quot;净重小于0,当前称重存在逻辑问题&quot;);&#xD;
        return;&#xD;
    }&#xD;
&#xD;
    /** å…¥åº“重量 = å‡€é‡ - æ€»æ‰£é‡  */&#xD;
    recordWeight = Number(netWeight) - Number(deOther);&#xD;
&#xD;
    /** ç»“算重量 = å‡€é‡ - æ€»æ‰£é‡ + å¢žé‡ */&#xD;
    settleWeight = Number(recordWeight);&#xD;
&#xD;
    curData.set(&quot;netWeight&quot;, netWeight);&#xD;
    curData.set(&quot;settleWeight&quot;, settleWeight);&#xD;
    curData.set(&quot;recordWeight&quot;, recordWeight);&#xD;
};&#xD;
</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="pageSize">20</Property>
      <Property name="dataProvider">inoutDataPR#pageInoutData</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</Property>
    </DataSet>
    <Container>
      <Property name="className">c-param</Property>
      <AutoForm>
        <Property name="cols">*,*,*,*,90,90</Property>
        <Property name="dataSet">dsQuery</Property>
        <Property name="labelAlign">right</Property>
        <Property name="labelWidth">100</Property>
        <AutoFormElement>
          <Property name="name">depotId</Property>
          <Property name="property">depotId</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">plateNum</Property>
          <Property name="property">plateNum</Property>
          <Editor>
            <TextEditor>
              <Property name="blankText">-- æ”¯æŒæ¨¡ç³Š --</Property>
            </TextEditor>
          </Editor>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">start</Property>
          <Property name="property">start</Property>
          <Property name="trigger">defaultDateDropDown</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">end</Property>
          <Property name="property">end</Property>
          <Property name="trigger">defaultDateDropDown</Property>
          <Editor/>
        </AutoFormElement>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">query();&#xD;
          </ClientEvent>
          <Property name="caption">搜索</Property>
          <Property name="iconClass">fa fa-search</Property>
          <Property name="exClassName">btn-q1</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">var type =&quot;${request.getParameter('type')}&quot;;&#xD;
              var deptId = window.parent.DEPT_ID;//父页面中的分库编码&#xD;
              view.get(&quot;#dsQuery&quot;).setData({type:type,deptId:deptId});</ClientEvent>
          <Property name="caption">重置</Property>
          <Property name="exClassName">btn-q2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
        </Button>
      </AutoForm>
    </Container>
    <Container>
      <Property name="className">c-data</Property>
      <ToolBar>
        <ToolBarButton id="btnEdit">
          <ClientEvent name="onClick">edit();</ClientEvent>
          <Property name="caption">修改</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-pencil-square-o</Property>
        </ToolBarButton>
        <ToolBarButton id="btnDel">
          <ClientEvent name="onClick">showAbnormal();</ClientEvent>
          <Property name="caption">异常操作</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-minus</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">showImg();</ClientEvent>
          <Property name="caption">过程追踪</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-picture-o</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var data = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
              if (!data) {&#xD;
              $alert(&quot;请先选择数据!&quot;);&#xD;
              return;&#xD;
              }&#xD;
              &#xD;
              printWeight();&#xD;
              </ClientEvent>
          <Property name="caption">打印过磅单</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-print</Property>
          <Property name="width">120</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dataGridMain" layoutConstraint="padding:8">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridMain&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn>
          <Property name="width">50</Property>
        </RowNumColumn>
        <DataColumn name="id">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.dom.style.color = &quot;#f67d06&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">id</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="plateNum">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">plateNum</Property>
          <Property name="align">center</Property>
          <Property name="width">130</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">customerName</Property>
          <Property name="name">customerName</Property>
          <Property name="align">center</Property>
          <Property name="caption">往来单位</Property>
        </DataColumn>
        <DataColumn name="depotId">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">depotId</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
          <Property name="width">110</Property>
        </DataColumn>
        <DataColumn name="fullWeight">
          <Property name="property">fullWeight</Property>
          <Property name="caption">毛重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="emptyWeight">
          <Property name="property">emptyWeight</Property>
          <Property name="caption">皮重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="deOther">
          <Property name="property">deOther</Property>
          <Property name="caption">扣重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="settleWeight">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">settleWeight</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn id="recordWeight">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">recordWeight</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
          <Property name="visible">true</Property>
          <Property name="name">recordWeight</Property>
        </DataColumn>
        <DataColumn name="progress">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">progress</Property>
          <Property name="align">center</Property>
          <Property name="width">80</Property>
        </DataColumn>
        <DataColumn name="completeTime">
          <Property name="property">completeTime</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
      </DataGrid>
      <ToolBar layoutConstraint="bottom">
        <Fill/>
        <DataPilot layoutConstraint="right">
          <Property name="itemCodes">pageSize,pages</Property>
          <Property name="dataSet">dsMain</Property>
        </DataPilot>
      </ToolBar>
    </Container>
    <Dialog id="dialogMain" layout="regionPadding:8">
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="caption">单据信息</Property>
      <Property name="width">1200</Property>
      <Property name="showCaptionBar">false</Property>
      <Buttons>
        <Button id="btnOK">
          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(data.validate() != 'ok'){&#xD;
    $notify(&quot;数据校验失败!!&quot;);&#xD;
    return;&#xD;
}&#xD;
view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
        return;&#xD;
    }&#xD;
    $notify(&quot;数据执行完成!!&quot;);&#xD;
    self.get(&quot;parent&quot;).hide();&#xD;
});</ClientEvent>
          <Property name="caption">确定保存</Property>
          <Property name="iconClass">fa fa-check-circle</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">120</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">self.get(&quot;parent&quot;).close();</ClientEvent>
          <Property name="caption">取消操作</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="width">120</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:5">
          <Property name="caption">基本信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">plateNum</Property>
                <Property name="property">plateNum</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Property name="label">装卸仓库</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">userName</Property>
                <Property name="property">userName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">userId</Property>
                <Property name="property">userId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">perWet</Property>
                <Property name="property">perWet</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">userContact</Property>
                <Property name="property">userContact</Property>
                <Property name="label">联系电话</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodLevel</Property>
                <Property name="property">foodLevel</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">perImpurity</Property>
                <Property name="property">perImpurity</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodYear</Property>
                <Property name="property">foodYear</Property>
                <Property name="trigger">yearDropDown</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodLocation</Property>
                <Property name="property">foodLocation</Property>
                <Property name="trigger">ddDicArea</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="label">客户名称</Property>
                <Property name="property">customerName</Property>
                <Property name="editable">false</Property>
                <Property name="trigger">ddNotice</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">noticeId</Property>
                <Property name="property">noticeId</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">称重信息(单位:KG)</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,50,*,50,*,50</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelWidth">100</Property>
              <Property name="labelSeparator">:</Property>
              <AutoFormElement layoutConstraint="colSpan:2">
                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                <Property name="name">fullWeight</Property>
                <Property name="property">fullWeight</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">fullWeightTime</Property>
                <Property name="property">fullWeightTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">fullWeightUser</Property>
                <Property name="property">fullWeightUser</Property>
                <Property name="label">满车称重人</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                <Property name="name">emptyWeight</Property>
                <Property name="property">emptyWeight</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">emptyWeightTime</Property>
                <Property name="property">emptyWeightTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">emptyWeightUser</Property>
                <Property name="property">emptyWeightUser</Property>
                <Property name="label">空车称重人</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">netWeight</Property>
                <Property name="property">netWeight</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <ClientEvent name="onBlur">deAutoByWeight();</ClientEvent>
                <Property name="name">deOther</Property>
                <Property name="property">deOther</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">registerTime</Property>
                <Property name="property">registerTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">settleWeight</Property>
                <Property name="property">settleWeight</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">recordWeight</Property>
                <Property name="property">recordWeight</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">completeTime</Property>
                <Property name="property">completeTime</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">其他信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">price</Property>
                <Property name="property">price</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">settleMoney</Property>
                <Property name="property">settleMoney</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">settleTime</Property>
                <Property name="property">settleTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:3">
                <Property name="name">remarks</Property>
                <Property name="property">remarks</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="dialogImg">
      <Property name="width">1000</Property>
      <Property name="height">95%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="caption">流程追溯展示</Property>
      <Buttons/>
      <Children>
        <IFrame id="iFrameImg">
          <Property name="width">100%</Property>
        </IFrame>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="dialogAbnormal" layout="regionPadding:5">
      <Property name="width">450</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Property name="caption">异常操作原因</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">todoError();</ClientEvent>
          <Property name="caption">异常终止</Property>
          <Property name="iconClass">fa fa-check</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">120</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">self.get(&quot;parent&quot;).close();</ClientEvent>
          <Property name="caption">取消操作</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="width">120</Property>
        </Button>
      </Buttons>
      <Children>
        <TextArea id="textAbnormal">
          <Property name="height">165</Property>
        </TextArea>
        <AutoForm>
          <Property name="cols">*</Property>
          <Label layoutConstraint="colSpan:1">
            <Property name="style">
              <Property name="color">blue</Property>
            </Property>
            <Property name="text">异常终止:业务数据流程结束,重量信息不进行统计计算。</Property>
          </Label>
          <Label layoutConstraint="colSpan:1">
            <Property name="style">
              <Property name="color">blue</Property>
            </Property>
            <Property name="text">删除操作:业务数据被删除且不统计,只保留日志记录。</Property>
          </Label>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">inoutDataPR#saveInoutData</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <UpdateAction id="ajaxError">
      <Property name="dataResolver">inoutDataPR#errorInoutData</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxPrint">
      <Property name="service">inoutDataPR#printWeightBill</Property>
      <Property name="executingMessage">正在执行打印……</Property>
      <Property name="async">false</Property>
    </AjaxAction>
    <CustomDropDown id="ddNotice">
      <Property name="minHeight">400</Property>
      <Property name="assignmentMap">noticeId=id,customerName=customerName</Property>
      <Property name="minWidth">1000</Property>
      <Property name="autoOpen">true</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsNotice">
          <Property name="dataProvider">inoutNoticePR#queryNoticeByKey</Property>
          <Property name="parameter">
            <Entity>
              <Property name="type">${request.getParameter('type')}</Property>
            </Entity>
          </Property>
          <Property name="dataType">[dtNoticeDto]</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key3">
            <Property name="blankText"> -- å®¢æˆ·åç§°æˆ–编码 --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key3.value&quot;);&#xD;
var type = &quot;${request.getParameter('type')}&quot;;&#xD;
view.get(&quot;#dsNotice&quot;).set(&quot;parameter&quot;,{key: key,type: type}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn1</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsNotice.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddNotice&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsNotice</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="name">
            <Property name="property">name</Property>
            <Property name="align">center</Property>
            <Property name="width">100</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">customerName</Property>
            <Property name="align">center</Property>
            <Property name="name">customerName</Property>
            <Property name="width">240</Property>
          </DataColumn>
          <DataColumn name="foodVariety">
            <Property name="property">foodVariety</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="year">
            <Property name="property">year</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="contract">
            <Property name="property">contract</Property>
            <Property name="align">center</Property>
            <Property name="width">300</Property>
          </DataColumn>
        </DataGrid>
      </Container>
    </CustomDropDown>
    <CustomDropDown id="ddDicArea">
      <Property name="minHeight">500</Property>
      <Property name="minWidth">500</Property>
      <Property name="assignmentMap">foodLocation=name,foodLocationId=code</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsDicArea">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="parameter"></Property>
          <Property name="dataType">[dtArea]</Property>
          <Property name="pageSize">1000</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -名称或简拼,北京市  bjs -</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
view.get(&quot;#dsDicArea&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
            <Property name="exClassName">btn1</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn2</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsDicArea.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddDicArea&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsDicArea</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsDicArea</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
    <YearDropDown id="yearDropDown"/>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java
@@ -5,12 +5,15 @@
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.data.NoticeDto;
import com.fzzy.igds.data.NoticeParam;
import com.fzzy.igds.service.InoutNoticeService;
import com.fzzy.igds.domain.InoutNoticeIn;
import com.fzzy.igds.domain.InoutNoticeOut;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
@@ -208,4 +211,55 @@
        return "fail";
    }
    /**
     * inoutNoticePR#queryNoticeByKey  æ ¹æ®å‚数查询出入库通知单,用于手动补单时,选择通知单
     *
     * @param
     * @return
     */
    @DataProvider
    public List<NoticeDto> queryNoticeByKey(Map<String, Object> param) {
        if (param == null) {
            return null;
        }
        String type = (String)param.get("type");
        if (StringUtils.isEmpty(type)) {
            return null;
        }
        List<NoticeDto> list = new ArrayList<>();
        NoticeDto dto;
        NoticeParam noticeParam = new NoticeParam();
        noticeParam.setCompanyId(ContextUtil.getCompanyId());
        noticeParam.setDeptId(ContextUtil.subDeptId(null));
        noticeParam.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        String key = (String)param.get("key");
        if (StringUtils.isNotEmpty(key)) {
            noticeParam.setKey(key);
        }
        if (Constant.TYPE_IN.equals(type)) {
            List<InoutNoticeIn> listIn = inoutNoticeService.getNoticeIn(noticeParam);
            if (null != listIn && listIn.size() > 0) {
                for (InoutNoticeIn inoutNoticeIn : listIn) {
                    dto = new NoticeDto();
                    BeanUtils.copyProperties(inoutNoticeIn, dto);
                    list.add(dto);
                }
            }
        }
        if (Constant.TYPE_OUT.equals(type)) {
            List<InoutNoticeOut> listOut = inoutNoticeService.getNoticeOut(noticeParam);
            if (null != listOut && listOut.size() > 0) {
                for (InoutNoticeOut inoutNoticeOut : listOut) {
                    dto = new NoticeDto();
                    BeanUtils.copyProperties(inoutNoticeOut, dto);
                    list.add(dto);
                }
            }
        }
        return list;
    }
}
fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -1209,4 +1209,120 @@
      <Property name="label">执行时间3</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtNoticeDto">
    <Property name="creationType">com.fzzy.igds.data.NoticeDto</Property>
    <PropertyDef name="id">
      <Property></Property>
      <Property name="label">通道单编码</Property>
    </PropertyDef>
    <PropertyDef name="name">
      <Property></Property>
      <Property name="label">通知单名称</Property>
    </PropertyDef>
    <PropertyDef name="companyId">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="deptId">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="depotId">
      <Property></Property>
      <Property name="label">所涉仓库</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="customerId">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="customerName">
      <Property></Property>
      <Property name="label">收/发货客户</Property>
    </PropertyDef>
    <PropertyDef name="foodVariety">
      <Property></Property>
      <Property name="label">粮食品种</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="foodType">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="year">
      <Property></Property>
      <Property name="label">年份</Property>
    </PropertyDef>
    <PropertyDef name="targetNumber">
      <Property name="dataType">Double</Property>
    </PropertyDef>
    <PropertyDef name="completeNumber">
      <Property name="dataType">Double</Property>
    </PropertyDef>
    <PropertyDef name="completeTime">
      <Property name="dataType">Date</Property>
    </PropertyDef>
    <PropertyDef name="unitName">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="contract">
      <Property></Property>
      <Property name="label">所属合同</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtFileData">
    <Property name="creationType">com.fzzy.igds.domain.FileInfo</Property>
    <PropertyDef name="fileId">
      <Property></Property>
      <Property name="label">附件ID</Property>
    </PropertyDef>
    <PropertyDef name="companyId">
      <Property></Property>
      <Property name="label">组织编号</Property>
    </PropertyDef>
    <PropertyDef name="deptId">
      <Property></Property>
      <Property name="label">库区编码</Property>
    </PropertyDef>
    <PropertyDef name="bizId">
      <Property></Property>
      <Property name="label">业务ID</Property>
    </PropertyDef>
    <PropertyDef name="bizTag">
      <Property></Property>
      <Property name="label">业务标签</Property>
    </PropertyDef>
    <PropertyDef name="fileName">
      <Property></Property>
      <Property name="label">文件名称</Property>
    </PropertyDef>
    <PropertyDef name="filePath">
      <Property></Property>
      <Property name="label">文件路径</Property>
    </PropertyDef>
    <PropertyDef name="createTime">
      <Property name="dataType">DateTime</Property>
      <Property name="label">创建时间</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
    <PropertyDef name="createBy">
      <Property></Property>
      <Property name="label">创建人</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
    <PropertyDef name="updateTime">
      <Property name="dataType">DateTime</Property>
      <Property name="label">更新时间</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
    <PropertyDef name="updateBy">
      <Property></Property>
      <Property name="label">更新人</Property>
      <Property name="readOnly">true</Property>
    </PropertyDef>
  </DataType>
</Model>
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/file/FileManager.java
@@ -71,7 +71,7 @@
        String oldFileName = file.getOriginalFilename();
        // èŽ·å–æ–‡ä»¶ä¿å­˜è·¯å¾„
        String filePath = fileService.getInoutFilePath(new Date());
        String filePath = fileService.getFileSavePath("INOUT");
        // èŽ·å–æ–°çš„ID
        String newFileName = ContextUtil.generateId();
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/inout/InoutManager.java
@@ -5,10 +5,7 @@
import com.fzzy.igds.constant.RespCodeEnum;
import com.fzzy.igds.data.*;
import com.fzzy.igds.domain.*;
import com.fzzy.igds.service.DicAreaService;
import com.fzzy.igds.service.InoutConfService;
import com.fzzy.igds.service.InoutNoticeService;
import com.fzzy.igds.service.InoutRecordService;
import com.fzzy.igds.service.*;
import com.fzzy.igds.utils.ContextUtil;
import com.fzzy.igds.utils.SystemUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
@@ -35,6 +32,8 @@
    private RedisCache redisCache;
    @Resource
    private InoutConfService inoutConfService;
    @Resource
    private FileService fileService;
    @Resource
    private InoutRecordService inoutRecordService;
    @Resource
@@ -228,7 +227,7 @@
        }
        //附件处理
        saveInoutFiles(data.getFiles(), data.getId(), curProgress);
        fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT");
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "登记成功!", data);
    }
@@ -293,6 +292,11 @@
        String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
        data.setProgress(nextProgress);
        if(Constant.PROGRESS_RECORD.equals(nextProgress)){
            //流程结束时,设置完成时间和完成人
            data.setCompleteTime(new Date());
            data.setCompleteUser(ContextUtil.getLoginUserName());
        }
        //称重数据更新
        int num = inoutRecordService.updateInoutRecord(data);
@@ -301,7 +305,7 @@
        }
        //附件处理
        saveInoutFiles(data.getFiles(), data.getId(), curProgress);
        fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT");
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功", data);
    }
@@ -335,28 +339,9 @@
        }
        //附件处理
        saveInoutFiles(data.getFiles(), data.getId(), curProgress);
        fileService.saveInoutFiles(data.getFiles(), data.getId(), curProgress, "INOUT");
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "提交成功", data);
    }
    /**
     * å¼‚步执行附件保存
     * @param files     é™„件信息
     * @param bizId     ä¸šåŠ¡id
     * @param progress  æµç¨‹èŠ‚ç‚¹
     */
    @Async
    public void saveInoutFiles(List<FileInfo> files, String bizId, String progress) {
        if (null == files || files.isEmpty()) {
            return;
        }
        //TODO é™„件逻辑待处理
    }
    /**
@@ -524,8 +509,8 @@
            param.setCompanyId(user.getCompanyId());
        }
        param.setDeptId(ContextUtil.subDeptId(user));
        List<InoutNoticeIn> list = inoutNoticeService.getNoticeIn(param.getCompanyId(), param.getDeptId(), Constant.COMPLETE_STATUS_NONE);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        List<InoutNoticeIn> list = inoutNoticeService.getNoticeIn(param);
        if (null == list || list.isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "查询结果为空!");
@@ -544,8 +529,8 @@
            param.setCompanyId(user.getCompanyId());
        }
        param.setDeptId(ContextUtil.subDeptId(user));
        List<InoutNoticeOut> list = inoutNoticeService.getNoticeOut(param.getCompanyId(), param.getDeptId(), Constant.COMPLETE_STATUS_NONE);
        param.setCompleteStatus(Constant.COMPLETE_STATUS_NONE);
        List<InoutNoticeOut> list = inoutNoticeService.getNoticeOut(param);
        if (null == list || list.isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "查询结果为空!");
fzzy-igdss-web/src/main/java/com/fzzy/sys/manager/print/PrintManager.java
@@ -1,21 +1,9 @@
package com.fzzy.sys.manager.print;
import com.fzzy.igds.bill.InoutBill;
import com.fzzy.igds.constant.Constant;
import com.fzzy.igds.constant.FoodVariety;
import com.fzzy.igds.data.InoutPrintBill;
import com.fzzy.igds.domain.Depot;
import com.fzzy.igds.domain.InoutRecord;
import com.fzzy.igds.service.DepotService;
import com.fzzy.igds.service.SysDeptService;
import com.fzzy.igds.utils.NumberUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.utils.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import com.fzzy.igds.service.InoutRecordService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.text.DecimalFormat;
import java.util.*;
/**
 * @Description å•据打印
@@ -26,9 +14,7 @@
public class PrintManager {
    @Resource
    private SysDeptService sysDeptService;
    @Resource
    private DepotService depotService;
    private InoutRecordService inoutRecordService;
    /**
     * èŽ·å–å…¥åº“è¿‡ç£…å•æ•°æ®ä¿¡æ¯
@@ -37,87 +23,7 @@
     * @return
     */
    public String inWeightBill(InoutRecord data) {
        // èŽ·å–è¡¨å•æ•°æ®
        InoutPrintBill bill = this.createBillData(data, "入库划码单");
        // è°ƒæ•´æ¨¡ç‰ˆæ•°æ®å¹¶è¿”回
        String htmlStr = InoutBill.IN_WEIGHT_DEFAULT;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
        htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime());
        htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime());
        htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
        htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
        htmlStr = htmlStr.replace("serId", bill.getSerId());
        htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
        htmlStr = htmlStr.replace("deptName", bill.getUnitName());
        htmlStr = htmlStr.replace("driverName", bill.getDriverName());
        htmlStr = htmlStr.replace("userNumberId", bill.getUserId());
        htmlStr = htmlStr.replace("userContact", bill.getUserContact());
        htmlStr = htmlStr.replace("userAddress", bill.getUserAddress());
        htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety());
        htmlStr = htmlStr.replace("depotName", bill.getDepotName());
        htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation());
        if ("5326".equals(data.getCompanyId())) {
            htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0").format(bill.getRecordWeight()));
            htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0").format(bill.getSettleWeight()));
            htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0").format(bill.getFullWeight()));
            htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0").format(bill.getEmptyWeight()));
            htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0").format(bill.getNetWeight()));
        }
        htmlStr = htmlStr.replace("plateNum", bill.getPlateNum());
        htmlStr = htmlStr.replace("fullWeight",
                new DecimalFormat("0.00").format(bill.getFullWeight()));
        htmlStr = htmlStr.replace("emptyWeight",
                new DecimalFormat("0.00").format(bill.getEmptyWeight()));
        htmlStr = htmlStr.replace("netWeight",
                new DecimalFormat("0.00").format(bill.getNetWeight()));
        htmlStr = htmlStr.replace("deImpurity", bill.getDeImpurity() + "");
        htmlStr = htmlStr.replace("deWet", bill.getDeWet() + "");
        htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight()));
        htmlStr = htmlStr.replace("deCheck", bill.getDeCheck() + "");
        htmlStr = htmlStr.replace("addCheck", bill.getAddCheck() + "");
        htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
        htmlStr = htmlStr.replace("settleWeight",
                new DecimalFormat("0.00").format(bill.getSettleWeight()));
        htmlStr = htmlStr.replace("dePackage", bill.getDePackage() + "");
        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
        htmlStr = htmlStr.replace("price", bill.getPrice());
        htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
        htmlStr = htmlStr.replace("wet", bill.getWet() + "");
        htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
        htmlStr = htmlStr.replace("checkStatus", bill.getCheckStatus());
        htmlStr = htmlStr.replace("remark", bill.getRemark());
        htmlStr = htmlStr.replace("moneyName", bill.getMoneyName());
        htmlStr = htmlStr.replace("unitName", bill.getUnitName());
        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
        htmlStr = htmlStr.replace("handleStart", "");
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replaceAll("weightUser",
                bill.getWeightUser() == null ? "" : bill.getWeightUser());
        htmlStr = htmlStr.replaceAll("handleUser",
                bill.getHandleUser() == null ? "" : bill.getHandleUser());
        htmlStr = htmlStr.replaceAll("keeperName",
                bill.getKeeperUser() == null ? "" : bill.getKeeperUser());
        return htmlStr;
        return inoutRecordService.inWeightBill( data);
    }
    /**
@@ -127,187 +33,8 @@
     * @return
     */
    public String outWeightBill(InoutRecord data) {
        // èŽ·å–è¡¨å•æ•°æ®
        InoutPrintBill bill = this.createBillData(data, "出库划码单");
        //默认模版
        String htmlStr = InoutBill.OUT_WEIGHT_DEFAULT;
        htmlStr = htmlStr.replace("billTitle", bill.getBillTitle());
        htmlStr = htmlStr.replace("registerTime", bill.getRegisterTime());
        htmlStr = htmlStr.replace("completeTime", bill.getCompleteTime());
        htmlStr = htmlStr.replace("fullTime", bill.getFullTime());
        htmlStr = htmlStr.replace("emptyTime", bill.getEmptyTime());
        htmlStr = htmlStr.replace("serId", bill.getSerId());
        htmlStr = htmlStr.replace("customerName", bill.getCustomerName());
        htmlStr = htmlStr.replace("deptName", bill.getUnitName());
        htmlStr = htmlStr.replace("driverName", bill.getDriverName());
        htmlStr = htmlStr.replace("userNumberId", bill.getUserId());
        htmlStr = htmlStr.replace("userContact", bill.getUserContact());
        htmlStr = htmlStr.replace("userAddress", bill.getUserAddress());
        htmlStr = htmlStr.replace("foodVariety", bill.getFoodVariety());
        htmlStr = htmlStr.replace("depotName", bill.getDepotName());
        htmlStr = htmlStr.replace("foodLocation", bill.getFoodLocation());
        if ("5326".equals(data.getCompanyId())) {
            htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0").format(bill.getRecordWeight()));
            htmlStr = htmlStr.replace("settleWeight", new DecimalFormat("0").format(bill.getSettleWeight()));
            htmlStr = htmlStr.replace("fullWeight", new DecimalFormat("0").format(bill.getFullWeight()));
            htmlStr = htmlStr.replace("emptyWeight", new DecimalFormat("0").format(bill.getEmptyWeight()));
            htmlStr = htmlStr.replace("netWeight", new DecimalFormat("0").format(bill.getNetWeight()));
        }
        htmlStr = htmlStr.replace("plateNum", bill.getPlateNum());
        htmlStr = htmlStr.replace("fullWeight",
                new DecimalFormat("0.00").format(bill.getFullWeight()));
        htmlStr = htmlStr.replace("emptyWeight",
                new DecimalFormat("0.00").format(bill.getEmptyWeight()));
        htmlStr = htmlStr.replace("netWeight",
                new DecimalFormat("0.00").format(bill.getNetWeight()));
        htmlStr = htmlStr.replace("dePackage",
                new DecimalFormat("0.00").format(bill.getDePackage()));
        htmlStr = htmlStr.replace("remark", bill.getRemark());
        htmlStr = htmlStr.replace("settleWeight",
                new DecimalFormat("0.00").format(bill.getSettleWeight()));
        htmlStr = htmlStr.replace("deHandle", bill.getDeHandle() + "");
        htmlStr = htmlStr.replace("recordWeight", new DecimalFormat("0.00").format(bill.getRecordWeight()));
        htmlStr = htmlStr.replace("deSum", bill.getDeSum() + "");
        htmlStr = htmlStr.replace("deOther", bill.getDeOther() + "");
        htmlStr = htmlStr.replace("price", bill.getPrice());
        htmlStr = htmlStr.replace("settleMoney", bill.getSettleMoney() + "");
        htmlStr = htmlStr.replace("wet", bill.getWet() + "");
        htmlStr = htmlStr.replace("impurity", bill.getImpurity() + "");
        htmlStr = htmlStr.replace("unitName", getValue(bill.getUnitName()));
        htmlStr = htmlStr.replace("time", bill.getRegisterTime());
        htmlStr = htmlStr.replace("handleStart", "");
        htmlStr = htmlStr.replace("handleEnd", "");
        htmlStr = htmlStr.replace("noticeId", bill.getNoticeId() == null ? "" : bill.getNoticeId());
        htmlStr = htmlStr.replace("phone", data.getUserContact() == null ? "" : data.getUserContact() + "");
        htmlStr = htmlStr.replace("printTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm"));
        htmlStr = htmlStr.replaceAll("weightUser", getValue(bill.getWeightUser()));
        htmlStr = htmlStr.replace("handleUser", getValue(bill.getHandleUser()));
        htmlStr = htmlStr.replaceAll("keeperName", getValue(bill.getKeeperUser()));
        return htmlStr;
    }
    public String getValue(String value) {
        if (null == value) return "";
        return value;
    }
    /**
     * å°è£…过磅单数据
     *
     * @param data
     * @param billTitle
     * @return
     */
    private InoutPrintBill createBillData(InoutRecord data, String billTitle) {
        InoutPrintBill bill = new InoutPrintBill();
        bill.setBillTitle(billTitle);
        SysDept dept = sysDeptService.getCacheDept(data.getCompanyId(), data.getDeptId());
        if (null != dept && StringUtils.isNotEmpty(dept.getDeptName())) {
            bill.setBillTitle(dept.getDeptName() + billTitle);
            bill.setDeptId(dept.getDeptId() + "");
            bill.setDeptName(dept.getDeptName() + "");
            bill.setUnitName(dept.getDeptName());
        }
        //清远出发货单位及标题,使用公司名
        if ("5368".equals(data.getCompanyId())) {
            SysDept company = sysDeptService.getCacheDept(data.getCompanyId(), data.getCompanyId());
            if (null != company && StringUtils.isNotEmpty(company.getDeptName())) {
                bill.setBillTitle(company.getDeptName() + billTitle);
                bill.setUnitName(company.getDeptName());
            }
        }
        bill.setCompanyId(data.getCompanyId() == null ? "" : data
                .getCompanyId());
        if (null == data.getRegisterTime()) {
            data.setRegisterTime(new Date());
        }
        bill.setRegisterTime(DateFormatUtils.format(data.getRegisterTime(),
                "yyyy-MM-dd HH:mm"));
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
        }
        bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(),
                "yyyy-MM-dd HH:mm"));
        bill.setEmptyTime(DateFormatUtils.format(data.getEmptyWeightTime(),
                "yyyy-MM-dd HH:mm:ss"));
        bill.setFullTime(DateFormatUtils.format(data.getFullWeightTime(),
                "yyyy-MM-dd HH:mm:ss"));
        bill.setSerId(data.getId());
        if ("5016".equals(data.getCompanyId()) || "5347".equals(data.getCompanyId()) || "5352".equals(data.getCompanyId())) {
            bill.setCompleteTime(DateFormatUtils.format(data.getCompleteTime(), "yyyy-MM-dd"));
            bill.setSerId(data.getId().substring(2));
        }
        //客户信息
        bill.setCustomerName(data.getCustomerName() == null ? "" : data.getCustomerName());
        bill.setUserId(data.getUserId() == null ? "" : data.getUserId());
        bill.setUserAddress(data.getUserAddress() == null ? "" : data.getUserAddress());
        bill.setUserContact(data.getUserContact() == null ? "" : data.getUserContact());
        bill.setNoticeId(data.getNoticeId());
        bill.setDriverName(data.getUserName() == null ? "" : data.getUserName());
        // èŽ·å–ä»“åº“ä¿¡æ¯
        Depot depot = depotService.getCacheDepot(data.getCompanyId(),
                data.getDepotId());
        if (depot != null) {
            bill.setDepotName(depot.getName() == null ? "" : depot.getName());
            bill.setHandleUser(depot.getStoreKeeperName() == null ? "" : depot
                    .getStoreKeeperName());
        }
        bill.setFoodVariety(FoodVariety.getMsg(data.getFoodVariety()));
        bill.setFoodLocation(data.getFoodLocation() == null ? "" : data
                .getFoodLocation());
        bill.setPlateNum(data.getPlateNum());
        bill.setFullWeight(data.getFullWeight());
        bill.setEmptyWeight(data.getEmptyWeight());
        bill.setNetWeight(data.getNetWeight());
        bill.setRecordWeight(data.getRecordWeight());
        bill.setCheckStatus(data.getCheckStatus().equals(Constant.STATUS_CHECK) ? "合格" : "不合格");
        bill.setDeOther(data.getDeOther());
        bill.setSettleWeight(data.getSettleWeight());
        bill.setPrice(data.getPrice() == null ? "" : data.getPrice() + "");
        if (data.getSettleMoney() <= 0) {
            if (null != data.getPrice() && null != data.getRecordWeight()) {
                data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2));
            }
        }
        bill.setSettleMoney(data.getSettleMoney() == null ? "" : data.getSettleMoney() + "");
        bill.setRemark(data.getRemarks() == null ? "" : data.getRemarks());
        if (Constant.TYPE_IN.equals(data.getType())) {
            bill.setWeightUser(data.getFullWeightUser());
        }
        if (Constant.TYPE_OUT.equals(data.getType())) {
            bill.setWeightUser(data.getEmptyWeightUser());
        }
        bill.setHandleUser(data.getHandleUser());
        bill.setKeeperUser(depot.getStoreKeeperName());
        return bill;
        return inoutRecordService.outWeightBill( data);
    }
}
fzzy-igdss-web/src/main/resources/static/inout/inout-weight2.js
@@ -234,11 +234,13 @@
 * ç™»è®°å¼¹çª—
 */
function quickRegister() {
    $("#form-data")[0].reset();
    form.render();
    //登记按钮放开
    $("#btn_register").css("display", "block");
    $("#text-info").removeClass("text-info");
    //称重操作弹窗
    var pro = '登记';
    var pro = '登记称重';
    recordData = null;
    updateEditAndProgress();
    flushPage();
@@ -261,8 +263,9 @@
 * @param progress
 */
function showWindows() {
    //登记按钮放开
    $("#form-data")[0].reset();
    form.render();
    //登记按钮隐藏
    $("#btn_register").css("display", "none");
    $("#text-info").addClass("text-info");
    //称重操作弹窗
@@ -606,8 +609,8 @@
                notify("数据提交成功", result.data);
                //第一次称重后,刷新页面
                if (recordData.recordWeight <= 0.0) {
                    flushData();
                    layer.closeAll();
                    $("#form-data")[0].reset();
                    form.render();
                }
            }
            layer.close(index);
@@ -709,7 +712,7 @@
        }
        $("#resultIntelCard").text(data.intelCard);
        layer.open({
        var indexNotify = layer.open({
            type: 1,
            offset: ['150px', '200px'],
            area: '450px;',
@@ -718,7 +721,7 @@
            btn: ['确定'],
            content: $('#dialog-from-notify'),
            yes: function (index) {
                layer.closeAll();
                layer.close(indexNotify);
            }
        });
    } else {
fzzy-igdss-web/src/main/resources/templates/inout/weight.html
@@ -386,7 +386,7 @@
                                    <label class="layui-form-label color-red">毛重(满车)</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="fullWeight" id="fullWeight" autocomplete="off"
                                               placeholder="地磅自动带入" class="layui-input rkbk-search-input"
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input"
                                               disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
fzzy-igdss-web/src/main/resources/templates/inout/weight2.html
@@ -591,7 +591,7 @@
                                    <label class="layui-form-label color-red">毛重(满车)</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="fullWeight" id="fullWeight" autocomplete="off"
                                               placeholder="地磅自动带入" class="layui-input rkbk-search-input"
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input"
                                               disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>