Browse Source

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

hy 7 years ago
parent
commit
930d892997
46 changed files with 300 additions and 190 deletions
  1. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  3. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  4. 38 32
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  5. 0 9
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  6. 2 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/ProdInOutController.java
  7. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/ProdInOutService.java
  8. 9 5
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  9. 2 2
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  10. 5 4
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  11. 4 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdIODetailMapper.java
  12. 2 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/ProdInOutService.java
  13. 51 35
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  14. 14 0
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  15. 1 1
      frontend/saas-web/Readme.md
  16. 22 5
      frontend/saas-web/app/util/FormUtil.js
  17. 4 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  18. 19 4
      frontend/saas-web/app/view/core/form/FormPanelController.js
  19. 2 2
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  20. 1 1
      frontend/saas-web/app/view/core/query/QueryPanel.js
  21. 1 1
      frontend/saas-web/app/view/core/query/QueryPanelController.js
  22. 15 15
      frontend/saas-web/app/view/main/Navigation.js
  23. 1 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  24. 1 1
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  25. 1 1
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  26. 1 1
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  27. 1 1
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  28. 2 2
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  29. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  30. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  31. 8 4
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  32. 2 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  33. 19 6
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  34. 15 2
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  35. 2 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  36. 8 4
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  37. 3 2
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  38. 4 4
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  39. 2 2
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  40. 2 2
      frontend/saas-web/app/view/stock/make/QueryPanel.js
  41. 0 8
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  42. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  43. 2 2
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  44. 1 9
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  45. 2 2
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  46. 21 2
      frontend/saas-web/overrides/i18n.js

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

@@ -40,7 +40,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     SALE_CLOSE(72001, "单据已关闭,无法进行操作"),
     SALE_CLOSE(72001, "单据已关闭,无法进行操作"),
     SALE_YQTYBEYONDQTY(72001, "明细行已转数量大于数量"),
     SALE_YQTYBEYONDQTY(72001, "明细行已转数量大于数量"),
     SALE_NULL_BILL(72002, "单据不存在或者明细为空"),
     SALE_NULL_BILL(72002, "单据不存在或者明细为空"),
-    SALEOUT_ALL_TURNIN(72003, "该销售出货单已全部转退货,无法转销售退货单"),
+    SALEOUT_ALL_TURNIN(72003, "该出货单已全部转退货,无法转销售退货单"),
     SALEOUT_POSTSTATUS_ERROR(72004,"当前单据状态无法进行此操作。"),
     SALEOUT_POSTSTATUS_ERROR(72004,"当前单据状态无法进行此操作。"),
     SALEOUT_POST_ERROR(72005,""),
     SALEOUT_POST_ERROR(72005,""),
     //资金
     //资金

+ 1 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java

@@ -22,7 +22,7 @@ public enum  BillCodeSeq {
 
 
     SALE("销售订单", "Sale"),
     SALE("销售订单", "Sale"),
 
 
-    SALEOUT("销售出货单", "SaleOut"),
+    SALEOUT("出货单", "SaleOut"),
 
 
     SALEIN("销售退货单", "SaleIn"),
     SALEIN("销售退货单", "SaleIn"),
 
 

+ 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);
     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 unAudit(Long id);
 
 
-    void batchUnAudit(BatchDealBaseDTO baseDTOs);
+    String batchUnAudit(BatchDealBaseDTO baseDTOs);
 
 
     void deleteItem(Long id);
     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);
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
                 id = baseDTO.getId();
             }
             }
-            String res = singleAudit(formData.getMain());
-            if(res!=null){
-                new BizException(501,res);
-            }
+            singleAudit(formData.getMain());
         }
         }
         baseDTO.setId(id);
         baseDTO.setId(id);
         return baseDTO;
         return baseDTO;
     }
     }
 
 
-    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
         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{
         }else{
             //记录日志
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             //日志
             messageLogService.audit(docBaseDTO);
             messageLogService.audit(docBaseDTO);
-            return "";
         }
         }
     }
     }
 
 
     @Override
     @Override
-    public void batchAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "没有可审核单据。";
         }
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
         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
     @Override
     public void unAudit(Long id) {
     public void unAudit(Long id) {
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
         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();
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
         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{
         }else{
             //记录日志
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             //日志
             messageLogService.unAudit(docBaseDTO);
             messageLogService.unAudit(docBaseDTO);
-            return "";
         }
         }
     }
     }
 
 
     @Override
     @Override
-    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "无可反审核单据。";
         }
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
         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
     @Override

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

