Browse Source

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

zhuth 7 years ago
parent
commit
a9664a1fe3
28 changed files with 703 additions and 160 deletions
  1. 17 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PayablesdetailMapper.java
  2. 16 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/ReceivablesdetailMapper.java
  3. 175 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Payablesdetail.java
  4. 175 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Receivablesdetail.java
  5. 62 16
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/MoneyReportServiceImpl.java
  6. 1 1
      applications/money/money-server/src/main/resources/mapper/CustmonthMapper.xml
  7. 68 0
      applications/money/money-server/src/main/resources/mapper/PayablesdetailMapper.xml
  8. 67 0
      applications/money/money-server/src/main/resources/mapper/ReceivablesdetailMapper.xml
  9. 1 1
      applications/money/money-server/src/main/resources/mapper/VendmonthMapper.xml
  10. 13 0
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  11. 1 1
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  12. 1 1
      frontend/saas-portal-web/src/components/conenter/home.vue
  13. 0 25
      frontend/saas-portal-web/src/pages/cell/cell.html
  14. 0 0
      frontend/saas-portal-web/src/pages/cell/cell.js
  15. 0 15
      frontend/saas-portal-web/src/pages/cell/cell.vue
  16. BIN
      frontend/saas-portal-web/static/img/assets/1@2x.png
  17. BIN
      frontend/saas-portal-web/static/img/assets/2@3x.png
  18. BIN
      frontend/saas-portal-web/static/img/assets/3@2x.png
  19. BIN
      frontend/saas-portal-web/static/img/gongneng/Group 32.png
  20. BIN
      frontend/saas-portal-web/static/img/logo_w.png
  21. BIN
      frontend/saas-portal-web/static/img/qr-tech.png
  22. 1 0
      frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js
  23. 7 3
      frontend/saas-web/app/view/document/kind/ChildForm.js
  24. 1 1
      frontend/saas-web/app/view/document/product/BasePanel.js
  25. 19 43
      frontend/saas-web/app/view/money/report/PayDetail.js
  26. 22 38
      frontend/saas-web/app/view/money/report/RecDetail.js
  27. 36 15
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  28. 20 0
      frontend/saas-web/app/view/sale/sale/FormPanelController.js

+ 17 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PayablesdetailMapper.java

@@ -0,0 +1,17 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Payablesdetail;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+public interface PayablesdetailMapper {
+
+    List<Payablesdetail> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
+
+    Long selectIdByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    void callvend(Map<String, String> map);
+}

+ 16 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/ReceivablesdetailMapper.java

@@ -0,0 +1,16 @@
+package com.usoftchina.saas.money.mapper;
+
+import com.usoftchina.saas.money.po.Receivablesdetail;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ReceivablesdetailMapper {
+    List<Receivablesdetail> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
+    String selectCalculateFields(@Param("fields") String fields, @Param("con") String con, @Param("companyId") Long companyId);
+
+    Long selectIdByName(@Param("name") String name, @Param("companyId") Long companyId);
+
+    void callcust(Map<String, String> map);
+}

+ 175 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Payablesdetail.java

