Explorar o código

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

guq %!s(int64=7) %!d(string=hai) anos
pai
achega
5f9d09de27
Modificáronse 31 ficheiros con 333 adicións e 167 borrados
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 4 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  3. 3 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java
  4. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BankinformationServiceImpl.java
  5. 30 17
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  6. 24 12
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java
  7. 9 1
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  8. 9 0
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  9. 2 2
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  10. 1 1
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDetailDTO.java
  11. 36 24
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  12. 3 3
      base-servers/auth/auth-common/src/main/java/com/usoftchina/saas/auth/common/cookie/CookieInfo.java
  13. 1 1
      frontend/saas-web/app/util/BaseUtil.js
  14. 40 39
      frontend/saas-web/app/view/home/InfoCard.js
  15. 11 2
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  16. 13 6
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  17. 11 3
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  18. 14 15
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  19. 11 2
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  20. 8 14
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  21. 10 0
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  22. 1 6
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  23. 10 0
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  24. 1 6
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  25. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  26. 16 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  27. 3 2
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  28. 38 5
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  29. 1 0
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  30. 2 2
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  31. 18 1
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

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

@@ -39,6 +39,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
     PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
     ACCOUNT_EXISTS(79503, "账号已存在"),
+    USING_EXISTS(79504, ""),
 
 
 

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java

@@ -4,6 +4,8 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customer;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Map;
+
 public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Long cu_id);
 
@@ -27,4 +29,6 @@ public interface CustomerMapper extends CommonBaseMapper<Customer> {
     int validNameAndCodeWhenUpdate(Customer record);
 
     int validFinish(@Param("id") Long id,@Param("companyId") Long companyId);
+
+    void check(Map<String, Object> map);
 }

