Browse Source

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

rainco 7 years ago
parent
commit
a0d74e21e7
30 changed files with 2095 additions and 175 deletions
  1. 1 1
      README.md
  2. 8 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  3. 8 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  4. 7 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  5. 8 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  6. 8 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  7. 0 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  8. 37 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/StockTakingDTO.java
  9. 34 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/StockTaking.java
  10. 49 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/StocktakingController.java
  11. 19 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/StockTakingMapper.java
  12. 20 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/StocktakingService.java
  13. 57 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/StocktakingServiceImpl.java
  14. 248 0
      applications/storage/storage-server/src/main/resources/mapper/StockTakingMapper.xml
  15. 28 0
      frontend/saas-web/app/model/money/Verification1.js
  16. 154 138
      frontend/saas-web/app/util/FormUtil.js
  17. 3 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  18. 6 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  19. 1 1
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  20. 1 0
      frontend/saas-web/app/view/document/customer/BasePanel.js
  21. 4 2
      frontend/saas-web/app/view/document/kind/ChildForm.js
  22. 19 7
      frontend/saas-web/app/view/home/charts/SaleTrend.js
  23. 523 0
      frontend/saas-web/app/view/money/verification/FormPanel.js
  24. 115 0
      frontend/saas-web/app/view/money/verification/FormPanelController.js
  25. 18 0
      frontend/saas-web/app/view/money/verification/FormPanelModel.js
  26. 77 0
      frontend/saas-web/app/view/money/verification/QueryPanel.js
  27. 186 0
      frontend/saas-web/app/view/money/verification/QueryPanelController.js
  28. 5 0
      frontend/saas-web/app/view/money/verification/QueryPanelModel.js
  29. 444 0
      frontend/saas-web/app/view/stock/inventory/EditDataList.js
  30. 7 3
      frontend/saas-web/resources/json/navigation.json

+ 1 - 1
README.md

@@ -107,7 +107,7 @@
 
 > 构建
 
-* [jenkins](http://192.168.0.181:8080/job/saas) **账号** admin **密码** select123***
+* [jenkins](http://192.168.253.3:8080/job/saas) **账号** admin **密码** select123***
 
 > 日志
 

+ 8 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java

@@ -66,8 +66,10 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
         if (id > 0){
             fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
             baseDTO = getBaseDTOById(id);
-            //日志记录
-            messageLogService.update(baseDTO);
+            if (!("AUDITED".equals(fundtransfer.getFt_statuscode()))) {
+                //日志记录
+                messageLogService.update(baseDTO);
+            }
         }else {
             fundtransfer.setCompanyId(BaseContextHolder.getCompanyId());
             fundtransfer.setFt_recorder(BaseContextHolder.getUserName());
@@ -76,8 +78,10 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             id = fundtransfer.getId();
 
             baseDTO = getBaseDTOById(id);
-            //日志记录
-            messageLogService.save(baseDTO);
+            if (!("AUDITED".equals(fundtransfer.getFt_statuscode()))) {
+                //日志记录
+                messageLogService.save(baseDTO);
+            }
         }
 
         Iterator isdet = fundtransferdetails.iterator();

+ 8 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java

@@ -74,8 +74,10 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
         if (othreceipts.getId() > 0){
             othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
             baseDTO = getBaseDTOById(id);
-            //日志记录
-            messageLogService.update(baseDTO);
+            if (!("AUDITED".equals(othreceipts.getOr_statuscode()))) {
+                //日志记录
+                messageLogService.update(baseDTO);
+            }
         }else {
             othreceipts.setCompanyId(BaseContextHolder.getCompanyId());
             othreceipts.setOr_recorder(BaseContextHolder.getUserName());
@@ -84,8 +86,10 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             othreceiptsMapper.insertSelective(othreceipts);
             id = othreceipts.getId();
             baseDTO = getBaseDTOById(id);
-            //日志记录
-            messageLogService.save(baseDTO);
+            if (!("AUDITED".equals(othreceipts.getOr_statuscode()))) {
+                //日志记录
+                messageLogService.save(baseDTO);
+            }
         }
 
         Iterator isdet = othreceiptsdetail.iterator();

+ 7 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java

@@ -70,7 +70,9 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             othspendingsMapper.updateByPrimaryKeySelective(othspendings);
             baseDTO = getBaseDTOById(id);
             //日志记录
-            messageLogService.update(baseDTO);
+            if (!("AUDITED".equals(othspendings.getOs_statuscode()))) {
+                messageLogService.update(baseDTO);
+            }
         }else {
             othspendings.setCompanyId(BaseContextHolder.getCompanyId());
             othspendings.setOs_recorder(BaseContextHolder.getUserName());
@@ -80,8 +82,10 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             id = othspendings.getId();
 
             baseDTO = getBaseDTOById(id);
-            //日志记录
-            messageLogService.save(baseDTO);
+            if (!("AUDITED".equals(othspendings.getOs_statuscode()))) {
+                //日志记录
+                messageLogService.save(baseDTO);
+            }
         }
 
         Iterator isdet = othspendingsdetails.iterator();

+ 8 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java

@@ -74,8 +74,10 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
         if (pbId > 0){
             paybalanceMapper.updateByPrimaryKeySelective(paybalance);
             baseDTO = getBaseDTOById(pbId);
-            //日志记录
-            messageLogService.update(baseDTO);
+            if (!("AUDITED".equals(paybalance.getPb_statuscode()))) {
+                //日志记录
+                messageLogService.update(baseDTO);
+            }
         }else {
             paybalance.setCompanyId(BaseContextHolder.getCompanyId());
             paybalance.setPb_recorder(BaseContextHolder.getUserName());
@@ -84,8 +86,10 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
             paybalanceMapper.insertSelective(paybalance);
             pbId = paybalance.getId();
             baseDTO = getBaseDTOById(pbId);
-            //日志记录
-            messageLogService.save(baseDTO);
+            if (!("AUDITED".equals(paybalance.getPb_statuscode()))) {
+                //日志记录
+                messageLogService.save(baseDTO);
+            }
         }
 
         Iterator isdet = paybalancedet.iterator();

+ 8 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -72,8 +72,10 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
         if (rbId > 0){
             recbalanceMapper.updateByPrimaryKeySelective(recbalance);
             baseDTO = getBaseDTOById(rbId);
-            //日志记录
-            messageLogService.update(baseDTO);
+            if (!("AUDITED".equals(recbalance.getRb_statuscode()))) {
+                //日志记录
+                messageLogService.update(baseDTO);
+            }
         }else {
             recbalance.setCompanyId(BaseContextHolder.getCompanyId());
             recbalance.setRb_recorder(BaseContextHolder.getUserName());
@@ -83,8 +85,10 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             rbId = recbalance.getId();
 
             baseDTO = getBaseDTOById(rbId);
-            //日志记录
-            messageLogService.save(baseDTO);
+            if (!("AUDITED".equals(recbalance.getRb_statuscode()))) {
+                //日志记录
+                messageLogService.save(baseDTO);
+            }
         }
 
         Iterator isdet = recbalancedet.iterator();

+ 0 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -161,8 +161,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             //日志记录
             messageLogService.save(baseDTO);
             return baseDTO;
-        }else{
-           // setUpdateInfo(purchase);
         }
         //更新操作
         purchaseMapper.updateByPrimaryKeySelective(purchase);

+ 37 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/StockTakingDTO.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.storage.dto;
+
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * Created by zdw
+ * 2018-11-20 19:46.
+ */
+@Data
+public class StockTakingDTO extends CommonBaseDTO implements Serializable {
+    private Integer st_prodid;
+
+    private String st_prodcode;
+
+    private String st_proddetail;
+
+    private String st_prodorispeccode;
+
+    private String st_prodkind;
+
+    private String st_produnit;
+
+    private Integer st_whid;
+
+    private String st_whcode;
+
+    private String st_whname;
+
+    private Double st_batchqty;
+
+    private Double st_actqty;
+
+    private Double st_num;
+}

