czt
2025-11-29 867f65fe7558c1fb1e2b11d23b625cc95dbe88d8
入库通知单提交
已添加8个文件
已修改1个文件
2552 ■■■■■ 文件已修改
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutNoticeOut.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutNoticeMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeInRepository.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeOutRepository.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeIn.view.xml 636 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml 1122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java 489 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeDto.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
package com.fzzy.igds.data;
import lombok.Data;
import java.util.Date;
/**
 * @Description å‡ºå…¥åº“通知单整体使用封装
 * @Author CZT
 * @Date 2025/11/29 16:33
 */
@Data
public class NoticeDto {
    /**
     * é€šçŸ¥å•id
     */
    private String id;
    private String name;
    /**
     * ç»„织编码
     */
    private String companyId;
    /**
     * åº“区编码
     */
    private String deptId;
    /**
     * ä»“库编码
     */
    private String depotId;
    /**
     * å®¢æˆ·ç¼–码
     */
    private String customerId;
    /**
     * å®¢æˆ·åç§°
     */
    private String customerName;
    /**
     * å•位名称
     */
    private String unitName;
    /**
     * ç²®é£Ÿå“ç§
     */
    private String foodVariety;
    /**
     * ç²®é£Ÿæ€§è´¨
     */
    private String foodType;
    /**
     * å¹´ä»½
     */
    private String year;
    /**
     * ç›®æ ‡æ•°é‡
     */
    private Double targetNumber = 0.0;
    /**
     * å®Œæˆæ•°é‡
     */
    private Double completeNumber = 0.0;
    /**
     * å®Œæˆæ—¶é—´
     */
    private Date completeTime;
    /**
     * æ‰€å±žåˆåŒ
     */
    private String contractName;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/data/NoticeParam.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
package com.fzzy.igds.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
 * @Description å‡ºå…¥åº“通知单参数
 * @Author CZT
 * @Date 2025/11/29 16:33
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class NoticeParam {
    private String id;
    private String companyId;
    private String depotId;
    private String deptId;// æ‰€å±žåˆ†åº“
    private String customerName;// å®¢æˆ·åç§°
    private String foodVariety;// å“ç§
    private String contractId;//合同号
    private String planId;//计划
    private String foodType; // ç²®é£Ÿæ€§è´¨
    private String year;// å¹´ä»½
    private String type;
    private Double weight;// é‡é‡ä¿¡æ¯
    private Double taskNum = 0.0;
    private String completeStatus; // å®ŒæˆçŠ¶æ€
    private Double storageReal;// åº“存重量
    private Date start;
    private Date end;
    private String createUser;
    public NoticeParam() {
    }
    public NoticeParam(String companyId, String deptId, String customerName,
                       String foodVariety, String id) {
        this.companyId = companyId;
        this.deptId = deptId;
        this.customerName = customerName;
        this.foodVariety = foodVariety;
        this.id = id;
    }
    public NoticeParam(String companyId, String deptId, String depotId,
                       String customerName, String foodVariety, String id) {
        this.companyId = companyId;
        this.deptId = deptId;
        this.depotId = depotId;
        this.customerName = customerName;
        this.foodVariety = foodVariety;
        this.id = id;
    }
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutNoticeOut.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -107,4 +108,7 @@
    @TableField("remark")
    private String remark;
    @Transient
    @PropertyDef(label = "标记", description = "用于判断通知单是否为新增")
    private String tag;
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/mapper/InoutNoticeMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
package com.fzzy.igds.mapper;
import com.fzzy.igds.data.NoticeParam;
import org.apache.ibatis.annotations.Param;
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/29 16:39
 */
public interface InoutNoticeMapper {
    /**
     * å…¥åº“通知单 - æ ¹æ®å‚数重新计算完成量
     *
     * @param param
     * @return
     */
    int reSumNoticeInComplete(@Param("param") NoticeParam param);
    /**
     * å‡ºåº“通知单 - æ ¹æ®å‚数重新计算完成量
     *
     * @param param
     * @return
     */
    int reSumNoticeOutComplete(@Param("param") NoticeParam param);
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeInRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,54 @@
package com.fzzy.igds.repository;
import com.fzzy.igds.domain.InoutNoticeIn;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/29 16:33
 */
@Service
public interface InoutNoticeInRepository extends JpaRepository<InoutNoticeIn, String> , JpaSpecificationExecutor<InoutNoticeIn> {
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param id
     * @return
     */
    @Query("from InoutNoticeIn where companyId =:companyId and deptId =:deptId and id =:id")
    InoutNoticeIn getDataById(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("id") String id);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeIn where companyId =:companyId and deptId =:deptId and completeStatus =:completeStatus")
    List<InoutNoticeIn> listNoticeIn(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("completeStatus") String completeStatus);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeIn where companyId =:companyId and completeStatus =:completeStatus")
    List<InoutNoticeIn> listNoticeIn(@Param("companyId") String companyId, @Param("completeStatus") String completeStatus);
}
fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutNoticeOutRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package com.fzzy.igds.repository;
import com.fzzy.igds.domain.InoutNoticeOut;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/29 16:34
 */
@Service
public interface InoutNoticeOutRepository extends JpaRepository<InoutNoticeOut, String> , JpaSpecificationExecutor<InoutNoticeOut> {
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param id
     * @return
     */
    @Query("from InoutNoticeOut where companyId =:companyId and deptId =:deptId and id =:id")
    InoutNoticeOut getDataById(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("id") String id);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param deptId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeOut where companyId =:companyId and deptId =:deptId and completeStatus =:completeStatus")
    List<InoutNoticeOut> listNoticeOut(@Param("companyId") String companyId, @Param("deptId") String deptId, @Param("completeStatus") String completeStatus);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取信息
     *
     * @param companyId
     * @param completeStatus
     * @return
     */
    @Query("from InoutNoticeOut where companyId =:companyId and completeStatus =:completeStatus")
    List<InoutNoticeOut> listNoticeOut(@Param("companyId") String companyId, @Param("completeStatus") String completeStatus);
}
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeIn.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,636 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.domain.InoutNoticeIn</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">通知单号</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <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="name">
        <Property></Property>
        <Property name="label">通知单名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property></Property>
        <Property name="label">类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">库区自建</Property>
                <Property name="code">10</Property>
              </Entity>
              <Entity>
                <Property name="name">银行监管</Property>
                <Property name="code">20</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="contractId">
        <Property></Property>
        <Property name="label">质押合同</Property>
        <Property name="required">false</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="customerName">
        <Property></Property>
        <Property name="label">发货客户</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="unitName">
        <Property></Property>
        <Property name="label">收货单位</Property>
        <Property name="required">false</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="year">
        <Property></Property>
        <Property name="label">年份</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="targetNumber">
        <Property name="dataType">Double</Property>
        <Property name="displayFormat">#0.0 KG</Property>
        <Property name="required">true</Property>
        <Property name="label">目标数量</Property>
      </PropertyDef>
      <PropertyDef name="completeNumber">
        <Property name="dataType">Double</Property>
        <Property name="label">完成数量</Property>
        <Property name="displayFormat">#0.0 KG</Property>
      </PropertyDef>
      <PropertyDef name="auditStatus">
        <Property></Property>
        <Property name="label">审核状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">监管审核</Property>
                <Property name="code">10</Property>
              </Entity>
              <Entity>
                <Property name="name">银行审核</Property>
                <Property name="code">20</Property>
              </Entity>
              <Entity>
                <Property name="name">已审核</Property>
                <Property name="code">30</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="auditUser">
        <Property></Property>
        <Property name="label">审核人</Property>
      </PropertyDef>
      <PropertyDef name="auditDate">
        <Property name="dataType">DateTime</Property>
        <Property name="label">审批时间</Property>
      </PropertyDef>
      <PropertyDef name="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="tag">
        <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>
    <DataType name="dtQuery">
      <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="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="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQueryTitle">
      <PropertyDef name="title">
        <Property name="label">title</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:10">
    <ClientEvent name="onReady">var deptId = window.parent.deptId;//父页面中的分库编码&#xD;
var TYPE = &quot;NOTICE_IN&quot;;&#xD;
query = function(){&#xD;
    view.get(&quot;#dsQuery&quot;).set(&quot;parameter&quot;,{deptId:deptId}).flushAsync();&#xD;
};&#xD;
query();&#xD;
      &#xD;
queryTitle = function(){&#xD;
    view.get(&quot;#dsQueryTitle&quot;).set(&quot;parameter&quot;,{type:TYPE,deptId:deptId}).flushAsync();&#xD;
};&#xD;
queryTitle();&#xD;
      &#xD;
//新增&#xD;
add = function(){&#xD;
    view.get(&quot;#ajaxInitAdd&quot;).set(&quot;parameter&quot;, TYPE).execute(function(data){&#xD;
        view.get(&quot;#dsMain&quot;).insert(data);&#xD;
        view.get(&quot;#dialogMain&quot;).show();&#xD;
    });&#xD;
};</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">inoutNoticePR#pageQueryIn</Property>
      <Property name="pageSize">15</Property>
      <Property name="loadMode">lazy</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</Property>
      <Property name="dataProvider">inoutNoticePR#getYearQuery</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <DataSet id="dsQueryTitle">
      <Property name="dataType">dtQueryTitle</Property>
      <Property name="dataProvider">inoutNoticePR#getTitle</Property>
      <Property name="loadMode">manual</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">customerName</Property>
          <Property name="property">customerName</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">foodVariety</Property>
          <Property name="property">foodVariety</Property>
          <Editor/>
        </AutoFormElement>
        <AutoFormElement>
          <Property name="name">completeStatus</Property>
          <Property name="property">completeStatus</Property>
          <Editor/>
        </AutoFormElement>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
            }else{&#xD;
            view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
            }</ClientEvent>
          <Property name="caption">搜索</Property>
          <Property name="iconClass">fa fa-search</Property>
          <Property name="exClassName">btn-q1</Property>>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsQuery&quot;).flushAsync();</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 layoutConstraint="left">
          <ClientEvent name="onClick">add();</ClientEvent>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
            var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
            if(select){&#xD;
            view.get(&quot;#dialogMain&quot;).show();&#xD;
            }else{&#xD;
            $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
            }</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 layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
            var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
            if(select){&#xD;
            view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(result){&#xD;
            select.remove();&#xD;
            });&#xD;
            }else{&#xD;
            $notify(&quot;请选择需要删除的仓库……&quot;);&#xD;
            }</ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="width">100</Property>
          <Property name="iconClass">fa fa-times</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="left">
          <ClientEvent name="onClick">view.get(&quot;#recalculate&quot;).execute(function(result){&#xD;
            if(result == 'success'){&#xD;
            $notify(&quot;数据更新完成!!&quot;);&#xD;
            &#xD;
            var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
            }else{&#xD;
            $notify(&quot;数据更新失败!!&quot;);&#xD;
            }&#xD;
            });</ClientEvent>
          <Property name="caption">实时核算</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="width">100</Property>
          <Property name="tip">完成量默认统计到昨天,查看实时完成量请点击“实时核算”按钮</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dataGridMain" layoutConstraint="padding:8">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridCamera&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <Property name="readOnly">true</Property>
        <RowSelectorColumn/>
        <RowNumColumn>
          <Property name="width">50</Property>
          <Property name="caption">序号</Property>
        </RowNumColumn>
        <DataColumn name="id">
          <Property name="property">id</Property>
          <Property name="width">200</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="name">
          <Property name="property">name</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">customerName</Property>
          <Property name="name">customerName</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="depotId">
          <Property name="property">depotId</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">targetNumber</Property>
          <Property name="name">targetNumber</Property>
          <Property name="align">center</Property>
          <Property name="width">200</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">completeStatus</Property>
          <Property name="name">completeStatus</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">createTime</Property>
          <Property name="align">center</Property>
          <Property name="name">createTime</Property>
          <Property name="width">160</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">updateBy</Property>
          <Property name="align">center</Property>
          <Property name="name">updateBy</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
          <Property name="name">updateTime</Property>
          <Property name="width">160</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layoutConstraint="bottom">
      <Property name="className">c-bottom</Property>
      <DataPilot layoutConstraint="right">
        <Property name="itemCodes">pageSize,pages</Property>
        <Property name="dataSet">dsMain</Property>
      </DataPilot>
    </Container>
    <Dialog id="dialogMain" layout="regionPadding:8">
      <Property name="closeable">false</Property>
      <Property name="caption">入库通知单</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</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;#ajaxSave&quot;).set(&quot;parameter&quot;,data).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">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</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>
        <Container>
          <AutoForm id="autoForm1" layoutConstraint="top padding:10">
            <Property name="cols">*,*,*,*,*,*,*</Property>
            <Property name="dataSet">dsQueryTitle</Property>
            <Property name="labelAlign">right</Property>
            <Property name="showHint">false</Property>
            <AutoFormElement layoutConstraint="colSpan:7">
              <Property name="name">title</Property>
              <Property name="property">title</Property>
              <Property name="showLabel">false</Property>
              <Property name="editorType">Label</Property>
              <Property name="style">
                <Property name="font">bold 30px Georgia, serif;</Property>
                <Property name="text-align">center</Property>
              </Property>
              <Editor/>
            </AutoFormElement>
          </AutoForm>
          <Container layout="padding:15">
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">name</Property>
                <Property name="property">name</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">customerName</Property>
                <Property name="property">customerName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">unitName</Property>
                <Property name="property">unitName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">year</Property>
                <Property name="property">year</Property>
                <Property name="trigger">defaultYearDropDown</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">targetNumber</Property>
                <Property name="property">targetNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeNumber</Property>
                <Property name="property">completeNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">type</Property>
                <Property name="property">type</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeStatus</Property>
                <Property name="property">completeStatus</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeTime</Property>
                <Property name="property">completeTime</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">contractId</Property>
                <Property name="property">contractId</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:2">
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
                <Property name="text">注:类型为银行监管时,需关联质押合同</Property>
              </Label>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">remark</Property>
                <Property name="property">remark</Property>
                <Property name="editorType">TextArea</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">createBy</Property>
                <Property name="property">createBy</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">createTime</Property>
                <Property name="property">createTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateBy</Property>
                <Property name="property">updateBy</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateTime</Property>
                <Property name="property">updateTime</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Container>
        </Container>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxSave">
      <Property name="service">inoutNoticePR#saveIn</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDel">
      <Property name="service">inoutNoticePR#delDataIn</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
    <AjaxAction id="ajaxInitAdd">
      <Property name="service">inoutNoticePR#initAddIn</Property>
    </AjaxAction>
    <AjaxAction id="recalculate">
      <Property name="service">inoutNoticePR#updateSumNoticeIn</Property>
    </AjaxAction>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticeOut.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,1122 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <ClientEvent name="onDataChange">if(arg.property ==&quot;depotId&quot;){&#xD;
    autoByDepot(arg.newValue);&#xD;
}</ClientEvent>
      <Property name="creationType">com.fzzy.igds.models.InoutNoticeOut</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">通知单号</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <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#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="planId">
        <Property></Property>
        <Property name="label">所属计划</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="planName">
        <Property></Property>
        <Property name="label">所属计划</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="contractId">
        <Property></Property>
        <Property name="label">所属合同</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="contractName">
        <Property></Property>
        <Property name="label">所属合同</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">通知单名称</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="customerId">
        <Property></Property>
        <Property name="label">收货客户</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">收货客户</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="unitName">
        <Property></Property>
        <Property name="label">发货单位</Property>
        <Property name="required">false</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</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="year">
        <Property></Property>
        <Property name="label">粮食年份</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="targetNumber">
        <Property name="dataType">double</Property>
        <Property name="displayFormat">#,## kG</Property>
        <Property name="required">true</Property>
        <Property name="label">计划数量</Property>
      </PropertyDef>
      <PropertyDef name="completeNumber">
        <Property name="dataType">double</Property>
        <Property name="label">完成数量</Property>
        <Property name="displayFormat">#,## kG</Property>
      </PropertyDef>
      <PropertyDef name="auditStatus">
        <Property></Property>
        <Property name="label">审核状态</Property>
      </PropertyDef>
      <PropertyDef name="auditUser">
        <Property></Property>
        <Property name="label">审核人</Property>
      </PropertyDef>
      <PropertyDef name="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">创建时间</Property>
      </PropertyDef>
      <PropertyDef name="createUser">
        <Property></Property>
        <Property name="label">创建人</Property>
      </PropertyDef>
      <PropertyDef name="completeTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">完成时间</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="tag">
        <Property></Property>
        <Property name="label">标记</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQuery">
      <PropertyDef name="id">
        <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#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</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>
      </PropertyDef>
      <PropertyDef name="year">
        <Property></Property>
        <Property name="label">年份</Property>
      </PropertyDef>
      <PropertyDef name="completeStatus">
        <Property></Property>
        <Property name="label">完成状态</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">未完成</Property>
                <Property name="code">NONE</Property>
              </Entity>
              <Entity>
                <Property name="name">已完成</Property>
                <Property name="code">COMPLETE</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</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>
        <Property name="required">true</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtQueryTitle">
      <PropertyDef name="title">
        <Property name="label">title</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtPlan">
      <Property name="creationType">com.fzzy.igds.models.InoutPlanDetail</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">计划明细号</Property>
      </PropertyDef>
      <PropertyDef name="planId">
        <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>
        <Property name="label">粮食性质</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</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="year">
        <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="planNum">
        <Property name="dataType">Double</Property>
        <Property name="label">计划数量</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property name="label">计划类型</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerPlanType&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property></Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtContract">
      <Property name="creationType">com.fzzy.igds.models.InoutContract</Property>
      <PropertyDef name="id">
        <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>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="planId">
        <Property></Property>
        <Property name="label">所属计划</Property>
      </PropertyDef>
      <PropertyDef name="planName">
        <Property></Property>
        <Property name="label">所属计划</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property></Property>
        <Property name="label">合同类型</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerContractType&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">合同名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="year">
        <Property></Property>
        <Property name="label">年份</Property>
      </PropertyDef>
      <PropertyDef name="customerId">
        <Property></Property>
        <Property name="label">客户编码</Property>
      </PropertyDef>
      <PropertyDef name="customerName">
        <Property></Property>
        <Property name="label">客户名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="customerType">
        <Property></Property>
        <Property name="label">客户类型</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="code">1</Property>
                <Property name="name">1-企业</Property>
              </Entity>
              <Entity>
                <Property name="code">2</Property>
                <Property name="name">2-个人</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="customerBank">
        <Property></Property>
        <Property name="label">客户开户行</Property>
      </PropertyDef>
      <PropertyDef name="customerBankAccount">
        <Property></Property>
        <Property name="label">客户开户行账号</Property>
      </PropertyDef>
      <PropertyDef name="customerSignUser">
        <Property></Property>
        <Property name="label">客户签约人</Property>
      </PropertyDef>
      <PropertyDef name="bank">
        <Property></Property>
        <Property name="label">本方开户行</Property>
      </PropertyDef>
      <PropertyDef name="bankAccount">
        <Property></Property>
        <Property name="label">本方开户行账号</Property>
      </PropertyDef>
      <PropertyDef name="signUser">
        <Property></Property>
        <Property name="label">本方签约人</Property>
      </PropertyDef>
      <PropertyDef name="signAddress">
        <Property></Property>
        <Property name="label">签约地址</Property>
      </PropertyDef>
      <PropertyDef name="price">
        <Property name="dataType">Double</Property>
        <Property name="label">单价</Property>
        <Property name="displayFormat">#,###0.000 å…ƒ/公斤</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="money">
        <Property name="dataType">Double</Property>
        <Property name="label">总金额</Property>
        <Property name="displayFormat">#,###0.000 å…ƒ</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="contactAmount">
        <Property name="dataType">Double</Property>
        <Property name="label">合同数量</Property>
        <Property name="displayFormat">#,##0.00 KG</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="completeNum">
        <Property name="dataType">Double</Property>
        <Property name="label">合同完成数量</Property>
        <Property name="displayFormat">#,##0.00 KG</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="foodType">
        <Property></Property>
        <Property name="label">粮食性质</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="payType">
        <Property></Property>
        <Property name="label">支付方式</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;PAY_TYPE&quot;)}</Property>
          <Property name="valueProperty">dictLabel</Property>
          <Property name="keyProperty">dictValue</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="createUser">
        <Property></Property>
        <Property name="label">创建人</Property>
      </PropertyDef>
      <PropertyDef name="createTime">
        <Property name="dataType">Date</Property>
        <Property name="label">创建时间</Property>
      </PropertyDef>
      <PropertyDef name="signingTime">
        <Property name="dataType">Date</Property>
        <Property name="label">签订时间</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="beginTime">
        <Property name="dataType">Date</Property>
        <Property name="label">有效开始时间</Property>
      </PropertyDef>
      <PropertyDef name="endTime">
        <Property name="dataType">Date</Property>
        <Property name="label">有效截止时间</Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注说明</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">var deptId = window.parent.deptId;//父页面中的分库编码&#xD;
var TYPE = &quot;NOTICE_OUT&quot;;&#xD;
query = function(){&#xD;
    view.get(&quot;#dsQuery&quot;).set(&quot;parameter&quot;,{deptId:deptId}).flushAsync();&#xD;
};&#xD;
query();&#xD;
      &#xD;
queryTitle = function(){&#xD;
    view.get(&quot;#dsQueryTitle&quot;).set(&quot;parameter&quot;,{type:TYPE,deptId:deptId}).flushAsync();&#xD;
};&#xD;
queryTitle();&#xD;
      &#xD;
//新增&#xD;
add = function(){&#xD;
    view.get(&quot;#ajaxInitAdd&quot;).set(&quot;parameter&quot;, TYPE).execute(function(data){&#xD;
        view.get(&quot;#dsMain&quot;).insert(data);&#xD;
        view.get(&quot;#dialogMain&quot;).show();&#xD;
    });&#xD;
};&#xD;
&#xD;
//根据仓库自动回填粮食品种,等级,产地新&#xD;
autoByDepot = function(depotId){&#xD;
    view.get(&quot;#ajaxGetDepot&quot;).set(&quot;parameter&quot;,depotId).execute(function(result){&#xD;
        if(result){&#xD;
            var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
            data.set(&quot;foodVariety&quot;,result.foodVariety);&#xD;
            &#xD;
        }&#xD;
    });&#xD;
};</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">inoutNoticePR#pageQueryOut</Property>
      <Property name="pageSize">15</Property>
      <Property name="loadMode">lazy</Property>
    </DataSet>
    <DataSet id="dsQueryTitle">
      <Property name="dataType">dtQueryTitle</Property>
      <Property name="dataProvider">inoutNoticePR#getTitle</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <DataSet id="dsQuery">
      <Property name="dataType">dtQuery</Property>
      <Property name="dataProvider">inoutNoticePR#getYearQuery</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <AutoForm layoutConstraint="top">
      <Property name="cols">*,*,*,*</Property>
      <Property name="dataSet">dsQuery</Property>
      <Property name="exClassName">bg-color</Property>
      <AutoFormElement>
        <Property name="name">foodVariety</Property>
        <Property name="property">foodVariety</Property>
        <Property name="editable">false</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">year</Property>
        <Property name="property">year</Property>
        <Property name="trigger">defaultYearDropDown</Property>
        <Property name="editable">false</Property>
        <Editor/>
      </AutoFormElement>
      <AutoFormElement>
        <Property name="name">completeStatus</Property>
        <Property name="property">completeStatus</Property>
        <Property name="editable">false</Property>
        <Editor/>
      </AutoFormElement>
      <Container layout="hbox regionPadding:15">
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
            }else{&#xD;
            view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
            }</ClientEvent>
          <Property name="caption">查询</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-search</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsQuery&quot;).flushAsync();</ClientEvent>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="caption">重置</Property>
        </Button>
      </Container>
      <Container layout="regionPadding:10" layoutConstraint="type:top;colSpan:2">
        <Property name="exClassName">bg-color</Property>
        <Property name="contentOverflow">hidden</Property>
        <Property name="height">55</Property>
        <Label layoutConstraint="left">
          <Property name="text">菜单栏:</Property>
        </Label>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">add();&#xD;
          //view.get(&quot;#dsMain&quot;).insert({&#xD;
          //          name:&quot;出库通知单&quot;&#xD;
          //          });&#xD;
          //         view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-plus</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">编辑</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-pencil</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(result){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的仓库……&quot;);&#xD;
}&#xD;
        </ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-minus</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
