Browse Source

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

hy 7 years ago
parent
commit
00548c6052
30 changed files with 327 additions and 128 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 2 2
      applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties
  3. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java
  4. 3 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  5. 1 1
      applications/document/document-server/src/main/resources/mapper/BomMapper.xml
  6. 1 1
      applications/money/money-server/src/main/resources/mapper/AcountbalanceViewMapper.xml
  7. 7 0
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  8. 2 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  9. 102 60
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  10. 56 2
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  11. 1 1
      frontend/saas-web/app/view/core/dbfind/types/EmployeeDbfindTrigger.js
  12. 2 0
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  13. 0 5
      frontend/saas-web/app/view/core/report/ReportPanel.js
  14. 1 1
      frontend/saas-web/app/view/document/bom/FormPanel.js
  15. 3 0
      frontend/saas-web/app/view/document/product/BasePanel.js
  16. 0 1
      frontend/saas-web/app/view/document/product/FormPanel.js
  17. 4 4
      frontend/saas-web/app/view/home/InfoCard.js
  18. 9 2
      frontend/saas-web/app/view/home/charts/MonthSale.js
  19. 1 0
      frontend/saas-web/app/view/home/charts/MonthSale.scss
  20. 84 11
      frontend/saas-web/app/view/home/charts/SaleTrend.js
  21. 5 3
      frontend/saas-web/app/view/main/Main.js
  22. 14 14
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  23. 2 2
      frontend/saas-web/app/view/money/report/AccountBalance.js
  24. 7 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  25. 7 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  26. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  27. 3 1
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  28. 2 8
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  29. 4 1
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  30. 1 1
      frontend/saas-web/app/view/sys/feedback/FormPanel.js

+ 1 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -26,6 +26,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_UNAUDITED(79304,"只能反审核已审核的单据"),
     BIZ_DELETE(79305,"只能删除未审核的单据"),
     BIZ_RELDELETE(79305,"存在关联单据,不允许删除"),
+    BIZ_RELCLOSE(79305,"存在关联单据,不允许禁用"),
     BIZ_RELDELETE_UPDATE(79306,"存在关联单据,不允许更新编号"),
     BIZ_RELDELETE_UPDATEPROD(79307,"存在关联单据,不允许更新"),
     BIZ_RELDELETE_DELETEPROD(79308,"存在关联单据,不允许删除"),

+ 2 - 2
applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties

@@ -121,7 +121,7 @@ msg.endProdudct=\u7ed3\u8d26\u64cd\u4f5c
 msg.endProdudctSuccess=\u7ed3\u8d26\u6210\u529f
 msg.unEndProduct=\u53cd\u7ed3\u8d26\u64cd\u4f5c
 msg.unEndProductSuccess=\u53cd\u7ed3\u8d26\u6210\u529f
-msg.turnPurcCheckin=\u8F6C\u6570\u91C7\u8D2D\u9A8C\u6536\u5355\u64CD\u4F5C
-msg.turnPurcCheckinSuccess=\u8F6C\u6570\u91C7\u8D2D\u9A8C\u6536\u5355\u64CD\u4F5C\u6210\u529F
+msg.turnPurcCheckin=\u8F6C\u91C7\u8D2D\u9A8C\u6536\u5355\u64CD\u4F5C
+msg.turnPurcCheckinSuccess=\u8F6C\u91C7\u8D2D\u9A8C\u6536\u5355\u64CD\u4F5C\u6210\u529F
 msg.turnPurcCheckout=\u8F6C\u91C7\u8D2D\u9A8C\u9000\u5355\u64CD\u4F5C
 msg.turnPurcCheckoutSuccess=\u8F6C\u91C7\u8D2D\u9A8C\u9000\u5355\u64CD\u4F5C\u6210\u529F

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BomServiceImpl.java