+ 34 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/StockTaking.java

@@ -0,0 +1,34 @@
+package com.usoftchina.saas.storage.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+import java.io.Serializable;
+
+@Data
+public class StockTaking extends CommonBaseEntity implements Serializable {
+
+    private Integer st_prodid;
+
+    private String st_prodcode;
+
+    private String st_proddetail;
+
+    private String st_prodorispeccode;
+
+    private String st_prodkind;
+
+    private String st_produnit;
+
+    private Integer st_whid;
+
+    private String st_whcode;
+
+    private String st_whname;
+
+    private Double st_batchqty;
+
+    private Double st_actqty;
+
+    private Double st_num;
+
+}

+ 49 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/StocktakingController.java

@@ -0,0 +1,49 @@
+package com.usoftchina.saas.storage.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.page.PageDefault;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.storage.dto.StockTakingDTO;
+import com.usoftchina.saas.storage.service.MakeService;
+import com.usoftchina.saas.storage.service.StocktakingService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/stocktaking")
+public class StocktakingController {
+
+    @Autowired
+    private MakeService makeService;
+    @Autowired
+    private StocktakingService stocktakingService;
+
+
+
+    /**
+     * 盘点查询
+     * @param page
+     * @param listReqDTO
+     * @return
+     */
+    @GetMapping("/list")
+    public Result getListData(@PageDefault(number = 1, size = 10) PageRequest page, ListReqDTO listReqDTO){
+        return Result.success(stocktakingService.getList(page, listReqDTO));
+    }
+
+
+
+    @PostMapping("/save")
+    public Result save(@RequestBody List<StockTakingDTO> list){
+        DocBaseDTO docBaseDTO = stocktakingService.saveOrUpdate(list);
+        return Result.success(docBaseDTO);
+    }
+
+
+
+
+}

+ 19 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/StockTakingMapper.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.storage.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.storage.po.StockTaking;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface StockTakingMapper extends CommonBaseMapper<StockTaking> {
+    int deleteByPrimaryKey(Integer st_id);
+
+    int insertSelective(StockTaking record);
+
+    StockTaking selectByPrimaryKey(Integer st_id);
+
+    int updateByPrimaryKeySelective(StockTaking record);
+
+    List<StockTaking> selectStockTakingBycondition(@Param("con") String con, @Param("companyId") Long companyId);
+}

+ 20 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/StocktakingService.java

@@ -0,0 +1,20 @@
+package com.usoftchina.saas.storage.service;
+
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.storage.dto.StockTakingDTO;
+import com.usoftchina.saas.storage.mapper.StockTakingMapper;
+import com.usoftchina.saas.storage.po.StockTaking;
+
+import java.util.List;
+
+public interface StocktakingService extends CommonBaseService<StockTakingMapper, StockTaking> {
+
+    PageInfo<StockTaking>  getList(PageRequest page, ListReqDTO listReqDTO);
+
+    DocBaseDTO saveOrUpdate(List<StockTakingDTO> list);
+}

+ 57 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/StocktakingServiceImpl.java

@@ -0,0 +1,57 @@
+package com.usoftchina.saas.storage.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.storage.dto.StockTakingDTO;
+import com.usoftchina.saas.storage.mapper.StockTakingMapper;
+import com.usoftchina.saas.storage.po.StockTaking;
+import com.usoftchina.saas.storage.service.StocktakingService;
+import com.usoftchina.saas.utils.BeanMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-11-20 14:59.
+ */
+@Service
+public class StocktakingServiceImpl extends CommonBaseServiceImpl<StockTakingMapper, StockTaking> implements StocktakingService {
+
+    @Override
+    public PageInfo<StockTaking> getList(PageRequest page, ListReqDTO listReqDTO) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<StockTaking> stockTakingList = getList(listReqDTO);
+        //取分页信息
+        PageInfo<StockTaking> pageInfo = new PageInfo<StockTaking>(stockTakingList);
+        return pageInfo;
+    }
+
+    @Override
+    @Transactional
+    public DocBaseDTO saveOrUpdate(List<StockTakingDTO> items) {
+        for (StockTakingDTO item : items) {
+            StockTaking stockTaking = BeanMapper.map(item,StockTaking.class);
+            getMapper().updateByPrimaryKeySelective(stockTaking);
+        }
+        DocBaseDTO baseDTO = new DocBaseDTO();
+        return baseDTO;
+    }
+
+    private List<StockTaking> getList(ListReqDTO listReqDTO) {
+        List<StockTaking> list = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        String con = listReqDTO.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        list = getMapper().selectStockTakingBycondition(con,companyId);
+        return list;
+    }
+}

