Browse Source

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

guq 7 years ago
parent
commit
5136f9a5b4
38 changed files with 639 additions and 183 deletions
  1. 34 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/EndProductDTO.java
  2. 87 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/MessagelogDTO.java
  3. 11 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java
  4. 37 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EndProductController.java
  5. 22 4
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MaxnumberController.java
  6. 18 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EndProductMapper.java
  7. 2 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MaxnumbersMapper.java
  8. 1 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MessagelogMapper.java
  9. 15 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/EndProductService.java
  10. 8 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/MaxnumberService.java
  11. 90 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java
  12. 65 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MaxnumberServiceImpl.java
  13. 3 1
      applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties
  14. 31 0
      applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml
  15. 33 15
      applications/commons/commons-server/src/main/resources/mapper/MaxnumbersMapper.xml
  16. 1 1
      applications/document/document-server/src/main/resources/mapper/AddressMapper.xml
  17. 1 1
      applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml
  18. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDetailDTO.java
  19. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java
  20. 0 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java
  21. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseDetail.java
  22. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  23. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  24. 1 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  25. 104 132
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  26. 2 2
      frontend/saas-web/app/model/purchase/purchasedetail.js
  27. 8 4
      frontend/saas-web/app/view/document/kind/Kind.js
  28. 3 2
      frontend/saas-web/app/view/document/kind/KindController.js
  29. 1 1
      frontend/saas-web/app/view/document/kind/KindModel.js
  30. 6 1
      frontend/saas-web/app/view/document/other/Address.js
  31. 6 1
      frontend/saas-web/app/view/document/other/BankInformation.js
  32. 6 1
      frontend/saas-web/app/view/document/other/ProductBrand.js
  33. 6 1
      frontend/saas-web/app/view/document/other/ProductUnit.js
  34. 6 1
      frontend/saas-web/app/view/document/other/Warehouse.js
  35. 1 1
      frontend/saas-web/app/view/document/product/FormPanel.js
  36. 18 8
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  37. 2 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  38. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

+ 34 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/EndProductDTO.java

@@ -0,0 +1,34 @@
+package com.usoftchina.saas.commons.dto;
+
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
+import com.usoftchina.saas.commons.po.Messagelog;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 结账  返回数据
+ * @author chenwei
+ * @date 2018/10/31
+ */
+public class EndProductDTO extends CommonBaseDTO implements Serializable {
+
+    private String main;
+    private List<MessagelogDTO> items;
+
+    public String getMain() {
+        return main;
+    }
+
+    public void setMain(String main) {
+        this.main = main;
+    }
+
+    public List<MessagelogDTO> getItems() {
+        return items;
+    }
+
+    public void setItems(List<MessagelogDTO> items) {
+        this.items = items;
+    }
+}

+ 87 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/MessagelogDTO.java

