Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

hy 7 years ago
parent
commit
5b3cb907ca
32 changed files with 818 additions and 197 deletions
  1. 2 2
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Configs.java
  2. 56 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/JasperResult.java
  3. 182 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/SysPrintSet.java
  4. 43 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/JasperReportController.java
  5. 26 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/SysprintsetMapper.java
  6. 13 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/JasperReportService.java
  7. 103 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/JasperReportServiceImpl.java
  8. 1 1
      applications/commons/commons-server/src/main/resources/mapper/ConfigsMapper.xml
  9. 248 0
      applications/commons/commons-server/src/main/resources/mapper/SysprintsetMapper.xml
  10. 5 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  11. 4 4
      applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml
  12. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  13. 1 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  14. 1 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  15. 9 4
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  16. 1 1
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  17. 11 18
      frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js
  18. 10 1
      frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js
  19. 6 1
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  20. 5 0
      frontend/saas-web/app/view/core/report/ReportPanel.js
  21. 1 8
      frontend/saas-web/app/view/document/customer/BasePanel.js
  22. 1 1
      frontend/saas-web/app/view/document/product/BasePanel.js
  23. 0 85
      frontend/saas-web/app/view/document/product/BasePanelController.js
  24. 3 7
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  25. 3 7
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  26. 3 7
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  27. 31 5
      frontend/saas-web/app/view/money/report/AccountBalance.js
  28. 14 14
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  29. 21 16
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  30. 10 10
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  31. 1 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  32. 1 1
      frontend/saas-web/resources/json/navigation.json

+ 2 - 2
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Configs.java

@@ -1,14 +1,14 @@
 package com.usoftchina.saas.commons.po;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /** 系统参数
  * @author: guq
  * @create: 2018-11-16 11:19
  **/