@@ -331,9 +331,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //检查转单状态
         //检查转单状态
         String acceptstatus = purchase.getPu_acceptstatuscode();
         String acceptstatus = purchase.getPu_acceptstatuscode();
 
 
-        if ("TURNIN".equals(acceptstatus)){
-            return Result.error(ExceptionCode.TURNIN_EXIST);
-        }
         if ("CLOSED".equals(acceptstatus)){
         if ("CLOSED".equals(acceptstatus)){
             return Result.error(ExceptionCode.CLOSED_EXIST);
             return Result.error(ExceptionCode.CLOSED_EXIST);
         }
         }
@@ -403,16 +400,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
             }
             }
         }
         }
-        //更新主表入库状态
-        purchase.setPu_acceptstatus("已入库");
-        purchase.setPu_acceptstatuscode("TURNIN");
-
         DocBaseDTO baseDTO = new DocBaseDTO();
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);
         baseDTO.setId(pi_id);
         baseDTO.setCode(piInoutno);
         baseDTO.setCode(piInoutno);
         baseDTO.setName("采购验收单");
         baseDTO.setName("采购验收单");
-        //更新存在字段
-        int affect = getMapper().updateByPrimaryKeySelective(purchase);
         return Result.success(baseDTO);
         return Result.success(baseDTO);
     }
     }
 
 

+ 2 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/ProdInOutController.java

@@ -149,8 +149,8 @@ public class ProdInOutController {
 
 
     @PostMapping("/turnProdIn/{id}")
     @PostMapping("/turnProdIn/{id}")
     public Result turnProdin(@PathVariable("id") Long id){
     public Result turnProdin(@PathVariable("id") Long id){
-        prodInOutService.turnProdin(id);
-        return Result.success();
+        DocBaseDTO baseDTO  = prodInOutService.turnProdin(id);
+        return Result.success(baseDTO);
     };
     };
 
 
     @PostMapping("/close/{id}")
     @PostMapping("/close/{id}")

+ 1 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/ProdInOutService.java

@@ -118,5 +118,5 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      * 出库单转退货单
      * 出库单转退货单
      * @param id
      * @param id
      */
      */
-    Result turnProdin(Long id);
+    DocBaseDTO turnProdin(Long id);
 }
 }

+ 9 - 5
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java

@@ -363,7 +363,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
     }
 
 
     @Override
     @Override
-    public Result turnProdin(Long id) {
+    public DocBaseDTO turnProdin(Long id) {
         Integer count=0;
         Integer count=0;
         double pdOutqty=0;
         double pdOutqty=0;
         double pdYqty=0;
         double pdYqty=0;
@@ -389,7 +389,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
         }
         //判断可转数
         //判断可转数
         if (count==0) {
         if (count==0) {
-            return Result.error(ExceptionCode.TURNINNUM_NOT_EXIST);
+            throw  new BizException(ExceptionCode.TURNINNUM_NOT_EXIST);
         }
         }
         //插入销售退货单主表
         //插入销售退货单主表
         ProdInOut targetPi = new ProdInOut();
         ProdInOut targetPi = new ProdInOut();
@@ -455,7 +455,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
                 prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
             }
             }
         }
         }
-        return Result.success();
+
+        //日志记录
+        DocBaseDTO baseDTO = new DocBaseDTO(pi_id, piInoutno, BillCodeSeq.SALEIN.getCaller());
+        //messageLogService.customizeLog(baseDTO, Operation.);
+        return baseDTO;
 
 
     }
     }
 
 
@@ -548,7 +552,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Integer count = "0".equals(String.valueOf(id)) ? prodInOutMapper.validateCodeWhenInsert(code,pi_class) :
         Integer count = "0".equals(String.valueOf(id)) ? prodInOutMapper.validateCodeWhenInsert(code,pi_class) :
                 prodInOutMapper.validateCodeWhenUpdate(code, id);
                 prodInOutMapper.validateCodeWhenUpdate(code, id);
         String caller ="";
         String caller ="";