var page = view.get(&quot;#dsMain&quot;);&#xD;
var param = {&#xD;
    &quot;pageSize&quot;:page.get(&quot;pageSize&quot;),&#xD;
    &quot;pageNo&quot;:page.get(&quot;pageNo&quot;),&#xD;
    &quot;foodVariety&quot;:data.get(&quot;foodVariety&quot;),&#xD;
    &quot;year&quot;:data.get(&quot;year&quot;),&#xD;
    &quot;completeStatus&quot;:data.get(&quot;completeStatus&quot;)&#xD;
}&#xD;
console.log(param);&#xD;
window.parent.$.table.exportExcelDorado(&quot;./export/noticeOut-excel&quot;, &quot;出库通知单数据&quot;, param);</ClientEvent>
          <Property name="caption">导出EXCEL</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-file-excel-o</Property>
          <Property name="action">exportExcel</Property>
        </Button>
        <Button layoutConstraint="left">
          <ClientEvent name="onClick">view.get(&quot;#recalculate&quot;).execute(function(result){&#xD;
    if(result == 'success'){&#xD;
        $notify(&quot;数据更新完成!!&quot;);&#xD;
        &#xD;
        var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
        view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
    }else{&#xD;
        $notify(&quot;数据更新失败!!&quot;);&#xD;
    }&#xD;
});</ClientEvent>
          <Property name="caption">实时核算</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="tip">完成量默认统计到昨天,查看实时完成量请点击“实时核算”按钮</Property>
        </Button>
      </Container>
    </AutoForm>
    <Container layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dataGridMain" layoutConstraint="center">
        <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
          if(data){&#xD;
          view.get(&quot;#dialogMain&quot;).show();&#xD;
          }</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn>
          <Property name="width">50</Property>
          <Property name="caption">序号</Property>
        </RowNumColumn>
        <DataColumn name="id">
          <Property name="property">id</Property>
          <Property name="width">200</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="name">
          <Property name="property">name</Property>
          <Property name="align">center</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">customerName</Property>
          <Property name="name">customerName</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">depotId</Property>
          <Property name="name">depotId</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
          <Property name="width">150</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">targetNumber</Property>
          <Property name="name">targetNumber</Property>
          <Property name="align">center</Property>
          <Property name="width">200</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">completeNumber</Property>
          <Property name="align">center</Property>
          <Property name="name">completeNumber</Property>
          <Property name="width">200</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">completeStatus</Property>
          <Property name="name">completeStatus</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">createTime</Property>
          <Property name="align">center</Property>
          <Property name="name">createTime</Property>
          <Property name="width">200</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layoutConstraint="bottom">
      <Property name="exClassName">bg-color</Property>
      <DataPilot layoutConstraint="right">
        <Property name="itemCodes">pageSize,pages</Property>
        <Property name="dataSet">dsMain</Property>
      </DataPilot>
    </Container>
    <Dialog id="dialogMain">
      <Property name="closeable">false</Property>
      <Property name="caption">出库单</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</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;#ajaxSave&quot;).set(&quot;parameter&quot;,data).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</Property>
          <Property name="exClassName">btn1</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times</Property>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Buttons>
      <Children>
        <Container>
          <AutoForm id="autoForm1" layoutConstraint="top padding:10">
            <Property name="cols">*,*,*,*,*,*,*</Property>
            <Property name="dataSet">dsQueryTitle</Property>
            <Property name="labelAlign">right</Property>
            <Property name="showHint">false</Property>
            <AutoFormElement layoutConstraint="colSpan:7">
              <Property name="name">title</Property>
              <Property name="property">title</Property>
              <Property name="showLabel">false</Property>
              <Property name="editorType">Label</Property>
              <Property name="style">
                <Property name="font">bold 30px Georgia, serif;</Property>
                <Property name="text-align">center</Property>
              </Property>
              <Editor/>
            </AutoFormElement>
          </AutoForm>
          <Container layout="padding:15">
            <AutoForm>
              <Property name="dataSet">dsMain</Property>
              <Property name="cols">*,*</Property>
              <Property name="labelAlign">right</Property>
              <Property name="labelSeparator">:</Property>
              <Property name="labelWidth">120</Property>
              <AutoFormElement>
                <Property name="name">name</Property>
                <Property name="property">name</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Property name="readOnly">true</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">customerName</Property>
                <Property name="property">customerName</Property>
                <Property name="trigger">ddCustomer</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">unitName</Property>
                <Property name="property">unitName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">year</Property>
                <Property name="property">year</Property>
                <Property name="trigger">defaultYearDropDown</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:1"/>
              <AutoFormElement>
                <Property name="name">targetNumber</Property>
                <Property name="property">targetNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeNumber</Property>
                <Property name="property">completeNumber</Property>
                <Property name="readOnly">false</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">planName</Property>
                <Property name="property">planName</Property>
                <Property name="trigger">ddPlan</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:1">
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
                <Property name="text">注:当前通知单关联的库区计划</Property>
              </Label>
              <AutoFormElement>
                <Property name="name">contractName</Property>
                <Property name="property">contractName</Property>
                <Property name="trigger">ddContract</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:1">
                <Property name="style">
                  <Property name="color">blue</Property>
                </Property>
                <Property name="text">注:当前通知单关联的销售合同</Property>
              </Label>
              <AutoFormElement>
                <Property name="name">createTime</Property>
                <Property name="property">createTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeTime</Property>
                <Property name="property">completeTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">completeStatus</Property>
                <Property name="property">completeStatus</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">remark</Property>
                <Property name="property">remark</Property>
                <Property name="editorType">TextArea</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Container>
        </Container>
      </Children>
      <Tools/>
    </Dialog>
    <AjaxAction id="ajaxGetDepot">
      <Property name="service">depotPR#getDepot</Property>
    </AjaxAction>
    <AjaxAction id="ajaxSave">
      <Property name="service">inoutNoticePR#saveOut</Property>
    </AjaxAction>
    <AjaxAction id="ajaxDel">
      <Property name="service">inoutNoticePR#delDataOut</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
    <AjaxAction id="ajaxInitAdd">
      <Property name="service">inoutNoticePR#initAddOut</Property>
    </AjaxAction>
    <CustomDropDown id="ddCustomer">
      <Property name="minHeight">400</Property>
      <Property name="assignmentMap">customerId=id,customerName=name</Property>
      <Property name="minWidth">500</Property>
      <Property name="autoOpen">true</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsCustomer">
          <Property name="dataProvider">inoutCustomerPR#queryListByKey</Property>
          <Property name="dataType">[dtInoutCustomer]</Property>
          <Property name="parameter">
            <Entity>
              <Property name="type">OUT</Property>
            </Entity>
          </Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key">
            <Property name="blankText"> -- ç¼–码或者名称 --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key.value&quot;);&#xD;