-public class Configs {
+public class Configs implements Serializable {
 
     private Long id;
 

+ 56 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/JasperResult.java

@@ -0,0 +1,56 @@
+package com.usoftchina.saas.commons.po;
+
+import java.io.Serializable;
+
+/**
+ * @author: guq
+ * @create: 2018-11-16 18:54
+ **/
+public class JasperResult implements Serializable{
+
+    private String printurl;
+    private String reportName;
+    private String title;
+    private String whereCondition;
+    private String printtype;
+
+    public String getPrinttype() {
+        return printtype;
+    }
+
+    public void setPrinttype(String printtype) {
+        this.printtype = printtype;
+    }
+
+    public String getPrinturl() {
+        return printurl;
+    }
+
+    public void setPrinturl(String printurl) {
+        this.printurl = printurl;
+    }
+
+    public String getReportName() {
+        return reportName;
+    }
+
+    public void setReportName(String reportName) {
+        this.reportName = reportName;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getWhereCondition() {
+        return whereCondition;
+    }
+
+    public void setWhereCondition(String whereCondition) {
+        this.whereCondition = whereCondition;
+    }
+}

+ 182 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/SysPrintSet.java

@@ -0,0 +1,182 @@
+package com.usoftchina.saas.commons.po;
+
+import java.io.Serializable;
+
+/**
+ * @author: guq
+ * @create: 2018-11-16 18:16
+ **/
+public class SysPrintSet implements Serializable{
+
+    private String caller;
+    private String reportname;
+    private String title;
+    private Integer isdefault;//默认
+    private Integer needaudit;//已审核才能打印
+    private Integer nopost;//已过帐不允许打印
+    private Integer needenoughstock;//库存不足不允许打印
+    private String  countfield;//打印次数字段
+    private String  statusfield;//状态字段
+    private String  statuscodefield;//状态码字段
+    private Integer allowmultiple;//允许多次打印
+    private String defaultcondition;//默认条件
+    private String handlermethod; //打印前执行逻辑方法名
+    private Integer id;
+    private String printtype; //输出类型
+    private String procedureName;//存储过程
+    private Integer ignorepage;
+    private Long companyId;
+    private String keyfield;
+
+    public String getKeyfield() {
+        return keyfield;
+    }
+
+    public void setKeyfield(String keyfield) {
+        this.keyfield = keyfield;
+    }
+    public Long getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Long companyId) {
+        this.companyId = companyId;
+    }
+
+    public Integer getIgnorepage() {
+        return ignorepage;
+    }
+
+    public void setIgnorepage(Integer ignorepage) {
+        this.ignorepage = ignorepage;
+    }
+
+    public String getCaller() {
+        return caller;
+    }
+
+    public void setCaller(String caller) {
+        this.caller = caller;
+    }
+
+    public String getReportname() {
+        return reportname;
+    }
+
+    public void setReportname(String reportname) {
+        this.reportname = reportname;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public Integer getIsdefault() {
+        return isdefault;
+    }
+
+    public void setIsdefault(Integer isdefault) {
+        this.isdefault = isdefault;
+    }
+
+    public Integer getNeedaudit() {
+        return needaudit;
+    }
+
+    public void setNeedaudit(Integer needaudit) {
+        this.needaudit = needaudit;
+    }
+
+    public Integer getNopost() {
+        return nopost;
+    }
+
+    public void setNopost(Integer nopost) {
+        this.nopost = nopost;
+    }
+
+    public Integer getNeedenoughstock() {
+        return needenoughstock;
+    }
+
+    public void setNeedenoughstock(Integer needenoughstock) {
+        this.needenoughstock = needenoughstock;
+    }
+
+    public String getCountfield() {
+        return countfield;
+    }
+
+    public void setCountfield(String countfield) {
+        this.countfield = countfield;
+    }
+
+    public String getStatusfield() {
+        return statusfield;
+    }
+
+    public void setStatusfield(String statusfield) {
+        this.statusfield = statusfield;
+    }
+
+    public String getStatuscodefield() {
+        return statuscodefield;
+    }
+
+    public void setStatuscodefield(String statuscodefield) {
+        this.statuscodefield = statuscodefield;
+    }
+
+    public Integer getAllowmultiple() {
+        return allowmultiple;
+    }
+
+    public void setAllowmultiple(Integer allowmultiple) {
+        this.allowmultiple = allowmultiple;
+    }
+
+    public String getDefaultcondition() {
+        return defaultcondition;
+    }
+
+    public void setDefaultcondition(String defaultcondition) {
+        this.defaultcondition = defaultcondition;
+    }
+
+    public String getHandlermethod() {
+        return handlermethod;
+    }
+
+    public void setHandlermethod(String handlermethod) {
+        this.handlermethod = handlermethod;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getPrinttype() {
+        return printtype;
+    }
+
+    public void setPrinttype(String printtype) {
+        this.printtype = printtype;
+    }
+
+    public String getProcedureName() {
+        return procedureName;
+    }
+
+    public void setProcedureName(String procedureName) {
+        this.procedureName = procedureName;
+    }
+
+}

+ 43 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/JasperReportController.java

@@ -0,0 +1,43 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.po.JasperResult;
+import com.usoftchina.saas.commons.po.SysPrintSet;
+import com.usoftchina.saas.commons.service.JasperReportService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2018-11-16 17:18
+ **/
+@RestController
+@RequestMapping("/jasperReport")
+public class JasperReportController {
+
+    @Autowired
+    private JasperReportService jasperReportService;
+
+    @GetMapping("/getPrintSet")
+    public Result getPrintSet(String caller) {
+        List<SysPrintSet> jasperSet = jasperReportService.getPrintSet(caller);
+        return Result.success(jasperSet);
+    }
+
+    @PostMapping("/print")
+    public Result print(String caller, String reportName, Integer id, boolean isProdIO) {
+        JasperResult print = jasperReportService.print(caller, reportName, id, isProdIO, false);
+        return Result.success(print);
+    }
+
+    @PostMapping("/printByDefault")
+    public Result printByDefault(String caller, String reportName, Integer id, boolean isProdIO) {
+        JasperResult print = jasperReportService.print(caller, reportName, id, isProdIO, true);
+        return Result.success(print);
+    }
+}

+ 26 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/SysprintsetMapper.java

@@ -0,0 +1,26 @@
+package com.usoftchina.saas.commons.mapper;
+
+import com.usoftchina.saas.commons.po.SysPrintSet;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface SysprintsetMapper {
+    int deleteByPrimaryKey(Integer ID);
+
+    int insert(SysPrintSet record);
+
+    int insertSelective(SysPrintSet record);
+
+    SysPrintSet selectByPrimaryKey(Integer ID);
+
+    int updateByPrimaryKeySelective(SysPrintSet record);
+
+    int updateByPrimaryKey(SysPrintSet record);
+
+    List<SysPrintSet> selectSetByCaller(@Param("caller") String caller, @Param("companyId") Long companyId);
+
+    SysPrintSet selectSetByReportName(@Param("caller") String caller, @Param("reportName") String reportName, @Param("companyId") Long companyId);
+
+    SysPrintSet selectDefaultSetBycaller(@Param("caller") String caller, @Param("companyId") Long companyId);
+}

+ 13 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/JasperReportService.java

@@ -0,0 +1,13 @@
+package com.usoftchina.saas.commons.service;
+
+import com.usoftchina.saas.commons.po.JasperResult;
+import com.usoftchina.saas.commons.po.SysPrintSet;
+
+import java.util.List;
+
+public interface JasperReportService {
+
+    List<SysPrintSet> getPrintSet(String caller);
+
+    JasperResult print(String caller, String reportName, Integer id, boolean isProdIO, boolean isDefault);
+}

+ 103 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/JasperReportServiceImpl.java

@@ -0,0 +1,103 @@
+package com.usoftchina.saas.commons.service.impl;
+
+import com.usoftchina.saas.commons.mapper.SysprintsetMapper;
+import com.usoftchina.saas.commons.po.Configs;
+import com.usoftchina.saas.commons.po.JasperResult;
+import com.usoftchina.saas.commons.po.SysPrintSet;
+import com.usoftchina.saas.commons.service.ConfigsService;
+import com.usoftchina.saas.commons.service.JasperReportService;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.context.SpringContextHolder;
+import com.usoftchina.saas.exception.BizException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2018-11-16 18:38
+ **/
+@Service
+public class JasperReportServiceImpl implements JasperReportService{
+
+    private static final String PRINTURLCODE = "printUrl";
+
+    @Autowired
+    private SysprintsetMapper sysprintsetMapper;
+    @Autowired
+    private ConfigsService configsService;
+
+    @Override
+    public List<SysPrintSet> getPrintSet(String caller) {
+        if (StringUtils.isEmpty(caller)) {
+            return null;
+        }
+        Long comanyId = BaseContextHolder.getCompanyId();
+        return sysprintsetMapper.selectSetByCaller(caller, comanyId);
+    }
+
+    @Override
+    public JasperResult print(String caller, String reportName, Integer id, boolean isProdIO, boolean isDefault) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        JasperResult result = new JasperResult();
+        SysPrintSet printSet = null;
+
+        if (isDefault) {
+            printSet = sysprintsetMapper.selectDefaultSetBycaller(caller, companyId);
+        } else {
+            printSet = sysprintsetMapper.selectSetByReportName(caller, reportName, companyId);
+        }
+        if (StringUtils.isEmpty(printSet)) {
+            return null;
+        }
+        //取打印地址
+        Configs config = configsService.getConfigByCode(PRINTURLCODE);
+        String printUrl = null != config ? config.getData() : "";
+        //打印限制 TODO
+        //打印前执行方法
+        if (!StringUtils.isEmpty(printSet.getHandlermethod())) {
+            executor(printSet.getHandlermethod(), new Object[] {id, caller});
+        }
+        //打印前执行过程
+        if (!StringUtils.isEmpty(printSet.getProcedureName())) {
+            //TODO
+        }
+        //拼打印条件
+        String condition = " where " + (StringUtils.isEmpty(printSet.getKeyfield()) ? "1=1" :
+                printSet.getKeyfield() + "=" + id);
+        if (!StringUtils.isEmpty(printSet.getDefaultcondition())) {
+            condition += " and " + printSet.getDefaultcondition();
+        }
+
+        result.setReportName(printSet.getReportname());
+        result.setTitle(printSet.getTitle());
+        result.setPrinturl(printUrl);
+        result.setWhereCondition(condition);
+        result.setPrinttype(StringUtils.isEmpty(printSet.getPrinttype()) ? "" : printSet.getPrinttype());
+        return result;
+
+    }
+
+    private void executor(String handlermethod, Object...args) {
+        Class[] argsClass = new Class[args.length];
+        for (int i = 0, j = args.length; i < j; i++) {
+            argsClass[i] = args[i].getClass();
+        }
+
+        try {
+            Object jasperReportServiceImpl = SpringContextHolder.getBean("jasperReportServiceImpl");
+            Method method = jasperReportServiceImpl.getClass().getMethod(handlermethod, argsClass);
+            method.invoke(jasperReportServiceImpl, args);
+        } catch (Exception e) {
+            if (e.getCause() != null) {
+                String exName = e.getCause().getClass().getSimpleName();
+                if (exName.equals("RuntimeException") || exName.equals("SystemException"))
+                    throw new BizException(3432434, e.getCause().getMessage());
+            }
+            e.printStackTrace();
+        }
+    }
+}

+ 1 - 1
applications/commons/commons-server/src/main/resources/mapper/ConfigsMapper.xml

@@ -143,7 +143,7 @@
     select  *  from configs
     <where>
       <if test="con != null">
-        ${con}
+        code=#{con}
       </if>
       <if test="companyId != null">
         and  companyId = #{companyId}

+ 248 - 0
applications/commons/commons-server/src/main/resources/mapper/SysprintsetMapper.xml

@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.commons.mapper.SysprintsetMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.po.SysPrintSet" >
+    <id column="ID" property="id" jdbcType="INTEGER" />
+    <result column="CALLER" property="caller" jdbcType="VARCHAR" />
+    <result column="REPORTNAME" property="reportname" jdbcType="VARCHAR" />
+    <result column="TITLE" property="title" jdbcType="VARCHAR" />
+    <result column="ISDEFAULT" property="isdefault" jdbcType="INTEGER" />
+    <result column="NEEDAUDIT" property="needaudit" jdbcType="INTEGER" />
+    <result column="NOPOST" property="nopost" jdbcType="INTEGER" />
+    <result column="NEEDENOUGHSTOCK" property="needenoughstock" jdbcType="INTEGER" />
+    <result column="COUNTFIELD" property="countfield" jdbcType="VARCHAR" />
+    <result column="STATUSFIELD" property="statusfield" jdbcType="VARCHAR" />
+    <result column="STATUSCODEFIELD" property="statuscodefield" jdbcType="VARCHAR" />
+    <result column="ALLOWMULTIPLE" property="allowmultiple" jdbcType="INTEGER" />
+    <result column="HANDLERMETHOD" property="handlermethod" jdbcType="VARCHAR" />
+    <result column="DEFAULTCONDITION" property="defaultcondition" jdbcType="VARCHAR" />
+    <result column="PRINTTYPE" property="printtype" jdbcType="VARCHAR" />
+    <result column="PROCEDURENAME" property="procedureName" jdbcType="VARCHAR" />
+    <result column="IGNOREPAGE" property="ignorepage" jdbcType="INTEGER" />
+    <result column="companyid" property="companyId" jdbcType="INTEGER" />
+    <result column="keyfield" property="keyfield" jdbcType="VARCHAR" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    ID, CALLER, REPORTNAME, TITLE, ISDEFAULT, NEEDAUDIT, NOPOST, NEEDENOUGHSTOCK, COUNTFIELD, 
+    STATUSFIELD, STATUSCODEFIELD, ALLOWMULTIPLE, HANDLERMETHOD, DEFAULTCONDITION, PRINTTYPE, 
+    PROCEDURENAME, IGNOREPAGE
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from sysprintset
+    where ID = #{ID,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from sysprintset
+    where ID = #{ID,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.commons.po.SysPrintSet" >
+    insert into sysprintset (ID, CALLER, REPORTNAME, 
+      TITLE, ISDEFAULT, NEEDAUDIT, 
+      NOPOST, NEEDENOUGHSTOCK, COUNTFIELD, 
+      STATUSFIELD, STATUSCODEFIELD, ALLOWMULTIPLE, 
+      HANDLERMETHOD, DEFAULTCONDITION, PRINTTYPE, 
+      PROCEDURENAME, IGNOREPAGE)
+    values (#{ID,jdbcType=INTEGER}, #{CALLER,jdbcType=VARCHAR}, #{REPORTNAME,jdbcType=VARCHAR}, 
+      #{TITLE,jdbcType=VARCHAR}, #{ISDEFAULT,jdbcType=INTEGER}, #{NEEDAUDIT,jdbcType=INTEGER}, 
+      #{NOPOST,jdbcType=INTEGER}, #{NEEDENOUGHSTOCK,jdbcType=INTEGER}, #{COUNTFIELD,jdbcType=VARCHAR}, 
+      #{STATUSFIELD,jdbcType=VARCHAR}, #{STATUSCODEFIELD,jdbcType=VARCHAR}, #{ALLOWMULTIPLE,jdbcType=INTEGER}, 
+      #{HANDLERMETHOD,jdbcType=VARCHAR}, #{DEFAULTCONDITION,jdbcType=VARCHAR}, #{PRINTTYPE,jdbcType=VARCHAR}, 
+      #{PROCEDURENAME,jdbcType=VARCHAR}, #{IGNOREPAGE,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.SysPrintSet" >
+    insert into sysprintset
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ID != null" >
+        ID,
+      </if>
+      <if test="CALLER != null" >
+        CALLER,
+      </if>
+      <if test="REPORTNAME != null" >
+        REPORTNAME,
+      </if>
+      <if test="TITLE != null" >
+        TITLE,
+      </if>
+      <if test="ISDEFAULT != null" >
+        ISDEFAULT,
+      </if>
+      <if test="NEEDAUDIT != null" >
+        NEEDAUDIT,
+      </if>
+      <if test="NOPOST != null" >
+        NOPOST,
+      </if>
+      <if test="NEEDENOUGHSTOCK != null" >
+        NEEDENOUGHSTOCK,
+      </if>
+      <if test="COUNTFIELD != null" >
+        COUNTFIELD,
+      </if>
+      <if test="STATUSFIELD != null" >
+        STATUSFIELD,
+      </if>
+      <if test="STATUSCODEFIELD != null" >
+        STATUSCODEFIELD,
+      </if>
+      <if test="ALLOWMULTIPLE != null" >
+        ALLOWMULTIPLE,
+      </if>
+      <if test="HANDLERMETHOD != null" >
+        HANDLERMETHOD,
+      </if>
+      <if test="DEFAULTCONDITION != null" >
+        DEFAULTCONDITION,
+      </if>
+      <if test="PRINTTYPE != null" >
+        PRINTTYPE,
+      </if>
+      <if test="PROCEDURENAME != null" >
+        PROCEDURENAME,
+      </if>
+      <if test="IGNOREPAGE != null" >
+        IGNOREPAGE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ID != null" >
+        #{ID,jdbcType=INTEGER},
+      </if>
+      <if test="CALLER != null" >
+        #{CALLER,jdbcType=VARCHAR},
+      </if>
+      <if test="REPORTNAME != null" >
+        #{REPORTNAME,jdbcType=VARCHAR},
+      </if>
+      <if test="TITLE != null" >
+        #{TITLE,jdbcType=VARCHAR},
+      </if>
+      <if test="ISDEFAULT != null" >
+        #{ISDEFAULT,jdbcType=INTEGER},
+      </if>
+      <if test="NEEDAUDIT != null" >
+        #{NEEDAUDIT,jdbcType=INTEGER},
+      </if>
+      <if test="NOPOST != null" >
+        #{NOPOST,jdbcType=INTEGER},
+      </if>
+      <if test="NEEDENOUGHSTOCK != null" >
+        #{NEEDENOUGHSTOCK,jdbcType=INTEGER},
+      </if>
+      <if test="COUNTFIELD != null" >
+        #{COUNTFIELD,jdbcType=VARCHAR},
+      </if>
+      <if test="STATUSFIELD != null" >
+        #{STATUSFIELD,jdbcType=VARCHAR},
+      </if>
+      <if test="STATUSCODEFIELD != null" >
+        #{STATUSCODEFIELD,jdbcType=VARCHAR},
+      </if>
+      <if test="ALLOWMULTIPLE != null" >
+        #{ALLOWMULTIPLE,jdbcType=INTEGER},
+      </if>
+      <if test="HANDLERMETHOD != null" >
+        #{HANDLERMETHOD,jdbcType=VARCHAR},
+      </if>
+      <if test="DEFAULTCONDITION != null" >
+        #{DEFAULTCONDITION,jdbcType=VARCHAR},
+      </if>
+      <if test="PRINTTYPE != null" >
+        #{PRINTTYPE,jdbcType=VARCHAR},
+      </if>
+      <if test="PROCEDURENAME != null" >
+        #{PROCEDURENAME,jdbcType=VARCHAR},
+      </if>
+      <if test="IGNOREPAGE != null" >
+        #{IGNOREPAGE,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.commons.po.SysPrintSet" >
+    update sysprintset
+    <set >
+      <if test="CALLER != null" >
+        CALLER = #{CALLER,jdbcType=VARCHAR},
+      </if>
+      <if test="REPORTNAME != null" >
+        REPORTNAME = #{REPORTNAME,jdbcType=VARCHAR},
+      </if>
+      <if test="TITLE != null" >
+        TITLE = #{TITLE,jdbcType=VARCHAR},
+      </if>
+      <if test="ISDEFAULT != null" >
+        ISDEFAULT = #{ISDEFAULT,jdbcType=INTEGER},
+      </if>
+      <if test="NEEDAUDIT != null" >
+        NEEDAUDIT = #{NEEDAUDIT,jdbcType=INTEGER},
+      </if>
+      <if test="NOPOST != null" >
+        NOPOST = #{NOPOST,jdbcType=INTEGER},
+      </if>
+      <if test="NEEDENOUGHSTOCK != null" >
+        NEEDENOUGHSTOCK = #{NEEDENOUGHSTOCK,jdbcType=INTEGER},
+      </if>
+      <if test="COUNTFIELD != null" >
+        COUNTFIELD = #{COUNTFIELD,jdbcType=VARCHAR},
+      </if>
+      <if test="STATUSFIELD != null" >
+        STATUSFIELD = #{STATUSFIELD,jdbcType=VARCHAR},
+      </if>
+      <if test="STATUSCODEFIELD != null" >
+        STATUSCODEFIELD = #{STATUSCODEFIELD,jdbcType=VARCHAR},
+      </if>
+      <if test="ALLOWMULTIPLE != null" >
+        ALLOWMULTIPLE = #{ALLOWMULTIPLE,jdbcType=INTEGER},
+      </if>
+      <if test="HANDLERMETHOD != null" >
+        HANDLERMETHOD = #{HANDLERMETHOD,jdbcType=VARCHAR},
+      </if>
+      <if test="DEFAULTCONDITION != null" >
+        DEFAULTCONDITION = #{DEFAULTCONDITION,jdbcType=VARCHAR},
+      </if>
+      <if test="PRINTTYPE != null" >
+        PRINTTYPE = #{PRINTTYPE,jdbcType=VARCHAR},
+      </if>
+      <if test="PROCEDURENAME != null" >
+        PROCEDURENAME = #{PROCEDURENAME,jdbcType=VARCHAR},
+      </if>
+      <if test="IGNOREPAGE != null" >
+        IGNOREPAGE = #{IGNOREPAGE,jdbcType=INTEGER},
+      </if>
+    </set>
+    where ID = #{ID,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.commons.po.SysPrintSet" >
+    update sysprintset
+    set CALLER = #{CALLER,jdbcType=VARCHAR},
+      REPORTNAME = #{REPORTNAME,jdbcType=VARCHAR},
+      TITLE = #{TITLE,jdbcType=VARCHAR},
+      ISDEFAULT = #{ISDEFAULT,jdbcType=INTEGER},
+      NEEDAUDIT = #{NEEDAUDIT,jdbcType=INTEGER},
+      NOPOST = #{NOPOST,jdbcType=INTEGER},
+      NEEDENOUGHSTOCK = #{NEEDENOUGHSTOCK,jdbcType=INTEGER},
+      COUNTFIELD = #{COUNTFIELD,jdbcType=VARCHAR},
+      STATUSFIELD = #{STATUSFIELD,jdbcType=VARCHAR},
+      STATUSCODEFIELD = #{STATUSCODEFIELD,jdbcType=VARCHAR},
+      ALLOWMULTIPLE = #{ALLOWMULTIPLE,jdbcType=INTEGER},
+      HANDLERMETHOD = #{HANDLERMETHOD,jdbcType=VARCHAR},
+      DEFAULTCONDITION = #{DEFAULTCONDITION,jdbcType=VARCHAR},
+      PRINTTYPE = #{PRINTTYPE,jdbcType=VARCHAR},
+      PROCEDURENAME = #{PROCEDURENAME,jdbcType=VARCHAR},
+      IGNOREPAGE = #{IGNOREPAGE,jdbcType=INTEGER}
+    where ID = #{ID,jdbcType=INTEGER}
+  </update>
+  <select id="selectSetByCaller" resultType="com.usoftchina.saas.commons.po.SysPrintSet">
+    select * from sysprintset where caller=#{caller} and companyId=#{companyId}
+  </select>
+
+  <select id="selectSetByReportName" resultType="com.usoftchina.saas.commons.po.SysPrintSet">
+    select * from sysprintset where caller=#{caller} and reportName=#{reportName} and companyId=#{companyId}
+  </select>
+
+  <select id="selectDefaultSetBycaller" resultType="com.usoftchina.saas.commons.po.SysPrintSet">
+    select * from sysprintset where caller=#{caller} and ISDEFAULT=1 and companyId=#{companyId}
+  </select>
+</mapper>

+ 5 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -88,12 +88,14 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         //校验明细仓库是否重复
         validRepeatWarehouse(productDetailList);
 
+        //保存
+        String code = pushMaxnubmer(product.getPr_code(), product.getId());
+
         if(product.getId() == 0){
-            //保存
-            String code = pushMaxnubmer(product.getPr_code(), product.getId());
             product.setCompanyId(companyId);
             product.setCreatorId(userId);
             product.setCreateTime(new Date());
+            product.setPr_code(code);
             //保存主表
             getMapper().insertSelective(product);
             //保存明细表数据
@@ -159,6 +161,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
 
             product.setUpdaterId(BaseContextHolder.getUserId());
             product.setUpdateTime(new Date());
+            product.setPr_code(code);
             getMapper().updateByPrimaryKeySelective(product);
             docBaseDTO = generateMsgObj(product.getId(), product.getPr_code());
             //记录LOG

+ 4 - 4
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -151,8 +151,8 @@
       <if test="creatorName != null" >
         creatorName,
       </if>
-      <if test="creatorTime != null" >
-        creatorTime,
+      <if test="createTime != null" >
+        createTime,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
@@ -223,8 +223,8 @@
       <if test="creatorName != null" >
         #{creatorName,jdbcType=VARCHAR},
       </if>
-      <if test="creatorTime != null" >
-        #{creatorTime,jdbcType=TIMESTAMP},
+      <if test="createTime != null" >
+        #{createTime,jdbcType=TIMESTAMP},
       </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java

@@ -122,6 +122,8 @@ public class PurchaseList extends CommonBaseEntity implements Serializable {
 
     private String pd_remark;
 
+    private String pd_ordercode;
+
     //private ProductDTO productDTO;
     private Long pr_id;
     private String pr_code;

+ 1 - 0
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml

@@ -42,6 +42,7 @@
         <result column="PD_PRODID" property="pd_prodid" jdbcType="INTEGER" />
         <result column="PD_PRODCODE" property="pd_prodcode" jdbcType="VARCHAR" />
         <result column="PD_UNIT" property="pd_unit" jdbcType="VARCHAR" />
+        <result column="pd_ordercode" property="pd_ordercode" jdbcType="VARCHAR" />
         <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
         <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
         <result column="PD_TAXPRICE" property="pd_taxprice" jdbcType="DOUBLE" />

+ 1 - 1
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java

@@ -25,7 +25,7 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
 
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
-    Double getOnHand(@Param("prodcode") String prodcode, @Param("whcode") String whcode, @Param("companyId") Long companyId);
+    Double getOnHand(@Param("prodid") Long prodid, @Param("whid") Integer whid, @Param("companyId") Long companyId);
 
     String selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
 

+ 9 - 4
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java

@@ -161,9 +161,13 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             for(MakeMaterial makeMaterial : makeMaterialList){
                 i++;
                 double qty = makeMaterial.getMm_qty()==null?0:makeMaterial.getMm_qty();
-                Double onHand = getMapper().getOnHand(makeMaterial.getMm_prodcode(),makeMaterial.getMm_whcode(), BaseContextHolder.getCompanyId());
-                if (onHand==null){
-                    onHand=0d;
+                double onHand = 0;
+                try {
+                    onHand = getMapper().getOnHand(make.getMa_prodid(),make.getMa_whid(), BaseContextHolder.getCompanyId());
+                }catch (Exception e){
+                    String msg = BizExceptionCode.UNENOUGH_DETAIL_STOCK.getMessage();
+                    int code = BizExceptionCode.SALE_ORDER_HASAUDIT.getCode();
+                    throw new BizException(code, String.format(msg, i));
                 }
                 if(onHand < qty){
                     String msg = BizExceptionCode.UNENOUGH_DETAIL_STOCK.getMessage();
@@ -175,7 +179,8 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             double qty = make.getMa_qty();
             double onHand = 0;
             try {
-                onHand = getMapper().getOnHand(make.getMa_prodcode(), make.getMa_whcode(), BaseContextHolder.getCompanyId());
+                onHand = getMapper().getOnHand(make.getMa_prodid(), make.getMa_whid(), BaseContextHolder.getCompanyId());
+
             }catch (Exception e){
                 String msg = BizExceptionCode.UNENOUGH_STOCK.getMessage();
                 int code = BizExceptionCode.UNENOUGH_STOCK.getCode();

+ 1 - 1
applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml

@@ -410,7 +410,7 @@
   </select>
 
     <select id="getOnHand" resultType="double">
-        SELECT IFNULL(PW_ONHAND,0) FROM PRODUCTWH WHERE PW_PRODCODE=#{prodcode} AND PW_WHCODE=#{whcode} and COMPANYID=#{companyId}
+        SELECT IFNULL(PW_ONHAND,0) FROM PRODUCTWH WHERE PW_PRODID=#{prodid} AND PW_WHID=#{whid} and COMPANYID=#{companyId}
     </select>
 
     <select id="selectMakeInOutCode" resultType="string">

+ 11 - 18
frontend/saas-web/app/view/core/dbfind/types/CustomerDbfindTrigger.js

@@ -30,65 +30,58 @@ Ext.define('saas.view.core.dbfind.types.CustomerDbfindTrigger', {
     dbColumns: [{
         conditionCode: 'id',
         text: "客户ID",
-        flex: 0,
         dataIndex: "id",
         width: 0,
         xtype: "",
     }, {
         conditionCode: 'cu_code',
         text: "客户编号",
-        flex: 1,
         dataIndex: "cu_code",
-        width: 100,
+        width: 150,
         xtype: "",
     }, {
         conditionCode: 'cu_name',
         text: "客户名称",
-        flex: 1,
         dataIndex: "cu_name",
+        width: 180,
         xtype: "",
     }, {
         conditionCode: 'cu_type',
         text: "客户类型",
-        flex: 1,
         dataIndex: "cu_type",
-        width: 200,
+        width: 150,
         xtype: "",
     }, {
         text: "业务员编号",
-        flex: 1,
         dataIndex: "cu_sellercode",
-        width: 100
+        width:150
     }, {
         text: "业务员",
-        flex: 1,
         dataIndex: "cu_sellername",
-        width: 100
+        width:180
     }, {
         text: "税率",
-        flex: 1,
         dataIndex: "cu_taxrate",
-        width: 100,
         xtype: 'numbercolumn',
+        width:80,
+        renderer: function (v) {
+            return Ext.util.Format.number(v, '0');
+        }
     }, {
         text: "承付天数",
-        flex: 1,
         dataIndex: "cu_promisedays",
-        width: 100,
+        width:100,
         xtype: 'numbercolumn',
-        align: 'end',
         renderer: function (v) {
             return Ext.util.Format.number(v, '0');
         }
     }, {
         text: "额度",
-        flex: 1,
         dataIndex: "cu_credit",
-        width: 100,
+        width:100,
         xtype: 'numbercolumn',
     }, {
         text: "客户地址",
-        flex: 1,
         dataIndex: "ca_address",
         width: 250
     }]

+ 10 - 1
frontend/saas-web/app/view/core/dbfind/types/ProductDbfindTrigger.js

@@ -91,7 +91,16 @@ Ext.define('saas.view.core.dbfind.types.ProductDbfindTrigger', {
         dataIndex: "pr_zxbzs",
         width: 100,
         xtype: 'numbercolumn',
-        align: 'end'
+        align: 'end',
+        renderer : function(v) {
+            if(!v) {
+                return 0;
+            }
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
     },{
         text: "L/T",
         dataIndex: "pr_leadtime",

+ 6 - 1
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -116,6 +116,10 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     load: function(store, records, successful, operation, eOpts) {
                         var queryPanel = me.up('core-query-querypanel'),
                         mode = queryPanel.getQueryMode();
+
+                        store.each(function(d, i) {
+                            d.set('id', d.get('id') + '-' + i);
+                        });
                         
                         if(mode=="MAIN"){
                             me.reconfigure(store, me.initColumns(me.baseColumn));
@@ -266,10 +270,11 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             if(e.target.parentElement.classList.contains('x-querygrid-code-column')) {
                 var grid = tableView.up('grid'),
                 idValue = record.get(grid.idField),
+                initId = typeof idValue.split == 'function' ? idValue.split('-')[0] : idValue;
                 codeValue = record.get(grid.codeField),
                 id = grid.addXtype + '-' + idValue;
                 saas.util.BaseUtil.openTab(grid.addXtype, grid.addTitle+"("+codeValue+")", id, {
-                    initId: idValue
+                    initId: initId
                 });
             }
         },

+ 5 - 0
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -226,6 +226,11 @@ Ext.define('saas.view.core.report.ReportPanel', {
                         condition: JSON.stringify(condition)
                     });
     
+                },
+                load: function(store, records, successful, operation, eOpts) {
+                    store.each(function(d, i) {
+                        d.set('id', d.get('id') + '-' + i);
+                    });
                 }
             }
         });

+ 1 - 8
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -154,14 +154,7 @@ Ext.define('saas.view.document.customer.BasePanel', {
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
             }
-        }, 
-        {
-            text : "开户银行", 
-            dataIndex : "cu_bankaccount"
-        },{
-            text : "银行账户", 
-            dataIndex : "cu_bankcode"
-        },{
+        }, {
             text : "客户状态", 
             dataIndex : "cu_status", 
         }, 

+ 1 - 1
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -6,7 +6,7 @@ Ext.define('saas.view.document.product.BasePanel', {
     viewModel: 'document-product-basepanel',
 
     searchField:[{
-        xtype : "dbfindtrigger", 
+        xtype : "productDbfindTrigger", 
         name : "pr_code", 
         emptyText : "物料编号", 
         width:120

+ 0 - 85
frontend/saas-web/app/view/document/product/BasePanelController.js

@@ -9,9 +9,6 @@ Ext.define('saas.view.document.product.BasePanelController', {
             'dbfindtrigger[name=pr_code]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/product/list',
-                        addXtype: 'document-product-formpanel',
-                        addTitle: '物料资料',
                         dbfinds:[
                         {
                             from:'pr_code',to:'pr_code'
@@ -28,88 +25,6 @@ Ext.define('saas.view.document.product.BasePanelController', {
                         }, {
                             from:'id',to:'id',ignore:true
                         }],
-                        dbtpls:[{
-                            field:'pr_code',width:100
-                        },{
-                            field:'pr_detail',width:100
-                        }],
-                        defaultCondition: "pr_statuscode='OPEN'",
-                        dbSearchFields:[{
-                            emptyText:'输入物料编号、名称或规格',
-                            xtype : "textfield", 
-                            name : "search", 
-                            width: 200,
-                            getCondition: function(v) {
-                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
-                            },
-                            allowBlank : true, 
-                            columnWidth : 0.25
-                        }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "hidden": true,
-                            "dataIndex": "id",
-                        }, {
-                            "text": "物料编号",       
-                            "dataIndex": "pr_code",
-                            "width": 200,
-                        }, {
-                            "text": "物料名称",
-                            "width": 200,
-                            "dataIndex": "pr_detail",
-                        }, {
-                            "text": "规格",
-                            "dataIndex": "pr_spec",
-                            "width": 100,
-                        }, {
-                            "text": "单位",
-                            "dataIndex": "pr_unit",
-                            "width": 100,
-                        },{
-                            "text": "仓库id",
-                            "dataIndex": "pr_whid",
-                            "hidden": true,
-                        },{
-                            "text": "仓库编号",
-                            "dataIndex": "pr_whcode",
-                            "hidden": true,
-                        },{
-                            "text": "仓库",
-                            "dataIndex": "pr_whname",
-                            "width": 200,
-                        },{
-                            "text": "总库存数",
-                            "dataIndex": "po_onhand",
-                            "width": 100,
-                            xtype: 'numbercolumn',
-                            align:'end'
-                        },{
-                            "text": "类型",
-                            "dataIndex": "pr_kind",
-                            "width": 100,
-                        },{
-                            "text": "型号",
-                            "dataIndex": "pr_orispeccode",
-                            "width": 100,
-                        },{
-                            "text": "品牌",
-                            "dataIndex": "pr_brand",
-                            "width": 100,
-                        },{
-                            "text": "供应商",
-                            "dataIndex": "pr_vendname",
-                            "width": 100,
-                        },{
-                            "text": "最小包装",
-                            "dataIndex": "pr_zxbzs",
-                            "width": 100,
-                            xtype: 'numbercolumn',
-                            align:'end'
-                        },{
-                            "text": "L/T",
-                            "dataIndex": "pr_leadtime",
-                            "width": 100,
-                        }]
                     }) ;   
 
                 }

+ 3 - 7
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -12,9 +12,9 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         name : "ft_code",
         fieldLabel : "单据编号",
     },{
-        xtype : "textfield",
-        name : "ft_recorder",
-        fieldLabel : "制单人",
+        xtype: 'textfield',
+        name: 'creatorName',
+        fieldLabel: '录入人'
     },{
         xtype : "textfield",
         name : "ft_auditman",
@@ -75,10 +75,6 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         xtype : "bandinfoDbfindTrigger",
         name : "ftd_inbankname",
         fieldLabel : "转入账号",
-    },{
-        xtype: 'textfield',
-        name: 'creatorName',
-        fieldLabel: '录入人'
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

+ 3 - 7
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -29,10 +29,10 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         xtype: 'customerDbfindTrigger',
         name: 'or_custname',
         fieldLabel: '客户名称',
-    }, {
+    },{
         xtype: 'textfield',
-        name: 'or_recorder',
-        fieldLabel: '制单人'
+        name: 'creatorName',
+        fieldLabel: '录入人'
     },{
         xtype: 'textfield',
         name: 'or_auditman',
@@ -76,10 +76,6 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         fieldLabel: '收入类别',
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
-    },{
-        xtype: 'textfield',
-        name: 'creatorName',
-        fieldLabel: '录入人'
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

+ 3 - 7
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -29,10 +29,10 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         xtype: 'vendorDbfindTrigger',
         name: 'os_vendname',
         fieldLabel: '供应商名称'
-    }, {
+    },{
         xtype: 'textfield',
-        name: 'os_recorder',
-        fieldLabel: '制单人',
+        name: 'creatorName',
+        fieldLabel: '录入人'
     }, {
         xtype: 'hidden',
         name: 'os_auditman',
@@ -75,10 +75,6 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         fieldLabel: '支出类别',
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
-    },{
-        xtype: 'textfield',
-        name: 'creatorName',
-        fieldLabel: '录入人'
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

+ 31 - 5
frontend/saas-web/app/view/money/report/AccountBalance.js

@@ -7,15 +7,15 @@ Ext.define('saas.view.money.report.AccountBalance', {
 
     viewName: 'money-report-accountbalance',
 
-    groupField: null,
+    groupField: 'bankname',
     listUrl: '/api/money/report/accountBalance',
     defaultCondition: null,
-    reportTitle: '资金账户收支明细',
+    reportTitle: '资金账户余额表',
     QueryWidth:0.25,
     //筛选:账户、日期(必填)
     searchItems: [ {
         xtype: 'bandinfoDbfindTrigger',
-        name: 'bankcode',
+        name: 'bankname',
         fieldLabel: '账户名称',
         columnWidth: 0.25
     }, {
@@ -44,11 +44,37 @@ Ext.define('saas.view.money.report.AccountBalance', {
         },{
             text:'收入',
             dataIndex:'outamount',
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
         },{
             text:'支出',
             dataIndex:'thisamount',
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
         },{
             text: '账户余额',
             dataIndex: 'pr_code',

+ 14 - 14
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     caller:'Purchase',
     
      //字段属性
-     _title:'采购单',
+     _title:'采购单',
      _idField: 'id',
      _codeField: 'pu_code',
      _statusField: 'pu_status',
@@ -139,19 +139,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     }                     
                     return v;    
                 }
-            },
-            {
-                text : "最小包装数", 
-                xtype: 'numbercolumn',
-                dataIndex : "pr_zxbzs",
-                align: 'end',
-                ignore:true,
-                renderer: function (v, m, r) {
-                    if(!v){
-                        return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null; 
-                    }                     
-                    return v; 
-                }
             },            
             {
                 text : "数量", 
@@ -293,6 +280,19 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     return Ext.util.Format.number(v, format);
                 }
             },
+            {
+                text : "最小包装数", 
+                xtype: 'numbercolumn',
+                dataIndex : "pr_zxbzs",
+                align: 'end',
+                ignore:true,
+                renderer: function (v, m, r) {
+                    if(!v){
+                        return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null; 
+                    }                     
+                    return v; 
+                }
+            },
             {
                 text : "关联销售单号", 
                 dataIndex : "pd_salecode", 

+ 21 - 16
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -85,11 +85,12 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
     queryGridConfig: {
         idField: 'pu_id',
         codeField: 'pu_code',
-        addTitle: '采购单',
+        addTitle: '采购单',
         addXtype: 'purchase-purchase-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/purchase/purchase/',
-        baseColumn: [{
+        baseColumn: [
+        {
             text: 'id',
             dataIndex: 'pu_id',
             width: 100,
@@ -164,7 +165,8 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             xtype: 'datecolumn',
             width: 0
         }],
-        relativeColumn: [{
+        relativeColumn: [
+        {
             text: 'id',
             dataIndex: 'pu_id',
             width: 100,
@@ -198,28 +200,31 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: '序号',
             dataIndex: 'pd_detno',
             xtype: 'numbercolumn',
-            width: 120
+            width: 120, 
+            renderer : function(v) {
+            return Ext.util.Format.number(v, '0');
+            }
         }, {
             text: '物料编号',
             dataIndex: 'pd_prodcode',
-            width: 120
+            width: 150
         },{
             text: '物料名称',
             dataIndex: 'pr_detail',
-            width: 120
+            width: 180
         }, {
             text: '物料规格',
             dataIndex: 'pr_spec',
-            width: 120
+            width: 180
         }, {
             text: '单位',
             dataIndex: 'pr_spec',
-            width: 120
+            width: 100
         },{
             text: '采购数量',
             dataIndex: 'pd_qty',
             xtype: 'numbercolumn',
-            width: 120,
+            width: 100,
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
@@ -235,18 +240,18 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: '单价',
             dataIndex: 'pd_price',
             xtype: 'numbercolumn',
-            width: 120,
+            width: 100,
             renderer : function(v) {
                 var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 8 ? 8 : arr[1].length)).fill('0');
+                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
-            },
+            }
         }, {
             text: '税率',
             dataIndex: 'pd_taxrate',
             xtype: 'numbercolumn',
-            width: 120,
+            width: 100,
             renderer : function(v) {
                 return Ext.util.Format.number(v, '0');
             },
@@ -254,18 +259,18 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: '金额',
             dataIndex: 'pd_total',
             xtype: 'numbercolumn',
-            width: 120,
+            width: 100,
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
-            },
+            }
         },{
             text: '备注',
             dataIndex: 'pu_remark',
             xtype: 'numbercolumn',
-            width: 120
+            width: 250
         }]
     }
 });

+ 10 - 10
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -53,7 +53,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         fieldLabel : "客户名称",
         allowBlank : false
     }, {
-        name : "pu_shipaddresscode", 
+        name : "sa_toplace", 
         editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/address/getCombo',
@@ -218,6 +218,15 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 renderer : function(v) {
                     return Ext.util.Format.number(v, '0');
                 }
+            },{
+                text : "交货日期", 
+                dataIndex : "sd_delivery", 
+                xtype:'datecolumn',
+                editor : {
+                    xtype : "datefield",
+                    editable : true, 
+                    hideTrigger : false
+                }
             },
             {
                 text : "含税金额", 
@@ -255,15 +264,6 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
-            },{
-                text : "交货日期", 
-                dataIndex : "sd_delivery", 
-                xtype:'datecolumn',
-                editor : {
-                    xtype : "datefield",
-                    editable : true, 
-                    hideTrigger : false
-                }
             },{
                 text : "关联采购订单", 
                 dataIndex : "sd_pucode",

+ 1 - 1
frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

@@ -126,7 +126,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
             text: '审核状态',

+ 1 - 1
frontend/saas-web/resources/json/navigation.json

@@ -5,7 +5,7 @@
         "text": "制单",
         "items": [{
             "id": "purchase",
-            "text": "采购单",
+            "text": "采购单",
             "addType": "purchase-purchase-formpanel",
             "viewType": "purchase-purchase-querypanel"
         }, {