-        if(pi_class.equals("销售出货单")){
+        if(pi_class.equals("出货单")){
             caller = BillCodeSeq.SALEOUT.getCaller();
             caller = BillCodeSeq.SALEOUT.getCaller();
         }else {//销售退货单
         }else {//销售退货单
             caller = BillCodeSeq.SALEIN.getCaller();
             caller = BillCodeSeq.SALEIN.getCaller();
@@ -580,7 +584,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     private void setTotal(ProdInOut prodInOut ) {
     private void setTotal(ProdInOut prodInOut ) {
         String pi_class = prodInOut.getPi_class();
         String pi_class = prodInOut.getPi_class();
         Long id = prodInOut.getId();
         Long id = prodInOut.getId();
-        if(BillCodeSeq.SALEOUT.getName().equals(pi_class)){//销售出货单
+        if(BillCodeSeq.SALEOUT.getName().equals(pi_class)){//出货单
             //更新明细
             //更新明细
             prodIODetailMapper.updatePDSaleOut(id);
             prodIODetailMapper.updatePDSaleOut(id);
             //更新主表
             //更新主表

+ 2 - 2
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -746,13 +746,13 @@ update prodiodetail a
           and pd_piid=#{id}  GROUP BY pd_ioid ) b
           and pd_piid=#{id}  GROUP BY pd_ioid ) b
           where IFNULL(b.pd_ioid ,0)= a.pd_id
           where IFNULL(b.pd_ioid ,0)= a.pd_id
      ),0)
      ),0)
-where a.pd_id in (select pd_ioid from prodiodetail where pd_piid=#{id} and pi_class='销售出货单')
+where a.pd_id in (select pd_ioid from prodiodetail where pd_piid=#{id} and pi_class='出货单')
   </update>
   </update>
   <update id="updateSaleYqty" parameterType="long">
   <update id="updateSaleYqty" parameterType="long">
 
 
     update saledetail a set a.sd_yqty =IFNULL( ( select b.pd_outqty from (
     update saledetail a set a.sd_yqty =IFNULL( ( select b.pd_outqty from (
     select pd_sdid,sum(pd_outqty) pd_outqty from prodiodetail left join
     select pd_sdid,sum(pd_outqty) pd_outqty from prodiodetail left join
-    prodinout on pd_piid = pi_id where pd_piclass='销售出货单' and pi_said=#{id}
+    prodinout on pd_piid = pi_id where pd_piclass='出货单' and pi_said=#{id}
     GROUP BY pd_sdid) b where IFNULL(b.pd_sdid ,0) = a.sd_id ),0) where a.sd_said =#{id}
     GROUP BY pd_sdid) b where IFNULL(b.pd_sdid ,0) = a.sd_id ),0) where a.sd_said =#{id}
   </update>
   </update>
 
 

+ 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
  * Created by zdw
  * 2018-10-17 11:41.
  * 2018-10-17 11:41.
  */
  */
+@CrossOrigin
 @RestController
 @RestController
 @RequestMapping("/prodinout")
 @RequestMapping("/prodinout")
 public class ProdInOutController {
 public class ProdInOutController {
@@ -130,8 +131,8 @@ public class ProdInOutController {
      */
      */
     @PostMapping("/batchAudit")
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
     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")
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
     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);
     List<ProdIODetail> selectByFK(Long id);
 
 
     void deleteByFK(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);
     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 unAudit(Long id);
 
 
-    void batchUnAudit(BatchDealBaseDTO baseDTOs);
+    String batchUnAudit(BatchDealBaseDTO baseDTOs);
 
 
     void deleteItem(Long id);
     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.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -185,10 +186,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             prodIODetailMapper.batchUpdate(updateDetails);
             prodIODetailMapper.batchUpdate(updateDetails);
         }
         }
         baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
         baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
-        //更新已转数
+        //计算金额,未税单价,未税金额等
+        calcProdInout(pi_id,pi_class);
         //日志记录
         //日志记录
         messageLogService.update(baseDTO);
         messageLogService.update(baseDTO);
-
         return baseDTO;
         return baseDTO;
     }
     }
 
 
@@ -220,95 +221,101 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         DocBaseDTO baseDTO = new DocBaseDTO();
         DocBaseDTO baseDTO = new DocBaseDTO();
         if (null != formData) {
         if (null != formData) {
             id = formData.getMain().getId();
             id = formData.getMain().getId();
-            if (StringUtils.isEmpty(id)) {
+            if (StringUtils.isEmpty(id)|| "0".equals(String.valueOf(id))) {
                 baseDTO = saveFormData(formData);
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
                 id = baseDTO.getId();
             }
             }
-            String res = singleAudit(formData.getMain());
-            if(res!=null){
-                new BizException(501,res);
-            }
+            singleAudit(formData.getMain());
         }
         }
         baseDTO.setId(id);
         baseDTO.setId(id);
         return baseDTO;
         return baseDTO;
     }
     }
 
 
-    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
         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{
         }else{
             //记录日志
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             //日志
             messageLogService.audit(docBaseDTO);
             messageLogService.audit(docBaseDTO);
-            return "";
         }
         }
     }
     }
 
 
     @Override
     @Override
