Browse Source

Merge remote-tracking branch 'origin/dev' into dev

rainco 7 years ago
parent
commit
2641b68e5f
32 changed files with 221 additions and 143 deletions
  1. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  2. 38 32
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  3. 5 4
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  4. 4 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdIODetailMapper.java
  5. 2 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/ProdInOutService.java
  6. 51 35
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  7. 14 0
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  8. 22 5
      frontend/saas-web/app/util/FormUtil.js
  9. 1 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  10. 1 1
      frontend/saas-web/app/view/core/query/QueryPanel.js
  11. 1 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  12. 1 1
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  13. 1 1
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  14. 1 1
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  15. 1 1
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  16. 2 2
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  17. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  18. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  19. 8 4
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  20. 2 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  21. 19 6
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  22. 15 2
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  23. 2 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  24. 8 4
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  25. 3 2
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  26. 4 4
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  27. 2 2
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  28. 2 2
      frontend/saas-web/app/view/stock/make/QueryPanel.js
  29. 0 8
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  30. 2 2
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  31. 1 9
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  32. 2 2
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

+ 2 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java

@@ -47,7 +47,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     DocBaseDTO audit(ProdInOutFormDTO formData);
 
-    void batchAudit(BatchDealBaseDTO baseDTOs);
+    String batchAudit(BatchDealBaseDTO baseDTOs);
 
     /**
      * 反审核出入库单
@@ -55,7 +55,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     void unAudit(Long id);
 
-    void batchUnAudit(BatchDealBaseDTO baseDTOs);
+    String batchUnAudit(BatchDealBaseDTO baseDTOs);
 
     void deleteItem(Long id);
 

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

@@ -232,91 +232,97 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
             }
-            String res = singleAudit(formData.getMain());
-            if(res!=null){
-                new BizException(501,res);
-            }
+            singleAudit(formData.getMain());
         }
         baseDTO.setId(id);
         return baseDTO;
     }
 
-    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.post(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.post(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.audit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "没有可审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleAudit(prodInOutDTO);
+            } catch (Exception e) {
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override
     public void unAudit(Long id) {
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
-        String res =  singleUnAudit(prodInOutDTO);
-
+        singleUnAudit(prodInOutDTO);
     }
 
-    private String singleUnAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.unPost(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.unPost(map);
+        Object result = res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.unAudit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "无可反审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleUnAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleUnAudit(prodInOutDTO);
+            }catch (Exception e) {
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override

+ 5 - 4
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java

@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-17 11:41.
  */