@@ -0,0 +1,87 @@
+package com.usoftchina.saas.commons.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MessagelogDTO implements Serializable {
+
+    private String ml_code;
+
+    private String ml_content;
+
+    private String ml_result;
+
+    private String ml_caller;
+
+    private String ml_man;
+
+    private Date createTime;
+
+    private Long companyId;
+
+    private Long ml_keyvalue;
+
+    public Long getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Long companyId) {
+        this.companyId = companyId;
+    }
+
+    public Long getMl_keyvalue() {
+        return ml_keyvalue;
+    }
+
+    public void setMl_keyvalue(Long ml_keyvalue) {
+        this.ml_keyvalue = ml_keyvalue;
+    }
+
+    public String getMl_code() {
+        return ml_code;
+    }
+
+    public void setMl_code(String ml_code) {
+        this.ml_code = ml_code;
+    }
+
+    public String getMl_content() {
+        return ml_content;
+    }
+
+    public void setMl_content(String ml_content) {
+        this.ml_content = ml_content;
+    }
+
+    public String getMl_result() {
+        return ml_result;
+    }
+
+    public void setMl_result(String ml_result) {
+        this.ml_result = ml_result;
+    }
+
+    public String getMl_caller() {
+        return ml_caller;
+    }
+
+    public void setMl_caller(String ml_caller) {
+        this.ml_caller = ml_caller;
+    }
+
+    public String getMl_man() {
+        return ml_man;
+    }
+
+    public void setMl_man(String ml_man) {
+        this.ml_man = ml_man;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

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

@@ -49,7 +49,17 @@ public enum Operation {
     /**
     /**
      * 禁用操作
      * 禁用操作
      */
      */
-    BANNED("msg.banned", "msg.bannedSuccess");
+    BANNED("msg.banned", "msg.bannedSuccess"),
+
+    /**
+     * 记账
+     */
+    ENDPRODUCT("msg.endProdudct", "msg.endProdudctSuccess"),
+
+    /**
+     * 反记账
+     */
+    UNENDPRODUCT("msg.unEndProduct", "msg.unEndProductSuccess");
 
 
     private final String title;
     private final String title;
     private final String result;
     private final String result;

+ 37 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EndProductController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.netflix.discovery.converters.Auto;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.service.EndProductService;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 结账
+ */
+@RestController
+@RequestMapping("/endProduct")
+public class EndProductController {
+
+    @Autowired
+    private EndProductService endProductService;
+
+    @GetMapping("/list")
+    public Result getListData(PageRequest page, ListReqDTO listReqDTO){
+        return Result.success(endProductService.getPeriodData(page, listReqDTO));
+    }
+
+    @PostMapping("/endAccount")
+    public Result endAccount(){
+        return Result.success(endProductService.endAccount());
+    }
+
+    @PostMapping("/unEndAccount")
+    public Result unEndAccount(){
+
+        return Result.success();
+    }
+
+}

+ 22 - 4
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MaxnumberController.java

@@ -2,13 +2,15 @@ package com.usoftchina.saas.commons.controller;
 
 
 
 
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.po.Maxnumbers;
 import com.usoftchina.saas.commons.service.MaxnumberService;
 import com.usoftchina.saas.commons.service.MaxnumberService;
 
 
+import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.sql.ResultSet;
 
 
 /**
 /**
  * @author: guq
  * @author: guq
@@ -31,4 +33,20 @@ public class MaxnumberController {
                                 @RequestParam("caller") String caller) {
                                 @RequestParam("caller") String caller) {
         return Result.success(maxnumberService.pushMaxnubmer(count, code, caller));
         return Result.success(maxnumberService.pushMaxnubmer(count, code, caller));
     }
     }
+
+    @GetMapping("/list")
+    public Result getList(PageRequest page, ListReqDTO listReqDTO){
+        return Result.success(maxnumberService.getListData(page, listReqDTO));
+    }
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Maxnumbers maxnumbers){
+        return Result.success(maxnumberService.saveData(maxnumbers));
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        maxnumberService.removeByPrimaryKey(id);
+        return Result.success();
+    }
 }
 }

+ 18 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EndProductMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.commons.mapper;
+
+import com.usoftchina.saas.commons.dto.MessagelogDTO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+public interface EndProductMapper {
+
+    void endProduct(Map<String, Object> map);
+
+    String selectPeriod(@Param("companyId") Long companyId);
+
+    List<MessagelogDTO> getListData(@Param("condition") String condition, @Param("companyId") Long companyId);
+
+    void updatePeriodStatus(@Param("status") Long status,@Param("period") String period, @Param("companyId") Long companyId);
+}

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

@@ -31,4 +31,6 @@ public interface MaxnumbersMapper extends CommonBaseMapper<Maxnumbers>{
     int updateByPrimaryKeySelective(Maxnumbers record);
     int updateByPrimaryKeySelective(Maxnumbers record);
 
 
     int updateByPrimaryKey(Maxnumbers record);
     int updateByPrimaryKey(Maxnumbers record);
+
+    List<Maxnumbers> getListDataByCondition(@Param("condition") String condition, @Param("companyId") Long companyId);
 }
 }

+ 1 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/MessagelogMapper.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.commons.mapper;
 package com.usoftchina.saas.commons.mapper;
 
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.dto.MessagelogDTO;
 import com.usoftchina.saas.commons.po.Messagelog;
 import com.usoftchina.saas.commons.po.Messagelog;
 import com.usoftchina.saas.commons.po.MessagelogExample;
 import com.usoftchina.saas.commons.po.MessagelogExample;
 import java.util.List;
 import java.util.List;

+ 15 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/EndProductService.java

@@ -0,0 +1,15 @@
+package com.usoftchina.saas.commons.service;
+
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.page.PageRequest;
+
+import java.util.Map;
+
+public interface EndProductService{
+
+    Map<String, Object> getPeriodData(PageRequest page, ListReqDTO listReqDTO);
+
+    String endAccount();
+
+    void unEndAccount();
+}

+ 8 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/MaxnumberService.java

@@ -1,8 +1,12 @@
 package com.usoftchina.saas.commons.service;
 package com.usoftchina.saas.commons.service;
 
 
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.mapper.MaxnumbersMapper;
 import com.usoftchina.saas.commons.mapper.MaxnumbersMapper;
 import com.usoftchina.saas.commons.po.Maxnumbers;
 import com.usoftchina.saas.commons.po.Maxnumbers;
+import com.usoftchina.saas.page.PageRequest;
 
 
 /**
 /**
  * @author: guq
  * @author: guq
@@ -12,4 +16,8 @@ public interface MaxnumberService extends CommonBaseService<MaxnumbersMapper, Ma
     String getMaxnumner(String caller, boolean update);
     String getMaxnumner(String caller, boolean update);
 
 
     String pushMaxnubmer(Integer count, String code, String caller);
     String pushMaxnubmer(Integer count, String code, String caller);
+
+    PageInfo<Maxnumbers> getListData(PageRequest page, ListReqDTO listReqDTO);
+
+    DocBaseDTO saveData(Maxnumbers maxnumbers);
 }
 }

+ 90 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java

@@ -0,0 +1,90 @@
+package com.usoftchina.saas.commons.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.commons.dto.MessagelogDTO;
+import com.usoftchina.saas.commons.mapper.EndProductMapper;
+import com.usoftchina.saas.commons.mapper.MessagelogMapper;
+import com.usoftchina.saas.commons.po.Operation;
+import com.usoftchina.saas.commons.service.EndProductService;
+import com.usoftchina.saas.commons.service.MessageLogService;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.page.PageRequest;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class EndProductServiceImpl implements EndProductService {
+
+    @Autowired
+    private MessageLogService messageLogService;
+    @Autowired
+    private MessagelogMapper messagelogMapper;
+    @Autowired
+    private EndProductMapper endProductMapper;
+
+    @Override
+    public Map<String, Object> getPeriodData(PageRequest page, ListReqDTO listReqDTO) {
+        //设置分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //condition语句
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<MessagelogDTO> messagelogDTOS = endProductMapper.getListData(condition, BaseContextHolder.getCompanyId());
+        //取分页信息
+        PageInfo<MessagelogDTO> pageInfo = new PageInfo<MessagelogDTO>(messagelogDTOS);
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("main", endProductMapper.selectPeriod(BaseContextHolder.getCompanyId()));
+        map.put("item",pageInfo);
+        return map;
+    }
+
+    @Override
+    public String endAccount() {
+        String period = endProductMapper.selectPeriod(BaseContextHolder.getCompanyId());
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("yearMonth", period);
+        map.put("companyId", BaseContextHolder.getCompanyId());
+        map.put("result", null);
+        endProductMapper.endProduct(map);
+        endProductMapper.updatePeriodStatus(99L, period, BaseContextHolder.getCompanyId());
+        DocBaseDTO docBaseDTO = generateMsgObj(Long.parseLong(period));
+        messageLogService.customizeLog(docBaseDTO, Operation.ENDPRODUCT);
+        return String.valueOf(map.get("result"));
+    }
+
+    @Override
+    public void unEndAccount() {
+        String period = endProductMapper.selectPeriod(BaseContextHolder.getCompanyId());
+        if (StringUtils.isEmpty(period)){
+            throw new BizException(79306,"系统还未结账,不能反结账");
+        }else{
+            endProductMapper.updatePeriodStatus(0L, period, BaseContextHolder.getCompanyId());
+            messageLogService.customizeLog(generateMsgObj(Long.parseLong(period)), Operation.UNENDPRODUCT);
+        }
+    }
+    /**
+     * 构造 记录日志对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, null, "EndProduct");
+    }
+
+}

+ 65 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/MaxnumberServiceImpl.java

@@ -1,6 +1,10 @@
 package com.usoftchina.saas.commons.service.impl;
 package com.usoftchina.saas.commons.service.impl;
 
 
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.mapper.MaxnumbersMapper;
 import com.usoftchina.saas.commons.mapper.MaxnumbersMapper;
 import com.usoftchina.saas.commons.mapper.MaxnumbersdetailMapper;
 import com.usoftchina.saas.commons.mapper.MaxnumbersdetailMapper;
@@ -9,15 +13,18 @@ import com.usoftchina.saas.commons.po.MaxnumbersExample;
 import com.usoftchina.saas.commons.po.Maxnumbersdetail;
 import com.usoftchina.saas.commons.po.Maxnumbersdetail;
 import com.usoftchina.saas.commons.po.MaxnumbersdetailExample;
 import com.usoftchina.saas.commons.po.MaxnumbersdetailExample;
 import com.usoftchina.saas.commons.service.MaxnumberService;
 import com.usoftchina.saas.commons.service.MaxnumberService;
+import com.usoftchina.saas.commons.service.MessageLogService;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
 
 
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.DateUtils;
 import com.usoftchina.saas.utils.DateUtils;
 
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 
 
 import java.util.Date;
 import java.util.Date;
+import java.util.List;
 
 
 
 
 /**
 /**
@@ -31,6 +38,8 @@ public class MaxnumberServiceImpl extends CommonBaseServiceImpl<MaxnumbersMapper
     private MaxnumbersMapper maxnumbersMapper;
     private MaxnumbersMapper maxnumbersMapper;
     @Autowired
     @Autowired
     private MaxnumbersdetailMapper maxnumbersdetailMapper;
     private MaxnumbersdetailMapper maxnumbersdetailMapper;
+    @Autowired
+    private MessageLogService messageLogService;
 
 
     /**
     /**
     * @Description
     * @Description
@@ -144,6 +153,53 @@ public class MaxnumberServiceImpl extends CommonBaseServiceImpl<MaxnumbersMapper
         return maxcode;
         return maxcode;
     }
     }
 
 
+    @Override
+    public PageInfo<Maxnumbers> getListData(PageRequest page, ListReqDTO listReqDTO) {
+        //设置分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        //condition语句
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+
+        List<Maxnumbers> maxnumbersList = getMapper().getListDataByCondition(condition, BaseContextHolder.getCompanyId());
+        //取分页信息
+        PageInfo<Maxnumbers> pageInfo = new PageInfo<Maxnumbers>(maxnumbersList);
+        return pageInfo;
+    }
+
+    @Override
+    public DocBaseDTO saveData(Maxnumbers maxnumbers) {
+        DocBaseDTO docBaseDTO = null;
+        if(maxnumbers.getId() == 0){
+            //保存
+            maxnumbers.setCompanyId(BaseContextHolder.getCompanyId());
+            maxnumbers.setCreatorId(BaseContextHolder.getUserId());
+            maxnumbers.setCreateTime(new Date());
+
+            getMapper().insertSelective(maxnumbers);
+            //记录LOG
+            docBaseDTO = generateMsgObj(maxnumbers.getId());
+            messageLogService.save(docBaseDTO);
+        }else{
+            //更新
+            maxnumbers.setUpdaterId(BaseContextHolder.getUserId());
+            maxnumbers.setUpdateTime(new Date());
+
+            getMapper().updateByPrimaryKeySelective(maxnumbers);
+            //记录LOG
+            docBaseDTO = generateMsgObj(maxnumbers.getId());
+            messageLogService.update(docBaseDTO);
+        }
+        return docBaseDTO;
+    }
+
     /**
     /**
     * @Description
     * @Description
     * 根据长度跳流水号
     * 根据长度跳流水号
@@ -229,4 +285,13 @@ public class MaxnumberServiceImpl extends CommonBaseServiceImpl<MaxnumbersMapper
         return rulecode += date;
         return rulecode += date;
     }
     }
 
 
+    /**
+     * 构造日记记录对象
+     * @param id
+     * @return
+     */
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, null, "Maxnumber");
+    }
+
 }
 }