-    public void batchAudit(BatchDealBaseDTO baseDTOs) {
+    public String  batchAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "没有可审核单据。";
         }
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
         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
     @Override
     public void unAudit(Long id) {
     public void unAudit(Long id) {
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
         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();
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
         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{
         }else{
             //记录日志
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             //日志
             messageLogService.unAudit(docBaseDTO);
             messageLogService.unAudit(docBaseDTO);
-            return "";
         }
         }
     }
     }
 
 
     @Override
     @Override
-    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "无可反审核单据。";
         }
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
         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
     @Override
@@ -455,4 +462,13 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
         }
         return prodInOut;
         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}
     where pd_piid = #{id,jdbcType=INTEGER}
   </delete>
   </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>
 </mapper>

+ 1 - 1
frontend/saas-web/Readme.md

@@ -96,7 +96,7 @@ viewModel: view.core.form.FormPanelModel
 | allowBlank | 是否必填列 | x | true |
 | allowBlank | 是否必填列 | x | true |
 | isValid | 自定义校验规则,传入value,返回boolean | x | function(v) { return v > 10; } |
 | isValid | 自定义校验规则,传入value,返回boolean | x | function(v) { return v > 10; } |
 - 需要根据columns在models文件夹下添加storeModel对应的Model
 - 需要根据columns在models文件夹下添加storeModel对应的Model
-
+- allowBlan和isValid的校验只会校验dirty数据
 ---
 ---
 
 
 ## 查询列表配置
 ## 查询列表配置

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

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