@@ -187,7 +187,7 @@ public class BomServiceImpl extends CommonBaseServiceImpl<BomMapper, Bom> implem
             Long prodId = getMapper().selectByPrimaryKey(id).getBo_motherid();
             int count = getMapper().getCountFromMake(prodId);
             if (count > 0){
-                throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+                throw new BizException(BizExceptionCode.BIZ_RELCLOSE);
             }
 
             Bom bom = new Bom();

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

@@ -121,11 +121,12 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             if (!product.getPr_code().equals(oldCode)){
                 validEnableUpdateCode(product.getId());
             }
-            //物料发生过除库存初始化外的出入库单时,不能新增,修改,删除
-            validProductOperation(product.getId(), BizExceptionCode.BIZ_RELDELETE_UPDATEPROD);
 
             //明细数据有更新/插入动作
             if (productDetailList.size() > 0){
+                //物料发生过除库存初始化外的出入库单时,不能新增,修改,删除
+                validProductOperation(product.getId(), BizExceptionCode.BIZ_RELDELETE_UPDATEPROD);
+
                 //找到原始单据,反过账并删除
                 String inoutCode = getMapper().selectProdIOCode(product.getPr_code(), BaseContextHolder.getCompanyId(), "库存初始化");
                 if (!StringUtils.isEmpty(inoutCode)) {

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/BomMapper.xml

@@ -273,7 +273,7 @@
     </where>
     ORDER BY BO_ID DESC
   </select>
-    <select id="getCountFromMake" parameterType="java.lang.Long">
+    <select id="getCountFromMake" parameterType="java.lang.Long" resultType="int">
         SELECT COUNT(*) FROM MAKE WHERE MA_PRODID = #{id}
     </select>
 </mapper>

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

@@ -27,7 +27,7 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by date, bankid desc
+    order by bankname, date, bankid desc
   </select>
 
 </mapper>

+ 7 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -752,6 +752,13 @@
     where pd_piid=#{id} order by pd_pdno
   </select>
 
+  <update id="updateSaleYqty" parameterType="long">
+    update saledetail a set a.sd_yqty =IFNULL( ( select b.pd_outqty from (
+    select pd_sdid,sum(pd_outqty) pd_outqty from prodiodetail left join
+    prodinout on pd_piid = pi_id where pd_piclass='出货单' and pi_said=#{id}
+    GROUP BY pd_sdid) b where IFNULL(b.pd_sdid ,0) = a.sd_id ),0) where a.sd_said =#{id}
+  </update>
+
   <update id="updatePDSaleIN" parameterType="long">
    update prodiodetail set
    pd_ordertotal=round(IFNULL(pd_inqty,0)*IFNULL(pd_sendprice,0),2),

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

@@ -2,6 +2,7 @@ package com.usoftchina.saas.storage.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.storage.po.Make;
+import com.usoftchina.saas.storage.po.ProdInOut;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -27,7 +28,7 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
 
     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);
+    ProdInOut selectMakeInOutCode(@Param("code") String code, @Param("companyId") Long companyId, @Param("type") String type);
 
     void updateCreator(@Param("userId") Long userId,@Param("userName") String userName,@Param("id") Long ma_id);
 }

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

@@ -2,6 +2,7 @@ package com.usoftchina.saas.storage.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.CommonService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
@@ -295,8 +296,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
         String ma_statuscode = make.getMa_statuscode();
         if(StringUtils.isEmpty(ma_statuscode)||(!StringUtils.isEmpty(ma_statuscode)&&!ma_statuscode.equals(Status.UNAUDITED.name()))){
             throw  new BizException(BizExceptionCode.BIZ_AUDITED);
-        };
-
+        }
         //2.校验库存是否足够
         validStorage(makeListDTO);
         //3.生成  完工入库单和领料单 并 过账
@@ -347,12 +347,14 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * 2.过账
      * @param makeListDTO
      */