+ 248 - 0
applications/storage/storage-server/src/main/resources/mapper/StockTakingMapper.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.storage.mapper.StockTakingMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.po.StockTaking">
+    <id column="st_id" jdbcType="INTEGER" property="id" />
+    <result column="st_prodid" jdbcType="INTEGER" property="st_prodid" />
+    <result column="st_prodcode" jdbcType="VARCHAR" property="st_prodcode" />
+    <result column="st_proddetail" jdbcType="VARCHAR" property="st_proddetail" />
+    <result column="st_prodorispeccode" jdbcType="VARCHAR" property="st_prodorispeccode" />
+    <result column="st_prodkind" jdbcType="VARCHAR" property="st_prodkind" />
+    <result column="st_produnit" jdbcType="VARCHAR" property="st_produnit" />
+    <result column="st_whid" jdbcType="INTEGER" property="st_whid" />
+    <result column="st_whcode" jdbcType="VARCHAR" property="st_whcode" />
+    <result column="st_whname" jdbcType="VARCHAR" property="st_whname" />
+    <result column="st_batchqty" jdbcType="DOUBLE" property="st_batchqty" />
+    <result column="st_actqty" jdbcType="DOUBLE" property="st_actqty" />
+    <result column="st_num" jdbcType="DOUBLE" property="st_num" />
+    <result column="companyId" jdbcType="INTEGER" property="companyId" />
+    <result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
+    <result column="creatorId" jdbcType="INTEGER" property="creatorId" />
+    <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="updaterName" jdbcType="TIMESTAMP" property="updaterName" />
+    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    st_id, st_prodid, st_prodcode, st_proddetail, st_prodorispeccode, st_prodkind, st_produnit, 
+    st_whid, st_whcode, st_whname, st_batchqty, st_actqty, st_num, companyId, createTime, 
+    creatorName, creatorId, updateTime, updaterName, updaterId
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from stocktaking
+    where st_id = #{st_id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from stocktaking
+    where st_id = #{st_id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.storage.po.StockTaking">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into stocktaking
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+
+      <if test="st_prodid != null">
+        st_prodid,
+      </if>
+      <if test="st_prodcode != null">
+        st_prodcode,
+      </if>
+      <if test="st_proddetail != null">
+        st_proddetail,
+      </if>
+      <if test="st_prodorispeccode != null">
+        st_prodorispeccode,
+      </if>
+      <if test="st_prodkind != null">
+        st_prodkind,
+      </if>
+      <if test="st_produnit != null">
+        st_produnit,
+      </if>
+      <if test="st_whid != null">
+        st_whid,
+      </if>
+      <if test="st_whcode != null">
+        st_whcode,
+      </if>
+      <if test="st_whname != null">
+        st_whname,
+      </if>
+      <if test="st_batchqty != null">
+        st_batchqty,
+      </if>
+      <if test="st_actqty != null">
+        st_actqty,
+      </if>
+      <if test="st_num != null">
+        st_num,
+      </if>
+      <if test="companyId != null">
+        companyId,
+      </if>
+      <if test="createTime != null">
+        createTime,
+      </if>
+      <if test="creatorName != null">
+        creatorName,
+      </if>
+      <if test="creatorId != null">
+        creatorId,
+      </if>
+      <if test="updateTime != null">
+        updateTime,
+      </if>
+      <if test="updaterName != null">
+        updaterName,
+      </if>
+      <if test="updaterId != null">
+        updaterId,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+      <if test="st_prodid != null">
+        #{st_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="st_prodcode != null">
+        #{st_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="st_proddetail != null">
+        #{st_proddetail,jdbcType=VARCHAR},
+      </if>
+      <if test="st_prodorispeccode != null">
+        #{st_prodorispeccode,jdbcType=VARCHAR},
+      </if>
+      <if test="st_prodkind != null">
+        #{st_prodkind,jdbcType=VARCHAR},
+      </if>
+      <if test="st_produnit != null">
+        #{st_produnit,jdbcType=VARCHAR},
+      </if>
+      <if test="st_whid != null">
+        #{st_whid,jdbcType=INTEGER},
+      </if>
+      <if test="st_whcode != null">
+        #{st_whcode,jdbcType=VARCHAR},
+      </if>
+      <if test="st_whname != null">
+        #{st_whname,jdbcType=VARCHAR},
+      </if>
+      <if test="st_batchqty != null">
+        #{st_batchqty,jdbcType=DOUBLE},
+      </if>
+      <if test="st_actqty != null">
+        #{st_actqty,jdbcType=DOUBLE},
+      </if>
+      <if test="st_num != null">
+        #{st_num,jdbcType=DOUBLE},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creatorName != null">
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatorId != null">
+        #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterName != null">
+        #{updaterName,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.po.StockTaking">
+    update stocktaking
+    <set>
+      <if test="st_prodid != null">
+        st_prodid = #{st_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="st_prodcode != null">
+        st_prodcode = #{st_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="st_proddetail != null">
+        st_proddetail = #{st_proddetail,jdbcType=VARCHAR},
+      </if>
+      <if test="st_prodorispeccode != null">
+        st_prodorispeccode = #{st_prodorispeccode,jdbcType=VARCHAR},
+      </if>
+      <if test="st_prodkind != null">
+        st_prodkind = #{st_prodkind,jdbcType=VARCHAR},
+      </if>
+      <if test="st_produnit != null">
+        st_produnit = #{st_produnit,jdbcType=VARCHAR},
+      </if>
+      <if test="st_whid != null">
+        st_whid = #{st_whid,jdbcType=INTEGER},
+      </if>
+      <if test="st_whcode != null">
+        st_whcode = #{st_whcode,jdbcType=VARCHAR},
+      </if>
+      <if test="st_whname != null">
+        st_whname = #{st_whname,jdbcType=VARCHAR},
+      </if>
+      <if test="st_batchqty != null">
+        st_batchqty = #{st_batchqty,jdbcType=DOUBLE},
+      </if>
+      <if test="st_actqty != null">
+        st_actqty = #{st_actqty,jdbcType=DOUBLE},
+      </if>
+      <if test="st_num != null">
+        st_num = #{st_num,jdbcType=DOUBLE},
+      </if>
+      <if test="companyId != null">
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        createTime = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="creatorName != null">
+        creatorName = #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatorId != null">
+        creatorId = #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterName != null">
+        updaterName = #{updaterName,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterId != null">
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+    </set>
+    where st_id = #{id,jdbcType=INTEGER}
+  </update>
+
+
+  <select id="selectStockTakingBycondition" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from stocktaking
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="companyId != null">
+        and  companyId = #{companyId}
+      </if>
+    </where>
+    order by st_id desc
+  </select>
+
+
+</mapper>

+ 28 - 0
frontend/saas-web/app/model/money/Verification1.js

@@ -0,0 +1,28 @@
+Ext.define('saas.model.money.Verification1', {
+    extend: 'saas.model.Base',
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'vd_id', type: 'int' },
+        { name: 'vd_vcid', type: 'int' },
+        { name: 'vd_detno', type: 'int' },
+        { name: 'vd_ym', type: 'int' },
+        { name: 'vd_slid', type: 'int' },
+        { name: 'vd_slcode', type: 'string' },
+        { name: 'vd_slkind', type: 'string' },
+        { name: 'vd_sldate', type: 'date' },
+        { name: 'vd_amount', type: 'float' },
+        { name: 'vd_nowbalance', type: 'float' },
+        { name: 'vd_remark', type: 'string' },
+        { name: 'companyId', type: 'int' },
+        { name: 'updaterId', type: 'int' },
+        { name: 'vd_text1', type: 'string' },
+        { name: 'vd_text2', type: 'string' },
+        { name: 'vd_text3', type: 'string' },
+        { name: 'vd_text4', type: 'string' },
+        { name: 'vd_text5', type: 'string' },
+        { name: 'creator', type: 'string' },
+        { name: 'creatorId', type: 'int' },
+        { name: 'createTime', type: 'date' },
+        { name: 'updater', type: 'string' },
+    ]
+});

+ 154 - 138
frontend/saas-web/app/util/FormUtil.js