+ 3 - 1
applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties

@@ -114,4 +114,6 @@ msg.CopySuccess=\u590d\u5236\u6210\u529f,\u6765\u6e90\u5355\u53f7\uff1a
 msg.getBill=\u83b7\u53d6\u53d1\u7968\u660e\u7ec6
 msg.getBill=\u83b7\u53d6\u53d1\u7968\u660e\u7ec6
 msg.getARBill=\u83b7\u53d6\u5e94\u6536\u53d1\u7968
 msg.getARBill=\u83b7\u53d6\u5e94\u6536\u53d1\u7968
 msg.getAPBill=\u83b7\u53d6\u5e94\u4ed8\u53d1\u7968
 msg.getAPBill=\u83b7\u53d6\u5e94\u4ed8\u53d1\u7968
-msg.getSuccess=\u83b7\u53d6\u6210\u529f
+msg.getSuccess=\u83b7\u53d6\u6210\u529f
+msg.endProdudct=\u8bb0\u8d26\u64cd\u4f5c
+msg.endProdudctSuccess=\u7ed3\u8d26\u6210\u529f

+ 31 - 0
applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.commons.mapper.EndProductMapper" >
+    <parameterMap id="spParamMap" type="java.util.Map">
+        <parameter property="yearMonth" jdbcType="VARCHAR" mode="IN" />
+        <parameter property="companyId" jdbcType="VARCHAR" mode="IN" />
+        <parameter property="result" jdbcType="VARCHAR" mode="OUT" />
+    </parameterMap>
+
+    <select id="selectPeriod" resultType="string">
+        select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_status=0 order by PD_DETNO LIMIT 1;
+    </select>
+    <resultMap id="MsgResult" type="com.usoftchina.saas.commons.dto.MessagelogDTO">
+        <result column="ml_content" property="ml_content" jdbcType="VARCHAR" />
+        <result column="ml_result" property="ml_result" jdbcType="VARCHAR" />
+        <result column="ml_man" property="ml_man" jdbcType="VARCHAR" />
+        <result column="companyId" property="companyId" jdbcType="INTEGER" />
+        <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+        <result column="ml_keyvalue" property="ml_keyvalue" jdbcType="INTEGER" />
+    </resultMap>
+    <select id="getListData" resultMap="MsgResult">
+        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result='记账成功'
+    </select>
+
+    <select id="endProduct" parameterMap="spParamMap" statementType="CALLABLE">
+        CALL SP_ENDPRODUCT(?, ?, ?)
+    </select>
+    <update id="updatePeriodStatus" >
+        update periodsdetail set pd_status=#{status} where pd_detno=#{period} and companyId=#{companyId}
+    </update>
+</mapper>

+ 33 - 15
applications/commons/commons-server/src/main/resources/mapper/MaxnumbersMapper.xml

@@ -88,15 +88,15 @@
       order by ${orderByClause}
       order by ${orderByClause}
     </if>
     </if>
   </select>
   </select>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     select 
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
     from maxnumbers
     from maxnumbers
-    where mn_id = #{id,jdbcType=INTEGER}
+    where mn_id = #{id}
   </select>
   </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
     delete from maxnumbers
     delete from maxnumbers
-    where mn_id = #{id,jdbcType=INTEGER}
+    where mn_id = #{id}
   </delete>
   </delete>
   <delete id="deleteByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" >
   <delete id="deleteByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" >
     delete from maxnumbers
     delete from maxnumbers
@@ -105,27 +105,30 @@
     </if>
     </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
   <insert id="insert" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
-    insert into maxnumbers (mn_id, mn_caller, mn_leadcode, 
+    insert into maxnumbers (mn_caller, mn_leadcode,
       mn_number, companyId, createTime, 
       mn_number, companyId, createTime, 
       creatorId, updateTime, updaterId
       creatorId, updateTime, updaterId
       )
       )
-    values (#{id,jdbcType=INTEGER}, #{mn_caller,jdbcType=VARCHAR}, #{mn_leadcode,jdbcType=VARCHAR},
+    values (#{mn_caller,jdbcType=VARCHAR}, #{mn_leadcode,jdbcType=VARCHAR},
       #{mn_number,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{mn_number,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{creatorId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=INTEGER}
       #{creatorId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=INTEGER}
       )
       )
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
   <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
+      <selectKey resultType="java.lang.Long" keyProperty="id">
+          SELECT LAST_INSERT_ID() AS ID
+      </selectKey>
     insert into maxnumbers
     insert into maxnumbers
     <trim prefix="(" suffix=")" suffixOverrides="," >
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        mn_id,
-      </if>
       <if test="mn_caller != null" >
       <if test="mn_caller != null" >
         mn_caller,
         mn_caller,
       </if>
       </if>
       <if test="mn_leadcode != null" >
       <if test="mn_leadcode != null" >
         mn_leadcode,
         mn_leadcode,
       </if>
       </if>
+      <if test="mn_rule != null" >
+          mn_rule,
+      </if>
       <if test="mn_number != null" >
       <if test="mn_number != null" >
         mn_number,
         mn_number,
       </if>
       </if>
@@ -146,15 +149,15 @@
       </if>
       </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="mn_caller != null" >
       <if test="mn_caller != null" >
         #{mn_caller,jdbcType=VARCHAR},
         #{mn_caller,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="mn_leadcode != null" >
       <if test="mn_leadcode != null" >
         #{mn_leadcode,jdbcType=VARCHAR},
         #{mn_leadcode,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="mn_rule != null" >
