Explorar o código

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

zhoudw %!s(int64=7) %!d(string=hai) anos
pai
achega
28c5f635c3
Modificáronse 25 ficheiros con 168 adicións e 69 borrados
  1. 9 4
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ConfigsController.java
  2. 2 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/ConfigsMapper.java
  3. 4 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/ConfigsService.java
  4. 11 2
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ConfigsServiceImpl.java
  5. 25 0
      applications/commons/commons-server/src/main/resources/mapper/ConfigsMapper.xml
  6. 14 7
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  7. 7 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  8. 11 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  9. 7 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  10. 7 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  11. 3 4
      base-servers/auth/auth-common/src/main/java/com/usoftchina/saas/auth/common/cookie/CookieInfo.java
  12. 2 1
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  13. 10 5
      base-servers/socket/socket-api/src/main/java/com/usoftchina/saas/socket/api/SocketMessageApi.java
  14. 23 8
      base-servers/socket/socket-server/src/main/java/com/usoftchina/saas/socket/controller/MessageController.java
  15. 2 2
      frontend/saas-web/app/Application.scss
  16. 1 1
      frontend/saas-web/app/view/core/chart/ChartBase.js
  17. 2 1
      frontend/saas-web/app/view/document/product/FormModel.js
  18. 4 2
      frontend/saas-web/app/view/document/product/FormPanel.js
  19. 3 3
      frontend/saas-web/app/view/home/InfoCard.js
  20. 1 1
      frontend/saas-web/app/view/home/InfoCard.scss
  21. 3 3
      frontend/saas-web/app/view/home/charts/MonthIO.js
  22. 3 3
      frontend/saas-web/app/view/home/charts/MonthPurchase.js
  23. 3 3
      frontend/saas-web/app/view/home/charts/PurchaseTrend.js
  24. 8 3
      frontend/saas-web/app/view/home/charts/SaleTrend.js
  25. 3 3
      frontend/saas-web/app/view/home/charts/StockAmount.js

+ 9 - 4
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/ConfigsController.java

@@ -8,9 +8,9 @@ import com.usoftchina.saas.commons.po.Configs;
 import com.usoftchina.saas.commons.service.ConfigsService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * @author: guq
@@ -35,10 +35,15 @@ public class ConfigsController {
         return Result.success(data);
     }
 
-    @GetMapping("/save")
+    @PostMapping("/save")
     public Result<DocBaseDTO> save(Configs data) {
         DocBaseDTO baseDTO = configsService.save(data);
         return Result.success(baseDTO);
     }
 
+    @PostMapping("/update")
+    public Result update(@RequestBody List<Configs> data) {
+        configsService.update(data);
+        return Result.success();
+    }
 }

+ 2 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/ConfigsMapper.java

@@ -21,4 +21,6 @@ public interface ConfigsMapper {
     List<Configs> selectByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 
     void updateCreator(@Param("userId") Long userId, @Param("userName") String userName, @Param("id") Long id);
+
+    void updateByCodeSelective(Configs con);
 }

+ 4 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/ConfigsService.java

@@ -6,10 +6,14 @@ import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.po.Configs;
 import com.usoftchina.saas.page.PageRequest;
 
+import java.util.List;
+
 public interface ConfigsService {
     PageInfo getListData(PageRequest page, ListReqDTO req);
 
     Configs getConfigByCode(String code);
 
     DocBaseDTO save(Configs data);
+
+    void update(List<Configs> data);
 }

+ 11 - 2
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ConfigsServiceImpl.java

@@ -6,14 +6,12 @@ import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.mapper.ConfigsMapper;
 import com.usoftchina.saas.commons.po.Configs;
-import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.commons.service.ConfigsService;
 import com.usoftchina.saas.commons.service.MessageLogService;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
-import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -89,4 +87,15 @@ public class ConfigsServiceImpl implements ConfigsService{
         messageLogService.update(baseDTO);
         return baseDTO;
     }
+
+    @Override
+    public void update(List<Configs> data) {
+        if (StringUtils.isEmpty(data)) {
+            return;
+        }
+        for (Configs con : data) {
+            con.setCompanyId(BaseContextHolder.getCompanyId());
+            configsMapper.updateByCodeSelective(con);
+        }
+    }
 }

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

@@ -156,4 +156,29 @@
     update configs set creatorId = #{userId} , creatorName=#{userName} where id=#{id}
   </update>
 