@@ -7,22 +7,11 @@ Ext.define('saas.util.FormUtil', {
         // 模板替换正则
         urlRe: /(.*){viewName}(.*)/g,
 
-        /**
-         * 获得form的字段配置
-         * @param form: form组件
-         * @param url: url
-         */
         setItems: function(form) {
             var me = this,
-            viewName = form.viewName,
-            defaultItems = form.defaultItems,
-            brr = [],
-            formModel = form.getViewModel(),
-            url = me.baseUrl.replace(me.urlRe, '$1' + viewName);
-            
-            brr = brr.concat(form.defaultItems);
+            defaultItems = form.defaultItems;
 
-            saas.util.BaseUtil.request({url, async: false})
+            me.applyCusItemConfig(form)
             .then(function(res) {
                 if(res.success) {
                     var config = res.data || true, items = defaultItems || [];
@@ -34,150 +23,177 @@ Ext.define('saas.util.FormUtil', {
                             });
                             Ext.apply(item, cusItem);
                         });
-                        Ext.Array.each(items, function(item) {
+                        items = me.applyDefaultItems(form, items);
+                    }
+                    form.removeAll();
+                    return form.addItems(items);
+                }else {
+                    return []
+                }
+            })
+            .then(function(items) {
+                form.fireEvent('afterSetItems', form, items);
+            })
+            .then(function() {
+                me.loadData(form);
+            })
+            .catch(function(response) {
+                saas.util.BaseUtil.showErrorToast('加载数据错误:' + response.message);
+                console.error(response);
+            });
 
-                            // 设置必填
-                            if(item.allowBlank==false){
-                                // TODO 需要判断类型
-                                item.beforeLabelTextTpl = "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>";
-                            }
+        },
 
-                            if(item.xtype == 'textfield') {
-                                Ext.applyIf(item, {
-                                    maxLength: 50
-                                });
-                            }
-                            
-                            if(item.xtype == 'datefield') {
-                                Ext.applyIf(item, {
-                                    editable: false,
-                                    format: 'Y-m-d'
-                                });
-                            }
+        /**
+         * 获得form的客户自定义字段配置
+         * @param form: form组件
+         * @param url: url
+         */
 
-                            if(item.xtype == 'numberfield') {
-                                Ext.applyIf(item, {
-                                    hideTrigger: true, // 隐藏trigger
-                                    mouseWheelEnabled: false // 取消滚轮事件
-                                });
-                                // 设置默认值为0
-                                formModel.set(item.name, 0);
-                            }
+        applyCusItemConfig: function(form) {
+            var me = this,
+            viewName = form.viewName,
+            defaultItems = form.defaultItems,
+            url = me.baseUrl.replace(me.urlRe, '$1' + viewName);
+            return saas.util.BaseUtil.request({url, async: false});
+        },
 
-                            // 如果是从表为其绑定store
-                            if(item.xtype == 'detailGridField') {
-                                var index = form.detailCount;
-                                var columns = item.columns,
-                                cnames = columns.filter(function(c) {
-                                    return c.dataIndex && !c.ignore;
-                                }).map(function(c) {
-                                    return c.dataIndex
-                                }),
-                                defaultValueColumns = {};
+        /**
+         * 处理formitems的一些默认配置
+         */
+        applyDefaultItems: function(form, items) {
+            var me = this,
+            formModel = form.getViewModel();
 
-                                Ext.Array.each(columns, function(c) {
+            Ext.Array.each(items, function(item) {
 
-                                    if(c.dataIndex && c.defaultValue) {
-                                        defaultValueColumns[c.dataIndex] = c.defaultValue;
-                                    }
+                // 设置必填
+                if(item.allowBlank==false){
+                    // TODO 需要判断类型
+                    item.beforeLabelTextTpl = "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>";
+                }
 
-                                    // 不可锁定
-                                    Ext.applyIf(c, {
-                                        lockable: false,
-                                        width: 120
-                                    });
+                if(item.xtype == 'textfield') {
+                    Ext.applyIf(item, {
+                        maxLength: 50
+                    });
+                }
+                
+                if(item.xtype == 'datefield') {
+                    Ext.applyIf(item, {
+                        editable: false,
+                        format: 'Y-m-d'
+                    });
+                }
 
-                                    //必填
-                                    Ext.applyIf(c, {
-                                        allowBlank: true
-                                    });
-                                    if(!c.allowBlank){
-                                        c.cls = 'x-grid-necessary';
-                                    }
+                if(item.xtype == 'numberfield') {
+                    Ext.applyIf(item, {
+                        hideTrigger: true, // 隐藏trigger
+                        mouseWheelEnabled: false // 取消滚轮事件
+                    });
+                    // 设置默认值为0
+                    formModel.set(item.name, 0);
+                }
 
-                                    if(c.xtype == 'textfield') {
-                                        Ext.applyIf(c, {
-                                            maxLength: 50
-                                        });
-                                    }else if(c.xtype == 'datecolumn') {
-                                        Ext.applyIf(c, {
-                                            format: 'Y-m-d'
-                                        });
-                                    }else if(c.xtype == 'numbercolumn') {
-                                        Ext.applyIf(c, {
-                                            align: 'end'
-                                        });
-                                    }
-                                    
-                                    var editor = c.editor;
-                                    if(editor) {
-                                        Ext.applyIf(editor, {
-                                            selectOnFocus: true
-                                        });
-                                        if(editor.xtype == 'numberfield') {
-                                            Ext.applyIf(editor, {
-                                                hideTrigger: true, // 隐藏trigger
-                                                mouseWheelEnabled: false // 取消滚轮事件
-                                            });
-                                        }else if(editor.xtype == 'datefield') {
-                                            Ext.apply(editor, {
-                                                format: 'Y-m-d'
-                                            });
-                                            Ext.applyIf(editor, {
-                                                editable: false
-                                            });
-                                        }
-                                    }
-                                });
+                // 如果是从表为其绑定store
+                if(item.xtype == 'detailGridField') {
+                    var index = form.detailCount;
+                    var columns = item.columns,
+                    cnames = columns.filter(function(c) {
+                        return c.dataIndex && !c.ignore;
+                    }).map(function(c) {
+                        return c.dataIndex
+                    }),
+                    defaultValueColumns = {};
+
+                    Ext.Array.each(columns, function(c) {
 
-                                if(columns[columns.length - 1].flex != 1) {
-                                    columns.push({
-                                        flex: 1,
-                                        allowBlank: true
-                                    });
-                                }
+                        if(c.dataIndex && c.defaultValue) {
+                            defaultValueColumns[c.dataIndex] = c.defaultValue;
+                        }
 
-                                cnames.push(item.detnoColumn);
+                        // 不可锁定
+                        Ext.applyIf(c, {
+                            lockable: false,
+                            width: 120
+                        });
 
-                                formModel.set('detail' + index + '.detailBindFields', cnames);
-                                item.bind = {
-                                    store: '{detail' + index + '.detailStore}'
-                                };     
-                                formModel.set('detail' + index + '.detailStore', Ext.create('Ext.data.Store', {
-                                    model:item.storeModel,
-                                    data: [],
-                                    listeners: {
-                                        add: function(store, records, index, eOpts) {
-                                            Ext.Array.each(records, function(r) {
-                                                for(k in defaultValueColumns) {
-                                                    r.set(k, defaultValueColumns[k]);
-                                                }
-                                                r.commit();
-                                            });
-                                        }
-                                    }
-                                }));
+                        //必填
+                        Ext.applyIf(c, {
+                            allowBlank: true
+                        });
+                        if(!c.allowBlank){
+                            c.cls = 'x-grid-necessary';
+                        }
 
-                                form.detailCount++;
+                        if(c.xtype == 'textfield') {
+                            Ext.applyIf(c, {
+                                maxLength: 50
+                            });
+                        }else if(c.xtype == 'datecolumn') {
+                            Ext.applyIf(c, {
+                                format: 'Y-m-d'
+                            });
+                        }else if(c.xtype == 'numbercolumn') {
+                            Ext.applyIf(c, {
+                                align: 'end'
+                            });
+                        }
+                        
+                        var editor = c.editor;
+                        if(editor) {
+                            Ext.applyIf(editor, {
+                                selectOnFocus: true
+                            });
+                            if(editor.xtype == 'numberfield') {
+                                Ext.applyIf(editor, {
+                                    hideTrigger: true, // 隐藏trigger
+                                    mouseWheelEnabled: false // 取消滚轮事件
+                                });
+                            }else if(editor.xtype == 'datefield') {
+                                Ext.apply(editor, {
+                                    format: 'Y-m-d'
+                                });
+                                Ext.applyIf(editor, {
+                                    editable: false
+                                });
                             }
+                        }
+                    });
+
+                    if(columns[columns.length - 1].flex != 1) {
+                        columns.push({
+                            flex: 1,
+                            allowBlank: true
                         });
                     }
-                    return form.addItems(items);
-                }else {
-                    return []
+
+                    cnames.push(item.detnoColumn);
+
+                    formModel.set('detail' + index + '.detailBindFields', cnames);
+                    item.bind = {
+                        store: '{detail' + index + '.detailStore}'
+                    };     
+                    formModel.set('detail' + index + '.detailStore', Ext.create('Ext.data.Store', {
+                        model:item.storeModel,
+                        data: [],
+                        listeners: {
+                            add: function(store, records, index, eOpts) {
+                                Ext.Array.each(records, function(r) {
+                                    for(k in defaultValueColumns) {
+                                        r.set(k, defaultValueColumns[k]);
+                                    }
+                                    r.commit();
+                                });
+                            }
+                        }
+                    }));
+
+                    form.detailCount++;
                 }
-            })
-            .then(function(items) {
-                form.fireEvent('afterSetItems', form, items);
-            })
-            .then(function() {
-                me.loadData(form);
-            })
-            .catch(function(response) {
-                saas.util.BaseUtil.showErrorToast('加载数据错误:' + response.message);
-                console.error(response);
             });
 
+            return items;
         },
 
         loadData: function(form) {

+ 3 - 1
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -170,7 +170,9 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
     },
 
     judge:function(f){
-        if(f.ownerCt.xtype.trim().toUpperCase().indexOf('QUERYFORMPANEL')>-1||(f.ownerCt.ownerCt&&f.ownerCt.ownerCt.xtype.trim().toUpperCase().indexOf('BASEPANEL')>-1)){
+        if(f.ownerCt.xtype.trim().toUpperCase().indexOf('QUERYFORMPANEL')>-1
+           ||(f.ownerCt.ownerCt&&(f.ownerCt.ownerCt.xtype.trim().toUpperCase().indexOf('BASEPANEL')>-1
+           ||f.ownerCt.ownerCt.xtype.trim().toUpperCase().indexOf('EDITDATALIST')>-1))){
             f.belong = 'form';
             return f.ownerCt.ownerCt
         }else if(f.ownerCt.xtype.trim().toUpperCase().indexOf('FORM')>-1){

+ 6 - 1
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -49,7 +49,7 @@ Ext.define('saas.view.core.form.FormPanel', {
         auditTexts = me.auditTexts;
         me._deleteMsg = '删除的'+me._title+'将不能恢复,请确认是否删除?';
         me.initViewModel();
-        saas.util.FormUtil.setItems(me);
+        me.initFormItems();
 
         me.defaultBtns = me.defaultBtns || [{
             cls: 'x-formpanel-btn-orange',
@@ -128,6 +128,11 @@ Ext.define('saas.view.core.form.FormPanel', {
         me.callParent(arguments);
     },
 
+    initFormItems: function() {
+        var me = this;
+        saas.util.FormUtil.setItems(me);
+    },
+
     getToolBarItems: function() {
         var me = this, items = [];
         var codeHeaderItems = [{

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

@@ -201,7 +201,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
         selectedRecord = me.selModel.lastSelected,
         datas = [];
 
-        num = num || 3
+        num = num || 3;
 
         //当前行后序号全部加1
         var detno = selectedRecord ? selectedRecord.data[detnoColumn] : 0;

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

@@ -56,6 +56,7 @@ Ext.define('saas.view.document.customer.BasePanel', {
     }],
 
     //字段属性
+    caller:'Customer',
     _formXtype:'document-customer-formpanel',
     _title:'客户资料',
     _deleteUrl:'/api/document/customer/delete/',

+ 4 - 2
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -335,13 +335,15 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 fieldLabel: '联系电话',
                 name: 'em_mobile',
-                allowBlank:false,
+                allowBlank:true,
+                beforeLabelTextTpl: '',
                 maxLength: 20
             },{
                 xtype:'textfield',
                 fieldLabel: '邮箱',
                 name: 'em_email', 
-                allowBlank:false,  
+                allowBlank:true,  
+                beforeLabelTextTpl: '',
                 maxLength: 20
             },{
                 value:'正式',

+ 19 - 7
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -18,7 +18,7 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                 bind: {
                     captions: {
                         title: {
-                            text: '销售趋势图',
+                            text: '近六月销售趋势图',
                             style: {
                                 'font-size': '14px',
                                 'color': '#485465',
@@ -71,14 +71,17 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     },
                 }],
                 series: [{
-                    tooltip: {
-                        trackMouse: true,
-                        renderer: me.onSeriesTooltipRender
-                    },
                     type: 'line',
                     smooth: true,
+                    title: '销售额',
                     xField: 'x',
                     yField: 'sale',
+                    label: {
+                        field: 'sale',
+                        display: 'over',
+                        fontSize: '12px',
+                        strokeStyle: '#A3D0EE',
+                    },
                     marker: {
                         radius: 0,
                         lineWidth: 0
@@ -95,13 +98,23 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                         fillStyle: '#53A8E2',
                         fillOpacity: 0.1,
                     },
+                    tooltip: {
+                        trackMouse: true,
+                        renderer: me.onSeriesTooltipRender
+                    },
                     // renderer: me.onSeriesRenderer
                 }, {
                     type: 'line',
                     smooth: true,
                     title: '销售回款',
                     xField: 'x',
-                    yField: ['saleback'],
+                    yField: 'saleback',
+                    label: {
+                        field: 'saleback',
+                        display: 'over',
+                        fontSize: '12px',
+                        strokeStyle: '#D54F65',
+                    },
                     tooltip: {
                         trackMouse: true,
                         renderer: me.onSeriesTooltipRender
@@ -165,7 +178,6 @@ Ext.define('saas.view.home.charts.SaleTrend', {
     },
 
     itemhighlightchange: function(chart, newHighlightItem, oldHighlightItem) {
-        debugger;
         this.setSeriesLineWidth(newHighlightItem, 4);
         this.setSeriesLineWidth(oldHighlightItem, 2);
     },

+ 523 - 0
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -0,0 +1,523 @@
+Ext.define('saas.view.money.verification.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    // extend: 'Ext.panel.Panel',
+    xtype: 'money-verification-formpanel',
+
+    controller: 'money-verification-formpanel',
+    viewModel: 'money-verification-formpanel',
+
+    viewName: 'money-verification-formpanel',
+
+    caller: 'Verification',
+
+    //字段属性
+    _title: '核销单',
+    _idField: 'vc_id',
+    _codeField: 'vc_code',
+    _statusField: 'vc_status',
+    _statusCodeField: 'vc_statuscode',
+
+    _readUrl: '/api/money/verification/read/',
+    _saveUrl: '/api/money/verification/save/',
+    _auditUrl: '/api/money/verification/audit/',
+    _unAuditUrl: '/api/money/verification/unAudit/',
+    _deleteUrl: '/api/money/verification/delete/',
+
+    defatulType: 'receipts_offset_receivable',
+
+    etc: {
+
+        /**
+         * 预收:receipts
+         * 预付:prepaid
+         * 应收:receivable
+         * 应付:payable
+         */
+
+        // base
+        base: [{
+            xtype: 'combo',
+            name: 'vc_kind',
+            fieldLabel: '业务类型',
+            editable: false,
+            store: [
+                ['receipts_offset_receivable', '预收冲应收'],
+                ['prepaid_offset_payable', '预付冲应付'],
+                ['receivable_offset_payable', '应收冲应付'],
+                ['receivable_to_receivable', '应收转应收'],
+                ['payable_to_payable', '应付转应付']
+            ]
+        }],
+
+        detail1: {
+            xtype: "detailGridField",
+            storeModel: 'saas.model.money.Verification1',
+            detnoColumn: 'vd_detno',
+            deleteDetailUrl: '/api/money/verification/deleteDetail1/',
+            columnWidth: 1,
+            columns: [{
+                text: 'ID',
+                dataIndex: 'id',
+                hidden: true
+            }, {
+                text: '来源ID',
+                dataIndex: 'vd_slid',
+                hidden: true
+            }, {
+                text: '来源单号',
+                dataIndex: 'vd_slcode',
+                editor:{
+                    displayField : "display",
+                    editable : true,
+                    format : "",
+                    hideTrigger : false,
+                    maxLength : 100.0,
+                    minValue : null,
+                    positiveNum : false,
+                    queryMode : "local",
+                    store : null,
+                    valueField : "value",
+                    xtype : "multidbfindtrigger"
+                }
+            }, {
+                text: '业务类型',
+                dataIndex: "vd_slkind"
+            }, {
+                text: "单据日期",
+                dataIndex: "vd_sldate",
+                xtype: 'datecolumn'
+            }, {
+                text: "单据金额",
+                xtype: 'numbercolumn',
+                dataIndex: "vd_amount",
+                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: "已核销金额",
+                xtype: 'numbercolumn',
+                dataIndex: "sl_yamount",
+                ignore:true,
+                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: "未核销金额",
+                xtype: 'numbercolumn',
+                dataIndex: "sl_namount",
+                ignore:true,
+                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: "本次核销金额",
+                xtype: 'numbercolumn',
+                dataIndex: "vd_nowbalance",
+                width:200,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                allowBlank : false,
+                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);
+                }
+            }]
+        },
+        detail2: {
+            xtype: "detailGridField",
+            storeModel: 'saas.model.money.Verification1',
+            detnoColumn: 'vd_detno',
+            deleteDetailUrl: '/api/money/verification/deleteDetail2/',
+            columnWidth: 1,
+            columns: [{
+                text: 'ID',
+                dataIndex: 'id',
+                hidden: true
+            }, {
+                text: '来源ID',
+                dataIndex: 'vd_slid',
+                hidden: true
+            }, {
+                text: '来源单号',
+                dataIndex: 'vd_slcode',
+                editor:{
+                    displayField : "display",
+                    editable : true,
+                    format : "",
+                    hideTrigger : false,
+                    maxLength : 100.0,
+                    minValue : null,
+                    positiveNum : false,
+                    queryMode : "local",
+                    store : null,
+                    valueField : "value",
+                    xtype : "multidbfindtrigger"
+                }
+            }, {
+                text: '业务类型',
+                dataIndex: "vd_slkind"
+            }, {
+                text: "单据日期",
+                dataIndex: "vd_sldate",
+                xtype: 'datecolumn'
+            }, {
+                text: "单据金额",
+                xtype: 'numbercolumn',
+                dataIndex: "vd_amount",
+                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: "已核销金额",
+                xtype: 'numbercolumn',
+                dataIndex: "sl_yamount",
+                ignore:true,
+                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: "未核销金额",
+                xtype: 'numbercolumn',
+                dataIndex: "sl_namount",
+                ignore:true,
+                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: "本次核销金额",
+                xtype: 'numbercolumn',
+                dataIndex: "vd_nowbalance",
+                width:200,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                allowBlank : false,
+                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);
+                }
+            }]
+        },
+        other: {
+            fieldLabel: '备注',
+            xtype: 'textfield',
+            columnWidth: 1,
+            name: 'vc_remark'
+        },
+
+        // 预收冲应收
+        receipts_offset_receivable : {
+            main: [{
+                xtype: 'hidden',
+                fieldLabel: '客户id',
+                name: 'vc_custid',
+            }, {
+                fieldLabel: '客户编号',
+                xtype: 'hidden',
+                name: 'vc_custcode',
+            }, {
+                fieldLabel: '客户名称',
+                xtype: 'customerDbfindTrigger',
+                name: 'vc_custname',
+            }, {
+                fieldLabel: '日期',
+                xtype: 'datefield',
+                name: 'vc_date'
+            }],
+            details: ['detail1', 'detail2']
+        },
+
+        // 预付冲应付
+        prepaid_offset_payable: {
+            main: [{
+                xtype: 'hidden',
+                name: 'vc_vendid',
+                fieldLabel: '供应商ID'
+            }, {
+                xtype: "hidden",
+                name: "vc_vendcode",
+                fieldLabel: "供应商编号"
+            }, {
+                xtype: "vendorDbfindTrigger",
+                name: "vc_vendname",
+                fieldLabel: "供应商名称",
+                allowBlank : false
+            }, {
+                fieldLabel: '日期',
+                xtype: 'datefield',
+                name: 'vc_date'
+            }],
+            details: ['detail1', 'detail2']
+        },
+
+        // 应收冲应付
+        receivable_offset_payable: {
+            main: [{
+                fieldLabel: '客户id',
+                xtype: 'textfield',
+                name: 'vc_custid',
+                hidden: true
+            }, {
+                fieldLabel: '客户编号',
+                xtype: 'textfield',
+                name: 'vc_custcode',
+                hidden: true
+            }, {
+                fieldLabel: '客户名称',
+                xtype: 'customerDbfindTrigger',
+                name: 'vc_custname',
+            }, {
+                xtype: 'hidden',
+                name: 'vc_vendid',
+                fieldLabel: '供应商ID'
+            }, {
+                xtype: "hidden",
+                name: "vc_vendcode",
+                fieldLabel: "供应商编号"
+            }, {
+                xtype: "vendorDbfindTrigger",
+                name: "vc_vendname",
+                fieldLabel: "供应商名称",
+                allowBlank : false
+            }, {
+                fieldLabel: '日期',
+                xtype: 'datefield',
+                name: 'vc_date'
+            }],
+            details: ['detail1', 'detail2']
+        },
+
+        // 应收转应收
+        receivable_to_receivable: {
+            main: [{
+                fieldLabel: '转出客户id',
+                xtype: 'textfield',
+                name: 'vc_outcustid',
+                hidden: true
+            }, {
+                fieldLabel: '转出客户编号',
+                xtype: 'textfield',
+                name: 'vc_outcustcode',
+                hidden: true
+            }, {
+                fieldLabel: '转出客户',
+                xtype: 'customerDbfindTrigger',
+                name: 'vc_outcustname',
+            }, {
+                fieldLabel: '转入客户id',
+                xtype: 'textfield',
+                name: 'vc_turncustid',
+                hidden: true
+            }, {
+                fieldLabel: '转入客户编号',
+                xtype: 'textfield',
+                name: 'vc_turncustcode',
+                hidden: true
+            }, {
+                fieldLabel: '转入客户',
+                xtype: 'customerDbfindTrigger',
+                name: 'vc_turncustname',
+            }, {
+                fieldLabel: '日期',
+                xtype: 'datefield',
+                name: 'vc_date'
+            }],
+            details: ['detail1']
+        },
+
+        // 应付转应付
+        payable_to_payable: {
+            main: [{
+                fieldLabel: '转出供应商id',
+                xtype: 'textfield',
+                name: 'vc_outvendid',
+                hidden: true
+            }, {
+                fieldLabel: '转出供应商编号',
+                xtype: 'textfield',
+                name: 'vc_outvendcode',
+                hidden: true
+            }, {
+                fieldLabel: '转出供应商',
+                xtype: 'vendorDbfindTrigger',
+                name: 'vc_outvendname',
+            }, {
+                fieldLabel: '转入供应商id',
+                xtype: 'textfield',
+                name: 'vc_turnvendid',
+                hidden: true
+            }, {
+                fieldLabel: '转入供应商编号',
+                xtype: 'textfield',
+                name: 'vc_turnvendcode',
+                hidden: true
+            }, {
+                fieldLabel: '转入供应商',
+                xtype: 'vendorDbfindTrigger',
+                name: 'vc_turnvendname',
+            }, {
+                fieldLabel: '日期',
+                xtype: 'datefield',
+                name: 'vc_date'
+            }],
+            details: ['detail1']
+        }
+    },
+
+    // initComponent: function() {
+    //     this.callParent(arguments);
+    // },
+
+    initFormItems: function() {
+        var me = this,
+        cusItems = me.cusItems,
+        defaultItems = me.getAcitveItems(),
+        FormUtil = saas.util.FormUtil;
+        
+        me.detailCount = 0;
+        if(cusItems) {
+            var items = defaultItems || [];
+            Ext.Array.each(cusItems, function(cusItem) {
+                var item = items.find(function(item) {
+                    return item.name == cusItem.name;
+                });
+                Ext.apply(item, cusItem);
+            });
+            items = FormUtil.applyDefaultItems(me, items);
+            me.removeAll();
+            me.addItems(items);
+            FormUtil.loadData(me);
+        }else {
+            FormUtil.applyCusItemConfig(me)
+            .then(function(res) {
+                if(res.success) {
+                    var config = res.data || true, items = defaultItems || [];
+                    if(config) {
+                        cusItems = config.items || [];
+                        me.cusItems = cusItems;
+                        Ext.Array.each(cusItems, function(cusItem) {
+                            var item = items.find(function(item) {
+                                return item.name == cusItem.name;
+                            });
+                            Ext.apply(item, cusItem);
+                        });
+                        items = FormUtil.applyDefaultItems(me, items);
+                    }
+                    me.removeAll();
+                    return me.addItems(items);
+                }
+            })
+            .then(function(items) {
+                me.fireEvent('afterSetItems', me, items);
+            })
+            .then(function() {
+                FormUtil.loadData(me);
+            })
+            .catch(function(response) {
+                saas.util.BaseUtil.showToast('错误:' + response.message);
+                console.error(response);
+            });
+        }
+    },
+
+    getAcitveItems: function() {
+        var me = this,
+        acitveType = me.acitveType || me.defatulType,
+        etc = me.etc,
+        acitveEtc = etc[acitveType],
+        mainItems =  acitveEtc.main,
+        details = acitveEtc.details,
+        base = etc.base,
+        detail1 = etc.detail1,
+        detail2 = etc.detail2,
+        other = etc.other,
+        items = [];
+
+        base.defaultValue = acitveType;
+
+        items = Ext.Array.merge(base, mainItems, (details[0] ? [detail1] : []), (details[1] ? [detail2] : []), [other] );
+
+        return items;
+    },
+});

+ 115 - 0
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -0,0 +1,115 @@
+Ext.define('saas.view.money.verification.FormPanelController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.money-verification-formpanel',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+            // 客户
+            'dbfindtrigger[name=vc_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //赋值 
+                        dbfinds:[{
+                            from: 'id', to: 'vc_custid',ignore:true
+                        }, {
+                            from:'cu_code', to:'vc_custcode'
+                        },{
+                            from:'cu_name', to:'vc_custname'
+                        }],
+                    }) ;   
+
+                }
+            },
+            // 转出客户
+            'dbfindtrigger[name=vc_outcustname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //赋值 
+                        dbfinds:[{
+                            from: 'id', to: 'vc_outcustid',ignore:true
+                        }, {
+                            from:'cu_code', to:'vc_outcustcode'
+                        },{
+                            from:'cu_name', to:'vc_outcustname'
+                        }],
+                    }) ;   
+
+                }
+            },
+            // 转入客户
+            'dbfindtrigger[name=vc_turncustname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //赋值 
+                        dbfinds:[{
+                            from: 'id', to: 'vc_turncustid',ignore:true
+                        }, {
+                            from:'cu_code', to:'vc_turncustcode'
+                        },{
+                            from:'cu_name', to:'vc_turncustname'
+                        }],
+                    }) ;   
+
+                }
+            },
+            // 供应商
+            'dbfindtrigger[name=vc_vendname]':{
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'vc_vendid',
+                            ignore: true
+                        }, {
+                            from: 've_code',
+                            to: 'vc_vendcode'
+                        }, {
+                            from: 've_name',
+                            to: 'vc_vendname'
+                        }],
+                    });
+
+                }
+            },
+            // 转出供应商
+            'dbfindtrigger[name=vc_outvendname]':{
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'vc_outvendid',
+                            ignore: true
+                        }, {
+                            from: 've_code',
+                            to: 'vc_outvendcode'
+                        }, {
+                            from: 've_name',
+                            to: 'vc_outvendname'
+                        }],
+                    });
+
+                }
+            },
+            // 转入供应商
+            'dbfindtrigger[name=vc_turnvendname]':{
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'vc_turncustid',
+                            ignore: true
+                        }, {
+                            from: 've_code',
+                            to: 'vc_turnvendcode'
+                        }, {
+                            from: 've_name',
+                            to: 'vc_turnvendname'
+                        }],
+                    });
+
+                }
+            },
+        });
+    },
+});