+        #{mn_rule,jdbcType=VARCHAR},
+      </if>
       <if test="mn_number != null" >
       <if test="mn_number != null" >
         #{mn_number,jdbcType=VARCHAR},
         #{mn_number,jdbcType=VARCHAR},
       </if>
       </if>
@@ -175,7 +178,7 @@
       </if>
       </if>
     </trim>
     </trim>
   </insert>
   </insert>
-  <select id="countByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" resultType="java.lang.Integer" >
+  <select id="countByExample" parameterType="com.usoftchina.saas.commons.po.MaxnumbersExample" resultType="java.lang.Long" >
     select count(*) from maxnumbers
     select count(*) from maxnumbers
     <if test="_parameter != null" >
     <if test="_parameter != null" >
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
@@ -240,6 +243,9 @@
       <if test="mn_leadcode != null" >
       <if test="mn_leadcode != null" >
         mn_leadcode = #{mn_leadcode,jdbcType=VARCHAR},
         mn_leadcode = #{mn_leadcode,jdbcType=VARCHAR},
       </if>
       </if>
+      <if test="mn_rule != null" >
+        mn_rule = #{mn_rule,jdbcType=VARCHAR},
+      </if>
       <if test="mn_number != null" >
       <if test="mn_number != null" >
         mn_number = #{mn_number,jdbcType=VARCHAR},
         mn_number = #{mn_number,jdbcType=VARCHAR},
       </if>
       </if>
@@ -259,7 +265,7 @@
         updaterId = #{updaterId,jdbcType=INTEGER},
         updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       </if>
     </set>
     </set>
-    where mn_id = #{id,jdbcType=INTEGER}
+    where mn_id = #{id}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.commons.po.Maxnumbers" >
     update maxnumbers
     update maxnumbers
@@ -271,6 +277,18 @@
       creatorId = #{creatorId,jdbcType=INTEGER},
       creatorId = #{creatorId,jdbcType=INTEGER},
       updateTime = #{updateTime,jdbcType=TIMESTAMP},
       updateTime = #{updateTime,jdbcType=TIMESTAMP},
       updaterId = #{updaterId,jdbcType=INTEGER}
       updaterId = #{updaterId,jdbcType=INTEGER}
-    where mn_id = #{id,jdbcType=INTEGER}
+    where mn_id = #{id}
   </update>
   </update>
+    <select id="getListDataByCondition" resultMap="BaseResultMap">
+        SELECT * FROM MAXNUMBERS
+        <where>
+            <if test="condition">
+                ${condition}
+            </if>
+            <if test="companyId">
+                and COMPANYID=#{companyId}
+            </if>
+        </where>
+        ORDER BY MN_ID DESC
+    </select>
 </mapper>
 </mapper>

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

@@ -182,7 +182,7 @@
     SELECT * FROM ADDRESS
     SELECT * FROM ADDRESS
   </select>
   </select>
   <select id="selectCountByName" resultType="int">
   <select id="selectCountByName" resultType="int">
-    SELECT * FROM ADDRESS WHERE AD_ADDRESS=#{name} AND COMPANYID=#{companyId}
+    SELECT count(*) FROM ADDRESS WHERE AD_ADDRESS=#{name} AND COMPANYID=#{companyId}
   </select>
   </select>
     <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
     <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
         SELECT AD_ADDRESS display,AD_ADDRESS value FROM ADDRESS WHERE COMPANYID=#{companyId}
         SELECT AD_ADDRESS display,AD_ADDRESS value FROM ADDRESS WHERE COMPANYID=#{companyId}

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

@@ -126,6 +126,6 @@
     SELECT ck_name display,ck_name value FROM CUSTOMERKIND WHERE COMPANYID=#{companyId}
     SELECT ck_name display,ck_name value FROM CUSTOMERKIND WHERE COMPANYID=#{companyId}
   </select>
   </select>
     <select id="selectCountByName" resultType="int">
     <select id="selectCountByName" resultType="int">
-        SELECT * FROM CUSTOMERKIND WHERE CK_NAME=#{name} AND COMPANYID=#{companyId}
+        SELECT count(*) FROM CUSTOMERKIND WHERE CK_NAME=#{name} AND COMPANYID=#{companyId}
     </select>
     </select>
 </mapper>
 </mapper>

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