+@CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {
@@ -130,8 +131,8 @@ public class ProdInOutController {
      */
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchAudit(baseDTOs);
-        return Result.success();
+        String res = prodInOutService.batchAudit(baseDTOs);
+        return Result.success(res);
     }
 
     /**
@@ -142,8 +143,8 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchUnAudit(baseDTOs);
-        return Result.success();
+        String res = prodInOutService.batchUnAudit(baseDTOs);
+        return Result.success(res);
     }
 
     /**

+ 4 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdIODetailMapper.java

@@ -30,4 +30,8 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
     List<ProdIODetail> selectByFK(Long id);
 
     void deleteByFK(Long id);
+
+    void calcProdIn(Long pi_id);
+
+    void calcProdOut(Long pi_id);
 }

+ 2 - 2
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/ProdInOutService.java

@@ -47,7 +47,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     DocBaseDTO audit(ProdInOutFormDTO formData);
 
-    void batchAudit(BatchDealBaseDTO baseDTOs);
+    String batchAudit(BatchDealBaseDTO baseDTOs);
 
     /**
      * 反审核出入库单
@@ -55,7 +55,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     void unAudit(Long id);
 
-    void batchUnAudit(BatchDealBaseDTO baseDTOs);
+    String batchUnAudit(BatchDealBaseDTO baseDTOs);
 
     void deleteItem(Long id);
 

+ 51 - 35
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.storage.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -185,10 +186,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             prodIODetailMapper.batchUpdate(updateDetails);
         }
         baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
-        //更新已转数
+        //计算金额,未税单价,未税金额等
+        calcProdInout(pi_id,pi_class);
         //日志记录
         messageLogService.update(baseDTO);
-
         return baseDTO;
     }
 
@@ -220,95 +221,101 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         DocBaseDTO baseDTO = new DocBaseDTO();
         if (null != formData) {
             id = formData.getMain().getId();
-            if (StringUtils.isEmpty(id)) {
+            if (StringUtils.isEmpty(id)|| "0".equals(String.valueOf(id))) {
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
             }
-            String res = singleAudit(formData.getMain());
-            if(res!=null){
-                new BizException(501,res);
-            }
+            singleAudit(formData.getMain());
         }
         baseDTO.setId(id);
         return baseDTO;
     }
 
-    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.post(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.post(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.audit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchAudit(BatchDealBaseDTO baseDTOs) {
+    public String  batchAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "没有可审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleAudit(prodInOutDTO);
+            } catch (Exception e){
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override
     public void unAudit(Long id) {
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
-        String res =  singleUnAudit(prodInOutDTO);
-
+        singleUnAudit(prodInOutDTO);
     }
 
-    private String singleUnAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.unPost(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.unPost(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.unAudit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "无可反审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleUnAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleUnAudit(prodInOutDTO);
+            }catch (Exception e) {
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override
@@ -455,4 +462,13 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
         return prodInOut;
     }
+
+    private void calcProdInout(Long pi_id, String pi_class) {
+        if ("其它入库单".equals(pi_class)) {
+            prodIODetailMapper.calcProdIn(pi_id);
+        } else if ("其它出库单".equals(pi_class)) {
+            prodIODetailMapper.calcProdOut(pi_id);
+        }
+    }
+
 }

+ 14 - 0
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -739,4 +739,18 @@ where a.pd_piid = (select pi_id from prodinout where pi_puid=#{id,jdbcType=INTEG
     where pd_piid = #{id,jdbcType=INTEGER}
   </delete>
 
+  <update id="calcProdIn">
+    update prodiodetail set pd_netprice = pd_orderprice/(1+pd_taxrate/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_total = pd_orderprice*pd_inqty,pd_nettotal = pd_netprice*pd_inqty where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+  </update>
+
+  <update id="calcProdOut">
+    update prodiodetail set pd_netprice = pd_orderprice/(1+pd_taxrate/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_total = pd_orderprice*pd_outqty,pd_nettotal = pd_netprice*pd_outqty where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+  </update>
+
 </mapper>

+ 22 - 5
frontend/saas-web/app/util/FormUtil.js

@@ -110,7 +110,12 @@ Ext.define('saas.util.FormUtil', {
                             };     
                             formModel.set('detail' + index + '.detailStore', Ext.create('Ext.data.Store', {
                                 model:item.storeModel,
-                                data: []
+                                data: [],
+                                listeners: {
+                                    add: function(store, records, index, eOpts) {
+                                        console.log(index);
+                                    }
+                                }
                             }));
 
                             form.detailCount++;
@@ -181,16 +186,28 @@ Ext.define('saas.util.FormUtil', {
                     var viewModel = form.getViewModel();
                     var detailGrids = form.query('detailGridField');
 
-                    Ext.Array.each(detailGrids, function(grid) {
-                        grid.add10EmptyRow();
-                    });
                     if(code){
                         var o = {};
                         o[form._codeField] = code;
 
-                        form.setFormData({
+                        var formData = {
                             main: o
+                        };
+                        Ext.Array.each(detailGrids, function(grid, index) {
+                            var detno = 0;
+                            var detnoColumn = grid.detnoColumn;
+                            var datas = [];
+                            
+                            Ext.Array.each(new Array(3), function() {
+                                detno += 1;
+                                var data = {};
+                                data[detnoColumn] = detno;
+                                datas.push(data);
+                            })
+                            formData['detail' + index] = datas;
                         });
+
+                        form.setFormData(formData);
                     }
                 }
             }).catch(function() {

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

@@ -104,7 +104,7 @@ Ext.define('saas.view.core.form.FormPanel', {
                     text: '保存',
                     handler: 'onSave',
                     bind: {
-                        disabled: '{!base.valid}'
+                        disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
                     }
                 }, {
                     xtype: 'button',

+ 1 - 1
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -227,7 +227,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
             var from = value.from,
             to = value.to;
 
-            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s') + ',' + Ext.Date.format(new Date(to), 'Y-m-d h:i:s');
+            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') {

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

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'ft_status',

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

@@ -54,7 +54,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'or_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'or_status',

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

@@ -54,7 +54,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'os_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'os_status',

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

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pb_code',
-            width: 120
+            width: 200
         }, {
             text: '状态',
             dataIndex: 'pb_status',

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

@@ -42,7 +42,7 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'rb_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'rb_status',

+ 2 - 2
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -105,7 +105,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',
@@ -139,7 +139,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 8 - 4
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -26,7 +26,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
  
      toolBtns: [{
          xtype: 'button',
-         text: '转销售出货单',
+         text: '转出货单',
          handler: 'turnOut'
      }],
 
@@ -46,7 +46,9 @@ Ext.define('saas.view.sale.sale.FormPanel', {
     }, {
         xtype : "dbfindtrigger", 
         name : "sa_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank : false
+
     }, {
         xtype : "textfield", 
         name : "sa_toplace", 
@@ -74,6 +76,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 dataIndex : "sd_prodcode", 
                 xtype : "", 
                 items : null,
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -113,6 +116,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 xtype : "numbercolumn", 
                 format:'0,000.00',
                 items : null,
+                allowBlank:false,
                 summaryType: 'sum'
             },  {
                 text : "已转数", 
@@ -156,11 +160,11 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "交货日期", 
                 dataIndex : "sd_delivery", 
                 xtype:'datecolumn',
-                format : "Y-m-d H:i:s", 
+                format : "Y-m-d", 
                 editor : {
                     xtype : "datefield",
                     editable : true, 
-                    format : "Y-m-d H:i:s", 
+                    format : "Y-m-d", 
                     hideTrigger : false
                 }
             },{

+ 2 - 1
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -209,7 +209,8 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                 openTab('sale-saleout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                showToast('转单成功');    
+                showToast('转单成功');  
+                form.FormUtil.loadData(form);
             }
         })
         .catch(function(res) {

+ 19 - 6
frontend/saas-web/app/view/sale/sale/QueryPanel.js

@@ -12,6 +12,10 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         name: 'sa_id',
         fieldLabel: 'ID',
         columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'sa_code',
+        fieldLabel: '销售编号'
     }, {
         xtype: 'hidden',
         name: 'sa_custcode',
@@ -56,14 +60,14 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
     }, {
         xtype: 'multicombo',
         name: 'sa_sendstatuscode',
-        bind: '{sa_sendstatuscode}',
-        fieldLabel: '出库状态',
+        fieldLabel: '业务状态',
         allowBlank: true,
         columnWidth: 0.25,
         datas: [
             ["TURNOUT", "已出库"],
             ["UNTURNOUT", "未出库"],
-            ["PARTOUT", "部分出库"]
+            ["PARTOUT", "部分出库"],
+            ["CLOSE", "已关闭"]
         ]
     }],
     moreQueryFormItems: [],
@@ -92,9 +96,13 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
             dataIndex: 'sa_cuname',
             width: 120
         }, {
-            text: '业务状态',
+            text: '审核状态',
             dataIndex: 'sa_status',
             width: 120
+        }, {
+            text: '业务状态',
+            dataIndex: 'sa_sendstatus',
+            width: 120
         }, {
             text: '单据日期',
             dataIndex: 'sa_recorddate',
@@ -116,7 +124,12 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
             text: '收货地址',
             dataIndex: 'sa_toplace',
-            width: 120
+            width: 200
+        }, {
+            text: '备注',
+            dataIndex: 'sa_remark',
+            width: 250,
+            flex:1
         }
     ],
         relativeColumn: [ {
@@ -127,7 +140,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'sa_code',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'sa_status',

+ 15 - 2
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -34,7 +34,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         fieldLabel : "单据类型", 
         readOnly:true,
         allowBlank : false, 
-        defaultValue:'销售退货单'
+        defaultValue:'销售退货单',
+        allowBlank:false
     },{
         xtype : "hidden", 
         name : "pi_custid",  
@@ -46,7 +47,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
     }, {
         xtype : "dbfindtrigger", 
         name : "pi_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank:false,
     }, {
         xtype : "textfield", 
         name : "pi_address", 
@@ -72,6 +74,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "物料编号", 
                 width : 200.0, 
                 dataIndex : "pd_prodcode", 
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -104,6 +107,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
             }, {
                 text : "数量", 
                 dataIndex : "pd_inqty", 
+                allowBlank:false,
                 editor : {
                     xtype : "numberfield"
                 },
@@ -111,9 +115,18 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 xtype : "numbercolumn", 
                 format:'0',
                 summaryType: 'sum'
+            }, {
+                text : "仓库ID", 
+                dataIndex : "pd_whid", 
+                width : 0
+            }, {
+                text : "仓库", 
+                dataIndex : "pd_whcode", 
+                width :0
             }, {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
+                allowBlank:false,
                 width : 120.0, 
                 editor : {
                     displayField : "display", 

+ 2 - 2
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -79,7 +79,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 8 - 4
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     caller:'SaleOut',
     
     //字段属性
-    _title:'销售出货单',
+    _title:'出货单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
@@ -43,7 +43,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
         fieldLabel : "单据类型", 
         readOnly:true,
         allowBlank : false, 
-        defaultValue:'销售出货单'
+        defaultValue:'出货单'
     }, {
         xtype : "hidden", 
         name : "pi_custid", 
@@ -55,7 +55,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     }, {
         xtype : "dbfindtrigger", 
         name : "pi_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank:false,
     }, {
         xtype : "textfield", 
         name : "pi_address", 
@@ -83,6 +84,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_prodcode", 
                 xtype : "", 
                 items : null,
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -122,7 +124,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 xtype : "numbercolumn", 
                 format:'0,000.00',
                 items : null,
-                summaryType: 'sum'
+                summaryType: 'sum',
+                allowBlank:false,
             }, {
                 text : "仓库ID", 
                 dataIndex : "pd_whid", 
@@ -136,6 +139,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_whname", 
                 width : 120.0, 
                 items : null,
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 

+ 3 - 2
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -254,7 +254,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
         id = form.getForm().findField(form._idField);
         form.BaseUtil.request({
             url: form._turnInUrl+id.value,
-            method: 'GET',
+            method: 'POST',
         })
         .then(function(localJson) {
             if(localJson.success){
@@ -264,7 +264,8 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                 openTab('sale-salein-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                showToast('转单成功');    
+                showToast('转单成功');  
+                form.FormUtil.loadData(form);  
             }
         })
         .catch(function(res) {

+ 4 - 4
frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

@@ -67,9 +67,9 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
     queryGridConfig: {
         idField:'id',
         codeField:'pi_inoutno',
-        addTitle:'销售出货单',
+        addTitle:'出货单',
         addXtype:'sale-saleout-formpanel',
-        defaultCondition:' pi_class = \'销售出货单\'',
+        defaultCondition:' pi_class = \'出货单\'',
         baseVastUrl: '/api/sale/prodinout/',
         baseColumn: [{
             text: 'id',
@@ -79,7 +79,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 2 - 2
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 2 - 2
frontend/saas-web/app/view/stock/make/QueryPanel.js

@@ -113,7 +113,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',
@@ -147,7 +147,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',

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

@@ -164,14 +164,6 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            },            {
-                text : "已转数", 
-                dataIndex : "pd_yqty", 
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
             },{
                 text : "仓库id", 
                 dataIndex : "pd_whid", 

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -161,15 +161,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 format: '0',
                 items: null,
                 summaryType: 'sum'
-            }, {
-                text: "已转数",
-                dataIndex: "pd_yqty",
-                width: 120.0,
-                xtype: "numbercolumn",
-                format: '0',
-                items: null,
-                summaryType: 'sum'
-            }, {
+            },{
                 text: "仓库id",
                 dataIndex: "pd_whid",
                 xtype: "numbercolumn",

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',