+  <update id="updateByCodeSelective" parameterType="com.usoftchina.saas.commons.po.Configs" >
+    update configs
+    <set >
+      <if test="description != null" >
+        description = #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="data != null" >
+        data = #{data,jdbcType=VARCHAR},
+      </if>
+      <if test="creatorName != null" >
+        creatorName = #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="creatorId != null" >
+        creatorId = #{creatorId,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null" >
+        createTime = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updaterName != null" >
+        updaterName = #{updaterName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where code = #{code,jdbcType=VARCHAR} and companyid = #{companyId}
+  </update>
+
 </mapper>

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

@@ -145,7 +145,10 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             Double bk_amount = fundtransferdetail.getFtd_nowbalance();
             //付款方
             Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
-            Double beginamount = bankinformation.getBk_beginamount();
+            Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
+//            if (beginamount < bk_amount){
+//                throw new BizException(500, BizExceptionCode.BANK_AMOUNT_NOTENOUGH.getMessage());
+//            }
             Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
             Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
             bankinformation.setBk_thisamount(beginamount + incomme - spending - bk_amount);
@@ -154,7 +157,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
 
             //收款方
             Bankinformation inbankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
-            Double inbeginamount = inbankinformation.getBk_beginamount();
+            Double inbeginamount = inbankinformation.getBk_beginamount()== null ? new Double(0) : inbankinformation.getBk_beginamount();
             Double inspending = inbankinformation.getBk_spending() == null ? new Double(0) : inbankinformation.getBk_spending();
             Double inincomme = inbankinformation.getBk_income() == null ? new Double(0) : inbankinformation.getBk_income();
             inbankinformation.setBk_thisamount(inbeginamount + inincomme - inspending + bk_amount);
@@ -202,7 +205,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             Double bk_amount = fundtransferdetail.getFtd_nowbalance();
             //付款方
             Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
-            Double beginamount = bankinformation.getBk_beginamount();
+            Double beginamount = bankinformation.getBk_beginamount()== null ? new Double(0) : bankinformation.getBk_beginamount();
             Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
             Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
             bankinformation.setBk_thisamount(beginamount + incomme - spending + bk_amount);
@@ -211,7 +214,7 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
 
             //收款方
             Bankinformation inbankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
-            Double inbeginamount = inbankinformation.getBk_beginamount();
+            Double inbeginamount = inbankinformation.getBk_beginamount()== null ? new Double(0) : inbankinformation.getBk_beginamount();
             Double inspending = inbankinformation.getBk_spending() == null ? new Double(0) : inbankinformation.getBk_spending();
             Double inincomme = inbankinformation.getBk_income() == null ? new Double(0) : inbankinformation.getBk_income();
             inbankinformation.setBk_thisamount(inbeginamount + inincomme - inspending - bk_amount);
@@ -314,9 +317,13 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
         Long companyId = BaseContextHolder.getCompanyId();