@@ -30,6 +30,8 @@ public class PurchaseDetailDTO extends CommonBaseDTO implements Serializable{
 
 
     private Double pd_price;
     private Double pd_price;
 
 
+    private Double pd_taxprice;
+
     private Double pd_total;
     private Double pd_total;
 
 
     private Double pd_taxrate;
     private Double pd_taxrate;

+ 2 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java

@@ -86,6 +86,8 @@ public class PurchaseListDTO extends CommonBaseDTO implements Serializable {
 
 
     private Double pd_price;
     private Double pd_price;
 
 
+    private Double pd_taxprice;
+
     private Double pd_total;
     private Double pd_total;
 
 
     private Double pd_taxrate;
     private Double pd_taxrate;

+ 0 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java

@@ -15,8 +15,6 @@ public interface PurchasedetailMapper extends CommonBaseMapper<Purchase> {
 
 
     int updateByPrimaryKeySelective(PurchaseDetail record);
     int updateByPrimaryKeySelective(PurchaseDetail record);
 
 
-    int updateByPrimaryKey(PurchaseDetail record);
-
     void batchInsert(List<PurchaseDetail> list);
     void batchInsert(List<PurchaseDetail> list);
 
 
     void batchUpdate(List<PurchaseDetail> list);
     void batchUpdate(List<PurchaseDetail> list);

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseDetail.java

@@ -26,6 +26,8 @@ public class PurchaseDetail extends CommonBaseEntity implements Serializable {
 
 
     private Double pd_price;
     private Double pd_price;
 
 
+    private Double pd_taxprice;
+
     private Double pd_total;
     private Double pd_total;
 
 
     private Double pd_taxrate;
     private Double pd_taxrate;

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java

@@ -87,6 +87,8 @@ public class PurchaseList extends CommonBaseEntity implements Serializable {
 
 
     private Double pd_price;
     private Double pd_price;
 
 
+    private Double pd_taxprice;
+
     private Double pd_total;
     private Double pd_total;
 
 
     private Double pd_taxrate;
     private Double pd_taxrate;

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

@@ -501,7 +501,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
 
     @Transactional
     @Transactional
     private void calcPurchase(Long pu_id) {
     private void calcPurchase(Long pu_id) {
-//        purchasedetailMapper.calcPurchase(pu_id);
+        purchasedetailMapper.calcPurchase(pu_id);
     }
     }
 
 
 }
 }

+ 1 - 0
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml

@@ -40,6 +40,7 @@
         <result column="PD_UNIT" property="pd_unit" jdbcType="VARCHAR" />
         <result column="PD_UNIT" property="pd_unit" jdbcType="VARCHAR" />
         <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
         <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
         <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
         <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
+        <result column="PD_TAXPRICE" property="pd_taxprice" jdbcType="DOUBLE" />
         <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
         <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
         <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
         <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
         <result column="PD_ACCEPTQTY" property="pd_acceptqty" jdbcType="DOUBLE" />
         <result column="PD_ACCEPTQTY" property="pd_acceptqty" jdbcType="DOUBLE" />

+ 104 - 132
applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml

@@ -11,6 +11,7 @@
     <result column="PD_UNIT" property="pd_unit" jdbcType="VARCHAR" />
     <result column="PD_UNIT" property="pd_unit" jdbcType="VARCHAR" />
     <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
     <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
     <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
     <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
+    <result column="PD_TAXPRICE" property="pd_taxprice" jdbcType="DOUBLE" />
     <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
     <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
     <result column="PD_TAXRATE" property="pd_taxrate" jdbcType="DOUBLE" />
     <result column="PD_TAXRATE" property="pd_taxrate" jdbcType="DOUBLE" />
     <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
     <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
@@ -60,7 +61,7 @@
     </association>
     </association>
   </resultMap>
   </resultMap>
   <sql id="Base_Column_List" >
   <sql id="Base_Column_List" >
-    PD_ID, PD_PUID, PD_CODE, PD_DETNO, PD_PRODID, PD_PRODCODE, PD_UNIT, PD_QTY, PD_PRICE,
+    PD_ID, PD_PUID, PD_CODE, PD_DETNO, PD_PRODID, PD_PRODCODE, PD_UNIT, PD_QTY, PD_PRICE,PD_TAXPRICE,
     PD_TOTAL, PD_TAXRATE,PD_TAXTOTAL, PD_ACCEPTQTY, PD_DELIVERY, PD_SALECODE, PD_SALEDETNO, PD_SDID,
     PD_TOTAL, PD_TAXRATE,PD_TAXTOTAL, PD_ACCEPTQTY, PD_DELIVERY, PD_SALECODE, PD_SALEDETNO, PD_SDID,
     companyId, updaterId, updateTime, pd_text1, pd_text2, pd_text3, pd_text4, pd_text5,
     companyId, updaterId, updateTime, pd_text1, pd_text2, pd_text3, pd_text4, pd_text5,
     pd_yqty
     pd_yqty
@@ -75,183 +76,180 @@
     delete from purchasedetail
     delete from purchasedetail
     where PD_ID = #{id}
     where PD_ID = #{id}
   </delete>
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
-    insert into purchasedetail (PD_PUID, PD_CODE,
-    PD_DETNO, PD_PRODID, PD_PRODCODE,
-    PD_UNIT, PD_QTY, PD_PRICE,
-    PD_TOTAL, PD_TAXTOTAL, PD_ACCEPTQTY,
-    PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
-    PD_SDID, companyId, updaterId,
-    updateTime, pd_text1, pd_text2,
-    pd_text3, pd_text4, pd_text5,
-    pd_yqty)
-    values (#{pdPuid,jdbcType=INTEGER}, #{pdCode,jdbcType=VARCHAR},
-    #{pdDetno,jdbcType=INTEGER}, #{pdProdid,jdbcType=INTEGER}, #{pdProdcode,jdbcType=VARCHAR},
-    #{pdUnit,jdbcType=VARCHAR}, #{pdQty,jdbcType=DOUBLE}, #{pdPrice,jdbcType=DOUBLE},
-    #{pdTotal,jdbcType=DOUBLE}, #{pdTaxtotal,jdbcType=DOUBLE}, #{pdAcceptqty,jdbcType=DOUBLE},
-    #{pdDelivery,jdbcType=DOUBLE}, #{pdSalecode,jdbcType=VARCHAR}, #{pdSaledetno,jdbcType=INTEGER},
-    #{pdSdid,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER},
-    #{updateTime,jdbcType=TIMESTAMP}, #{pdText1,jdbcType=VARCHAR}, #{pdText2,jdbcType=VARCHAR},
-    #{pdText3,jdbcType=VARCHAR}, #{pdText4,jdbcType=VARCHAR}, #{pdText5,jdbcType=VARCHAR},
-    #{pdYqty,jdbcType=DOUBLE})
-  </insert>
-  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
+
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail">
+    <selectKey resultType="java.lang.Long" keyProperty="id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
     insert into purchasedetail
     insert into purchasedetail
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="pdPuid != null" >
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="PD_ID != null">
+        PD_ID,
+      </if>
+      <if test="PD_PUID != null">
         PD_PUID,
         PD_PUID,
       </if>
       </if>
-      <if test="pdCode != null" >
+      <if test="PD_CODE != null">
         PD_CODE,
         PD_CODE,
       </if>
       </if>
-      <if test="pdDetno != null" >
+      <if test="PD_DETNO != null">
         PD_DETNO,
         PD_DETNO,
       </if>
       </if>
-      <if test="pdProdid != null" >
+      <if test="PD_PRODID != null">
         PD_PRODID,
         PD_PRODID,
       </if>
       </if>
-      <if test="pdProdcode != null" >
+      <if test="PD_PRODCODE != null">
         PD_PRODCODE,
         PD_PRODCODE,
       </if>
       </if>
-      <if test="pdUnit != null" >
+      <if test="PD_UNIT != null">
         PD_UNIT,
         PD_UNIT,
       </if>
       </if>
-      <if test="pdQty != null" >
+      <if test="PD_QTY != null">
         PD_QTY,
         PD_QTY,
       </if>
       </if>
-      <if test="pdPrice != null" >
+      <if test="PD_YQTY != null">
+        PD_YQTY,
+      </if>
+      <if test="PD_PRICE != null">
         PD_PRICE,
         PD_PRICE,
       </if>
       </if>
-      <if test="pdTotal != null" >
+      <if test="PD_TAXPRICE != null">
+        PD_TAXPRICE,
+      </if>
+      <if test="PD_TOTAL != null">
         PD_TOTAL,
         PD_TOTAL,
       </if>
       </if>
-      <if test="PD_TAXRATE != null" >
+      <if test="PD_TAXRATE != null">
         PD_TAXRATE,
         PD_TAXRATE,
       </if>
       </if>
-      <if test="pdTaxtotal != null" >
+      <if test="PD_TAXTOTAL != null">
         PD_TAXTOTAL,
         PD_TAXTOTAL,
       </if>
       </if>
-      <if test="pdAcceptqty != null" >
+      <if test="PD_ACCEPTQTY != null">
         PD_ACCEPTQTY,
         PD_ACCEPTQTY,
       </if>
       </if>
-      <if test="pdDelivery != null" >
+      <if test="PD_DELIVERY != null">
         PD_DELIVERY,
         PD_DELIVERY,
       </if>
       </if>
-      <if test="pdSalecode != null" >
+      <if test="PD_SALECODE != null">
         PD_SALECODE,
         PD_SALECODE,
       </if>
       </if>
-      <if test="pdSaledetno != null" >
+      <if test="PD_SALEDETNO != null">
         PD_SALEDETNO,
         PD_SALEDETNO,
       </if>
       </if>
-      <if test="pdSdid != null" >
+      <if test="PD_SDID != null">
         PD_SDID,
         PD_SDID,
       </if>
       </if>
-      <if test="companyId != null" >
+      <if test="companyId != null">
         companyId,
         companyId,
       </if>
       </if>
-      <if test="updaterId != null" >
+      <if test="updaterId != null">
         updaterId,
         updaterId,
       </if>
       </if>
-      <if test="updateTime != null" >
+      <if test="updateTime != null">
         updateTime,
         updateTime,
       </if>
       </if>
-      <if test="pdText1 != null" >
+      <if test="pd_text1 != null">
         pd_text1,
         pd_text1,
       </if>
       </if>
-      <if test="pdText2 != null" >
+      <if test="pd_text2 != null">
         pd_text2,
         pd_text2,
       </if>
       </if>
-      <if test="pdText3 != null" >
+      <if test="pd_text3 != null">
         pd_text3,
         pd_text3,
       </if>
       </if>
-      <if test="pdText4 != null" >
+      <if test="pd_text4 != null">
         pd_text4,
         pd_text4,
       </if>
       </if>
-      <if test="pdText5 != null" >
+      <if test="pd_text5 != null">
         pd_text5,
         pd_text5,
       </if>
       </if>
-      <if test="pdYqty != null" >
-        pd_yqty,
-      </if>
     </trim>
     </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="pdPuid != null" >
-        #{pdPuid,jdbcType=INTEGER},
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+      <if test="PD_PUID != null">
+        #{PD_PUID,jdbcType=INTEGER},
+      </if>
+      <if test="PD_CODE != null">
+        #{PD_CODE,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdCode != null" >
-        #{pdCode,jdbcType=VARCHAR},
+      <if test="PD_DETNO != null">
+        #{PD_DETNO,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="pdDetno != null" >
-        #{pdDetno,jdbcType=INTEGER},
+      <if test="PD_PRODID != null">
+        #{PD_PRODID,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="pdProdid != null" >
-        #{pdProdid,jdbcType=INTEGER},
+      <if test="PD_PRODCODE != null">
+        #{PD_PRODCODE,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdProdcode != null" >
-        #{pdProdcode,jdbcType=VARCHAR},
+      <if test="PD_UNIT != null">
+        #{PD_UNIT,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdUnit != null" >
-        #{pdUnit,jdbcType=VARCHAR},
+      <if test="PD_QTY != null">
+        #{PD_QTY,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="pdQty != null" >
-        #{pdQty,jdbcType=DOUBLE},
+      <if test="PD_YQTY != null">
+        #{PD_YQTY,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="pdPrice != null" >
-        #{pdPrice,jdbcType=DOUBLE},
+      <if test="PD_PRICE != null">
+        #{PD_PRICE,jdbcType=DOUBLE},
       </if>
       </if>
-      <if test="pdTotal != null" >
-        #{pdTotal,jdbcType=DOUBLE},
+      <if test="PD_TAXPRICE != null">
+        #{PD_TAXPRICE,jdbcType=DOUBLE},
       </if>
       </if>
-      <if test="PD_TAXRATE != null" >
+      <if test="PD_TOTAL != null">
+        #{PD_TOTAL,jdbcType=DOUBLE},
+      </if>
+      <if test="PD_TAXRATE != null">
         #{PD_TAXRATE,jdbcType=DOUBLE},
         #{PD_TAXRATE,jdbcType=DOUBLE},
       </if>
       </if>
-      <if test="pdTaxtotal != null" >
-        #{pdTaxtotal,jdbcType=DOUBLE},
+      <if test="PD_TAXTOTAL != null">
+        #{PD_TAXTOTAL,jdbcType=DOUBLE},
       </if>
       </if>
-      <if test="pdAcceptqty != null" >
-        #{pdAcceptqty,jdbcType=DOUBLE},
+      <if test="PD_ACCEPTQTY != null">
+        #{PD_ACCEPTQTY,jdbcType=DOUBLE},
       </if>
       </if>
-      <if test="pdDelivery != null" >
-        #{pdDelivery,jdbcType=TIMESTAMP},
+      <if test="PD_DELIVERY != null">
+        #{PD_DELIVERY,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <if test="pdSalecode != null" >
-        #{pdSalecode,jdbcType=VARCHAR},
+      <if test="PD_SALECODE != null">
+        #{PD_SALECODE,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdSaledetno != null" >
-        #{pdSaledetno,jdbcType=INTEGER},
+      <if test="PD_SALEDETNO != null">
+        #{PD_SALEDETNO,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="pdSdid != null" >
-        #{pdSdid,jdbcType=INTEGER},
+      <if test="PD_SDID != null">
+        #{PD_SDID,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="companyId != null" >
+      <if test="companyId != null">
         #{companyId,jdbcType=INTEGER},
         #{companyId,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="updaterId != null" >
+      <if test="updaterId != null">
         #{updaterId,jdbcType=INTEGER},
         #{updaterId,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="updateTime != null" >
+      <if test="updateTime != null">
         #{updateTime,jdbcType=TIMESTAMP},
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <if test="pdText1 != null" >
-        #{pdText1,jdbcType=VARCHAR},
-      </if>
-      <if test="pdText2 != null" >
-        #{pdText2,jdbcType=VARCHAR},
+      <if test="pd_text1 != null">
+        #{pd_text1,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdText3 != null" >
-        #{pdText3,jdbcType=VARCHAR},
+      <if test="pd_text2 != null">
+        #{pd_text2,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdText4 != null" >
-        #{pdText4,jdbcType=VARCHAR},
+      <if test="pd_text3 != null">
+        #{pd_text3,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdText5 != null" >
-        #{pdText5,jdbcType=VARCHAR},
+      <if test="pd_text4 != null">
+        #{pd_text4,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="pdYqty != null" >
-        #{pdYqty,jdbcType=DOUBLE},
+      <if test="pd_text5 != null">
+        #{pd_text5,jdbcType=VARCHAR},
       </if>
       </if>
     </trim>
     </trim>
   </insert>
   </insert>
+
+
+
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
     update purchasedetail
     update purchasedetail
     <set >
     <set >
@@ -334,38 +332,11 @@
     </set>
     </set>
     where PD_ID = #{id,jdbcType=INTEGER}
     where PD_ID = #{id,jdbcType=INTEGER}
   </update>
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
-    update purchasedetail
-    set PD_PUID = #{pdPuid,jdbcType=INTEGER},
-    PD_CODE = #{pdCode,jdbcType=VARCHAR},
-    PD_DETNO = #{pdDetno,jdbcType=INTEGER},
-    PD_PRODID = #{pdProdid,jdbcType=INTEGER},
-    PD_PRODCODE = #{pdProdcode,jdbcType=VARCHAR},
-    PD_UNIT = #{pdUnit,jdbcType=VARCHAR},
-    PD_QTY = #{pdQty,jdbcType=DOUBLE},
-    PD_PRICE = #{pdPrice,jdbcType=DOUBLE},
-    PD_TOTAL = #{pdTotal,jdbcType=DOUBLE},
-    PD_TAXTOTAL = #{pdTaxtotal,jdbcType=DOUBLE},
-    PD_ACCEPTQTY = #{pdAcceptqty,jdbcType=DOUBLE},
-    PD_DELIVERY = #{pdDelivery,jdbcType=DOUBLE},
-    PD_SALECODE = #{pdSalecode,jdbcType=VARCHAR},
-    PD_SALEDETNO = #{pdSaledetno,jdbcType=INTEGER},
-    PD_SDID = #{pdSdid,jdbcType=INTEGER},
-    companyId = #{companyId,jdbcType=INTEGER},
-    updaterId = #{updaterId,jdbcType=INTEGER},
-    updateTime = #{updateTime,jdbcType=TIMESTAMP},
-    pd_text1 = #{pdText1,jdbcType=VARCHAR},
-    pd_text2 = #{pdText2,jdbcType=VARCHAR},
-    pd_text3 = #{pdText3,jdbcType=VARCHAR},
-    pd_text4 = #{pdText4,jdbcType=VARCHAR},
-    pd_text5 = #{pdText5,jdbcType=VARCHAR},
-    pd_yqty = #{pdYqty,jdbcType=DOUBLE}
-    where PD_ID = #{id,jdbcType=INTEGER}
-  </update>
+
   <insert id="batchInsert" parameterType="java.util.List" >
   <insert id="batchInsert" parameterType="java.util.List" >
     insert into purchasedetail ( PD_PUID, PD_CODE,
     insert into purchasedetail ( PD_PUID, PD_CODE,
     PD_DETNO, PD_PRODID, PD_PRODCODE,
     PD_DETNO, PD_PRODID, PD_PRODCODE,
-    PD_UNIT, PD_QTY, PD_PRICE,
+    PD_UNIT, PD_QTY, PD_PRICE,PD_TAXPRICE,
     PD_TOTAL,PD_TAXRATE, PD_TAXTOTAL, PD_ACCEPTQTY,
     PD_TOTAL,PD_TAXRATE, PD_TAXTOTAL, PD_ACCEPTQTY,
     PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
     PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
     PD_SDID, companyId, updaterId,
     PD_SDID, companyId, updaterId,
@@ -377,7 +348,7 @@
       (
       (
       #{item.pd_puid,jdbcType=INTEGER}, #{item.pd_code,jdbcType=VARCHAR},
       #{item.pd_puid,jdbcType=INTEGER}, #{item.pd_code,jdbcType=VARCHAR},
       #{item.pd_detno,jdbcType=INTEGER}, #{item.pd_prodid,jdbcType=INTEGER}, #{item.pd_prodcode,jdbcType=VARCHAR},
       #{item.pd_detno,jdbcType=INTEGER}, #{item.pd_prodid,jdbcType=INTEGER}, #{item.pd_prodcode,jdbcType=VARCHAR},
-      #{item.pd_unit,jdbcType=VARCHAR}, #{item.pd_qty,jdbcType=DOUBLE}, #{item.pd_price,jdbcType=DOUBLE},
+      #{item.pd_unit,jdbcType=VARCHAR}, #{item.pd_qty,jdbcType=DOUBLE}, #{item.pd_price,jdbcType=DOUBLE},#{item.pd_taxprice,jdbcType=DOUBLE},
       #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE}, #{item.pd_taxtotal,jdbcType=DOUBLE}, #{item.pd_acceptqty,jdbcType=DOUBLE},
       #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE}, #{item.pd_taxtotal,jdbcType=DOUBLE}, #{item.pd_acceptqty,jdbcType=DOUBLE},
       #{item.pd_delivery,jdbcType=DOUBLE}, #{item.pd_salecode,jdbcType=VARCHAR}, #{item.pd_saledetno,jdbcType=INTEGER},
       #{item.pd_delivery,jdbcType=DOUBLE}, #{item.pd_salecode,jdbcType=VARCHAR}, #{item.pd_saledetno,jdbcType=INTEGER},
       #{item.pd_sdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
       #{item.pd_sdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
@@ -398,6 +369,7 @@
       PD_UNIT = #{item.pd_unit},
       PD_UNIT = #{item.pd_unit},
       PD_QTY = #{item.pd_qty},
       PD_QTY = #{item.pd_qty},
       PD_PRICE = #{item.pd_price},
       PD_PRICE = #{item.pd_price},
+      PD_TAXPRICE = #{item.pd_taxprice},
       PD_TOTAL = #{item.pd_total},
       PD_TOTAL = #{item.pd_total},
       PD_TAXRATE = #{item.pd_taxrate},
       PD_TAXRATE = #{item.pd_taxrate},
       PD_TAXTOTAL = #{item.pd_taxtotal},
       PD_TAXTOTAL = #{item.pd_taxtotal},
@@ -437,10 +409,10 @@
 
 
 
 
   <update id="calcPurchase" parameterType="long" >
   <update id="calcPurchase" parameterType="long" >
-    update purchasedetail set pd_netprice = PD_PRICE/(1+pd_taxrate/100) where pd_puid = #{pu_id,jdbcType=INTEGER};
-    update purchasedetail set pd_total = PD_PRICE*pd_qty,pd_nettotal = pd_netprice*pd_inqty where pd_puid = #{pu_id,jdbcType=INTEGER};
-    update purchase set pu_total = (select sum(pd_total) from prodiodetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
-    update purchase set p_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
+    update purchasedetail set pd_taxprice = PD_PRICE/(1+pd_taxrate/100) where pd_puid = #{pu_id,jdbcType=INTEGER};
+    update purchasedetail set pd_total = PD_PRICE*pd_qty,pd_taxtotal = pd_taxprice*pd_qty where pd_puid = #{pu_id,jdbcType=INTEGER};
+    update purchase set pu_total = (select sum(pd_total) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
+    update purchase set PU_TAXTOTAL = (select sum(pd_taxtotal) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
   </update>
   </update>
 
 
 
 

+ 2 - 2
frontend/saas-web/app/model/purchase/purchasedetail.js

@@ -5,8 +5,8 @@ Ext.define('saas.model.purchase.Purchasedetail', {
         { name: 'pd_detno', type: 'int' },
         { name: 'pd_detno', type: 'int' },
         { name: 'id', type: 'int' },
         { name: 'id', type: 'int' },
         { name: 'pd_prodcode', type: 'string' },
         { name: 'pd_prodcode', type: 'string' },
-        { name: 'pd_qty', type: 'int' },
-        { name: 'pd_yqty', type: 'int' },
+        { name: 'pd_qty', type: 'float' },
+        { name: 'pd_yqty', type: 'float' },
         { name: 'pd_price', type: 'float' },
         { name: 'pd_price', type: 'float' },
         { name: 'pd_taxrate', type: 'float' },
         { name: 'pd_taxrate', type: 'float' },
         { name: 'pd_total', type: 'float' },
         { name: 'pd_total', type: 'float' },

+ 8 - 4
frontend/saas-web/app/view/document/kind/Kind.js

@@ -24,16 +24,20 @@ Ext.define('saas.view.document.kind.Kind', {
         bind:'{segmented}',
         bind:'{segmented}',
         items: [{
         items: [{
             text: '客户',
             text: '客户',
-            value: 'customerkind'
+            value: 'customerkind',
+            typeText:'客户类型'
         }, {
         }, {
             text: '供应商',
             text: '供应商',
-            value: 'vendorkind'
+            value: 'vendorkind',
+            typeText:'供应商类型'
         }, {
         }, {
             text: '商品',
             text: '商品',
-            value: 'productkind'
+            value: 'productkind',
+            typeText:'商品类型'
         }, {
         }, {
             text: '收支',
             text: '收支',
-            value: 'inoutkind'
+            value: 'inoutkind',
+            typeText:'收支类型'
         }],
         }],
         listeners: {
         listeners: {
             toggle: 'onKindToggle'
             toggle: 'onKindToggle'

+ 3 - 2
frontend/saas-web/app/view/document/kind/KindController.js

@@ -32,7 +32,7 @@ Ext.define('saas.view.document.kind.KindController', {
        var columns=me.insertActionColumn(etc.columns);
        var columns=me.insertActionColumn(etc.columns);
         grid.reconfigure(store, columns);
         grid.reconfigure(store, columns);
         if(store) store.reload();
         if(store) store.reload();
-        vm.set('title', button.text);
+        vm.set('title', button.typeText);
     },
     },
     onAdd:function(){
     onAdd:function(){
         var me=this,
         var me=this,
@@ -48,6 +48,7 @@ Ext.define('saas.view.document.kind.KindController', {
         if(columns.length>0 && columns[0].xtype!='actioncolumn'){
         if(columns.length>0 && columns[0].xtype!='actioncolumn'){
             return Ext.Array.insert(columns,0,[{
             return Ext.Array.insert(columns,0,[{
                 xtype:'actioncolumn',
                 xtype:'actioncolumn',
+                text:'操作',
                 items: [{
                 items: [{
                     tooltip: '编辑',
                     tooltip: '编辑',
                     iconCls: 'x-fa fa-pencil fa-fw',
                     iconCls: 'x-fa fa-pencil fa-fw',
@@ -99,7 +100,7 @@ Ext.define('saas.view.document.kind.KindController', {
             autoScroll:true,
             autoScroll:true,
             xtype: 'document-kind-childwin',
             xtype: 'document-kind-childwin',
             bind: {
             bind: {
-                title: record ? '修改{title}类型' : '新增{title}类型'
+                title: record ? '修改{title}' : '新增{title}'
             },
             },
             dataKind:dataKind,
             dataKind:dataKind,
             belong:this.getView().etc[dataKind],
             belong:this.getView().etc[dataKind],

+ 1 - 1
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.document.kind.KindModel', {
     extend: 'Ext.app.ViewModel',
     extend: 'Ext.app.ViewModel',
     alias: 'viewmodel.document-kind',
     alias: 'viewmodel.document-kind',
     data: {
     data: {
-        title: '客户'
+        title: '客户类型'
     },
     },
     stores: {
     stores: {
         customerkind: {
         customerkind: {

+ 6 - 1
frontend/saas-web/app/view/document/other/Address.js

@@ -19,7 +19,12 @@ Ext.define('saas.view.document.other.Address', {
         listeners: {
         listeners: {
             click: 'onRefresh'
             click: 'onRefresh'
         }
         }
-    }]
+    }],
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'采购地址'});
+        }
+    }
 })
 })
 
 
 
 

+ 6 - 1
frontend/saas-web/app/view/document/other/BankInformation.js

@@ -19,7 +19,12 @@ Ext.define('saas.view.document.other.BankInformation', {
         listeners: {
         listeners: {
             click: 'onRefresh'
             click: 'onRefresh'
         }
         }
-    }]
+    }],
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'资金账户'});
+        }
+    }
 })
 })
 
 
 
 

+ 6 - 1
frontend/saas-web/app/view/document/other/ProductBrand.js

@@ -19,7 +19,12 @@ Ext.define('saas.view.document.other.ProductBrand', {
         listeners: {
         listeners: {
             click: 'onRefresh'
             click: 'onRefresh'
         }
         }
-    }]
+    }],
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'物料品牌'});
+        }
+    }
 })
 })
 
 
 
 

+ 6 - 1
frontend/saas-web/app/view/document/other/ProductUnit.js

@@ -19,7 +19,12 @@ Ext.define('saas.view.document.other.ProductUnit', {
         listeners: {
         listeners: {
             click: 'onRefresh'
             click: 'onRefresh'
         }
         }
-    }]
+    }],
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'物料单位'});
+        }
+    }
 })
 })
 
 
 
 