+ 18 - 0
frontend/saas-web/app/view/money/verification/FormPanelModel.js

@@ -0,0 +1,18 @@
+Ext.define('saas.view.money.verification.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.money-verification-formpanel',
+
+    formulas: {
+        vc_kind_change: {
+            bind: '{vc_kind}',
+            get: function(v) {
+                var form = this.getView();
+                form.acitveType = v;
+                form.initFormItems();
+
+                return v;
+            }
+        }
+    }
+
+});

+ 77 - 0
frontend/saas-web/app/view/money/verification/QueryPanel.js

@@ -0,0 +1,77 @@
+Ext.define('saas.view.money.verification.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'money-verification-querypanel',
+
+    controller: 'money-verification-querypanel',
+    viewModel: 'money-verification-querypanel',
+
+    viewName: 'money-verification-querypanel',
+    
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'rb_id',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        getCondition: function(value) {
+            return 'rb_id=' + value;
+        }
+    }, {
+        xtype: 'textfield',
+        name: 'rb_code',
+        fieldLabel: '单据编号'
+    }, {
+        xtype: 'condatefield',
+        name: 'rb_date',
+        fieldLabel: '日期',
+        columnWidth: 0.5,
+        operation: 'between'
+    }],
+    moreQueryFormItems: [],
+    queryGridConfig: {
+        idField: 'id',
+        codeField: 'rb_code',
+        addTitle: '收款单',
+        addXtype: 'money-recbalance-formpanel',
+        defaultCondition:'',
+        baseVastUrl: '/api/money/recbalance/',
+        baseColumn: [{
+            text: 'id',
+            dataIndex: 'id',
+            width: 100,
+            xtype: 'numbercolumn',
+            hidden: true
+        }, {
+            text: '单据编号',
+            dataIndex: 'rb_code',
+            width: 200
+        }, {
+            text: '单据状态',
+            dataIndex: 'rb_status',
+            width: 120
+        }, {
+            text: '日期',
+            dataIndex: 'rb_date',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户编号',
+            dataIndex: 'rb_custcode',
+            hidden: true
+        }, {
+            text: '客户名称',
+            dataIndex: 'rb_custname',
+        }, {
+            text: '收款人',
+            dataIndex: 'rb_manname',
+            xtype: 'numbercolumn',
+            width: 120,
+        }, {
+            text: '收款金额',
+            dataIndex: 'rb_rdamount',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1,
+            hidden: true
+        }]
+    }
+});