+ 3 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/VendorMapper.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.document.entities.VendorList;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 public interface VendorMapper extends CommonBaseMapper<Vendor> {
 
@@ -28,4 +29,6 @@ public interface VendorMapper extends CommonBaseMapper<Vendor> {
     int getCountByName(@Param("name") String name, @Param("companyId") Long companyId);
 
     int validFinish(@Param("id") Long id,@Param("companyId") Long companyId);
+
+    void check(Map<String, Object> map);
 }

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

@@ -138,7 +138,7 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
      */
     public static Date string2Date(String dateStr, String format) throws Exception {
         SimpleDateFormat sdf = new SimpleDateFormat(format);
-        if (dateStr == null) {
+        if (dateStr != null) {
             return sdf.parse(dateStr);
         }
         return null;

+ 30 - 17
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java

@@ -28,9 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * Created by zdw
@@ -55,6 +53,8 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     private MaxnumberService maxnumberService;
     @Autowired
     private SubledgerMapper subledgerMapper;
+    @Autowired
+    private CustomerMapper customerMapper;
 
 
     @Override
@@ -294,17 +294,28 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     private void singleDelete(Long id) {
         if (null!=id) {
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
-            //主表删除
-            getMapper().deleteByPrimaryKey(id);
-            //从表删除
-            customercontactMapper.deleteByFK(id);
-            customeraddressMapper.deleteByFK(id);
-
-            //删除中间表
-            subledgerMapper.deleteCustomer("期初余额", "期初余额", Math.toIntExact(id));
-
-            //日志
-            messageLogService.delete(docBaseDTO);
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("v_id",id);
+            map.put("v_code", docBaseDTO.getCode());
+            map.put("v_type","cust");
+            map.put("v_res","");
+            customerMapper.check(map);
+            Object result =  map.get("v_res");
+            if(!StringUtils.isEmpty(result)){
+                throw new BizException(BizExceptionCode.USING_EXISTS.getCode(),result.toString());
+            }else{
+                //主表删除
+                getMapper().deleteByPrimaryKey(id);
+                //从表删除
+                customercontactMapper.deleteByFK(id);
+                customeraddressMapper.deleteByFK(id);
+
+                //删除中间表
+                subledgerMapper.deleteCustomer("期初余额", "期初余额", Math.toIntExact(id));
+
+                //日志
+                messageLogService.delete(docBaseDTO);
+            }
         }
     }
 
@@ -482,10 +493,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
      */
     public static Date string2Date(String dateStr, String format) throws Exception {
         SimpleDateFormat sdf = new SimpleDateFormat(format);
-        if (dateStr == null) {
+        if (dateStr != null) {
             return sdf.parse(dateStr);
+        }else {
+            return null;
         }
-        return null;
     }
 
     /**
@@ -499,8 +511,9 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         SimpleDateFormat sdf = new SimpleDateFormat(format);
         if (date != null) {
             return sdf.format(date);
+        }else {
+            return null;
         }
-        return null;
     }
 
 }

+ 24 - 12
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/VendorServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.document.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -27,11 +28,10 @@ import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
 
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * @author chenwei
@@ -48,6 +48,8 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     private MaxnumberService maxnumberService;
     @Autowired
     private SubledgerMapper subledgerMapper;
+    @Autowired
+    private VendorMapper vendorMapper;
 
     @Override
     public PageInfo<VendorDTO> getVendorsByCondition(PageRequest page, ListReqDTO listReqDTO) {
@@ -257,14 +259,24 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
     @Override
     public void deleteById(Long id) {
         if(id != null && id > 0){
-            getMapper().deleteByPrimaryKey(id);
-            vendorcontactMapper.deleteByFK(id);
-            String code = getMapper().getCodeById(id, BaseContextHolder.getCompanyId());
-
-            //删除中间表
-            subledgerMapper.deleteVendor("期初余额", "期初余额", Math.toIntExact(id));
-            //记录LOG
-            messageLogService.delete(generateMsgObj(id, code));
+            String code = getMapper().getCodeById(id, new Long(1));
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("v_id",id);
+            map.put("v_code", code);
+            map.put("v_type","vend");
+            map.put("v_res","");
+            vendorMapper.check(map);
+            Object result =  map.get("v_res");
+            if(!StringUtils.isEmpty(result)){
+                throw new BizException(BizExceptionCode.USING_EXISTS.getCode(),result.toString());
+            }else{
+                getMapper().deleteByPrimaryKey(id);
+                vendorcontactMapper.deleteByFK(id);
+                //删除中间表
+                subledgerMapper.deleteVendor("期初余额", "期初余额", Math.toIntExact(id));
+                //记录LOG
+                messageLogService.delete(generateMsgObj(id, code));
+            }
         }
     }
 
@@ -420,7 +432,7 @@ public class VendorServiceImpl extends CommonBaseServiceImpl<VendorMapper, Vendo
      */
     public static Date string2Date(String dateStr, String format) throws Exception {
         SimpleDateFormat sdf = new SimpleDateFormat(format);
-        if (dateStr == null) {
+        if (dateStr != null) {
             return sdf.parse(dateStr);
         }
         return null;

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

@@ -391,7 +391,15 @@
   select count(1) from periodsdetail where pd_status=99 and pd_detno=(select DATE_FORMAT(cu_begindate,'%Y%m') from customer where cu_id =#{id})
   and companyId =#{companyId};
   </select>
-
+  <select id="check" parameterMap="checkParamMap" statementType="CALLABLE">
+        CALL SP_LIMITBASE(?, ?, ?, ?)
+    </select>
+  <parameterMap id="checkParamMap" type="java.util.Map">
+    <parameter property="v_type" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_id" jdbcType="INTEGER" mode="IN" />
+    <parameter property="v_code" jdbcType="VARCHAR" mode="IN" />
+    <parameter property="v_res" jdbcType="VARCHAR" mode="OUT" />
+  </parameterMap>
 
 
 </mapper>

+ 9 - 0
applications/document/document-server/src/main/resources/mapper/VendorMapper.xml

@@ -477,5 +477,14 @@
         and companyId =#{companyId};
     </select>
 
+    <select id="check" parameterMap="checkParamMap" statementType="CALLABLE">
+        CALL SP_LIMITBASE(?, ?, ?, ?)
+    </select>
+    <parameterMap id="checkParamMap" type="java.util.Map">
+        <parameter property="v_type" jdbcType="VARCHAR" mode="IN" />
+        <parameter property="v_id" jdbcType="INTEGER" mode="IN" />
+        <parameter property="v_code" jdbcType="VARCHAR" mode="IN" />
+        <parameter property="v_res" jdbcType="VARCHAR" mode="OUT" />
+    </parameterMap>
 </mapper>
 

+ 2 - 2
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -33,8 +33,8 @@
   <sql id="Base_Column_List" >
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
     os_bankname, os_amount, os_recorderid, os_recorder, os_recorddate, os_status, os_statuscode, 
-    os_remark, companyId, updaterId,
-    updatedate, os_text1, os_text2, os_text3, os_text4,
+    os_remark, othspendings.companyId, othspendings.updaterId,
+    othspendings.updatedate, os_text1, os_text2, os_text3, os_text4,
     os_text5
   </sql>
   <sql id="Detail_Column_List" >

+ 1 - 1
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDetailDTO.java

@@ -12,7 +12,7 @@ import java.util.Date;
  * @date 2018/10/9
  */
 @Data
-public class PurchaseDetailDTO implements Serializable{
+public class PurchaseDetailDTO extends CommonBaseDTO implements Serializable{
 
     private  Long pd_puid;
 

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

@@ -266,6 +266,13 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
     public void singleAudit(MakeListDTO makeListDTO) {
         //1.获取主从表数据
         Make make = makeListDTO.getMain();
+        //检验单审核状态
+        //检查审核状态
+        String ma_statuscode = make.getMa_statuscode();
+        if(StringUtils.isEmpty(ma_statuscode)||(!StringUtils.isEmpty(ma_statuscode)&&!ma_statuscode.equals(Status.UNAUDITED.name()))){
+            throw  new BizException(BizExceptionCode.BIZ_AUDITED);
+        };
+
         //2.校验库存是否足够
         validStorage(makeListDTO);
         //3.生成  完工入库单和领料单 并 过账
@@ -537,7 +544,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
                 prodIODetailList.add(prodIODetail);
             }
             prodIODetailMapper.batchInsert(prodIODetailList);
-
             map.put("inoutNo", code);
             map.put("class", "完工入库单");
             map.put("commitid", BaseContextHolder.getUserId());
@@ -551,10 +557,21 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
     }
 
     @Override
-    @Transactional(rollbackFor = Exception.class)
     public DocBaseDTO resAudit(Long id) {
+        return singleUnAudit(id);
+    }
+
+
+
+    @Transactional(propagation = Propagation.REQUIRED)
+    public DocBaseDTO singleUnAudit(Long id) {
         //1.获取主从表数据
         Make make = getMapper().selectByPrimaryKey(id);
+        //检查审核状态
+        String ma_statuscode = make.getMa_statuscode();
+        if(StringUtils.isEmpty(ma_statuscode)||(!StringUtils.isEmpty(ma_statuscode)&&!ma_statuscode.equals(Status.AUDITED.name()))){
+            throw  new BizException(BizExceptionCode.BIZ_UNAUDITED);
+        };
         List<MakeMaterial> items = makeMaterialMapper.selectByFK(id, BaseContextHolder.getCompanyId());
         MakeListDTO makeListDTO = new MakeListDTO(make, items);
         //2.校验库存是否足够
@@ -577,7 +594,23 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
     }
 
 
-
+    @Override
+    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return "无可反审核单据。";
+        }
+        StringBuffer errorMsg = new StringBuffer();
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            try {
+                Long id =  base.getId();
+                singleUnAudit(id);
+            }catch (Exception e) {
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
+        }
+        return errorMsg.toString();
+    }
 
     @Override
     public String batchClose(BatchDealBaseDTO batchDealBaseDTO) {
@@ -618,27 +651,6 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
     }
 
 
-
-    @Override
-    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
-        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
-                baseDTOs.getBaseDTOs().size() == 0) {
-            return "无可反审核单据。";
-        }
-        StringBuffer errorMsg = new StringBuffer();
-        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            try {
-                Long id =  base.getId();
-
-//                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-//                singleUnAudit(prodInOutDTO);
-            }catch (Exception e) {
-                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
-            }
-        }
-        return errorMsg.toString();
-    }
-
     /**
      * 1.查找制造单关联的出入库单据
      * 2.反过账

+ 3 - 3
base-servers/auth/auth-common/src/main/java/com/usoftchina/saas/auth/common/cookie/CookieInfo.java

@@ -105,7 +105,7 @@ public class CookieInfo implements Serializable {
     /**
      * 上次登录时间
      */
-    private Date lastLoginTime;
+    private Long lastLoginTime;
 
     public Long getUserUU() {
         return userUU;
@@ -243,11 +243,11 @@ public class CookieInfo implements Serializable {
         this.appId = appId;
     }
 
-    public Date getLastLoginTime() {
+    public Long getLastLoginTime() {
         return lastLoginTime;
     }
 
-    public void setLastLoginTime(Date lastLoginTime) {
+    public void setLastLoginTime(Long lastLoginTime) {
         this.lastLoginTime = lastLoginTime;
     }
 

+ 1 - 1
frontend/saas-web/app/util/BaseUtil.js

@@ -112,7 +112,7 @@ Ext.define('saas.util.BaseUtil', {
         },
 
         getCurrentUser: function () {
-            return saas.util.State.get('session').account;
+            return saas.util.State.get('session') ? saas.util.State.get('session').account : null;
         },
 
         /**

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

@@ -31,49 +31,50 @@ Ext.define('saas.view.home.InfoCard', {
         '</div>'
     ],
 
-    cards: {
-        unship: {
-            title: '七天内待出货销售',
-            color: 'yellow',
-            viewType: 'sale-sale-querypanel',
-            condition: 'sale.companyid=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail where sd_said=sa_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now()) <7)'
-        },
-        unstorage: {
-            title: '七天内待入库采购',
-            color: 'purple',
-            viewType: 'purchase-purchase-querypanel',
-            condition: 'purchase.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail where pd_puid=pu_id and IFNULL(pd_acceptqty,0)<ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <7)'
-        },
-        unpay: {
-            title: '七天内待付款',
-            color: 'red',
-            viewType: 'purchase-purchasein-querypanel',
-            condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now())<7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and ifnull(sl_namount,0)<>0)'
-        },
-        unreceive: {
-            title: '七天内待收款',
-            color: 'pink',
-            viewType: 'sale-saleout-querypanel',
-            condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now())<7and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=1 and ifnull(sl_namount,0)<>0)'
-        },
-        unauditcheck: {
-            title: '未审核验收',
-            color: 'blue',
-            viewType: 'purchase-purchasein-querypanel',
-            condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'采购验收单\' and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId
-        },
-        unauditship: {
-            title: '未审核出货',
-            color: 'default',
-            viewType: 'purchase-purchasein-querypanel',
-            condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'出货单\' and prodinout.companyId=' + saas.util.BaseUtil.getCurrentUser().companyId
-        }
-    },
-
     initComponent: function () {
         var me = this;
 
+        var companyId = saas.util.BaseUtil.getCurrentUser().companyId;
+
         Ext.apply(me, {
+            cards: {
+                unship: {
+                    title: '七天内待出货销售',
+                    color: 'yellow',
+                    viewType: 'sale-sale-querypanel',
+                    condition: 'sale.companyid=' + companyId + ' and sa_statuscode=\'AUDITED\' and exists (select 1 from saledetail where sd_said=sa_id and  IFNULL(sd_sendqty,0)<ifnull(sd_qty,0) and TO_DAYS(sd_delivery)-TO_DAYS(now()) <7)'
+                },
+                unstorage: {
+                    title: '七天内待入库采购',
+                    color: 'purple',
+                    viewType: 'purchase-purchase-querypanel',
+                    condition: 'purchase.companyId=' + companyId + ' and pu_statuscode=\'AUDITED\' and exists (select 1 from purchasedetail where pd_puid=pu_id and IFNULL(pd_acceptqty,0)<ifnull(pd_qty,0) and TO_DAYS(PD_DELIVERY)-TO_DAYS(now()) <7)'
+                },
+                unpay: {
+                    title: '七天内待付款',
+                    color: 'red',
+                    viewType: 'purchase-purchasein-querypanel',
+                    condition: 'pi_class in(\'采购验收单\',\'采购验退单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(ve_promisedays,0))-TO_DAYS(now())<7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=' + companyId + ' and ifnull(sl_namount,0)<>0)'
+                },
+                unreceive: {
+                    title: '七天内待收款',
+                    color: 'pink',
+                    viewType: 'sale-saleout-querypanel',
+                    condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now())<7and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=1 and ifnull(sl_namount,0)<>0)'
+                },
+                unauditcheck: {
+                    title: '未审核验收',
+                    color: 'blue',
+                    viewType: 'purchase-purchasein-querypanel',
+                    condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'采购验收单\' and prodinout.companyId=' + companyId
+                },
+                unauditship: {
+                    title: '未审核出货',
+                    color: 'default',
+                    viewType: 'purchase-purchasein-querypanel',
+                    condition: 'pi_statuscode<>\'AUDITED\' and pi_class=\'出货单\' and prodinout.companyId=' + companyId
+                }
+            },
             userCls: 'x-info-card ' + me.userCls,
             lbar: [{
                 itemId: 'card-prev',

+ 11 - 2
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -190,6 +190,15 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         name : "createTime",
         fieldLabel : "录入日期",
         readOnly:true
-    }
-    ]
+    },{
+        xtype: 'textfield',
+        name: 'ft_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "ft_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
+    }]
 });

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

@@ -11,17 +11,23 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         xtype : "textfield",
         name : "ft_code",
         fieldLabel : "单据编号",
-        columnWidth: 0.3
+    },{
+        xtype : "textfield",
+        name : "ft_recorder",
+        fieldLabel : "制单人",
+    },{
+        xtype : "textfield",
+        name : "ft_auditman",
+        fieldLabel : "审核人",
     },{
         xtype : "condatefield",
         name : "ft_date",
         fieldLabel : "单据日期",
-        columnWidth: 0.6
+        columnWidth: 0.5
     },{
         xtype: 'multicombo',
         name: 'ft_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]
@@ -29,7 +35,6 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
     },{
         name : "ft_status",
         fieldLabel : "结算方式",
-        columnWidth: 0.3,
         xtype:'combo',
         queryMode: 'local',
         displayField: 'display',
@@ -50,12 +55,10 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         xtype : "dbfindtrigger",
         name : "ftd_bankname",
         fieldLabel : "转出账号",
-        columnWidth: 0.3
     },{
         xtype : "dbfindtrigger",
         name : "ftd_inbankname",
         fieldLabel : "转入账号",
-        columnWidth: 0.3
     }],
     moreQueryFormItems: [],
     queryGridConfig: {
@@ -88,6 +91,10 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
             dataIndex: 'ft_recorder',
             width: 120
         }, {
+            text: '审核人',
+            dataIndex: 'ft_auditman',
+            width: 120
+        },{
             text: '转出账户',
             dataIndex: 'ftd_bankname',
             width: 120

+ 11 - 3
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -160,7 +160,15 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
         name : "or_recorddate",
         fieldLabel : "录入日期",
         readOnly:true
-    }
-
-    ]
+    },{
+        xtype: 'textfield',
+        name: 'or_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "or_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
+    }]
 });

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

@@ -21,7 +21,6 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         xtype: 'textfield',
         name: 'or_code',
         fieldLabel: '单据编号',
-        columnWidth: 0.3
     }, {
         xtype: 'hidden',
         name: 'or_custcode',
@@ -30,31 +29,28 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         xtype: 'dbfindtrigger',
         name: 'or_custname',
         fieldLabel: '客户名称',
-        columnWidth: 0.3
-    }, {
-        xtype : 'hidden',
-        name : 'or_bankid', 
-        fieldLabel : '账户ID'
-     }, {
-        xtype: 'hidden',
-        name: 'or_bankcode',
-        fieldLabel: '账户编号'
     }, {
+        xtype: 'textfield',
+        name: 'or_recorder',
+        fieldLabel: '制单人'
+    },{
+        xtype: 'textfield',
+        name: 'or_auditman',
+        fieldLabel: '审核人'
+    },  {
         xtype: 'dbfindtrigger',
         name: 'or_bankname',
-        columnWidth: 0.3,
         fieldLabel: '账户名称'
     }, {
         xtype: 'condatefield',
         name: 'or_date',
         fieldLabel: '单据日期',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         operation: 'between'
     }, {
         xtype: 'multicombo',
         name: 'or_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]
@@ -62,7 +58,6 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
     }, {
         name: 'ord_type',
         fieldLabel: '收入类别',
-        columnWidth: 0.3,
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=收入',
     }],
@@ -102,7 +97,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
             dataIndex: 'or_bankname',
             width: 120
         },{
-            text: '金额',
+            text: '收款金额',
             xtype: 'numbercolumn',
             dataIndex: 'or_amount',
             width: 120,
@@ -116,6 +111,10 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
             text: '录入人',
             dataIndex: 'or_recorder',
             width: 120
+        },{
+            text: '审核人',
+            dataIndex: 'or_auditman',
+            width: 120
         }, {
             text: '收入类别',
             dataIndex: 'ord_type',

+ 11 - 2
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -160,6 +160,15 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
         name : "os_recorddate",
         fieldLabel : "录入日期",
         readOnly:true
-    }
-    ]
+    },{
+        xtype: 'textfield',
+        name: 'os_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "os_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
+    }]
 });

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

@@ -21,40 +21,35 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         xtype : 'textfield',
         name : 'os_code',
         fieldLabel : '单据编号',
-        columnWidth: 0.3,
     }, {
         xtype: 'hidden',
         name: 'os_vendcode',
         fieldLabel: '供应商编号',
-        columnWidth: 0.3,
     }, {
         xtype: 'dbfindtrigger',
         name: 'os_vendname',
-        fieldLabel: '供应商名称',
-        columnWidth: 0.3
+        fieldLabel: '供应商名称'
+    }, {
+        xtype: 'textfield',
+        name: 'os_recorder',
+        fieldLabel: '制单人',
     }, {
-        xtype : 'hidden',
-        name : 'os_bankid', 
-        fieldLabel : '结算账户ID'
-     }, {
         xtype: 'hidden',
-        name: 'os_bankcode',
-        fieldLabel: '结算账户编号'
+        name: 'os_auditman',
+        fieldLabel: '审核人',
     }, {
         xtype: 'dbfindtrigger',
         name: 'os_bankname',
         fieldLabel: '结算账户',
-        columnWidth: 0.3
     },{
         xtype: 'condatefield',
         name: 'os_date',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         fieldLabel: '单据日期'
     },{
         xtype: 'multicombo',
         name: 'os_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]
@@ -62,7 +57,6 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
     },{
         name: 'ord_type',
         fieldLabel: '支出类别',
-        columnWidth: 0.3,
         xtype : "remotecombo",
         storeUrl:'/api/document/fundinouttype/getCombo?condition=支出',
     }],

+ 10 - 0
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -374,6 +374,16 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: 'hidden',
         name: 'pb_text5',
         fieldLabel: '自定义字段5'
+    },{
+        xtype: 'textfield',
+        name: 'pb_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "pb_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
     }],
 
     beforeAudit: function() {

+ 1 - 6
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -11,33 +11,28 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         xtype: 'textfield',
         name: 'pb_code',
         fieldLabel: '单据编号',
-        columnWidth: 0.3
     },{
         xtype: 'dbfindtrigger',
         name: 'pb_vendname',
         fieldLabel: '供应商',
-        columnWidth: 0.3
     },{
         xtype: 'textfield',
         name: 'pb_manname',
         fieldLabel: '付款人',
-        columnWidth: 0.3
     },{
         xtype: 'dbfindtrigger',
         name: 'pd_bankname',
         fieldLabel: '资金账户',
-        columnWidth: 0.3
     },{
         xtype: 'condatefield',
         name: 'pb_date',
         fieldLabel: '单据日期',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         operation: 'between'
     },{
         xtype: 'multicombo',
         name: 'pb_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]

+ 10 - 0
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -343,6 +343,16 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         name: "rb_recorddate",
         fieldLabel: "录入日期",
         hidden: true
+    }, {
+        xtype: 'textfield',
+        name: 'rb_auditman',
+        fieldLabel: '审核人',
+        hidden: true
+    },{
+        xtype: "datefield",
+        name: "rb_auditdate",
+        fieldLabel: "审核日期",
+        hidden: true
     }],
 
     beforeAudit: function() {

+ 1 - 6
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -19,33 +19,28 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         xtype: 'textfield',
         name: 'rb_code',
         fieldLabel: '单据编号',
-        columnWidth: 0.3,
     }, {
         xtype: 'dbfindtrigger',
         name: 'rb_custname',
         fieldLabel: '客户名',
-        columnWidth: 0.3,
     }, {
         xtype: 'textfield',
         name: 'rb_manname',
         fieldLabel: '收款人',
-        columnWidth: 0.3,
     },{
         xtype: 'textfield',
         name: 'rd_bankname',
         fieldLabel: '资金账户',
-        columnWidth: 0.3,
     },  {
         xtype: 'condatefield',
         name: 'rb_date',
         fieldLabel: '单据日期',
-        columnWidth: 0.6,
+        columnWidth: 0.5,
         operation: 'between'
     },{
         xtype: 'multicombo',
         name: 'rb_status',
         fieldLabel: '审核状态',
-        columnWidth: 0.3,
         datas: [
             ["已审核", "已审核"],
             ["未审核", "未审核"]

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

@@ -46,7 +46,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
-    }, {
+    },{
         xtype : "hidden", 
         name : "pi_vendid", 
         fieldLabel : "供应商ID", 

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

@@ -62,10 +62,25 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
         bind: '{pi_custcode}',
         fieldLabel: '客户编号'
     }, {
-        xtype: 'dbfindtrigger',
+        xtype: 'hidden',
         name: 'pi_custname',
         bind: '{pi_custname}',
         fieldLabel: '客户名称'
+    },{
+        xtype : "hidden", 
+        name : "pi_vendid", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    },{
+        xtype: 'hidden',
+        name: 'pi_vendcode',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_vendname',
+        fieldLabel: '供应商名称',
+        allowBlank : false,
     },{
         xtype : "datefield", 
         name : "pi_date", 

+ 3 - 2
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -9,6 +9,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
             'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
+
                         dataUrl:'/api/document/vendor/list',
                         // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
@@ -315,10 +316,10 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             to: 'pd_whname'
                         }],
                         dbtpls: [{
-                            field: 'pd_whcode',
+                            field: 'wh_code',
                             width: 100
                         }, {
-                            field: 'pd_whname',
+                            field: 'wh_description',
                             width: 100
                         }],
                         dbSearchFields:[{

+ 38 - 5
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -28,7 +28,21 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         fieldLabel: '单据日期',
         allowBlank: true,
         columnWidth: 0.5
+    },{
+        xtype: 'textfield',
+        name: 'pi_vendcode',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        hidden:true,
+        columnWidth: 0.25
     }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_vendname',
+        fieldLabel: '供应商名称',
+        emptyText:'输入供应商编号或名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    },{
         xtype: 'textfield',
         name: 'pi_custcode',
         fieldLabel: '客户编号',
@@ -41,6 +55,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         fieldLabel: '客户名称',
         emptyText:'输入客户编号或名称',
         allowBlank: true,
+        hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'textfield',
@@ -113,8 +128,8 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             dataIndex: 'pi_status',
             width: 120
         },{
-            text: '客户名称',
-            dataIndex: 'pi_custname',
+            text: '供应商名称',
+            dataIndex: 'pi_vendname',
             width: 120
         },{
             text: '制单人',
@@ -142,6 +157,11 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             text: '单据类型',
             dataIndex: 'pd_piclass',
             width: 200
+        },{
+            text: '单据日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
         },{
             text: '审核状态',
             dataIndex: 'pi_status',
@@ -149,10 +169,11 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         },{
             text: '客户编号',
             dataIndex: 'pi_custcode',
+            hidden:true,
             width: 120
         },{
-            text: '客户名称',
-            dataIndex: 'pi_custname',
+            text: '供应商名称',
+            dataIndex: 'pi_vendname',
             width: 120
         },{
             text: '物料编号',
@@ -180,9 +201,15 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '单位成本',
+            text: '单',
             dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },            
             width: 120
         },{
             text: '税率',
@@ -193,6 +220,12 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             text: '金额',
             dataIndex: 'pd_total',
             xtype:'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },            
             width: 120
         },{
             text: '相关单号',

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

@@ -63,6 +63,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         xtype: 'dbfindtrigger',
         name: 'pi_custname',
         bind: '{pi_custname}',
+        allowBlank : false,
         fieldLabel: '客户名称'
     }, {
         xtype: "datefield",

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

@@ -304,9 +304,9 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             from:'wh_description',to:'pd_whname'
                         }],
                         dbtpls:[{
-                            field:'pd_whcode',width:100
+                            field:'wh_code',width:100
                         },{
-                            field:'pd_whname',width:100
+                            field:'wh_description',width:100
                         }],
                         dbSearchFields:[{
                             emptyText:'输入仓库编号或名称',

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

@@ -139,6 +139,11 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             text: '单据类型',
             dataIndex: 'pd_piclass',
             width: 200
+        },{
+            text: '单据日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
         },{
             text: '审核状态',
             dataIndex: 'pi_status',
@@ -177,9 +182,15 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '单位成本',
+            text: '单',
             dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },             
             width: 120
         },{
             text: '税率',
@@ -190,6 +201,12 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             text: '金额',
             dataIndex: 'pd_total',
             xtype:'numbercolumn',
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },            
             width: 120
         },{
             text: '相关单号',