var type = &quot;${request.getParameter('type')}&quot;;&#xD;
view.get(&quot;#dsCustomer&quot;).set(&quot;parameter&quot;,{key:key,type:type}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsCustomer.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddCustomer&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsCustomer.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddCustomer&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsCustomer</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="id">
            <Property name="property">id</Property>
            <Property name="width">100</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <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="align">center</Property>
          </DataColumn>
        </DataGrid>
      </Container>
    </CustomDropDown>
    <AjaxAction id="recalculate">
      <Property name="service">inoutNoticePR#updateSumNoticeOut</Property>
    </AjaxAction>
    <CustomDropDown id="ddPlan">
      <Property name="minHeight">325</Property>
      <Property name="assignmentMap">planId=id,planName=planId</Property>
      <Property name="minWidth">900</Property>
      <Property name="autoOpen">false</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsPlan">
          <Property name="dataProvider">planManagePR#pagePlanDetail</Property>
          <Property name="dataType">[dtPlan]</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">5</Property>
        </DataSet>
        <AutoForm layoutConstraint="top">
          <Property name="cols">*,*,*</Property>
          <Property name="dataSet">dsQuery</Property>
          <Property name="exClassName">bg-color</Property>
          <Property name="labelAlign">right</Property>
          <Property name="labelSeparator">:</Property>
          <Property name="labelWidth">100</Property>
          <AutoFormElement>
            <Property name="name">depotId</Property>
            <Property name="property">depotId</Property>
            <Property name="editable">false</Property>
            <Property name="label">计划仓库</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">year</Property>
            <Property name="property">year</Property>
            <Property name="trigger">defaultYearDropDown</Property>
            <Property name="editable">false</Property>
            <Property name="label">收获年份</Property>
            <Editor/>
          </AutoFormElement>
          <Container layout="hbox regionPadding:15">
            <Button>
              <ClientEvent name="onClick">var data = view.get(&quot;#dsQuery.data&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#dsPlan&quot;).set(&quot;parameter&quot;,data.toJSON()).flushAsync();&#xD;
}else{&#xD;
    view.get(&quot;#dsPlan&quot;).flushAsync();&#xD;
}&#xD;
</ClientEvent>
              <Property name="caption">查询</Property>
              <Property name="exClassName">btn-normal</Property>
              <Property name="iconClass">fa fa-search</Property>
            </Button>
            <Button>
              <ClientEvent name="onClick">var data = view.get(&quot;#dsPlan.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddPlan&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
              <Property name="iconClass">fa fa-check</Property>
              <Property name="caption">确定</Property>
            </Button>
          </Container>
        </AutoForm>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsPlan.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddPlan&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsPlan</Property>
          <Property name="readOnly">true</Property>
          <DataColumn>
            <Property name="property">planId</Property>
            <Property name="width">100</Property>
            <Property name="align">center</Property>
            <Property name="name">planId</Property>
            <Property name="visible">false</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>
          </DataColumn>
          <DataColumn>
            <Property name="property">year</Property>
            <Property name="width">200</Property>
            <Property name="align">center</Property>
            <Property name="name">year</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">planNum</Property>
            <Property name="width">80</Property>
            <Property name="align">center</Property>
            <Property name="name">planNum</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">foodVariety</Property>
            <Property name="width">80</Property>
            <Property name="align">center</Property>
            <Property name="name">foodVariety</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">type</Property>
            <Property name="align">center</Property>
            <Property name="name">type</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsPlan</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
    <CustomDropDown id="ddContract">
      <Property name="minHeight">317</Property>
      <Property name="assignmentMap">contractId=id,contractName=name</Property>
      <Property name="minWidth">550</Property>
      <Property name="autoOpen">false</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsContract">
          <Property name="dataProvider">contractManagePR#pageContract</Property>
          <Property name="dataType">[dtContract]</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">5</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;
view.get(&quot;#dsContract&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsContract.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddContract&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsContract.data:#&quot;);&#xD;
if(data){&#xD;
    view.get(&quot;#ddContract&quot;).close(data.toJSON());&#xD;
}</ClientEvent>
          <Property name="dataSet">dsContract</Property>
          <Property name="readOnly">true</Property>
          <DataColumn>
            <Property name="property">id</Property>
            <Property name="width">100</Property>
            <Property name="align">center</Property>
            <Property name="name">id</Property>
            <Property name="visible">false</Property>
          </DataColumn>
          <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="align">center</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">planName</Property>
            <Property name="align">center</Property>
            <Property name="name">planName</Property>
          </DataColumn>
          <DataColumn>
            <Property name="property">year</Property>
            <Property name="width">80</Property>
            <Property name="align">center</Property>
            <Property name="name">year</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsContract</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
  </View>
</ViewConfig>
fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutNoticePR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,489 @@
package com.fzzy.igds;
import com.bstek.dorado.annotation.DataProvider;
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.service.InoutNoticeService;
import com.fzzy.igds.domain.InoutNoticeIn;
import com.fzzy.igds.domain.InoutNoticeOut;
import com.fzzy.igds.service.SysDeptService;
import com.fzzy.igds.utils.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
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.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import java.util.*;
/**
 * @Description é€šçŸ¥å•管理
 * @Author CZT
 * @Date 2024/12/16 10:10
 */
@Component
public class InoutNoticePR {
    @Resource
    private InoutNoticeService inoutNoticeService;
    @Resource
    private SysDeptService sysDeptService;
    /**
     * inoutNoticePR#getTitle æ ¹æ®æŠ¥è¡¨ç±»åž‹ï¼ŒèŽ·å–é»˜è®¤æŸ¥è¯¢ä¿¡æ¯ï¼Œæ¯”å¦‚è¡¨å¤´ä¿¡æ¯ç­‰
     *
     * @param
     * @return
     */
    @DataProvider
    public Map<String, Object> getTitle(Map<String, Object> param) {
        Map<String, Object> result = new HashMap<String, Object>();
        //获取参数中报表类型
        String type = (String)param.get("type");
        //获取分库编码对应的分库名称
        String deptName = "";
        SysDept subDept = sysDeptService.getCacheDept(null, ContextUtil.subDeptId(null));
        if (null != subDept) {
            deptName = subDept.getDeptName();
        }
        if ("NOTICE_IN".equals(type)) {
            result.put("title", "入库通知单");
            if (StringUtils.isNotEmpty(deptName)) {
                result.put("title", deptName + "入库通知单");
            }
        }
        if ("NOTICE_OUT".equals(type)) {
            result.put("title", "出库通知单");
            if (StringUtils.isNotEmpty(deptName)) {
                result.put("title", deptName + "出库通知单");
            }
        }
        return result;
    }
    /**
     * inoutNoticePR#getYearQuery é»˜è®¤å¹´ä»½
     *
     * @param
     * @return
     */
    @DataProvider
    public Map<String, Object> getYearQuery(Map<String, Object> param) {
        Map<String, Object> result = new HashMap<String, Object>();
        //获取参数中分库编码
        String deptId = (String)param.get("deptId");
        result.put("year", DateFormatUtils.format(new Date(), "yyyy"));
        result.put("deptId", deptId);
        return result;
    }
    /**
     * 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;
        if (Constant.TYPE_IN.equals(type)) {
            List<InoutNoticeIn> listIn = this.queryNoticeIn(param);
            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 = this.queryNoticeOut(param);
            if (null != listOut && listOut.size() > 0) {
                for (InoutNoticeOut inoutNoticeOut : listOut) {
                    dto = new NoticeDto();
                    BeanUtils.copyProperties(inoutNoticeOut, dto);
                    list.add(dto);
                }
            }
        }
        return list;
    }
    /*==================== å…¥åº“通知单相关业务 ====================*/
    /**
     * inoutNoticePR#initAddIn å…¥åº“通知单新增初始化
     *
     * @return
     */
    @Expose
    public InoutNoticeIn initAddIn() {
        SysUser user = ContextUtil.getLoginUser();
        InoutNoticeIn data = new InoutNoticeIn();
        data.setId("RKTZD_" + ContextUtil.generateId());
        data.setName("入库通知单");
        data.setCompanyId(user.getCompanyId());
        data.setDeptId(ContextUtil.subDeptId(user));
        data.setTag(Constant.YN_Y);
        return data;
    }
    /**
     * inoutNoticePR#pageQueryIn èŽ·å–å…¥åº“é€šçŸ¥å•
     *
     * @param param
     * @return
     */
    @DataProvider
    public void pageQueryIn(Page<InoutNoticeIn> page, Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeIn.SORT_PROP);
        Specification<InoutNoticeIn> specification = new Specification<InoutNoticeIn>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeIn> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                String key = String.valueOf(finalParam.get("year"));
                if (StringUtils.isBlank(key)) {
                    Predicate predicate3 = cb.equal(root.get("year"), key);
                    predicates.add(predicate3);
                }
                key = (String) finalParam.get("id");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate4 = cb.equal(root.get("id"),  key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("customerName");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate5 = cb.like(root.get("customerName"), "%" + key + "%");
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("completeStatus");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate6 = cb.equal(root.get("completeStatus"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isBlank(key)) {
                    Predicate predicate7 = cb.equal(root.get("foodVariety"), key);
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeIn> japPage = inoutNoticeService.queryAllNoticeIn(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * inoutNoticePR#saveIn æ›´æ–°å…¥åº“通知单
     */
    @Expose
    public String saveIn(InoutNoticeIn data) {
        InoutNoticeIn inoutNoticeIn = new InoutNoticeIn();
        BeanUtils.copyProperties(data, inoutNoticeIn);
        return inoutNoticeService.saveOrUpdateIn(inoutNoticeIn);
    }
    /**
     * inoutNoticePR#delDataIn
     */
    @Expose
    public String delDataIn(InoutNoticeIn data) {
        InoutNoticeIn inoutNoticeIn = new InoutNoticeIn();
        BeanUtils.copyProperties(data, inoutNoticeIn);
        return inoutNoticeService.delDataIn(inoutNoticeIn);
    }
    /**
     * æ ¹æ®ä¸åŒæ¡ä»¶æŸ¥è¯¢
     * @param param
     * @return
     */
    public List<InoutNoticeIn> queryNoticeIn(Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeIn.SORT_PROP);
        Specification<InoutNoticeIn> specification = new Specification<InoutNoticeIn>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeIn> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                Predicate predicate3 = cb.equal(root.get("completeStatus"), "NONE");
                predicates.add(predicate3);
                String key = (String) finalParam.get("customerId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate4 = cb.equal(root.get("customerId"), key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate5 = cb.equal(root.get("foodVariety"),  key);
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("depotId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate6 = cb.equal(root.get("depotId"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("key");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate7 = cb.like(root.get("name"), "%" + key + "%");
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeIn> japPage = inoutNoticeService.queryAllNoticeIn(specification, pageable);
        return japPage.getContent();
    }
    /**
     * é‡æ–°æ ¸ç®—入库通知单完成量
     *
     * inoutNoticePR#updateSumNoticeIn
     *
     * @return
     */
    @Expose
    public String updateSumNoticeIn() {
        //获取所有未完成状态的入库通知单
        String companyId = ContextUtil.getCompanyId();
        String deptId = ContextUtil.subDeptId(null);
        List<InoutNoticeIn> noticeInList = inoutNoticeService.getUnComNoticeIn(companyId);
        if (noticeInList != null && noticeInList.size() > 0) {
            inoutNoticeService.updateSumNoticeIn(noticeInList);
            return "success";
        }
        return "fail";
    }
    /*==================== å‡ºåº“通知单相关业务 ====================*/
    /**
     * inoutNoticePR#initAddOut å‡ºåº“通知单新增初始化
     *
     * @return
     */
    @Expose
    public InoutNoticeOut initAddOut() {
        SysUser user = ContextUtil.getLoginUser();
        InoutNoticeOut data = new InoutNoticeOut();
        data.setId("CKTZD_" + ContextUtil.generateId());
        data.setName("出库通知单");
        data.setCompanyId(user.getCompanyId());
        data.setDeptId(ContextUtil.subDeptId(user));
        data.setTag(Constant.YN_Y);
        return data;
    }
    /**
     * inoutNoticePR#pageQueryOut èŽ·å–å‡ºåº“é€šçŸ¥å•
     * @param page
     * @param param
     */
    @DataProvider
    public void pageQueryOut(Page<InoutNoticeOut> page, Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeOut.SORT_PROP);
        Specification<InoutNoticeOut> specification = new Specification<InoutNoticeOut>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeOut> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                String key = String.valueOf(finalParam.get("year"));
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate3 = cb.equal(root.get("year"), key);
                    predicates.add(predicate3);
                }
                key = (String) finalParam.get("id");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate4 = cb.equal(root.get("id"),  key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("customerId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate5 = cb.equal(root.get("customerId"), key);
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("completeStatus");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate6 = cb.equal(root.get("completeStatus"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate7 = cb.equal(root.get("foodVariety"), key);
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeOut> japPage = inoutNoticeService.queryAllNoticeOut(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * inoutNoticePR#saveOut æ›´æ–°å‡ºåº“通知单
     * @param data
     * @return
     */
    @Expose
    public String saveOut(InoutNoticeOut data) {
        InoutNoticeOut inoutNoticeOut = new InoutNoticeOut();
        BeanUtils.copyProperties(data, inoutNoticeOut);
        return inoutNoticeService.saveOrUpdateOut(inoutNoticeOut);
    }
    /**
     * inoutNoticePR#delDataOut
     */
    @Expose
    public String delDataOut(InoutNoticeOut data) {
        InoutNoticeOut inoutNoticeOut = new InoutNoticeOut();
        BeanUtils.copyProperties(data, inoutNoticeOut);
        return inoutNoticeService.delDataOut(inoutNoticeOut);
    }
    /**
     * æ ¹æ®ä¸åŒæ¡ä»¶æŸ¥è¯¢
     * @param param
     * @return
     */
    public List<InoutNoticeOut> queryNoticeOut(Map<String, Object> param) {
        if (null == param) {
            param = new HashMap<>();
        }
        Map<String, Object> finalParam = param;
        //多参数分页查询
        Pageable pageable = PageRequest.of(0, 10000, Sort.Direction.ASC, InoutNoticeOut.SORT_PROP);
        Specification<InoutNoticeOut> specification = new Specification<InoutNoticeOut>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<InoutNoticeOut> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId());
                predicates.add(predicate1);
                Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null));
                predicates.add(predicate2);
                Predicate predicate3 = cb.equal(root.get("completeStatus"), "NONE");
                predicates.add(predicate3);
                String key = (String) finalParam.get("customerId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate4 = cb.equal(root.get("customerId"), key);
                    predicates.add(predicate4);
                }
                key = (String) finalParam.get("foodVariety");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate5 = cb.equal(root.get("foodVariety"),  key);
                    predicates.add(predicate5);
                }
                key = (String) finalParam.get("depotId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate6 = cb.equal(root.get("depotId"), key);
                    predicates.add(predicate6);
                }
                key = (String) finalParam.get("key");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate7 = cb.like(root.get("name"), "%" + key + "%");
                    predicates.add(predicate7);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<InoutNoticeOut> japPage = inoutNoticeService.queryAllNoticeOut(specification, pageable);
        return japPage.getContent();
    }
    /**
     * é‡æ–°æ ¸ç®—出库通知单完成量
     *
     * inoutNoticePR#updateSumNoticeOut
     *
     * @return
     */
    @Expose
    public String updateSumNoticeOut() {
        //获取所有未完成状态的入库通知单
        String companyId = ContextUtil.getCompanyId();
        String deptId = ContextUtil.subDeptId(null);
        List<InoutNoticeOut> noticeOutList = inoutNoticeService.getUnComNoticeOut(companyId);
        if (noticeOutList != null && noticeOutList.size() > 0) {
            inoutNoticeService.updateSumNoticeOut(noticeOutList);
            return "success";
        }
        return "fail";
    }
}