+
     @Transactional(rollbackFor = Exception.class)
     public void generateProdIO(MakeListDTO makeListDTO) {
         Make make = makeListDTO.getMain();
         Long ma_id = make.getId();
         List<MakeMaterial> items = makeListDTO.getItems();
-
+        Result res = null;
+        Object result =  null;
         if ("组装".equals(make.getMa_type())){
             /** 1.生产领料单 **/
             //a.主表
@@ -361,7 +363,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             String code = maxnumberService.getMaxnumber("MakeOut", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -399,7 +400,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
                 prodIODetailList.add(prodIODetail);
             }
             prodIODetailMapper.batchInsert(prodIODetailList);
-
             //c.领料单过账
             Map<String, Object> map = new HashMap<String, Object>();
             map.put("inoutNo", code);
@@ -407,14 +407,14 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76201, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                throw new BizException(76201, result.toString());
             }
-
             //重新获取更新后的工单
             make = getMapper().selectByPrimaryKey(ma_id);
-
             /** 2.完工入库单 **/
             //a.主表
             prodInOut = new ProdInOut();
@@ -422,7 +422,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             code = maxnumberService.getMaxnumber("MakeIn", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -455,15 +454,17 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             prodIODetail.setCompanyId(BaseContextHolder.getCompanyId());    //公司ID
             prodIODetail.setPd_status(0);      //单据状态
             prodIODetailMapper.insertSelective(prodIODetail);
-
             map.put("inoutNo", code);
             map.put("class", "完工入库单");
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76201, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                unPostMakeIn(make);
+                throw new BizException(76201, result.toString());
             }
         }else if ("拆件".equals(make.getMa_type())){
             /** 1.拆件领料单 **/
@@ -473,8 +474,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             String code = maxnumberService.getMaxnumber("MakeOut", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-            //prodInOut.setPi_total(make.getMa_price());
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -514,9 +513,11 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76201, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                throw new BizException(76201, result.toString());
             }
 
             //重新获取更新后的工单
@@ -533,7 +534,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             code = maxnumberService.getMaxnumber("MakeIn", true).getData();
             prodInOut.setPi_inoutno(code);
             prodInOut.setPi_date(new Date());       //出入库日期
-//            prodInOut.setPi_recordmanid(BaseContextHolder.getUserId());     //录入人ID
             prodInOut.setPi_recorddate(new Date());     //录入日期
             prodInOut.setPi_auditdate(new Date());      //审核日期
             prodInOut.setPi_auditman("");               //审核人
@@ -578,9 +578,12 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             map.put("commitid", BaseContextHolder.getUserId());
             map.put("companyId", BaseContextHolder.getCompanyId());
             map.put("result", null);
-            prodInOutMapper.post(map);
-            if (!StringUtils.isEmpty(map.get("result"))){
-                throw new BizException(76202, map.get("result").toString());
+            res = warehouseApi.post(map);
+            result =  res.getData();
+            if (!StringUtils.isEmpty(result)){
+                unPostPicking(make);
+                unPostMakeIn(make);
+                throw new BizException(76202,result.toString());
             }
         }
     }
@@ -688,54 +691,93 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
      * 2.反过账
      * @param make
      */
