Browse Source

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

hy 6 năm trước cách đây
mục cha
commit
aa9c0e61ab

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

@@ -382,7 +382,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         String pi_statuscode = prodInOutDTO.getPi_statuscode();
         if(StringUtils.isEmpty(pi_statuscode)||(!StringUtils.isEmpty(pi_statuscode)&&!pi_statuscode.equals(Status.AUDITED.name()))){
             throw  new BizException(BizExceptionCode.BIZ_UNAUDITED);
-        };
+        }
+        //明细已对账,不允许反审核
         if (ConfigsCache.current().enableB2B()) {
             //明细已对账数量
             int count = prodIODetailMapper.selectApCheckCountByFK(prodInOutDTO.getId());

+ 5 - 10
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -378,17 +378,12 @@ Ext.define('saas.view.core.form.FormPanel', {
         });
 
         store.removeAll();
-        if (detailData.length > 0) {
 
-            for(let j = 0; j < detailData.length; j++) {
-                let d = detailData[j];
-                let o = {};
-                o[detnoColumn] = j + 1;
-                let r = store.add(o)[0];
-                for(let k in d) {
-                    r.set(k, d[k]);
-                }
-            }
+        if (detailData.length > 0) {
+            store.loadData(detailData.map(function(d, i) {
+                d[detnoColumn] = i + 1;
+                return d;
+            }));
         }
 
         me.isValid();