@@ -0,0 +1,175 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.Date;
+
+public class Payablesdetail {
+    private Integer pd_id;
+
+    private Integer pd_detno;
+
+    private Integer pd_vendid;
+
+    private String pd_vendcode;
+
+    private String pd_vendname;
+
+    private Date pd_date;
+
+    private String pd_code;
+
+    private String pd_kind;
+
+    private Integer pd_buyerid;
+
+    private String pd_buyername;
+
+    private Double pd_addpay;
+
+    private Double pd_addpre;
+
+    private Double pd_remain;
+
+    private Integer companyid;
+
+    private Integer pd_status;
+
+    private Integer pd_query;
+
+    private Integer pd_ym;
+
+    public Integer getPd_ym() {
+        return pd_ym;
+    }
+
+    public void setPd_ym(Integer pd_ym) {
+        this.pd_ym = pd_ym;
+    }
+
+    public Integer getPd_id() {
+        return pd_id;
+    }
+
+    public void setPd_id(Integer pd_id) {
+        this.pd_id = pd_id;
+    }
+
+    public Integer getPd_detno() {
+        return pd_detno;
+    }
+
+    public void setPd_detno(Integer pd_detno) {
+        this.pd_detno = pd_detno;
+    }
+
+    public Integer getPd_vendid() {
+        return pd_vendid;
+    }
+
+    public void setPd_vendid(Integer pd_vendid) {
+        this.pd_vendid = pd_vendid;
+    }
+
+    public String getPd_vendcode() {
+        return pd_vendcode;
+    }
+
+    public void setPd_vendcode(String pd_vendcode) {
+        this.pd_vendcode = pd_vendcode == null ? null : pd_vendcode.trim();
+    }
+
+    public String getPd_vendname() {
+        return pd_vendname;
+    }
+
+    public void setPd_vendname(String pd_vendname) {
+        this.pd_vendname = pd_vendname == null ? null : pd_vendname.trim();
+    }
+
+    public Date getPd_date() {
+        return pd_date;
+    }
+
+    public void setPd_date(Date pd_date) {
+        this.pd_date = pd_date;
+    }
+
+    public String getPd_code() {
+        return pd_code;
+    }
+
+    public void setPd_code(String pd_code) {
+        this.pd_code = pd_code == null ? null : pd_code.trim();
+    }
+
+    public String getPd_kind() {
+        return pd_kind;
+    }
+
+    public void setPd_kind(String pd_kind) {
+        this.pd_kind = pd_kind == null ? null : pd_kind.trim();
+    }
+
+    public Integer getPd_buyerid() {
+        return pd_buyerid;
+    }
+
+    public void setPd_buyerid(Integer pd_buyerid) {
+        this.pd_buyerid = pd_buyerid;
+    }
+
+    public String getPd_buyername() {
+        return pd_buyername;
+    }
+
+    public void setPd_buyername(String pd_buyername) {
+        this.pd_buyername = pd_buyername == null ? null : pd_buyername.trim();
+    }
+
+    public Double getPd_addpay() {
+        return pd_addpay;
+    }
+
+    public void setPd_addpay(Double pd_addpay) {
+        this.pd_addpay = pd_addpay;
+    }
+
+    public Double getPd_addpre() {
+        return pd_addpre;
+    }
+
+    public void setPd_addpre(Double pd_addpre) {
+        this.pd_addpre = pd_addpre;
+    }
+
+    public Double getPd_remain() {
+        return pd_remain;
+    }
+
+    public void setPd_remain(Double pd_remain) {
+        this.pd_remain = pd_remain;
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Integer getPd_status() {
+        return pd_status;
+    }
+
+    public void setPd_status(Integer pd_status) {
+        this.pd_status = pd_status;
+    }
+
+    public Integer getPd_query() {
+        return pd_query;
+    }
+
+    public void setPd_query(Integer pd_query) {
+        this.pd_query = pd_query;
+    }
+}

+ 175 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Receivablesdetail.java

@@ -0,0 +1,175 @@
+package com.usoftchina.saas.money.po;
+
+import java.util.Date;
+
+public class Receivablesdetail {
+    private Integer rd_id;
+
+    private Integer rd_detno;
+
+    private Integer rd_custid;
+
+    private String rd_custcode;
+
+    private String rd_custname;
+
+    private Date rd_date;
+
+    private String rd_code;
+
+    private String rd_kind;
+
+    private Integer rd_sellerid;
+
+    private String rd_sellername;
+
+    private Double rd_addrec;
+
+    private Double rd_addpre;
+
+    private Double rd_remain;
+
+    private Integer companyid;
+
+    private Integer rd_status;
+
+    private Integer rd_query;
+
+    private Integer rd_ym;
+
+    public Integer getRd_ym() {
+        return rd_ym;
+    }
+
+    public void setRd_ym(Integer rd_ym) {
+        this.rd_ym = rd_ym;
+    }
+
+    public Integer getRd_id() {
+        return rd_id;
+    }
+
+    public void setRd_id(Integer rd_id) {
+        this.rd_id = rd_id;
+    }
+
+    public Integer getRd_detno() {
+        return rd_detno;
+    }
+
+    public void setRd_detno(Integer rd_detno) {
+        this.rd_detno = rd_detno;
+    }
+
+    public Integer getRd_custid() {
+        return rd_custid;
+    }
+
+    public void setRd_custid(Integer rd_custid) {
+        this.rd_custid = rd_custid;
+    }
+
+    public String getRd_custcode() {
+        return rd_custcode;
+    }
+
+    public void setRd_custcode(String rd_custcode) {
+        this.rd_custcode = rd_custcode == null ? null : rd_custcode.trim();
+    }
+
+    public String getRd_custname() {
+        return rd_custname;
+    }
+
+    public void setRd_custname(String rd_custname) {
+        this.rd_custname = rd_custname == null ? null : rd_custname.trim();
+    }
+
+    public Date getRd_date() {
+        return rd_date;
+    }
+
+    public void setRd_date(Date rd_date) {
+        this.rd_date = rd_date;
+    }
+
+    public String getRd_code() {
+        return rd_code;
+    }
+
+    public void setRd_code(String rd_code) {
+        this.rd_code = rd_code == null ? null : rd_code.trim();
+    }
+
+    public String getRd_kind() {
+        return rd_kind;
+    }
+
+    public void setRd_kind(String rd_kind) {
+        this.rd_kind = rd_kind == null ? null : rd_kind.trim();
+    }
+
+    public Integer getRd_sellerid() {
+        return rd_sellerid;
+    }
+
+    public void setRd_sellerid(Integer rd_sellerid) {
+        this.rd_sellerid = rd_sellerid;
+    }
+
+    public String getRd_sellername() {
+        return rd_sellername;
+    }
+
+    public void setRd_sellername(String rd_sellername) {
+        this.rd_sellername = rd_sellername == null ? null : rd_sellername.trim();
+    }
+
+    public Double getRd_addrec() {
+        return rd_addrec;
+    }
+
+    public void setRd_addrec(Double rd_addrec) {
+        this.rd_addrec = rd_addrec;
+    }
+
+    public Double getRd_addpre() {
+        return rd_addpre;
+    }
+
+    public void setRd_addpre(Double rd_addpre) {
+        this.rd_addpre = rd_addpre;
+    }
+
+    public Double getRd_remain() {
+        return rd_remain;
+    }
+
+    public void setRd_remain(Double rd_remain) {
+        this.rd_remain = rd_remain;
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Integer getRd_status() {
+        return rd_status;
+    }
+
+    public void setRd_status(Integer rd_status) {
+        this.rd_status = rd_status;
+    }
+
+    public Integer getRd_query() {
+        return rd_query;
+    }
+
+    public void setRd_query(Integer rd_query) {
+        this.rd_query = rd_query;
+    }
+}

+ 62 - 16
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/MoneyReportServiceImpl.java

@@ -28,9 +28,9 @@ public class MoneyReportServiceImpl implements MoneyReportService {
     @Autowired
     private VendorAcountViewMapper vendorAcountViewMapper;
     @Autowired
-    private PaydetailViewMapper paydetailViewMapper;
+    private PayablesdetailMapper payablesdetailMapper;
     @Autowired
-    private RecdetailViewMapper recdetailViewMapper;
+    private ReceivablesdetailMapper receivablesdetailMapper;
     @Autowired
     private AcountbalanceViewMapper acountbalanceViewMapper;
     @Autowired
@@ -93,6 +93,8 @@ public class MoneyReportServiceImpl implements MoneyReportService {
     }
 
     private Map<String, Object> getListDATA(@PageDefault(size = 10) PageRequest page, ListReqDTO req, String type) {
+
+        //调用存储过程
         if ("custormonthdetails".equals(type)){
             Map map1 = this.getYm(req.getCondition());
             Map<String, Integer> map = new HashMap();
@@ -107,6 +109,35 @@ public class MoneyReportServiceImpl implements MoneyReportService {
             map.put("v_YearMonthTo", Integer.valueOf((String) map1.get("yearmonthTo")));
             map.put("v_companyid",  Math.toIntExact(BaseContextHolder.getCompanyId()));
             vendmonthMapper.callVend(map);
+        }else if ("payDetail".equals(type)){
+            Map<String, String> maps = new HashMap<>();
+            Map<String, String> map = this.getIdAndDate(req.getCondition());
+            Long custid = new Long(0);
+            if (map.get("name") == null) {
+                custid = new Long(0);
+            }else {
+                custid = payablesdetailMapper.selectIdByName(map.get("name"), BaseContextHolder.getCompanyId());
+            }
+            maps.put("V_vendid", String.valueOf(custid));
+            maps.put("V_start", map.get("yearmonth"));
+            maps.put("V_end", map.get("yearmonthTo"));
+            maps.put("v_companyid", String.valueOf(BaseContextHolder.getCompanyId()));
+            payablesdetailMapper.callvend(maps);
+
+        }else if("recDetail".equals(type)){
+            Map<String, String> maps = new HashMap<>();
+            Map<String, String> map = this.getIdAndDate(req.getCondition());
+            Long custid = new Long(0);
+            if (map.get("name") == null) {
+                custid = new Long(0);
+            }else {
+                custid = receivablesdetailMapper.selectIdByName(map.get("name"), BaseContextHolder.getCompanyId());
+            }
+            maps.put("V_custid", String.valueOf(custid));
+            maps.put("V_start", map.get("yearmonth"));
+            maps.put("V_end", map.get("yearmonthTo"));
+            maps.put("v_companyid", String.valueOf(BaseContextHolder.getCompanyId()));
+            receivablesdetailMapper.callcust(maps);
         }
 
       /*  //设置默认分页
@@ -169,14 +200,14 @@ public class MoneyReportServiceImpl implements MoneyReportService {
                 }
             }
         } else if("payDetail".equals(type)){
-            list = paydetailViewMapper.selectByCondition(con, companyId);
+            list = payablesdetailMapper.selectByCondition(con, companyId);
             if (!StringUtils.isEmpty(calculateFieldsSql)) {
-                res = paydetailViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+                res = payablesdetailMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
             }
         }else if("recDetail".equals(type)){
-            list = recdetailViewMapper.selectByCondition(con, companyId);
+            list = receivablesdetailMapper.selectByCondition(con, companyId);
             if (!StringUtils.isEmpty(calculateFieldsSql)) {
-                res = recdetailViewMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+                res = receivablesdetailMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
             }
         }else if ("acountBalance".equals(type)){
             list = acountbalanceViewMapper.selectByCondition(con, companyId);
@@ -271,23 +302,38 @@ public class MoneyReportServiceImpl implements MoneyReportService {
             StringBuffer finalCondition = new StringBuffer();
             for (int i = 0; i < jsonArray.size(); i++) {
                 JSONObject jsonObject = (JSONObject) jsonArray.get(i);
-//
-//                String yearmonth = "yearmonth";
-//                String yearmonthTo = "yearmonthTo";
-//                if (st.equals("vend")){
-//                    yearmonth = "vm_" + yearmonth;
-//                    yearmonthTo = "vm_" + yearmonthTo;
-//                }else if (st.equals("cust")){
-//                    yearmonth = "cm_" + yearmonth;
-//                    yearmonthTo = "cm_" + yearmonthTo;
-//                }
+                String type = (String) jsonObject.get("type");
+                if ("date".equals(type)) {
                     String value = (String) jsonObject.get("value");
                     String[] arr = value.split(",");
                     map.put("yearmonth", arr[0]);
                     map.put("yearmonthTo", arr[1]);
+                }
             }
         }
         System.out.println("map:" + map);
         return map;
     }
+
+    public Map<String, String> getIdAndDate(String cons){
+        JSONArray jsonArray = JSONArray.parseArray(cons);
+        Map<String, String> map = new HashMap<>();
+        if (null != jsonArray && jsonArray.size() > 0) {
+            StringBuffer finalCondition = new StringBuffer();
+            for (int i = 0; i < jsonArray.size(); i++) {
+                JSONObject jsonObject = (JSONObject) jsonArray.get(i);
+                String type = (String) jsonObject.get("type");
+                if ("string".equals(type)){
+                    String value = (String) jsonObject.get("value");
+                    map.put("name", value);
+                }else if ("date".equals(type)){
+                    String value = (String) jsonObject.get("value");
+                    String[] arr = value.split(",");
+                    map.put("yearmonth", arr[0]);
+                    map.put("yearmonthTo", arr[1]);
+                }
+            }
+        }
+        return map;
+    }
 }

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/CustmonthMapper.xml

@@ -25,7 +25,7 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyId = #{companyId}
+        and  companyId = #{companyId} and (cm_endamount +cm_nowamount+ cm_nowpreamount + cm_beginamount) != 0
       </if>
     </where>
     order by cm_id desc, cm_yearmonth desc

+ 68 - 0
applications/money/money-server/src/main/resources/mapper/PayablesdetailMapper.xml

@@ -0,0 +1,68 @@
+<?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.money.mapper.PayablesdetailMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Payablesdetail" >
+    <id column="pd_id" property="pd_id" jdbcType="INTEGER" />
+    <result column="pd_detno" property="pd_detno" jdbcType="INTEGER" />
+    <result column="pd_vendid" property="pd_vendid" jdbcType="INTEGER" />
+    <result column="pd_vendcode" property="pd_vendcode" jdbcType="VARCHAR" />
+    <result column="pd_vendname" property="pd_vendname" jdbcType="VARCHAR" />
+    <result column="pd_date" property="pd_date" jdbcType="DATE" />
+    <result column="pd_code" property="pd_code" jdbcType="VARCHAR" />
+    <result column="pd_kind" property="pd_kind" jdbcType="VARCHAR" />
+    <result column="pd_buyerid" property="pd_buyerid" jdbcType="INTEGER" />
+    <result column="pd_buyername" property="pd_buyername" jdbcType="VARCHAR" />
+    <result column="pd_addpay" property="pd_addpay" jdbcType="DOUBLE" />
+    <result column="pd_addpre" property="pd_addpre" jdbcType="DOUBLE" />
+    <result column="pd_remain" property="pd_remain" jdbcType="DOUBLE" />
+    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+    <result column="pd_status" property="pd_status" jdbcType="INTEGER" />
+    <result column="pd_query" property="pd_query" jdbcType="INTEGER" />
+    <result column="pd_ym" property="pd_ym" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    pd_id, pd_detno, pd_vendid, pd_vendcode, pd_vendname, pd_date, pd_code, pd_kind, 
+    pd_buyerid, pd_buyername, pd_addpay, pd_addpre, pd_remain, companyid, pd_status, 
+    pd_query,pd_ym
+  </sql>
+
+  <select id="selectByCondition" resultMap="BaseResultMap">
+    select  *  from payablesdetail
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId} and pd_query =1
+      </if>
+    </where>
+    order by pd_vendname asc, pd_detno desc, pd_date desc
+  </select>
+
+  <select id="selectCalculateFields" resultType="string">
+    select   ${fields}  from payablesdetail
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+  </select>
+
+  <select id="selectIdByName" resultType="long">
+    select ve_id from vendor where vc_name=#{name} and companyId=#{companyId}
+  </select>
+
+  <parameterMap id="ymParamMap" type="java.util.Map">
+    <parameter property="V_vendid" jdbcType="INTEGER" mode="IN" />
+    <parameter property="V_start" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="V_end" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_companyid" jdbcType="INTEGER" mode="IN" />
+  </parameterMap>
+  <select id="callvend" parameterMap="ymParamMap" statementType="CALLABLE">
+        CALL SP_PAYABLESDETAIL_QUERY(?, ?, ?, ?)
+    </select>
+
+</mapper>

+ 67 - 0
applications/money/money-server/src/main/resources/mapper/ReceivablesdetailMapper.xml

@@ -0,0 +1,67 @@
+<?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.money.mapper.ReceivablesdetailMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Receivablesdetail" >
+    <id column="rd_id" property="rd_id" jdbcType="INTEGER" />
+    <result column="rd_detno" property="rd_detno" jdbcType="INTEGER" />
+    <result column="rd_custid" property="rd_custid" jdbcType="INTEGER" />
+    <result column="rd_custcode" property="rd_custcode" jdbcType="VARCHAR" />
+    <result column="rd_custname" property="rd_custname" jdbcType="VARCHAR" />
+    <result column="rd_date" property="rd_date" jdbcType="DATE" />
+    <result column="rd_code" property="rd_code" jdbcType="VARCHAR" />
+    <result column="rd_kind" property="rd_kind" jdbcType="VARCHAR" />
+    <result column="rd_sellerid" property="rd_sellerid" jdbcType="INTEGER" />
+    <result column="rd_sellername" property="rd_sellername" jdbcType="VARCHAR" />
+    <result column="rd_addrec" property="rd_addrec" jdbcType="DOUBLE" />
+    <result column="rd_addpre" property="rd_addpre" jdbcType="DOUBLE" />
+    <result column="rd_remain" property="rd_remain" jdbcType="DOUBLE" />
+    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+    <result column="rd_status" property="rd_status" jdbcType="INTEGER" />
+    <result column="rd_query" property="rd_query" jdbcType="INTEGER" />
+    <result column="rd_ym" property="rd_ym" jdbcType="INTEGER" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    rd_id, rd_detno, rd_custid, rd_custcode, rd_custname, rd_date, rd_code, rd_kind, 
+    rd_sellerid, rd_sellername, rd_addrec, rd_addpre, rd_remain, companyid, rd_status, 
+    rd_query,rd_ym
+  </sql>
+
+  <select id="selectByCondition" resultMap="BaseResultMap">
+    select  *  from receivablesdetail
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId} and rd_query = 1
+      </if>
+    </where>
+    order by rd_custname asc, rd_detno desc, rd_date desc
+  </select>
+
+  <select id="selectCalculateFields" resultType="string">
+    select   ${fields}  from receivablesdetail
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+  </select>
+
+  <select id="selectIdByName" resultType="long">
+    select cu_id from customer where cu_name=#{name} and companyId=#{companyId}
+  </select>
+
+  <parameterMap id="ymParamMap" type="java.util.Map">
+    <parameter property="V_custid" jdbcType="INTEGER" mode="IN" />
+    <parameter property="V_start" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="V_end" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_companyid" jdbcType="INTEGER" mode="IN" />
+  </parameterMap>
+  <select id="callcust" parameterMap="ymParamMap" statementType="CALLABLE">
+        CALL SP_RECEIVABLESDETAIL_QUERY(?, ?, ?, ?)
+    </select>
+</mapper>

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/VendmonthMapper.xml

@@ -25,7 +25,7 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyid = #{companyId}
+        and  companyid = #{companyId} and (vm_endamount+ vm_nowamount+vm_nowpreamount+vm_beginamount) != 0
       </if>
     </where>
     order by vm_id desc, vm_yearmonth desc

+ 13 - 0
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
@@ -252,6 +253,18 @@ public class AuthController {
             authorizeLogService.save(AuthorizeLog.from(request)
                     .setAccountId(accountDTO.getId())
                     .setAppId(appId).build());
+            //将cookies
+            Cookie[] cookies = request.getCookies();
+            Cookie ssoCookies = null;
+            for (Cookie cookie : cookies) {
+                if (cookieConfig.getName().equals(cookie.getName())) {
+                    ssoCookies = cookie;
+                    break;
+                }
+            }
+            if (null != ssoCookies) {
+                response.addCookie(ssoCookies);
+            }
             // 将登录信息推送到客户端
             if (!StringUtils.isEmpty(clientId)) {
                 Long companyId = null;

+ 1 - 1
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -130,7 +130,7 @@ import { setTimeout } from 'timers';
                 const frame = window.frames[window.frames.length - 1]
                 frame.postMessage('', '*')
                 Session.remove()
-                window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL=https://'+window.location.host
+                window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL='+window.location.origin
                 // this.$router.puth({path:'/home'})
             },
             //修改密码

+ 1 - 1
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -345,7 +345,7 @@
         const frame = window.frames[window.frames.length - 1]
         frame.postMessage('', '*')
         Session.remove()
-        window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL=https://'+window.location.host
+        window.location.href=this.$url.sso+'/logquit?appId=sp&returnURL='+window.location.origin
         //this.$router.go(0);
       },
       // 关闭窗口

+ 0 - 25
frontend/saas-portal-web/src/pages/cell/cell.html

@@ -1,25 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>Document</title>
-</head>
-<body>
-    <div id="app">hello</div>
-    <script>
-        // iframe接收消息
-        window.addEventListener('message', function(e) {
-            if (e.data == 'removeToken') {
-                if (e.source != window.parent) {
-                    return;
-                }
-                var storeKey = 'app-state-session';
-                localStorage.removeItem(storeKey);
-                window.parent.postMessage("success", "*");
-            }
-        });
-    </script>
-</body>
-</html>

+ 0 - 0
frontend/saas-portal-web/src/pages/cell/cell.js


+ 0 - 15
frontend/saas-portal-web/src/pages/cell/cell.vue

@@ -1,15 +0,0 @@
-<template>
-    <div>
-
-    </div>
-</template>
-
-<script>
-    export default {
-        
-    }
-</script>
-
-<style scoped>
-
-</style>

BIN
frontend/saas-portal-web/static/img/assets/1@2x.png


BIN
frontend/saas-portal-web/static/img/assets/2@3x.png


BIN
frontend/saas-portal-web/static/img/assets/3@2x.png


BIN
frontend/saas-portal-web/static/img/gongneng/Group 32.png


BIN
frontend/saas-portal-web/static/img/logo_w.png


BIN
frontend/saas-portal-web/static/img/qr-tech.png


+ 1 - 0
frontend/saas-web/app/view/core/dbfind/types/WarehouseDbfindTrigger.js

@@ -55,6 +55,7 @@ Ext.define('saas.view.core.dbfind.types.WarehouseDbfindTrigger', {
             bind: {
                 title: '新增仓库资料'
             },
+            _parent:this,
             caller:'WareHouse',
             session: true
         });

+ 7 - 3
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -24,7 +24,7 @@ Ext.define('saas.view.document.kind.ChildForm', {
                 codeField = item.name
             }
           });
-          if(count!=0&&count<4){
+          if(count!=0&&count<6){
             w.setHeight(114+40*count)
           }
           if(w.record){
@@ -208,9 +208,13 @@ Ext.define('saas.view.document.kind.ChildForm', {
         .then(function(localJson) {
             me.setLoading(false);
             if(localJson.success){
-                var grid = form.ownerCt._parent ? form.ownerCt._parent.lookup('document-kind-Grid') : null;
+                var grid = form.ownerCt._parent;
                 if(grid){
-                    grid.store.load();
+                    if(form.ownerCt._parent.lookup('document-kind-Grid')!=null){
+                        form.ownerCt._parent.lookup('document-kind-Grid').store.load()
+                    }else{
+                        grid.store.load();
+                    }
                 }
                 if(relativeField&&relativeValue&&form.ownerCt._parent){
                     var grid = form.ownerCt._parent.down('grid');

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.document.product.BasePanel', {
         width:300, 
         emptyText:'输入物料编号、名称、型号、规格或品牌',
         getCondition: function (v) {
-            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_spec,''),'#',ifnull(pr_orispeccode,'')'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
+            return "(upper(CONCAT(pr_code,'#',pr_detail,'#',ifnull(pr_spec,''),'#',ifnull(pr_orispeccode,''),'#',ifnull(pr_brand,''))) like '%" + v.toUpperCase() + "%' )";
         },
     },{
         editable:true,

+ 19 - 43
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -6,7 +6,7 @@ Ext.define('saas.view.money.report.PayDetail', {
     viewModel: 'money-report-paydetail',
     viewName: 'money-report-paydetail',
 
-    groupField:'pi_vendname',
+    groupField:'pd_vendname',
     listUrl: '/api/money/report/payDetail',
     defaultCondition: null,
     reportTitle: '应付账款明细表',
@@ -14,12 +14,12 @@ Ext.define('saas.view.money.report.PayDetail', {
     //筛选:供应商、日期(必填)
     searchItems: [ {
         xtype: 'vendorDbfindTrigger',
-        name: 'pi_vendname',
+        name: 'pd_vendname',
         fieldLabel: '供应商名称',
         columnWidth: 0.25
     }, {
         xtype: 'conmonthfield',
-        name: 'pb_date',
+        name: 'pd_ym',
         fieldLabel: '单据日期',
         columnWidth: 0.5
     }],
@@ -27,35 +27,39 @@ Ext.define('saas.view.money.report.PayDetail', {
     reportColumns: [
         {
             text: 'id',
-            dataIndex: 'pi_id',
+            dataIndex: 'pd_id',
             hidden: true
         }, {
             text: '单据日期',
             xtype: 'datecolumn',
-            dataIndex: 'pb_date',
+            dataIndex: 'pd_date',
             width: 110
         }, {
             text: '单号',
-            dataIndex: 'pi_inoutno',
+            dataIndex: 'pd_code',
             width: 150
+        }, {
+            text: '单据类型',
+            dataIndex: 'pd_kind',
+            width: 110
         }, {
             text:'供应商编号',
-            dataIndex:'pi_vendcode',
+            dataIndex:'pd_vendcode',
             width: 150,
             hidden: true
         },{
             text:'供应商名称',
             width: 200,
-            dataIndex:'pi_vendname',
+            dataIndex:'pd_vendname',
             hidden: true
         },{
             text: '采购员',
-            dataIndex: 'pu_buyercode',
+            dataIndex: 'pd_buyername',
             width: 110
         },{
-            text: '期初应付余额',
+            text: '增加应付',
             xtype: 'numbercolumn',
-            dataIndex: 've_beginapamount',
+            dataIndex: 'pd_addpay',
             xtype: 'numbercolumn',
             width: 180,
             renderer : function(v) {
@@ -72,9 +76,9 @@ Ext.define('saas.view.money.report.PayDetail', {
                 return Ext.util.Format.number(v, format);
             }
         }, {
-            text: '本期付款金额',
+            text: '增加预付',
             xtype: 'numbercolumn',
-            dataIndex: 'pb_pdamount',
+            dataIndex: 'pd_addpre',
             xtype: 'numbercolumn',
             width: 180,
             renderer : function(v) {
@@ -93,7 +97,7 @@ Ext.define('saas.view.money.report.PayDetail', {
         }, {
             text: '应付余额',
             xtype: 'numbercolumn',
-            dataIndex: 'mustpay',
+            dataIndex: 'pd_remain',
             xtype: 'numbercolumn',
             width: 110,
             renderer : function(v) {
@@ -109,37 +113,9 @@ Ext.define('saas.view.money.report.PayDetail', {
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
             }
-        }, {
-            text: '应付日期',
-            xtype: 'datecolumn',
-            dataIndex: 'mustdate',
-            width: 110
-        }, {
-            text: '单据总金额',
-            xtype: 'numbercolumn',
-            width: 110,
-            dataIndex: 'pi_total',
-            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: 'pi_remark',
-            width: 250
         }, {
             text: '供应商名称',
-            dataIndex: 'pi_vendname',
+            dataIndex: 'pd_vendname',
             hidden:true
         }]
 });

+ 22 - 38
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -7,7 +7,7 @@ Ext.define('saas.view.money.report.RecDetail', {
 
     viewName: 'money-report-recdetail',
 
-    groupField: 'pi_custname',
+    groupField: 'rd_custname',
     listUrl: '/api/money/report/recDetail',
     defaultCondition: null,
     reportTitle: '应收账款明细',
@@ -15,12 +15,12 @@ Ext.define('saas.view.money.report.RecDetail', {
     //筛选:客户、日期(必填)
     searchItems: [ {
         xtype: 'customerDbfindTrigger',
-        name: 'pi_custname',
+        name: 'rd_custname',
         fieldLabel: '客户名称',
         columnWidth: 0.25
     }, {
         xtype: 'conmonthfield',
-        name: 'rb_date',
+        name: 'rd_ym',
         fieldLabel: '单据日期',
         columnWidth: 0.5
     }],
@@ -28,13 +28,22 @@ Ext.define('saas.view.money.report.RecDetail', {
     reportColumns: [
         {
             text: 'id',
-            dataIndex: 'pi_id',
+            dataIndex: 'rd_id',
             hidden: true
+        }, {
+            text: '单据日期',
+            xtype: 'datecolumn',
+            dataIndex: 'rd_date',
+            width: 110
         }, {
             text: '单号',
-            dataIndex: 'pi_inoutno',
+            dataIndex: 'rd_code',
             width: 150
         }, {
+            text: '单据类型',
+            dataIndex: 'rd_kind',
+            width: 110
+        },{
             text: '客户编号',
             dataIndex: 'pi_custcode',
             width: 150,
@@ -44,28 +53,19 @@ Ext.define('saas.view.money.report.RecDetail', {
             dataIndex: 'pi_custname',
             width: 200,
             hidden: true
-        },{
-            text: '单据类型',
-            dataIndex: 'pi_class',
-            width: 110
         },{
             text: '业务员',
-            dataIndex: 'pu_buyername',
-            width: 110
-        }, {
-            text: '单据日期',
-            xtype: 'datecolumn',
-            dataIndex: 'rb_date',
+            dataIndex: 'rd_sellername',
             width: 110
         }, {
             text: '序号',
-            dataIndex: 'pd_pdno',
+            dataIndex: 'rd_detno',
             xtype: 'numbercolumn',
             width: 80,
             hidden: true
         },{
-            text:'期初应收',
-            dataIndex:'cu_beginaramount',
+            text:'增加应收',
+            dataIndex:'rd_addrec',
             xtype: 'numbercolumn',
             width: 110,
             renderer : function(v) {
@@ -82,9 +82,9 @@ Ext.define('saas.view.money.report.RecDetail', {
                 return Ext.util.Format.number(v, format);
             }
         },{
-            text:'本期收款金额',
+            text:'增加预收',
             xtype: 'numbercolumn',
-            dataIndex:'rb_rdamount',
+            dataIndex:'rd_addpre',
             xtype: 'numbercolumn',
             width: 180,
             renderer : function(v) {
@@ -103,7 +103,7 @@ Ext.define('saas.view.money.report.RecDetail', {
         },{
             text: '应收余额',
             xtype: 'numbercolumn',
-            dataIndex: 'mustpay',
+            dataIndex: 'rd_remain',
             xtype: 'numbercolumn',
             width: 110,
             renderer : function(v) {
@@ -119,25 +119,9 @@ Ext.define('saas.view.money.report.RecDetail', {
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
             }
-        }, {
-            text: '单据总金额',
-            dataIndex: 'pi_total',
-            xtype: 'numbercolumn',
-            width: 110,
-            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: 'pd_unit',
-            width: 250
         }, {
             text: '客户名称',
-            dataIndex: 'pi_custname',
+            dataIndex: 'rd_custname',
             hidden:true
         }]
 });

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

@@ -47,24 +47,45 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 allowBlank : false
             }, {
                 name : "sa_toplace", 
-                xtype : "textfield", 
+                xtype : "remotecombo", 
                 fieldLabel : "交货地址", 
+                editable:false,
                 allowBlank : false, 
                 columnWidth : 0.5,
-                hiddenBtn:false,//true 则会关闭新增按钮功能
-                addHandler:function(b){
-                    var form = this.ownerCmp.ownerCt;
-                    this.dialog = form.add({
-                        xtype: 'document-address-window',
-                        bind: {
-                            title: '新增交货地址'
-                        },
-                        _parent:form,
-                        _combo:this.ownerCmp,
-                        record:null,
-                        session: true
-                    });
-                    this.dialog.show();
+                storeUrl:'/api/document/customer/getAddressCombo',
+                hiddenBtn:true,//true 则会关闭新增按钮功能
+                setValue:function(value){
+                    var me = this,bind, valueBind;
+                    if(value&&value!=''){
+                        me.setDisabled(false);
+                    }else{
+                        me.setDisabled(true);
+                    }
+                    if (me.hasFocus) {
+                        bind = me.getBind();
+                        valueBind = bind && bind.value;
+                        if (valueBind && valueBind.syncing) {
+                            if ((Ext.isEmpty(value) && Ext.isEmpty(me.value)) || value === me.value) {
+                                return me;
+                            } else if (Ext.isArray(value) && Ext.isArray(me.value) && Ext.Array.equals(value, me.value)) {
+                                return me;
+                            }
+                        }
+                    } else {
+                        me.lastSelectedRecords = null;
+                    }
+            
+                    if (value != null) {
+                        me.doSetValue(value);
+                    }
+                    else {
+                        me.suspendEvent('select');
+                        me.valueCollection.beginUpdate();
+                        me.pickerSelectionModel.deselectAll();
+                        me.valueCollection.endUpdate();
+                        me.resumeEvent('select');
+                    }
+                    return me;
                 }
             }, {
                 name : "detailGridField", 

+ 20 - 0
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -69,6 +69,26 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                     });
 
                 }
+            },
+            'remotecombo[name=sa_toplace]':{
+                focus:function(f){
+                    //获取客户ID
+                    var sa_custid = f.ownerCt.down('[name=sa_custid]').value;
+                    if(sa_custid&&sa_custid!=""){
+                        Ext.apply(f.store.proxy.extraParams, {
+                            id:sa_custid
+                        });
+                        f.store.load();
+                    }else{
+                        saas.util.BaseUtil.showErrorToast('请先选择客户后在维护交货地址');
+                        f.setDisabled(true);
+                    }
+                },
+                expand:function(f){
+                    if(f.picker&&f.isExpanded){
+                        f.picker.setHeight(33*f.store.getCount())
+                    }
+                }
             }
         });