-        Integer count = "0".equals(String.valueOf(id)) ? fundtransferMapper.validateCodeWhenInsert(code, companyId) :
-                fundtransferMapper.validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.FUNDTRANSFER.getCaller()).getData();
+        String codeString = null;
+        synchronized(FundtransferServiceImpl.class) {
+            Integer count = "0".equals(String.valueOf(id)) ? fundtransferMapper.validateCodeWhenInsert(code, companyId) :
+                    fundtransferMapper.validateCodeWhenUpdate(code, id, companyId);
+            codeString = maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.FUNDTRANSFER.getCaller()).getData();
+        }
+        return codeString;
     }
 
     private List<Fundtransfer> getListByMode(ListReqDTO req) {

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

@@ -316,9 +316,13 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
         Long companyId = BaseContextHolder.getCompanyId();
-        Integer count = "0".equals(String.valueOf(id)) ? othreceiptsMapper.validateCodeWhenInsert(code, companyId) :
-                othreceiptsMapper.validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHRECEIPTS.getCaller()).getData();
+        String codeString = null;
+        synchronized(OthreceiptsServiceImpl.class) {
+            Integer count = "0".equals(String.valueOf(id)) ? othreceiptsMapper.validateCodeWhenInsert(code, companyId) :
+                    othreceiptsMapper.validateCodeWhenUpdate(code, id, companyId);
+            codeString = maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHRECEIPTS.getCaller()).getData();
+        }
+        return codeString;
     }
 
     private List<Othreceipts> getListByMode(ListReqDTO req) {

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

@@ -163,7 +163,10 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
         Double bk_amount = othspendings.getOs_amount();
         //付款方
         Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
-        Double beginamount = bankinformation.getBk_beginamount();
+        Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
+//        if (beginamount < bk_amount){
+//            throw new BizException(500, BizExceptionCode.BANK_AMOUNT_NOTENOUGH.getMessage());
+//        }
         Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
         Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
         bankinformation.setBk_thisamount(beginamount + incomme - spending - bk_amount);
@@ -341,9 +344,13 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
         Long companyId = BaseContextHolder.getCompanyId();
-        Integer count = "0".equals(String.valueOf(id)) ? othspendingsMapper.validateCodeWhenInsert(code, companyId) :
-                othspendingsMapper.validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHSPENDINGS.getCaller()).getData();
+        String codeString = null;
+        synchronized(OthspendingsServiceImpl.class) {
+            Integer count = "0".equals(String.valueOf(id)) ? othspendingsMapper.validateCodeWhenInsert(code, companyId) :
+                    othspendingsMapper.validateCodeWhenUpdate(code, id, companyId);
+            codeString = maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.OTHSPENDINGS.getCaller()).getData();
+        }
+        return codeString;
     }
 
     private List<Othspendings> getListByMode(ListReqDTO req) {

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

@@ -458,9 +458,13 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
         Long companyId = BaseContextHolder.getCompanyId();
-        Integer count = "0".equals(String.valueOf(id)) ? paybalanceMapper.validateCodeWhenInsert(code, companyId) :
-                paybalanceMapper.validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.PAYBALANCE.getCaller()).getData();
+        String codeString = null;
+        synchronized(PaybalanceServiceImpl.class) {
+            Integer count = "0".equals(String.valueOf(id)) ? paybalanceMapper.validateCodeWhenInsert(code, companyId) :
+                    paybalanceMapper.validateCodeWhenUpdate(code, id, companyId);
+            codeString = maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.PAYBALANCE.getCaller()).getData();
+        }
+        return codeString;
     }
 
     private List<Paybalance> getListByMode(ListReqDTO req) {

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

@@ -463,9 +463,13 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             throw new BizException(BizExceptionCode.NULL_CODE);
         }
         Long companyId = BaseContextHolder.getCompanyId();
-        Integer count = "0".equals(String.valueOf(id)) ? recbalanceMapper.validateCodeWhenInsert(code, companyId) :
-                recbalanceMapper.validateCodeWhenUpdate(code, id, companyId);
-        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.RECBALANCE.getCaller()).getData();
+        String codeString = null;
+        synchronized(RecbalanceServiceImpl.class) {
+            Integer count = "0".equals(String.valueOf(id)) ? recbalanceMapper.validateCodeWhenInsert(code, companyId) :
+                    recbalanceMapper.validateCodeWhenUpdate(code, id, companyId);
+            codeString = maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.RECBALANCE.getCaller()).getData();
+        }
+        return codeString;
     }
 
     private List<Recbalance> getListByMode(ListReqDTO req) {

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

@@ -3,7 +3,6 @@ package com.usoftchina.saas.auth.common.cookie;
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 
 import java.io.Serializable;
-import java.util.Date;
 
 /**
  * @author yingp
@@ -105,7 +104,7 @@ public class CookieInfo implements Serializable {
     /**
      * 上次登录时间
      */
-    private Date lastLoginTime;
+    private Long lastLoginTime;
 
     public Long getUserUU() {
         return userUU;
@@ -243,11 +242,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;
     }
 

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

@@ -167,7 +167,8 @@ public class AuthController {
                 JwtInfo jwtInfo = new JwtInfo(appId, companyId, accountDTO.getId(), accountDTO.getUsername(), accountDTO.getRealname());
                 JwtToken jwtToken = JwtHelper.generateToken(jwtInfo, privateKeyPath, expire);
                 TokenDTO tokenDTO = BeanMapper.map(jwtToken, TokenDTO.class);
-                socketMessageApi.sendToClient(clientId, JsonUtils.toJsonString(new AuthDTO(tokenDTO, accountDTO)));
+                socketMessageApi.sendToClient(clientId, "/sso/callback",
+                        JsonUtils.toJsonString(new AuthDTO(tokenDTO, accountDTO)));
             }
             ServletErrorUtils.writeJsonPMessage(response, callback, true);
         }

+ 10 - 5
base-servers/socket/socket-api/src/main/java/com/usoftchina/saas/socket/api/SocketMessageApi.java

@@ -2,8 +2,8 @@ package com.usoftchina.saas.socket.api;
 
 import com.usoftchina.saas.base.Result;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 
 /**
  * @author yingp
@@ -15,18 +15,23 @@ public interface SocketMessageApi {
      * 发送信息给指定用户
      *
      * @param clientId
+     * @param dest
      * @param message
      * @return
      */