@@ -95,13 +95,16 @@ Ext.define('saas.view.core.form.FormPanel', {
                     cls: 'x-formpanel-btn-orange',
                     cls: 'x-formpanel-btn-orange',
                     xtype: 'button',
                     xtype: 'button',
                     text: '新增',
                     text: '新增',
+                    bind: {
+                        hidden: '{!id}'
+                    },
                     handler: 'add'
                     handler: 'add'
                 }, {
                 }, {
                     xtype: 'button',
                     xtype: 'button',
                     text: '保存',
                     text: '保存',
                     handler: 'onSave',
                     handler: 'onSave',
                     bind: {
                     bind: {
-                        disabled: '{!base.valid}'
+                        disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
                     }
                     }
                 }, {
                 }, {
                     xtype: 'button',
                     xtype: 'button',

+ 19 - 4
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -17,8 +17,8 @@ Ext.define('saas.view.core.form.FormPanelController', {
 
 
     add: function(){
     add: function(){
         var form = this.getView();
         var form = this.getView();
-        var id = form.xtype + '_add';
-        openTab(form.xtype,'新增' + form._title,id);
+        var id = form.xtype + '-add';
+        openTab(form.xtype,'新增' + form._title, id);
     },
     },
     
     
     delete: function(){
     delete: function(){
@@ -95,9 +95,16 @@ Ext.define('saas.view.core.form.FormPanelController', {
         })
         })
         .then(function(localJson) {
         .then(function(localJson) {
             if(localJson.success){
             if(localJson.success){
-                form.initId = localJson.data.id;
+                var id = localJson.data.id;
+                var code = localJson.data.code;
+                form.initId = id;
                 form.FormUtil.loadData(form);
                 form.FormUtil.loadData(form);
                 showToast('保存成功');
                 showToast('保存成功');
+
+                var newId = form.xtype + '-' + id;
+                var newTitle = form._title + '(' + code + ')';
+
+                refreshTabTitle(newId, newTitle);
             }
             }
         })
         })
         .catch(function(res) {
         .catch(function(res) {
@@ -149,7 +156,15 @@ Ext.define('saas.view.core.form.FormPanelController', {
             if(localJson.success){
             if(localJson.success){
                 // 未保存直接审核会返回id
                 // 未保存直接审核会返回id
                 if(localJson.data) {
                 if(localJson.data) {
-                    form.initId = localJson.data.id;
+                    var id = localJson.data.id;
+                    var code = localJson.data.code;
+                    
+                    form.initId = id;
+
+                    var newId = form.xtype + '-' + id;
+                    var newTitle = form._title + '(' + code + ')';
+
+                    refreshTabTitle(newId, newTitle);
                 }
                 }
                 form.FormUtil.loadData(form);
                 form.FormUtil.loadData(form);
                 form.setEditable(false);
                 form.setEditable(false);

+ 2 - 2
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -207,8 +207,8 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             var grid = tableView.up('grid'),
             var grid = tableView.up('grid'),
             idValue = record.get(grid.idField),
             idValue = record.get(grid.idField),
             codeValue = record.get(grid.codeField),
             codeValue = record.get(grid.codeField),
-            id = grid.xtype + idValue;
-            openTab(grid.addXtype,grid.addTitle+"("+codeValue+")",id, {
+            id = grid.addXtype + '-' + idValue;
+            openTab(grid.addXtype, grid.addTitle+"("+codeValue+")", id, {
                 initId: idValue
                 initId: idValue
             });
             });
         }
         }

+ 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,
             var from = value.from,
             to = value.to;
             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') {
         }else if(xtype == 'combobox' || xtype == 'combo') {
             conditionValue = '\'' + value + '\'';
             conditionValue = '\'' + value + '\'';
         }else if(xtype == 'multicombo') {
         }else if(xtype == 'multicombo') {

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

@@ -36,7 +36,7 @@ Ext.define('saas.view.core.query.QueryPanelController', {
         var me = this,
         var me = this,
         queryPanel = me.getView(),
         queryPanel = me.getView(),
         gridPanel = queryPanel.down('core-query-querygridpanel'),
         gridPanel = queryPanel.down('core-query-querygridpanel'),
-        id = gridPanel.addXtype + '_add';
+        id = gridPanel.addXtype + '-add';
         openTab(gridPanel.addXtype,'新增'+gridPanel.addTitle,id)
         openTab(gridPanel.addXtype,'新增'+gridPanel.addTitle,id)
     },
     },
     onReSetClick:function(btn){
     onReSetClick:function(btn){

+ 15 - 15
frontend/saas-web/app/view/main/Navigation.js

@@ -138,14 +138,14 @@ Ext.define('saas.view.main.Navigation', {
                             Ext.Array.each(menuItemText, function (item) {
                             Ext.Array.each(menuItemText, function (item) {
                                 item.addEventListener('click', function (e) {
                                 item.addEventListener('click', function (e) {
                                     var target = e.target,
                                     var target = e.target,
-                                        dataset = target.dataset,
-                                        viewType = dataset.viewtype,
-                                        type = dataset.type,
-                                        text = dataset.text,
-                                        id = dataset.id;
+                                    dataset = target.dataset,
+                                    viewType = dataset.viewtype,
+                                    type = dataset.type,
+                                    text = dataset.text,
+                                    id = dataset.id;
 
 
-                                    var tabTitle = text + (type == 'form' ? '' : '查询'),
-                                        tabId = 'maintab-' + type + '-' + id;
+                                    var tabTitle = text + '查询',
+                                    tabId = 'maintab-' + type + '-' + id;
 
 
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
                                     openTab(viewType, tabTitle, tabId);
                                     openTab(viewType, tabTitle, tabId);
@@ -155,14 +155,14 @@ Ext.define('saas.view.main.Navigation', {
                             Ext.Array.each(menuItemIcon, function (item) {
                             Ext.Array.each(menuItemIcon, function (item) {
                                 item.addEventListener('click', function (e) {
                                 item.addEventListener('click', function (e) {
                                     var target = e.target,
                                     var target = e.target,
-                                        dataset = target.dataset,
-                                        viewType = dataset.viewtype,
-                                        type = dataset.type,
-                                        text = dataset.text,
-                                        id = dataset.id;
-
-                                    var tabTitle = text + (type == 'form' ? '' : '查询'),
-                                        tabId = 'maintab-' + type + '-' + id;
+                                    dataset = target.dataset,
+                                    viewType = dataset.viewtype,
+                                    type = dataset.type,
+                                    text = dataset.text,
+                                    id = dataset.id;
+
+                                    var tabTitle ='新增' + text,
+                                    tabId = viewType + '-add';
 
 
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
                                     openTab(viewType, tabTitle, tabId);
                                     openTab(viewType, tabTitle, tabId);

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

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'ft_code',
             dataIndex: 'ft_code',
-            width: 150
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'ft_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'or_code',
             dataIndex: 'or_code',
-            width: 150
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'or_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'os_code',
             dataIndex: 'os_code',
-            width: 150
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'os_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'pb_code',
             dataIndex: 'pb_code',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '状态',
             text: '状态',
             dataIndex: 'pb_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'rb_code',
             dataIndex: 'rb_code',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'rb_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'pu_code',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pu_status',
             dataIndex: 'pu_status',
@@ -139,7 +139,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pu_code',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pu_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pd_inoutno',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pd_inoutno',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             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: [{
      toolBtns: [{
          xtype: 'button',
          xtype: 'button',
-         text: '转销售出货单',
+         text: '转出货单',
          handler: 'turnOut'
          handler: 'turnOut'
      }],
      }],
 
 
@@ -46,7 +46,9 @@ Ext.define('saas.view.sale.sale.FormPanel', {
     }, {
     }, {
         xtype : "dbfindtrigger", 
         xtype : "dbfindtrigger", 
         name : "sa_custname", 
         name : "sa_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank : false
+
     }, {
     }, {
         xtype : "textfield", 
         xtype : "textfield", 
         name : "sa_toplace", 
         name : "sa_toplace", 
@@ -74,6 +76,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 dataIndex : "sd_prodcode", 
                 dataIndex : "sd_prodcode", 
                 xtype : "", 
                 xtype : "", 
                 items : null,
                 items : null,
+                allowBlank:false,
                 editor : {
                 editor : {
                     displayField : "display", 
                     displayField : "display", 
                     editable : true, 
                     editable : true, 
@@ -113,6 +116,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 xtype : "numbercolumn", 
                 xtype : "numbercolumn", 
                 format:'0,000.00',
                 format:'0,000.00',
                 items : null,
                 items : null,
+                allowBlank:false,
                 summaryType: 'sum'
                 summaryType: 'sum'
             },  {
             },  {
                 text : "已转数", 
                 text : "已转数", 
@@ -156,11 +160,11 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "交货日期", 
                 text : "交货日期", 
                 dataIndex : "sd_delivery", 
                 dataIndex : "sd_delivery", 
                 xtype:'datecolumn',
                 xtype:'datecolumn',
-                format : "Y-m-d H:i:s", 
+                format : "Y-m-d", 
                 editor : {
                 editor : {
                     xtype : "datefield",
                     xtype : "datefield",
                     editable : true, 
                     editable : true, 
-                    format : "Y-m-d H:i:s", 
+                    format : "Y-m-d", 
                     hideTrigger : false
                     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, {
                 openTab('sale-saleout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                     initId: intValue
                 });
                 });
-                showToast('转单成功');    
+                showToast('转单成功');  
+                form.FormUtil.loadData(form);
             }
             }
         })
         })
         .catch(function(res) {
         .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',
         name: 'sa_id',
         fieldLabel: 'ID',
         fieldLabel: 'ID',
         columnWidth: 0
         columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'sa_code',
+        fieldLabel: '销售编号'
     }, {
     }, {
         xtype: 'hidden',
         xtype: 'hidden',
         name: 'sa_custcode',
         name: 'sa_custcode',
@@ -56,14 +60,14 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
     }, {
     }, {
         xtype: 'multicombo',
         xtype: 'multicombo',
         name: 'sa_sendstatuscode',
         name: 'sa_sendstatuscode',
-        bind: '{sa_sendstatuscode}',
-        fieldLabel: '出库状态',
+        fieldLabel: '业务状态',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25,
         columnWidth: 0.25,
         datas: [
         datas: [
             ["TURNOUT", "已出库"],
             ["TURNOUT", "已出库"],
             ["UNTURNOUT", "未出库"],
             ["UNTURNOUT", "未出库"],
-            ["PARTOUT", "部分出库"]
+            ["PARTOUT", "部分出库"],
+            ["CLOSE", "已关闭"]
         ]
         ]
     }],
     }],
     moreQueryFormItems: [],
     moreQueryFormItems: [],
@@ -92,9 +96,13 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
             dataIndex: 'sa_cuname',
             dataIndex: 'sa_cuname',
             width: 120
             width: 120
         }, {
         }, {
-            text: '业务状态',
+            text: '审核状态',
             dataIndex: 'sa_status',
             dataIndex: 'sa_status',
             width: 120
             width: 120
+        }, {
+            text: '业务状态',
+            dataIndex: 'sa_sendstatus',
+            width: 120
         }, {
         }, {
             text: '单据日期',
             text: '单据日期',
             dataIndex: 'sa_recorddate',
             dataIndex: 'sa_recorddate',
@@ -116,7 +124,12 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
         }, {
             text: '收货地址',
             text: '收货地址',
             dataIndex: 'sa_toplace',
             dataIndex: 'sa_toplace',
-            width: 120
+            width: 200
+        }, {
+            text: '备注',
+            dataIndex: 'sa_remark',
+            width: 250,
+            flex:1
         }
         }
     ],
     ],
         relativeColumn: [ {
         relativeColumn: [ {
@@ -127,7 +140,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'sa_code',
             dataIndex: 'sa_code',
-            width: 180
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'sa_status',
             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 : "单据类型", 
         fieldLabel : "单据类型", 
         readOnly:true,
         readOnly:true,
         allowBlank : false, 
         allowBlank : false, 
-        defaultValue:'销售退货单'
+        defaultValue:'销售退货单',
+        allowBlank:false
     },{
     },{
         xtype : "hidden", 
         xtype : "hidden", 
         name : "pi_custid",  
         name : "pi_custid",  
@@ -46,7 +47,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
     }, {
     }, {
         xtype : "dbfindtrigger", 
         xtype : "dbfindtrigger", 
         name : "pi_custname", 
         name : "pi_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank:false,
     }, {
     }, {
         xtype : "textfield", 
         xtype : "textfield", 
         name : "pi_address", 
         name : "pi_address", 
@@ -72,6 +74,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "物料编号", 
                 text : "物料编号", 
                 width : 200.0, 
                 width : 200.0, 
                 dataIndex : "pd_prodcode", 
                 dataIndex : "pd_prodcode", 
+                allowBlank:false,
                 editor : {
                 editor : {
                     displayField : "display", 
                     displayField : "display", 
                     editable : true, 
                     editable : true, 
@@ -104,6 +107,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
             }, {
             }, {
                 text : "数量", 
                 text : "数量", 
                 dataIndex : "pd_inqty", 
                 dataIndex : "pd_inqty", 
+                allowBlank:false,
                 editor : {
                 editor : {
                     xtype : "numberfield"
                     xtype : "numberfield"
                 },
                 },
@@ -111,9 +115,18 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 xtype : "numbercolumn", 
                 xtype : "numbercolumn", 
                 format:'0',
                 format:'0',
                 summaryType: 'sum'
                 summaryType: 'sum'
+            }, {
+                text : "仓库ID", 
+                dataIndex : "pd_whid", 
+                width : 0
+            }, {
+                text : "仓库", 
+                dataIndex : "pd_whcode", 
+                width :0
             }, {
             }, {
                 text : "仓库", 
                 text : "仓库", 
                 dataIndex : "pd_whname", 
                 dataIndex : "pd_whname", 
+                allowBlank:false,
                 width : 120.0, 
                 width : 120.0, 
                 editor : {
                 editor : {
                     displayField : "display", 
                     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: '单据编号',
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pd_inoutno',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             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',
     caller:'SaleOut',
     
     
     //字段属性
     //字段属性
-    _title:'销售出货单',
+    _title:'出货单',
     _idField: 'id',
     _idField: 'id',
     _codeField: 'pi_inoutno',
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
     _statusField: 'pi_status',
@@ -43,7 +43,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
         fieldLabel : "单据类型", 
         fieldLabel : "单据类型", 
         readOnly:true,
         readOnly:true,
         allowBlank : false, 
         allowBlank : false, 
-        defaultValue:'销售出货单'
+        defaultValue:'出货单'
     }, {
     }, {
         xtype : "hidden", 
         xtype : "hidden", 
         name : "pi_custid", 
         name : "pi_custid", 
@@ -55,7 +55,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     }, {
     }, {
         xtype : "dbfindtrigger", 
         xtype : "dbfindtrigger", 
         name : "pi_custname", 
         name : "pi_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank:false,
     }, {
     }, {
         xtype : "textfield", 
         xtype : "textfield", 
         name : "pi_address", 
         name : "pi_address", 
@@ -83,6 +84,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_prodcode", 
                 dataIndex : "pd_prodcode", 
                 xtype : "", 
                 xtype : "", 
                 items : null,
                 items : null,
+                allowBlank:false,
                 editor : {
                 editor : {
                     displayField : "display", 
                     displayField : "display", 
                     editable : true, 
                     editable : true, 
@@ -122,7 +124,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 xtype : "numbercolumn", 
                 xtype : "numbercolumn", 
                 format:'0,000.00',
                 format:'0,000.00',
                 items : null,
                 items : null,
-                summaryType: 'sum'
+                summaryType: 'sum',
+                allowBlank:false,
             }, {
             }, {
                 text : "仓库ID", 
                 text : "仓库ID", 
                 dataIndex : "pd_whid", 
                 dataIndex : "pd_whid", 
@@ -136,6 +139,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_whname", 
                 dataIndex : "pd_whname", 
                 width : 120.0, 
                 width : 120.0, 
                 items : null,
                 items : null,
+                allowBlank:false,
                 editor : {
                 editor : {
                     displayField : "display", 
                     displayField : "display", 
                     editable : true, 
                     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);
         id = form.getForm().findField(form._idField);
         form.BaseUtil.request({
         form.BaseUtil.request({
             url: form._turnInUrl+id.value,
             url: form._turnInUrl+id.value,
-            method: 'GET',
+            method: 'POST',
         })
         })
         .then(function(localJson) {
         .then(function(localJson) {
             if(localJson.success){
             if(localJson.success){
@@ -264,7 +264,8 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                 openTab('sale-salein-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                 openTab('sale-salein-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                     initId: intValue
                 });
                 });
-                showToast('转单成功');    
+                showToast('转单成功');  
+                form.FormUtil.loadData(form);  
             }
             }
         })
         })
         .catch(function(res) {
         .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: {
     queryGridConfig: {
         idField:'id',
         idField:'id',
         codeField:'pi_inoutno',
         codeField:'pi_inoutno',
-        addTitle:'销售出货单',
+        addTitle:'出货单',
         addXtype:'sale-saleout-formpanel',
         addXtype:'sale-saleout-formpanel',
-        defaultCondition:' pi_class = \'销售出货单\'',
+        defaultCondition:' pi_class = \'出货单\'',
         baseVastUrl: '/api/sale/prodinout/',
         baseVastUrl: '/api/sale/prodinout/',
         baseColumn: [{
         baseColumn: [{
             text: 'id',
             text: 'id',
@@ -79,7 +79,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pd_inoutno',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pd_inoutno',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             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: '单据编号',
             text: '单据编号',
             dataIndex: 'pu_code',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pu_status',
             dataIndex: 'pu_status',
@@ -147,7 +147,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pu_code',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pu_status',
             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',
                 format:'0',
                 items : null,
                 items : null,
                 summaryType: 'sum'
                 summaryType: 'sum'
-            },            {
-                text : "已转数", 
-                dataIndex : "pd_yqty", 
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
             },{
             },{
                 text : "仓库id", 
                 text : "仓库id", 
                 dataIndex : "pd_whid", 
                 dataIndex : "pd_whid", 

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

@@ -66,7 +66,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                 beforerender: function (f) {
                 beforerender: function (f) {
                     Ext.apply(f, {
                     Ext.apply(f, {
 
 
-                        dataUrl: '/api/document/vendor/list',
+                        dataUrl: '/api/document/customer/list',
                         // dataUrl:'http://localhost:9480/customer/list',
                         // dataUrl:'http://localhost:9480/customer/list',
                         dbfinds: [{
                         dbfinds: [{
                             from: 'id',
                             from: 'id',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pd_inoutno',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             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',
                 format: '0',
                 items: null,
                 items: null,
                 summaryType: 'sum'
                 summaryType: 'sum'
-            }, {
-                text: "已转数",
-                dataIndex: "pd_yqty",
-                width: 120.0,
-                xtype: "numbercolumn",
-                format: '0',
-                items: null,
-                summaryType: 'sum'
-            }, {
+            },{
                 text: "仓库id",
                 text: "仓库id",
                 dataIndex: "pd_whid",
                 dataIndex: "pd_whid",
                 xtype: "numbercolumn",
                 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: '单据编号',
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pd_inoutno',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
         }, {
             text: '单据状态',
             text: '单据状态',
             dataIndex: 'pi_status',
             dataIndex: 'pi_status',

+ 21 - 2
frontend/saas-web/overrides/i18n.js

@@ -7,10 +7,10 @@
  */
  */
 function openTab(xtype, title, id, config) {
 function openTab(xtype, title, id, config) {
     var mainTab = Ext.getCmp('main-tab-panel');
     var mainTab = Ext.getCmp('main-tab-panel');
-    var panel = Ext.getCmp(id);
+    var panel = mainTab.query('[tabId="' + id + '"]')[0];
     if(!panel) {
     if(!panel) {
         panel = Ext.create('saas.view.core.tab.Panel', {
         panel = Ext.create('saas.view.core.tab.Panel', {
-            id: id,
+            tabId: id,
             title: title,
             title: title,
             viewType: xtype,
             viewType: xtype,
             viewConfig: config
             viewConfig: config
@@ -39,4 +39,23 @@ function showToast(content, title) {
         slideDUration: 400,
         slideDUration: 400,
         maxWidth: 400
         maxWidth: 400
     });
     });
+}
+
+/**
+ * 重设tab标题
+ */
+function refreshTabTitle(id, title) {
+    var currentTab = getCurrentTab();
+    currentTab.tabId = id;
+    currentTab.setTitle(title);
+}
+
+/**
+ * 获得当前Tab
+ */
+function getCurrentTab() {
+    var mainTab = Ext.getCmp('main-tab-panel');
+    var currentTab = mainTab.getActiveTab();
+
+    return currentTab;
 }
 }