-    @Transactional(rollbackFor = Exception.class)
     public void selectProdIO(Make make) {
+        unPostMakeIn(make);
+        unPostPicking(make);
+    }
+
+    /**
+     * 删除,反审核完工入库单
+     * @param make
+     */
+    @Transactional
+    public void unPostMakeIn(Make make){
         String code = make.getMa_code();
         String type = make.getMa_type();
-        String outCode="";
         Long companyId = BaseContextHolder.getCompanyId();
-        String inCode = getMapper().selectMakeInOutCode(code, companyId, "完工入库单");
-        if ("拆件".equals(type)){
-            outCode = getMapper().selectMakeInOutCode(code, companyId, "拆件领料单");
-        }else if ("组装".equals(type)){
-            outCode = getMapper().selectMakeInOutCode(code, companyId, "生产领料单");
-        }
-        Map<String, Object> map = new HashMap<String, Object>();
-        map.put("inoutNo", inCode);
-        map.put("class", "完工入库单");
-        map.put("commitid", BaseContextHolder.getUserId());
-        map.put("companyId", companyId);
-        map.put("result", null);
-        //完工入库单反过账
-        prodInOutMapper.unPost(map);
-        if(!StringUtils.isEmpty(map.get("result"))){
-            throw new BizException(76203, map.get("result").toString());
+        String inCode="";
+        ProdInOut prodInOut = null;
+        prodInOut = getMapper().selectMakeInOutCode(code, companyId, "完工入库单");
+        if (!StringUtils.isEmpty(prodInOut)){
+            String status = prodInOut.getPi_statuscode();
+            inCode = prodInOut.getPi_inoutno();
+            if ("AUDITED".equals(status)){
+                Map<String, Object> map = new HashMap<String, Object>();
+                map.put("inoutNo", inCode);
+                map.put("class", "完工入库单");
+                map.put("commitid", BaseContextHolder.getUserId());
+                map.put("companyId", companyId);
+                map.put("result", null);
+                //完工入库单反过账
+                Result res = warehouseApi.unPost(map);
+                Object result =  res.getData();
+                if (!StringUtils.isEmpty(result)){
+                    throw new BizException(76201, result.toString());
+                }
+            }
+            prodIODetailMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
+            prodInOutMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
         }
-        prodIODetailMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
-        prodInOutMapper.deleteByInOutNo(inCode, "完工入库单", BaseContextHolder.getCompanyId());
-
+    }
 
+    /**
+     * 删除,反审核领料单
+     * @param make
+     */
+    @Transactional
+    public void unPostPicking(Make make){
+        String code = make.getMa_code();
+        String type = make.getMa_type();
+        Long companyId = BaseContextHolder.getCompanyId();
+        String outCode="";
+        ProdInOut prodInOut = null;
         if ("拆件".equals(type)){
-            map.put("class", "拆件领料单");
+            prodInOut = getMapper().selectMakeInOutCode(code, companyId, "拆件领料单");
         }else if ("组装".equals(type)){
-            map.put("class", "生产领料单");
-        }
-        map.put("inoutNo", outCode);
-        map.put("result", null);
-        //生产领料单/拆件领料反过账
-        prodInOutMapper.unPost(map);
-        if(!StringUtils.isEmpty(map.get("result"))){
-            throw new BizException(76204, map.get("result").toString());
+            prodInOut = getMapper().selectMakeInOutCode(code, companyId, "生产领料单");
         }
-        if ("拆件".equals(type)){
-            prodIODetailMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
-            prodInOutMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
-        }else if ("组装".equals(type)){
-            prodIODetailMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
-            prodInOutMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
+        if (!StringUtils.isEmpty(prodInOut)){
+            String status = prodInOut.getPi_statuscode();
+            outCode = prodInOut.getPi_inoutno();
+            if ("AUDITED".equals(status)) {
+                Map<String, Object> map = new HashMap<String, Object>();
+                map.put("inoutNo", outCode);
+                if ("拆件".equals(type)){
+                    map.put("class", "拆件领料单");
+                }else if ("组装".equals(type)){
+                    map.put("class", "生产领料单");
+                }
+                map.put("commitid", BaseContextHolder.getUserId());
+                map.put("companyId", companyId);
+                map.put("result", null);
+                //生产领料单/拆件领料反过账
+                Result res = warehouseApi.unPost(map);
+                Object result =  res.getData();
+                if (!StringUtils.isEmpty(result)){
+                    throw new BizException(76201, result.toString());
+                }
+            }
+            if ("拆件".equals(type)){
+                prodIODetailMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
+                prodInOutMapper.deleteByInOutNo(outCode, "拆件领料单", BaseContextHolder.getCompanyId());
+            }else if ("组装".equals(type)){
+                prodIODetailMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
+                prodInOutMapper.deleteByInOutNo(outCode, "生产领料单", BaseContextHolder.getCompanyId());
+            }
         }
     }
 
+
     /**
      * 构造日记记录对象
      * @param id

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

@@ -37,6 +37,60 @@
     <result column="ma_text4" property="ma_text4" jdbcType="VARCHAR" />
     <result column="ma_text5" property="ma_text5" jdbcType="VARCHAR" />
   </resultMap>
+
+
+
+
+
+
+
+  <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
+    <id column="pi_id" jdbcType="INTEGER" property="id" />
+    <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
+    <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
+    <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
+    <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
+    <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
+    <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
+    <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
+    <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
+    <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
+    <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
+    <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
+    <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
+    <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
+    <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
+    <result column="pi_recordmanid" jdbcType="INTEGER" property="pi_recordmanid" />
+    <result column="pi_recordman" jdbcType="VARCHAR" property="pi_recordman" />
+    <result column="pi_recorddate" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
+    <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
+    <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
+    <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
+    <result column="companyid" property="companyId" jdbcType="BIGINT" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
+    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
+    <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
+    <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
+    <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
+    <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
+    <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
+    <result column="pi_ioid" jdbcType="INTEGER" property="pi_ioid" />
+  </resultMap>
+
+
+
+
+
+
+
   <sql id="Base_Column_List" >
     ma_id, ma_code, ma_status, ma_statuscode, ma_type, ma_prodid, ma_prodcode, ma_proddetail, 
     ma_prodspec, ma_version, ma_produnit, ma_qty, ma_whid, ma_whcode, ma_whname, ma_recorddate,
@@ -439,8 +493,8 @@
         SELECT IFNULL(PW_ONHAND,0) FROM PRODUCTWH WHERE PW_PRODID=#{prodid} AND PW_WHID=#{whid} and COMPANYID=#{companyId}
     </select>
 
-    <select id="selectMakeInOutCode" resultType="string">
-        SELECT PI_INOUTNO FROM PRODINOUT WHERE COMPANYID=#{companyId} AND PI_MACODE=#{code} AND PI_CLASS=#{type}
+    <select id="selectMakeInOutCode" resultMap="ResultMapWithBLOBs">
+        SELECT * FROM PRODINOUT WHERE COMPANYID=#{companyId} AND PI_MACODE=#{code} AND PI_CLASS=#{type}
     </select>
 
   <update id="updateCreator">

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

@@ -8,7 +8,7 @@ Ext.define('saas.view.core.dbfind.types.EmployeeDbfindTrigger', {
     //数据接口
     dataUrl:'/api/document/employee/list',
     addXtype: 'document-vendor-formpanel',
-    addTitle: '供应商资料',
+    addTitle: '人员资料',
     //联想设置
     dbtpls:[{
         field:'em_code',width:100

+ 2 - 0
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -4,6 +4,8 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
 
     cls: 'x-detailgridfield',
 
+    sortableColumns: false,
+    enableColumnHide: false,
     border: 1,
     margin: '0 0 10 0', // formpanel的fieldDefaults未生效
     height: 245,

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

@@ -226,11 +226,6 @@ 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 - 1
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -55,7 +55,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
         name: 'bo_motherid',
         fieldLabel: '产品id'
     },{
-        xtype : "bomDbfindTrigger", 
+        xtype : "productDbfindTrigger", 
         name: 'bo_mothercode',
         fieldLabel: '产品编号',
         allowBlank: false

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

@@ -5,6 +5,9 @@ Ext.define('saas.view.document.product.BasePanel', {
     controller: 'document-product-basepanel',
     viewModel: 'document-product-basepanel',
 
+    deleteMoreMsg: '删除的物料将不能恢复,请确认是否删除?',
+    deleteOneMsg: '删除的物料将不能恢复,请确认是否删除?',
+
     searchField:[{
         xtype : "productDbfindTrigger", 
         name : "pr_code", 

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

@@ -19,7 +19,6 @@ Ext.define('saas.view.document.product.FormPanel', {
     _openUrl:'/api/document/product/open',
     _closeUrl:'/api/document/product/close',
     _deleteUrl:'/api/document/product/delete/',
-    _deleteMsg:'删除的物料将不能恢复,请确认是否删除?',
     initId:0,
 
     codeInHeader: false,

+ 4 - 4
frontend/saas-web/app/view/home/InfoCard.js

@@ -42,25 +42,25 @@ Ext.define('saas.view.home.InfoCard', {
                     title: '七天内待出货销售',
                     color: 'yellow',
                     viewType: 'sale-sale-querypanel',
-                    condition: 'sale.companyid=' + companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail detail where sd_id=saledetail.sd_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now()) between 0 and 7)'
+                    condition: 'sale.companyid=' + companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail detail where sd_id=saledetail.sd_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now())<= 7)'
                 },
                 unstorage: {
                     title: '七天内待入库采购',
                     color: 'purple',
                     viewType: 'purchase-purchase-querypanel',
-                    condition: 'purchase.companyId=' + companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pd_acceptqty,0) < ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) between 0 and 7)'
+                    condition: 'purchase.companyId=' + companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail detail where pd_id=purchasedetail.pd_id and IFNULL(pd_acceptqty,0) < ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <= 7)'
                 },
                 unpay: {
                     title: '七天内待付款',
                     color: 'red',
                     viewType: 'purchase-purchasein-querypanel',
-                    condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now()) between 0 and 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
+                    condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now()) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unreceive: {
                     title: '七天内待收款',
                     color: 'pink',
                     viewType: 'sale-saleout-querypanel',
-                    condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now()) between 0 and 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
+                    condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now()) <= 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
                 },
                 unauditcheck: {
                     title: '未审核验收',

+ 9 - 2
frontend/saas-web/app/view/home/charts/MonthSale.js

@@ -50,7 +50,8 @@ Ext.define('saas.view.home.charts.MonthSale', {
                     '#1E90FF',
                     '#B0E0E6'
                 ],
-                innerPadding: 0,
+                interactions: ['rotate', 'itemhighlight'],
+                innerPadding: 2,
                 legend: {
                     type: 'dom',
                     docked: 'right',
@@ -76,11 +77,17 @@ Ext.define('saas.view.home.charts.MonthSale', {
                         color: '#fff',
                         font: '12px Microsoft YaHei'
                     },
+                    style: {
+                        // lineWidth: 0,
+                        // strokeStyle: 'transparent',
+                        // fillStyle: 'transparent',
+                        // fillOpacity: 0
+                    },
                     // label: {
                     //     field: 'x',
                     //     renderer: me.onLabelRender
                     // },
-                    highlight: true,
+                    highlight: false,
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender

+ 1 - 0
frontend/saas-web/app/view/home/charts/MonthSale.scss

@@ -11,6 +11,7 @@
                 text-align: left;
 
                 .x-legend-item-marker {
+                    box-shadow: none;
                     border-radius: 50%;
                 }
             }

+ 84 - 11
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -71,15 +71,31 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     },
                 }],
                 series: [{
-                    type: 'line',
-                    smooth: true,
-                    title: '销售额',
-                    xField: 'x',
-                    yField: ['sale'],
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender
-                    }
+                    },
+                    type: 'line',
+                    smooth: true,
+                    xField: 'x',
+                    yField: 'sale',
+                    marker: {
+                        radius: 0,
+                        lineWidth: 0
+                    },
+                    highlight: {
+                        fillStyle: '#53A8E2',
+                        fillOpacity: 1,
+                        strokeStyle: '#A3D0EE',
+                        radius: 5,
+                        lineWidth: 2,
+                    },
+                    style: {
+                        lineWidth: 2,
+                        fillStyle: '#53A8E2',
+                        fillOpacity: 0.1,
+                    },
+                    // renderer: me.onSeriesRenderer
                 }, {
                     type: 'line',
                     smooth: true,
@@ -89,21 +105,78 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender
-                    }
-                }]
+                    },
+                    marker: {
+                        radius: 0,
+                        lineWidth: 0
+                    },
+                    highlight: {
+                        fillStyle: '#D54F65',
+                        fillOpacity: 1,
+                        strokeStyle: '#FF9BAC',
+                        radius: 5,
+                        lineWidth: 2,
+                    },
+                    style: {
+                        lineWidth: 2,
+                        fillStyle: '#D54F65',
+                        fillOpacity: 0.1,
+                    },
+                }],
+                listeners: {
+                    itemhighlightchange: me.itemhighlightchange
+                }
             }]
         });
 
         me.callParent(arguments);
     },
 
+    onSeriesRender: function (sprite, config, rendererData, index) {
+        var store = rendererData.store,
+            storeItems = store.getData().items,
+            currentRecord = storeItems[index],
+            previousRecord = (index > 0 ? storeItems[index-1] : currentRecord),
+            current = currentRecord && currentRecord.data['g1'],
+            previous = previousRecord && previousRecord.data['g1'],
+            isUp = current >= previous,
+            changes = {};
+
+        switch (config.type) {
+            case 'marker':
+                changes.strokeStyle = (isUp ? 'cornflowerblue' : 'tomato');
+                changes.fillStyle = (isUp ? 'aliceblue' : 'lightpink');
+                break;
+            case 'line':
+                changes.strokeStyle = (isUp ? 'cornflowerblue' : 'tomato');
+                changes.fillStyle = (isUp ? 'rgba(100, 149, 237, 0.4)' : 'rgba(255, 99, 71, 0.4)');
+                break;
+        }
+
+        return changes;
+    },
+
     onSeriesTooltipRender: function (tooltip, record, item) {
-        var title = item.series.getTitle();
-        tooltip.setHtml(record.get('x') + title + record.get(item.series.getYField()) + '万元');
+        tooltip.setHtml(record.get('x') + '月: ' + record.get(item.series.getYField()) + '万元');
     },
 
     categoryRender: function(axis, label, layoutContext, lastLabel) {
         return label + '月';
-    }
+    },
+
+    itemhighlightchange: function(chart, newHighlightItem, oldHighlightItem) {
+        debugger;
+        this.setSeriesLineWidth(newHighlightItem, 4);
+        this.setSeriesLineWidth(oldHighlightItem, 2);
+    },
+
+    setSeriesLineWidth: function (item, lineWidth) {
+        console.log('xxxx');
+        if (item) {
+            item.series.setStyle({
+                lineWidth: lineWidth
+            });
+        }
+    },
 
 });

+ 5 - 3
frontend/saas-web/app/view/main/Main.js

@@ -76,13 +76,15 @@ Ext.define('saas.view.main.Main', {
                         cls:'x-main-menu sa-nav-menu',
                         items: [{
                             text: '新手导航',
-                            iconCls:'x-fa fa-comment-o sa-navicon',
+                            //fa-comment-o sa-userGuite
+                            iconCls:'x-fa sa-navicon fa-comment-o',
                             handler:function(){
                                saas.util.BaseUtil.openTab('sys-guide-formpanel','新手导航', 'sys-guide-formpanel-nav');
                             }
                         },{
                             text: '用户手册',
-                            iconCls:'x-fa fa-address-book-o sa-navicon',
+                            //fa-address-book-o sa-userBook
+                            iconCls:'x-fa sa-navicon  fa-address-book-o',
                             handler:function(){
                                 window.open('http://www.usoftchina.com','_blank');
                             }
@@ -94,7 +96,7 @@ Ext.define('saas.view.main.Main', {
                             }
                         },{
                             text: '客服热线',
-                            iconCls:'x-fa fa-comment-o sa-navicon',
+                            iconCls:'x-fa fa-phone-o sa-navicon',
                             menu:{
                                 cls:'sa-nav-menu',
                                 items:[{

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

@@ -11,14 +11,6 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         xtype : "textfield",
         name : "ft_code",
         fieldLabel : "单据编号",
-    },{
-        xtype: 'textfield',
-        name: 'creatorName',
-        fieldLabel: '录入人'
-    },{
-        xtype : "textfield",
-        name : "ft_auditman",
-        fieldLabel : "审核人",
     },{
         xtype : "condatefield",
         name : "ft_date",
@@ -48,6 +40,14 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
                 return 'ft_statuscode=\'' + value + '\'';
             }
         }
+    },{
+        xtype : "bandinfoDbfindTrigger",
+        name : "ftd_bankname",
+        fieldLabel : "转出账号",
+    },{
+        xtype : "bandinfoDbfindTrigger",
+        name : "ftd_inbankname",
+        fieldLabel : "转入账号",
     },{
         name : "ft_status",
         fieldLabel : "结算方式",
@@ -68,13 +68,13 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
             ]
         })
     },{
-        xtype : "bandinfoDbfindTrigger",
-        name : "ftd_bankname",
-        fieldLabel : "转出账号",
+        xtype: 'textfield',
+        name: 'creatorName',
+        fieldLabel: '录入人'
     },{
-        xtype : "bandinfoDbfindTrigger",
-        name : "ftd_inbankname",
-        fieldLabel : "转入账号",
+        xtype : "textfield",
+        name : "ft_auditman",
+        fieldLabel : "审核人",
     }],
     moreQueryFormItems: [],
     queryGridConfig: {

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

@@ -60,7 +60,7 @@ Ext.define('saas.view.money.report.AccountBalance', {
             }
         },{
             text:'支出',
-            dataIndex:'thisamount',
+            dataIndex:'outamount',
             xtype: 'numbercolumn',
             renderer : function(v) {
                 var arr = (v + '.').split('.');
@@ -77,7 +77,7 @@ Ext.define('saas.view.money.report.AccountBalance', {
             }
         },{
             text: '账户余额',
-            dataIndex: 'pr_code',
+            dataIndex: 'thisamount',
             xtype: 'numbercolumn',
             renderer : function(v) {
                 var arr = (v + '.').split('.');

+ 7 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -207,9 +207,15 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '单位成本',
+            text: '单',
             dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },            
             width: 120
         },{
             text: '税率',

+ 7 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -215,9 +215,15 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '单位成本',
+            text: '单',
             dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },            
             width: 120
         },{
             text: '税率',

+ 1 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -126,7 +126,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                     queryMode : "local", 
                     store : null, 
                     valueField : "value", 
-                    xtype : "productDbfindTrigger"
+                    xtype : "productMultiDbfindTrigger"
                 }
             },{
                 text: 'model映射需要',

+ 3 - 1
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -215,7 +215,9 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             text: '税率',
             dataIndex: 'pd_taxrate',
             xtype:'numbercolumn',
-            width: 120
+            width: 120,            renderer : function(v) {
+                return Ext.util.Format.number(v, '0');
+            },
         },{
             text: '金额',
             dataIndex: 'pd_total',

+ 2 - 8
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -64,7 +64,8 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         bind: "{pi_date}",
         fieldLabel: "单据日期",
         allowBlank: false,
-        columnWidth: 0.25
+        columnWidth: 0.25,
+        defaultValue: new Date()
     }, {
         xtype: "textfield",
         name: "pi_total",
@@ -200,13 +201,6 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                     var xr = (new Array(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)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
                 }
             },
             {

+ 4 - 1
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -196,7 +196,10 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             text: '税率',
             dataIndex: 'pd_taxrate',
             xtype:'numbercolumn',
-            width: 120
+            width: 120,
+            renderer : function(v) {
+                return Ext.util.Format.number(v, '0');
+            },
         },{
             text: '金额',
             dataIndex: 'pd_total',

+ 1 - 1
frontend/saas-web/app/view/sys/feedback/FormPanel.js

@@ -47,7 +47,7 @@ Ext.define('saas.view.sys.feedback.FormPanel', {
             name : "fb_wechat", 
             fieldLabel : "微信"
         }, {
-            xtype : "htmleditor", 
+            xtype : "textfield", 
             name : "fb_msg", 
             fieldLabel : "反馈内容",
             columnWidth: 1