-    @PostMapping("/clients/{clientId}")
-    Result sendToClient(@PathVariable("clientId") String clientId, String message);
+    @PostMapping("/message/clients")
+    Result sendToClient(@RequestParam("clientId") String clientId,
+                        @RequestParam(value = "dest", required = false) String dest,
+                        @RequestParam("message") String message);
 
     /**
      * 广播信息
      *
+     * @param dest
      * @param message
      * @return
      */
-    @PostMapping("/clients")
-    Result sendToAllClients(String message);
+    @PostMapping("/message/clients/all")
+    Result sendToAllClients(@RequestParam(value = "dest", required = false) String dest,
+                            @RequestParam("message") String message);
 }

+ 23 - 8
base-servers/socket/socket-server/src/main/java/com/usoftchina/saas/socket/controller/MessageController.java

@@ -17,27 +17,42 @@ public class MessageController {
     @Resource
     private SimpMessagingTemplate simpMessagingTemplate;
 
-    @PostMapping("/clients/{clientId}")
-    public Result sendToClient(@PathVariable String clientId, String message) {
+    /**
+     * 发送信息给指定用户
+     *
+     * @param clientId
+     * @param dest
+     * @param message
+     * @return
+     */
+    @PostMapping("/clients")
+    public Result sendToClient(@RequestParam String clientId, String dest, @RequestParam String message) {
         /**
          * 前端使用
          * <pre>
-         *     stomp.subscribe('/clients/{clientId}/message', function(message){});
+         *     stomp.subscribe('/clients/{clientId}/{dest}', function(message){});
          * </pre>
          */
-        simpMessagingTemplate.convertAndSendToUser(clientId, "/message", message);
+        simpMessagingTemplate.convertAndSendToUser(clientId, dest, message);
         return Result.success();
     }
 
-    @PostMapping("/clients")
-    public Result sendToAllClients(String message) {
+    /**
+     * 广播信息
+     *
+     * @param dest
+     * @param message
+     * @return
+     */
+    @PostMapping("/clients/all")
+    public Result sendToAllClients(String dest, @RequestParam String message) {
         /**
          * 前端使用
          * <pre>
-         *     stomp.subscribe('/clients/message', function(message){});
+         *     stomp.subscribe('/clients/{dest}', function(message){});
          * </pre>
          */
-        simpMessagingTemplate.convertAndSend("/message", message);
+        simpMessagingTemplate.convertAndSend(dest, message);
         return Result.success();
     }
 }

+ 2 - 2
frontend/saas-web/app/Application.scss

@@ -99,8 +99,8 @@ body.launching {
 // toolbar button
 .x-btn-default-toolbar-small {
   color: #fff;
-  background-color: #308ee0;
-  border-color: #308ee0;
+  background-color: #35BAF6;
+  border-color: #35BAF6;
   min-width: 86px;
   transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
 

+ 1 - 1
frontend/saas-web/app/view/core/chart/ChartBase.js

@@ -6,7 +6,7 @@ Ext.define('saas.view.core.chart.ChartBase', {
     ],
 
     height: 300,
-    bodyPadding: '16 0 16 0',
+    bodyPadding: 16,
 
     layout: 'fit',
 

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

@@ -18,7 +18,8 @@ Ext.define('saas.view.document.product.FormModel', {
             get: function(v) {
                 var form = this.getView(),
                 detailGrid = form.down('detailGridField');
-
+                
+                form.getForm().findField('qcsz').resetOriginalValue();
                 detailGrid.setHidden(!v);
             }
         },

+ 4 - 2
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -375,9 +375,11 @@ Ext.define('saas.view.document.product.FormPanel', {
     listeners: {
         load: function(form, data) {
             var viewModel = form.getViewModel();
-            var store = viewModel.get('detail0').detailStore;
+            var store = viewModel.get('detail0').detailStore,
+            detailGrid = form.down('grid'),
+            trueData = detailGrid.getTrueData();
 
-            viewModel.set('qcsz', store.getCount() > 0);
+            viewModel.set('qcsz', trueData.length > 0);
         }
     }
 });

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

@@ -48,19 +48,19 @@ Ext.define('saas.view.home.InfoCard', {
                     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)'
+                    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)'
+                    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)'
+                    condition: 'pi_class in(\'出货单\',\'销售退货单\') and prodinout.companyId=' + companyId + ' and TO_DAYS(pi_date+ifnull(cu_promisedays,0))-TO_DAYS(now()) < 7 and exists (select 1 from subledger where sl_code=pi_inoutno and sl_kind=pi_class and subledger.companyId=1 and ifnull(sl_namount,0)<>0)'
                 },
                 unauditcheck: {
                     title: '未审核验收',

+ 1 - 1
frontend/saas-web/app/view/home/InfoCard.scss

@@ -19,7 +19,7 @@ $max-card-width: 235px;
             
                     .x-box {
                         padding: 16px;
-                        height: 131px;
+                        height: 120px;
                         border-radius: 0.5rem;
                         box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
                         position: relative;

+ 3 - 3
frontend/saas-web/app/view/home/charts/MonthIO.js

@@ -40,10 +40,10 @@ Ext.define('saas.view.home.charts.MonthIO', {
                     minimum: 0,
                     grid: {
                         even: {
-                            stroke: '#E7EBEF'
+                            stroke: '#F7F8FA'
                         },
                         odd: {
-                            stroke: '#E7EBEF',
+                            stroke: '#F7F8FA',
                         }
                     },
                     style: {
@@ -55,7 +55,7 @@ Ext.define('saas.view.home.charts.MonthIO', {
                     position: 'bottom',
                     fields: ['x'],
                     style: {
-                        fill: '#E7EBEF',
+                        fill: '#F7F8FA',
                         strokeStyle: 'transparent'
                     },
                 }],

+ 3 - 3
frontend/saas-web/app/view/home/charts/MonthPurchase.js

@@ -32,7 +32,7 @@ Ext.define('saas.view.home.charts.MonthPurchase', {
                     fields: ['x'],
                     position: 'bottom',
                     style: {
-                        fill: '#E7EBEF',
+                        fill: '#F7F8FA',
                         strokeStyle: 'transparent'
                     },
                 },{
@@ -42,10 +42,10 @@ Ext.define('saas.view.home.charts.MonthPurchase', {
                     adjustByMajorUnit: true,
                     grid: {
                         even: {
-                            stroke: '#E7EBEF'
+                            stroke: '#F7F8FA'
                         },
                         odd: {
-                            stroke: '#E7EBEF',
+                            stroke: '#F7F8FA',
                         }
                     },
                     style: {

+ 3 - 3
frontend/saas-web/app/view/home/charts/PurchaseTrend.js

@@ -36,7 +36,7 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                     fields: ['x'],
                     position: 'bottom',
                     style: {
-                        fill: '#E7EBEF',
+                        fill: '#F7F8FA',
                         strokeStyle: 'transparent'
                     },
                     renderer: me.categoryRender
@@ -46,10 +46,10 @@ Ext.define('saas.view.home.charts.PurchaseTrend', {
                     position: 'left',
                     grid: {
                         even: {
-                            stroke: '#E7EBEF'
+                            stroke: '#F7F8FA'
                         },
                         odd: {
-                            stroke: '#E7EBEF',
+                            stroke: '#F7F8FA',
                         }
                     },
                     style: {

+ 8 - 3
frontend/saas-web/app/view/home/charts/SaleTrend.js

@@ -41,8 +41,13 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     type: 'category',
                     fields: ['x'],
                     position: 'bottom',
+                    label: {
+                        style: {
+                            fontSize: 12,
+                        }
+                    },
                     style: {
-                        fill: '#E7EBEF',
+                        fill: '#F7F8FA',
                         strokeStyle: 'transparent'
                     },
                     renderer: me.categoryRender
@@ -52,10 +57,10 @@ Ext.define('saas.view.home.charts.SaleTrend', {
                     position: 'left',
                     grid: {
                         even: {
-                            stroke: '#E7EBEF',
+                            stroke: '#F7F8FA',
                         },
                         odd: {
-                            stroke: '#E7EBEF',
+                            stroke: '#F7F8FA',
                         }
                     },
                     style: {

+ 3 - 3
frontend/saas-web/app/view/home/charts/StockAmount.js

@@ -36,7 +36,7 @@ Ext.define('saas.view.home.charts.StockAmount', {
                     fields: ['x'],
                     position: 'bottom',
                     style: {
-                        fill: '#E7EBEF',
+                        fill: '#F7F8FA',
                         strokeStyle: 'transparent'
                     },
                     renderer: me.categoryRender
@@ -46,10 +46,10 @@ Ext.define('saas.view.home.charts.StockAmount', {
                     position: 'left',
                     grid: {
                         even: {
-                            stroke: '#E7EBEF',
+                            stroke: '#F7F8FA',
                         },
                         odd: {
-                            stroke: '#E7EBEF',
+                            stroke: '#F7F8FA',
                         }
                     },
                     style: {