+ 186 - 0
frontend/saas-web/app/view/money/verification/QueryPanelController.js

@@ -0,0 +1,186 @@
+Ext.define('saas.view.money.verification.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.money-verification-querypanel',
+    
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl: '/api/document/vendor/list',
+                        addXtype: 'document-vendor-formpanel',
+                        addTitle: '供应商资料',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "供应商ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
+                        },{
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100
+                        }, {
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "width": 100
+                        }, {
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl: '/api/document/product/list',
+                        addXtype: 'document-product-formpanel',
+                        addTitle: '物料资料',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                        }, {
+                            from:'pr_detail',to:'pr_detail'
+                        }],
+                        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_spec",
+                            "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,
+                        },{
+                            "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,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]   
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

+ 5 - 0
frontend/saas-web/app/view/money/verification/QueryPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.money.verification.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.money-verification-querypanel'
+
+});

+ 444 - 0
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -0,0 +1,444 @@
+Ext.define('saas.view.stock.inventory.EditDataList', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'stock-inventory-editdatalist',
+
+    autoScroll: true,
+    frame:true,
+    layout:'fit',
+    dataUrl:'/api/storage/stocktaking/list',
+    saveUrl:'/api/storage/stocktaking/save',
+    requires: [
+        'Ext.Action',
+        'Ext.grid.plugin.CellEditing',
+        'Ext.selection.CellModel'
+    ],
+    plugins: {
+        cellediting: {
+            clicksToEdit: 1,
+            listeners: {
+                // edit: function(editor, context, eOpts) {
+                //     context.column.fireEvent('edit', context.value);
+                // }
+            }
+        }
+    },
+    tbar: [{		
+        xtype: 'warehouseDbfindTrigger',
+        name: 'wh_description',
+        emptyText: '仓库',
+        dbfinds:[{
+            from:'id',to:'id',ignore:true 
+        }, { 
+            from:'wh_code',to:'wh_code'
+        }, {
+            from:'wh_description',to:'wh_description'
+        }],
+        width:150,
+    },{
+        editable:false,
+        xtype : "remotecombo", 
+        storeUrl:'/api/document/producttype/getCombo',
+        name : "pr_kind", 
+        emptyText : "类型", 
+        allowBlank : false, 
+        addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
+            var form = this.ownerCmp.ownerCt;
+            this.dialog = form.getController().getView().add({
+                xtype: 'document-kind-childwin',
+                bind: {
+                    title: '新增物料类型'
+                },
+                dataKind:'productkind',
+                belong:document.etc['productkind'],
+                _parent:form,
+                _combo:this.ownerCmp,
+                record:null,
+                session: true
+            });
+            this.dialog.show();
+        },
+        width:150
+    }, {
+        xtype: 'productDbfindTrigger',
+        name: 'pr_detail',
+        emptyText:'输入物料编号或名称',
+        width:150,
+        dbfinds:[{
+            from:'pr_detail',to:'pr_detail',
+        },{
+            from:'pr_code',to:'pd_prodcode',
+        }, {
+            from:'pr_detail',to:'pr_detail'
+        }]
+    },{
+        cls:'x-formpanel-btn-orange',
+        xtype:'button',
+        text:'查询',
+        listeners: {
+            click:function(b){
+                var grid = b.ownerCt.ownerCt;
+                var tbar = b.ownerCt;
+                grid.condition = '';
+                var items = [];
+                var fields = tbar.items.items.map(f => f.name);
+                Ext.each(fields, function(f, index){
+                    var field = tbar.down('[name='+f+']');
+                    if(field){
+                        items.push(field);
+                    }
+                });
+                grid.condition = grid.getCondition(items);
+                grid.store.loadPage(1);
+            }
+        }
+    },'->',{
+        xtype:'button',
+        text:'保存',
+        listeners: {
+            click:function(b){
+                var me = this.ownerCt.ownerCt;
+                me.onSave();
+            }
+        }
+    },{
+        xtype:'button',
+        text:'导出',
+        listeners: {
+            click:function(b){
+             
+            }
+        }
+    },{
+        xtype:'button',
+        text:'生成盘点单据',
+        listeners: {
+            click:function(b){
+             
+            }
+        }
+    }],
+
+    //字段属性
+    columns : [{
+        text : "盘点id", 
+        width : 0, 
+        dataIndex : "id", 
+        xtype : "numbercolumn", 
+    },{
+        text : "物料id", 
+        width : 0, 
+        dataIndex : "st_prodid", 
+        xtype : "numbercolumn", 
+    }, 
+    {
+        text : "物料编号", 
+        dataIndex : "st_prodcode", 
+        width : 120.0, 
+        xtype : "", 
+    }, 
+    {
+        text : "物料名称", 
+        dataIndex : "st_proddetail", 
+        width : 120.0, 
+        xtype : "", 
+    },
+    {
+        text : "规格型号", 
+        dataIndex : "st_prodorispeccode", 
+        width : 120.0, 
+        xtype : "", 
+    },
+    {
+        text : "物料类别", 
+        dataIndex : "st_prodkind", 
+        width : 120.0, 
+        xtype : "", 
+    },
+    {
+        text : "单位", 
+        dataIndex : "st_produnit", 
+        width : 120.0, 
+        xtype : "", 
+    },
+    {
+        text : "仓库id", 
+        dataIndex : "st_whid", 
+        width : 0, 
+        xtype : "numbercolumn", 
+    },
+    {
+        text : "仓库编号", 
+        dataIndex : "st_whcode", 
+        width : 120.0, 
+        xtype : "", 
+    },
+    {
+        text : "仓库", 
+        dataIndex : "st_whname", 
+        width : 120.0, 
+        xtype : "", 
+    },
+    {
+        text : "系统库存", 
+        dataIndex : "st_batchqty", 
+        width : 120.0, 
+        xtype : "numbercolumn",
+        renderer : function(v) {
+            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 : "盘点库存", 
+        dataIndex : "st_actqty", 
+        width : 120.0, 
+        xtype : "numbercolumn",
+        editor : {
+            xtype : "numberfield",
+            decimalPrecision: 3,
+            minValue:0,
+            listeners:{
+                change:function( f, newValue, oldValue, eOpts ){
+                    var s= f.ownerCt.ownerCmp.getSelectionModel(),
+                    id =  s.lastSelected.id,
+                    record = s.store.getById(id),
+                    batchqty = record.get("st_batchqty");       
+                    record.set("st_num",newValue-batchqty);
+
+                }
+            }    
+        },
+        renderer : function(v) {
+            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 : "盘盈盘亏", 
+        dataIndex : "st_num", 
+        width : 120.0, 
+        xtype : "numbercolumn", 
+    }],
+
+    condition:'',
+
+    listeners:{
+        boxready: function(grid, width, height, eOpts) {
+            var store = grid.getStore(),
+            gridBodyBox = grid.body.dom.getBoundingClientRect(),
+            gridBodyBoxHeight = gridBodyBox.height;
+
+            var pageSize = Math.floor(gridBodyBoxHeight / 33);
+
+            store.setPageSize(pageSize);
+        }
+    },
+
+    initComponent: function() {
+        var me = this;
+        if(me.columns){
+            var fields = me.columns.map(column => column.dataIndex);
+            me.store = Ext.create('Ext.data.Store',{
+                fields:fields,
+                autoLoad: true,
+                pageSize: 11,
+                data: [],
+                proxy: {
+                    timeout:8000,
+                    type: 'ajax',
+                    url: me.dataUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data.list',
+                        totalProperty: 'data.total',
+                    }
+                },
+                listeners: {
+                    beforeload: function (store, op) {
+                        var condition = me.condition;
+                        if (Ext.isEmpty(condition)) {
+                            condition = "";
+                        }
+                        Ext.apply(store.proxy.extraParams, {
+                            number: op._page,
+                            size: store.pageSize,
+                            condition: JSON.stringify(condition)
+                        });
+                    }
+                }
+            });
+
+            Ext.apply(me, {
+                dockedItems:[{
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    displayInfo: true,
+                    store: me.store
+                }]
+            });
+        }
+        me.callParent(arguments);
+    },
+
+     /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
+
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    refresh:function(){
+        //debugger
+        var me = this,
+        store = me.getStore();
+        store.load();
+    },
+    onSave:function(){
+        var me = this,
+        gridData = me.getDirtyData();
+        if(gridData==null){
+            saas.util.BaseUtil.showToast('未修改数据');
+        }
+
+        saas.util.BaseUtil.request({
+            url: me.saveUrl,
+            params: JSON.stringify(gridData),
+            method: 'POST',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                me.refresh();
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            saas.util.BaseUtil.showToast('保存失败: ' + res.message);
+        });        
+    },
+    getDirtyData: function() {
+        var me = this,
+        store = me.getStore(),
+        allData = store.getData().items,
+        dirtyData = [];
+
+        Ext.Array.each(allData, function(item){
+            var d = Object.assign({}, item.data),
+            dirty = item.dirty;
+
+            if(dirty){
+                if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
+                    d.id = 0;
+                }
+                for(k in d) {
+                    if(Ext.isDate(d[k])) {
+                        d[k] = Ext.Date.format(d[k], 'Y-m-d H:i:s');
+                    }
+                }
+                dirtyData.push(d);
+            }
+        });
+        return dirtyData;
+    },
+
+
+});

+ 7 - 3
frontend/saas-web/resources/json/navigation.json

@@ -104,10 +104,9 @@
             "addType": "stock-otherout-formpanel",
             "viewType": "stock-otherout-querypanel"
         }, {
-            "id": "inventory",
+            "id": "stock-inventory-editdatalist",
             "text": "盘点单",
-            "addType": "stock-inventory-formpanel",
-            "viewType": "stock-inventory-querypanel"
+            "viewType": "stock-inventory-editdatalist"
         }]
     }, {
         "text": "报表",
@@ -140,6 +139,11 @@
             "text": "收款单",
             "addType": "money-recbalance-formpanel",
             "viewType": "money-recbalance-querypanel"
+        }, {
+            "id": "verification",
+            "text": "核销单",
+            "addType": "money-verification-formpanel",
+            "viewType": "money-verification-querypanel"
         }, {
             "id": "othReceipts",
             "text": "其它收入单",