+ 6 - 1
frontend/saas-web/app/view/document/other/Warehouse.js

@@ -18,5 +18,10 @@ Ext.define('saas.view.document.other.Warehouse', {
         listeners: {
         listeners: {
             click: 'onRefresh'
             click: 'onRefresh'
         }
         }
-    }]
+    }],
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'仓库'});
+        }
+    }
 })
 })

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

@@ -64,7 +64,7 @@ Ext.define('saas.view.document.product.FormPanel', {
             this.dialog = form.getController().getView().add({
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 xtype: 'document-kind-childwin',
                 bind: {
                 bind: {
-                    title: '新增供应商类型'
+                    title: '新增物料类型'
                 },
                 },
                 dataKind:'productkind',
                 dataKind:'productkind',
                 belong:document.etc['productkind'],
                 belong:document.etc['productkind'],

+ 18 - 8
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -95,7 +95,13 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
             {
             {
                 text : "id", 
                 text : "id", 
                 dataIndex : "id", 
                 dataIndex : "id", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
+            },{
+                text : "物料id", 
+                dataIndex : "pd_prodid", 
+                xtype : "numbercolumn",
+                hidden:true
             },
             },
             {
             {
                 text : "物料编号", 
                 text : "物料编号", 
@@ -142,8 +148,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 },
                 },
                 width : 120.0, 
                 width : 120.0, 
                 xtype : "numbercolumn", 
                 xtype : "numbercolumn", 
-                format:'0',
-                items : null,
+                format:'0,000.00',
                 summaryType: 'sum'
                 summaryType: 'sum'
             },
             },
             {
             {
@@ -152,7 +157,8 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 editor : {
                 editor : {
                     xtype : "numberfield"
                     xtype : "numberfield"
                 },
                 },
-                width : 120.0, 
+                width : 120.0,
+                format:'0,000.00', 
                 xtype : "numbercolumn", 
                 xtype : "numbercolumn", 
                 format:'0',
                 format:'0',
                 items : null,
                 items : null,
@@ -174,6 +180,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     xtype : "numberfield"
                     xtype : "numberfield"
                 },
                 },
                 dataIndex : "pd_taxrate", 
                 dataIndex : "pd_taxrate", 
+                format:'0,000.00',
                 width : 120.0, 
                 width : 120.0, 
                 xtype : "numbercolumn",
                 xtype : "numbercolumn",
             },
             },
@@ -181,23 +188,26 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 text : "含税金额", 
                 text : "含税金额", 
                 dataIndex : "pd_total", 
                 dataIndex : "pd_total", 
                 width : 120.0, 
                 width : 120.0, 
-                xtype : "numbercolumn"
+                format:'0,000.00',
+                xtype : "numbercolumn",
+                summaryType: 'sum'
             }, 
             }, 
             {
             {
                 text : "未含税金额", 
                 text : "未含税金额", 
                 dataIndex : "pd_taxtotal", 
                 dataIndex : "pd_taxtotal", 
-                width : 120.0, 
+                width : 120.0,
+                format:'0,000.00', 
                 xtype : "numbercolumn"
                 xtype : "numbercolumn"
             },{
             },{
                 text : "需求日期", 
                 text : "需求日期", 
                 dataIndex : "pd_delivery", 
                 dataIndex : "pd_delivery", 
                 xtype:'datecolumn',
                 xtype:'datecolumn',
                 width : 120.0, 
                 width : 120.0, 
-                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/purchase/purchase/QueryPanel.js

@@ -101,7 +101,8 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: 'id',
             text: 'id',
             dataIndex: 'pu_id',
             dataIndex: 'pu_id',
             width: 100,
             width: 100,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
         }, {
             text: '单据编号',
             text: '单据编号',
             dataIndex: 'pu_code',
             dataIndex: 'pu_code',

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

@@ -280,7 +280,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 text : "采购序号", 
                 text : "采购序号", 
                 dataIndex : "pd_orderdetno", 
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
                 xtype : "numbercolumn",
-                flex:1
+                width : 120.0
             }
             }
         ]
         ]
     }, {
     }, {