zhuth 7 years ago
parent
commit
4285db18c0
60 changed files with 1373 additions and 810 deletions
  1. 1 1
      applications/commons/commons-server/src/main/resources/application.yml
  2. 12 3
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/DocumentApplication.java
  3. 1 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  4. 1 1
      applications/document/document-server/src/main/resources/application.yml
  5. 17 9
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/FundtransferController.java
  6. 7 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java
  7. 4 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java
  8. 10 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java
  9. 6 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java
  10. 0 20
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  11. 0 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  12. 0 19
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java
  13. 5 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/FundtransferService.java
  14. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java
  15. 72 7
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  16. 5 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  17. 6 0
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  18. 2 2
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  19. 4 4
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  20. 6 2
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java
  21. 0 28
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutReqDTO.java
  22. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  23. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  24. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  25. 1 1
      applications/purchase/purchase-server/src/main/resources/application.yml
  26. 2 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  27. 2 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  28. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  29. 5 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  30. 5 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java
  31. 4 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  32. 5 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  33. 1 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  34. 8 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java
  35. 1 1
      applications/storage/storage-server/src/main/resources/application.yml
  36. 1 1
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  37. 7 2
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  38. 3 2
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml
  39. 3 0
      frontend/saas-web/app/view/document/kind/Kind.js
  40. 24 11
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  41. 5 5
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  42. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  43. 22 19
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  44. 3 3
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  45. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  46. 126 49
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  47. 99 12
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  48. 5 2
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelModel.js
  49. 87 74
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  50. 2 1
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js
  51. 154 80
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  52. 189 174
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  53. 4 0
      frontend/saas-web/app/view/stock/otherIn/FormPanelModel.js
  54. 53 20
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  55. 2 1
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  56. 111 54
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  57. 150 73
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  58. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanelModel.js
  59. 108 76
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  60. 4 2
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

+ 1 - 1
applications/commons/commons-server/src/main/resources/application.yml

@@ -45,7 +45,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 8920
   tomcat:

+ 12 - 3
applications/document/document-server/src/main/java/com/usoftchina/saas/document/DocumentApplication.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 @SpringBootApplication
@@ -14,10 +15,18 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 @EnableTransactionManagement
 @EnableFeignClients("com.usoftchina.saas")
 @MapperScan("com.usoftchina.saas.document.mapper")
-public class DocumentApplication{
-
+public class DocumentApplication extends WebMvcConfigurerAdapter {
     public static void main(String[] args) {
-        SpringApplication.run(DocumentApplication.class);
+        SpringApplication.run(DocumentApplication.class, args);
+    }
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+
+        registry.addMapping("/**")
+                .allowCredentials(true)
+                .allowedHeaders("*")
+                .allowedOrigins("*")
+                .allowedMethods("*");
     }
 
 }

+ 1 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -20,6 +20,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+@CrossOrigin
 @RestController
 @RequestMapping("/product")
 public class ProductController {

+ 1 - 1
applications/document/document-server/src/main/resources/application.yml

@@ -47,7 +47,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 9480
   tomcat:

+ 17 - 9
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/FundtransferController.java

@@ -2,6 +2,8 @@ package com.usoftchina.saas.money.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Fundtran;
 import com.usoftchina.saas.money.po.Fundtransfer;
 import com.usoftchina.saas.money.service.FundtransferService;
@@ -21,26 +23,32 @@ public class FundtransferController {
 
     @RequestMapping("/save")
     public Result insert(@RequestBody Fundtran body) {
-        int id = fundtransferService.insert(body);
-        return Result.success(id);
+        DocBaseDTO docBaseDTO = fundtransferService.insert(body);
+        return Result.success(docBaseDTO);
     }
 
 
-    @PostMapping("/delete")
-    public Result delete(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") int id){
         fundtransferService.delete(id);
         return Result.success();
     }
 
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
+        fundtransferService.deleteItem(id);
+        return Result.success();
+    }
+
 
-    @GetMapping("/read")
-    public Result read(int id){
+    @GetMapping("/read/{id}")
+    public Result read(@PathVariable("id")int id){
         return Result.success(fundtransferService.select(id));
     }
 
-    @GetMapping("/List")
-    public Result getList(PageRequest page){
-        PageInfo<Fundtransfer> list = fundtransferService.selectList(page);
+    @GetMapping("/list")
+    public Result getList(PageRequest page, ListReqDTO condition){
+        PageInfo<Fundtransfer> list = fundtransferService.selectList(page, condition);
         return Result.success(list);
     }
 

+ 7 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthreceiptsController.java

@@ -28,12 +28,17 @@ public class OthreceiptsController {
     }
 
 
-    @PostMapping("/delete")
-    public Result deletePaybalance(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result deletePaybalance(@PathVariable("id") int id){
         othreceiptsService.delete(id);
         return Result.success();
     }
 
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
+        othreceiptsService.deleteItem(id);
+        return Result.success();
+    }
 
     @GetMapping("/read/{id}")
     public Result getPaybalance(@PathVariable("id")int id){

+ 4 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/OthspengdingsController.java

@@ -31,14 +31,14 @@ public class OthspengdingsController {
     }
 
 
-    @PostMapping("/delete")
-    public Result deletePaybalance(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result deletePaybalance(@PathVariable("id") int id){
         othspendingsService.delete(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItem")
-    public Result deleteItem(@RequestBody int id){
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
         othspendingsService.deleteItem(id);
         return Result.success();
     }

+ 10 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java

@@ -28,18 +28,24 @@ public class PaybalanceController {
     }
 
 
-    @PostMapping("/delete")
-    public Result deletePaybalance(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result deletePaybalance(@PathVariable("id") int id){
         paybalanceService.delete(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItem/")
-    public Result deleteItem(@RequestBody int id){
+    @PostMapping("/deleteDetail/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
         paybalanceService.deleteItem(id);
         return Result.success();
     }
 
+    @PostMapping("/deleteDetai2/{id}")
+    public Result deleteItems(@PathVariable("id") int id){
+        paybalanceService.deleteItems(id);
+        return Result.success();
+    }
+
     @GetMapping("/read/{id}")
     public Result getPaybalance(@PathVariable("id")int id){
         return Result.success(paybalanceService.select(id));

+ 6 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java

@@ -25,20 +25,20 @@ public class RecbalanceContorller {
         return Result.success(docBaseDTO);
     }
 
-    @PostMapping("/delete")
-    public Result delete(@RequestBody int id){
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") int id){
         recbalanceService.delect(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItems1")
-    public Result deleteItem(@RequestBody int id){
+    @PostMapping("/deleteDetail1/{id}")
+    public Result deleteItem(@PathVariable("id") int id){
         recbalanceService.deleteItem(id);
         return Result.success();
     }
 
-    @PostMapping("/deleteItems2")
-    public Result deleteItems(@RequestBody int id){
+    @PostMapping("/deleteDetail2/{id}")
+    public Result deleteItems(@PathVariable("id") int id){
         recbalanceService.deleteItems(id);
         return Result.success();
     }

+ 0 - 20
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java

@@ -252,24 +252,4 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
     public void setPb_text5(String pb_text5) {
         this.pb_text5 = pb_text5 == null ? null : pb_text5.trim();
     }
-
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
-    }
 }

+ 0 - 19
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java

@@ -253,23 +253,4 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
         this.rb_text5 = rb_text5 == null ? null : rb_text5.trim();
     }
 
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
-    }
 }

+ 0 - 19
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalancedet.java

@@ -173,23 +173,4 @@ public class Recbalancedet extends CommonBaseEntity implements Serializable{
         this.rd_text5 = rd_text5 == null ? null : rd_text5.trim();
     }
 
-    @Override
-    public void setCreatorId(long creatorId) {
-
-    }
-
-    @Override
-    public void setUpdaterId(long updaterId) {
-
-    }
-
-    @Override
-    public long getCompanyId() {
-        return 0;
-    }
-
-    @Override
-    public void setCompanyId(long companyId) {
-
-    }
 }

+ 5 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/FundtransferService.java

@@ -1,6 +1,8 @@
 package com.usoftchina.saas.money.service;
 
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.money.po.Fundtran;
 import com.usoftchina.saas.money.po.Fundtransfer;
 import com.usoftchina.saas.page.PageRequest;
@@ -10,15 +12,16 @@ import com.usoftchina.saas.page.PageRequest;
  * @date 2018/10/25 19:26
  **/
 public interface FundtransferService {
-    int insert(Fundtran fundtran);
+    DocBaseDTO insert(Fundtran fundtran);
 
     void audit(Fundtran fundtran);
 
     void unAudit(int id);
 
     void delete(int id);
+    void deleteItem(int id);
 
     Fundtran select(int id);
 
-    PageInfo<Fundtransfer> selectList(PageRequest page);
+    PageInfo<Fundtransfer> selectList(PageRequest page, ListReqDTO reqDTO);
 }

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/PaybalanceService.java

@@ -23,6 +23,8 @@ public interface PaybalanceService {
 
     void deleteItem(int id);
 
+    void deleteItems(int id);
+
     Pay select(int id);
 
     PageInfo<Paybalance> selectList(PageRequest page, ListReqDTO reqDTO);

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

@@ -2,16 +2,25 @@ package com.usoftchina.saas.money.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.commons.api.MaxnumberService;
+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.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.FundtransferMapper;
 import com.usoftchina.saas.money.mapper.FundtransferdetailMapper;
 import com.usoftchina.saas.money.po.Fundtran;
 import com.usoftchina.saas.money.po.Fundtransfer;
 import com.usoftchina.saas.money.po.Fundtransferdetail;
+import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.money.service.FundtransferService;
 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.Iterator;
 import java.util.List;
@@ -26,34 +35,55 @@ public class FundtransferServiceImpl implements FundtransferService {
     private FundtransferMapper fundtransferMapper;
     @Autowired
     private FundtransferdetailMapper fundtransferdetailMapper;
+    @Autowired
+    private MaxnumberService maxnumberService;
 
     @Override
-    public int insert(Fundtran fundtran) {
+    public DocBaseDTO insert(Fundtran fundtran) {
         Fundtransfer fundtransfer = fundtran.getMain();
         List<Fundtransferdetail> fundtransferdetails = fundtran.getItems();
 
+        String ft_code = fundtransfer.getFt_code();
+
+        //编号校验
+        ft_code = pushMaxnubmer(ft_code, fundtransfer.getId());
+
+        System.out.println("ft_code" + ft_code);
+        //单号赋值
+        fundtransfer.setFt_code(ft_code);
+
+        Long id = fundtransfer.getId();
+
         if (fundtransfer.getId() > 0){
             fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
         }else {
-            fundtransferMapper.insert(fundtransfer);
+            fundtransfer.setCompanyId(BaseContextHolder.getCompanyId());
+            fundtransferMapper.insertSelective(fundtransfer);
+            id = fundtransfer.getId();
         }
 
         Iterator isdet = fundtransferdetails.iterator();
         while (isdet.hasNext()){
             Fundtransferdetail fundtransferdetail= (Fundtransferdetail) isdet.next();
-            if (fundtransferdetail.getFtdId() > 0 ){
+            fundtransfer.setCompanyId(BaseContextHolder.getCompanyId());
+            fundtransferdetail.setFtd_ftid(Math.toIntExact(id));
+            if (fundtransferdetail.getId() > 0 ){
                 fundtransferdetailMapper.updateByPrimaryKey(fundtransferdetail);
             }else {
                 fundtransferdetailMapper.insertSelective(fundtransferdetail);
             }
         }
-        return 0;
+        return new DocBaseDTO(id, ft_code, BillCodeSeq.FUNDTRANSFER.getCaller());
     }
 
     @Override
     public void audit(Fundtran fundtran) {
+        Long companyId = BaseContextHolder.getCompanyId();
         int id = Math.toIntExact(fundtran.getMain().getId());
         Fundtransfer fundtransfer = fundtransferMapper.selectByPrimaryKey(id);
+        fundtransfer.setFt_status(Status.AUDITED.getDisplay());
+        fundtransfer.setFt_statuscode(Status.AUDITED.name());
+        fundtransfer.setCompanyId(companyId);
         if ( fundtransfer == null || "".equals(fundtransfer)){
             this.insert(fundtran);
         }else {
@@ -85,12 +115,12 @@ public class FundtransferServiceImpl implements FundtransferService {
     public Fundtran select(int id) {
         Fundtran fundtran = new Fundtran();
         fundtran.setMain(fundtransferMapper.selectByPrimaryKey(id));
-        fundtran.setItems((List<Fundtransferdetail>) fundtransferdetailMapper.selectByPrimaryKey(id));
+        fundtran.setItems(fundtransferdetailMapper.selectByPrimaryKey(id));
         return fundtran;
     }
 
     @Override
-    public PageInfo<Fundtransfer> selectList(PageRequest page) {
+    public PageInfo<Fundtransfer> selectList(PageRequest page, ListReqDTO reqDTO) {
         //设置默认分页
         if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
             page = new PageRequest();
@@ -98,9 +128,44 @@ public class FundtransferServiceImpl implements FundtransferService {
             page.setSize(10);
         }
         PageHelper.startPage(page.getNumber(), page.getSize());
-        List<Fundtransfer> fundtransfers = fundtransferMapper.selectList();
+        List<Fundtransfer> fundtransfers = this.getListByMode(reqDTO);
         //取分页信息
         PageInfo<Fundtransfer> pageInfo = new PageInfo<>(fundtransfers);
         return pageInfo;
     }
+
+    /**
+     * @Description: 检验获取并更新单号
+     * @Param: [code, id]
+     * @return: java.lang.String
+     * @Author: guq
+     * @Date: 2018/10/19
+     */
+    private String pushMaxnubmer(String code, Long id) {
+        if (null == code) {
+            throw new BizException(BizExceptionCode.NULL_CODE);
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        Integer count = "0".equals(String.valueOf(id)) ? fundtransferMapper.validateCodeWhenInsert(code, companyId) :
+                fundtransferMapper.validateCodeWhenUpdate(code, id, companyId);
+        return maxnumberService.pushMaxnubmer(count, code, BillCodeSeq.FUNDTRANSFER.getCaller()).getData();
+    }
+
+    private List<Fundtransfer> getListByMode(ListReqDTO req) {
+        List<Fundtransfer> fundtransferList = null;
+        Long companyId = BaseContextHolder.getCompanyId();
+        if (StringUtils.isEmpty(req)) {
+            return  null;
+        }
+        String con = req.getFinalCondition();
+        if (null == con) {
+            con = "1=1";
+        }
+        if (StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
+            fundtransferList = fundtransferMapper.selectFundtransferBycondition(con, companyId);
+        } else {
+            fundtransferList = fundtransferMapper.selectFundtransferListByCondition(con, companyId);
+        }
+        return fundtransferList;
+    }
 }

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

@@ -121,10 +121,14 @@ public class PaybalanceServiceImpl implements PaybalanceService {
 
     @Override
     public void deleteItem(int id) {
-        paybalancedetailMapper.deleteItem(id);
         paybalancedetMapper.deleteItem(id);
     }
 
+    @Override
+    public void deleteItems(int id) {
+        paybalancedetailMapper.deleteItem(id);
+    }
+
     public Pay select(int id){
         Pay pay = new Pay();
         pay.setMain(paybalanceMapper.selectByPrimaryKey(id));

+ 6 - 0
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -55,6 +55,9 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
     insert into othreceiptsdetail
     <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ord_orid != null" >
+        ord_orid,
+      </if>
       <if test="ord_detno != null" >
         ord_detno,
       </if>
@@ -96,6 +99,9 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ord_orid != null" >
+        #{ord_orid,jdbcType=INTEGER},
+      </if>
       <if test="ord_detno != null" >
         #{ord_detno,jdbcType=INTEGER},
       </if>

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

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.purchase.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
@@ -11,7 +11,7 @@ import java.io.Serializable;
  * 2018-10-17 13:45.
  */
 @Data
-public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
+public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Long pd_piid;
 

+ 4 - 4
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java

@@ -1,7 +1,6 @@
 package com.usoftchina.saas.purchase.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
-import io.swagger.annotations.ApiModel;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -12,8 +11,7 @@ import java.util.Date;
  * 2018-10-17 13:44.
  */
 @Data
-@ApiModel(value = "Prodinout", description = "出入库单")
-public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
+public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_inoutno;
 
@@ -69,6 +67,8 @@ public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
 
+    private String pi_auditman;
 
 }

+ 6 - 2
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.purchase.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -11,7 +11,7 @@ import java.util.Date;
  * 2018-10-17 13:45.
  */
 @Data
-public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
+public class ProdInOutListDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_inoutno;
 
@@ -67,6 +67,10 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
     private Long pd_piid;
 
     private String pd_inoutno;

+ 0 - 28
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutReqDTO.java

@@ -1,28 +0,0 @@
-package com.usoftchina.saas.purchase.dto;
-
-import lombok.Data;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Created by zdw
- * 2018-10-17 13:46.
- */
-@Data
-public class ProdInOutReqDTO implements Serializable {
-    /**
-     * 开始日期
-     */
-    private Date begin;
-    /**
-     * 截止日期
-     */
-    private Date end;
-    private String status;
-    private String keyword;
-    //区分是否为关联列表
-    private String mode;
-
-
-}

+ 1 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -92,7 +92,7 @@ public class ProdInOutController {
      * @param id
      * @return
      */
-    @PostMapping("/deleteItem/{id}")
+    @PostMapping("/deleteDetail/{id}")
     public Result deleteItem(@PathVariable("id") Long id) {
         prodInOutService.deleteItem(id);
         return Result.success();

+ 4 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java

@@ -62,4 +62,8 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
 }

+ 4 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -66,6 +66,10 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private String pi_auditman;
+
     private Long pd_piid;
 
     private String pd_inoutno;

+ 1 - 1
applications/purchase/purchase-server/src/main/resources/application.yml

@@ -47,7 +47,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 8800
   tomcat:

+ 2 - 0
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -29,6 +29,8 @@
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />

+ 2 - 1
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -32,7 +32,8 @@
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
-
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
 
 
   </resultMap>

+ 2 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.storage.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
@@ -11,7 +11,7 @@ import java.io.Serializable;
  * 2018-10-17 13:45.
  */
 @Data
-public class ProdIODetailDTO extends CommonBaseEntity implements Serializable {
+public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Long pd_piid;
 

+ 5 - 2
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.storage.dto;
 
-import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 
@@ -13,7 +13,7 @@ import java.util.Date;
  */
 @Data
 @ApiModel(value = "Prodinout", description = "出入库单")
-public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
+public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_inoutno;
 
@@ -69,6 +69,9 @@ public class ProdInOutDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private Date pi_auditman;
 
 
 }

+ 5 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java

@@ -67,6 +67,11 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private Date pi_auditman;
+
+
     private Long pd_piid;
 
     private String pd_inoutno;

+ 4 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java

@@ -63,4 +63,8 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private Date pi_auditman;
+
 }

+ 5 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -66,6 +66,11 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_address;
 
+    private Date pi_auditdate;
+
+    private Date pi_auditman;
+
+
     private Long pd_piid;
 
     private String pd_inoutno;

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

@@ -92,7 +92,7 @@ public class ProdInOutController {
      * @param id
      * @return
      */
-    @PostMapping("/deleteItem/{id}")
+    @PostMapping("/deleteDetail/{id}")
     public Result deleteItem(@PathVariable("id") Long id) {
         prodInOutService.deleteItem(id);
         return Result.success();

+ 8 - 1
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java

@@ -406,7 +406,14 @@ public class ProdInoutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         if (null == id) {
             return null;
         }
-        String caller = BillCodeSeq.PURCHASEIN.getName().equals(pi_class)?BillCodeSeq.PURCHASEIN.getCaller():BillCodeSeq.PURCHASEOUT.getCaller();
+        String caller ="";
+        if("其它入库单".equals(pi_class)){
+            caller = BillCodeSeq.OTHERIN.getCaller();
+        }else if("其它出库单".equals(pi_class)) {
+            caller = BillCodeSeq.OTHEROUT.getCaller();
+        }else if("调拨单".equals(pi_class)) {
+            caller = BillCodeSeq.APPROPRIATIONINOUT.getCaller();
+        }
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(id);
         baseDTO.setCode(code);

+ 1 - 1
applications/storage/storage-server/src/main/resources/application.yml

@@ -47,7 +47,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 9000
   tomcat:

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

@@ -1,6 +1,6 @@
 <?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.purchase.mapper.ProdIODetailMapper">
+<mapper namespace="com.usoftchina.saas.storage.mapper.ProdIODetailMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.po.ProdIODetail">
     <id column="pd_id" jdbcType="INTEGER" property="id" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />

+ 7 - 2
applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -1,7 +1,7 @@
 <?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.purchase.mapper.ProdInOutListMapper">
-  <resultMap id="BaseResultMap" type="com.usoftchina.saas.purchase.po.ProdInOutList">
+<mapper namespace="com.usoftchina.saas.storage.mapper.ProdInOutListMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.po.ProdInOutList">
     <id column="pi_id" jdbcType="INTEGER" property="id" />
     <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
     <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
@@ -30,6 +30,11 @@
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+
+
+
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
     <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />

+ 3 - 2
applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -1,6 +1,6 @@
 <?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.purchase.mapper.ProdInOutMapper">
+<mapper namespace="com.usoftchina.saas.storage.mapper.ProdInOutMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.storage.po.ProdInOut">
     <id column="pi_id" jdbcType="INTEGER" property="id" />
     <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
@@ -32,7 +32,8 @@
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
-
+    <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
+    <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
 
 
   </resultMap>

+ 3 - 0
frontend/saas-web/app/view/document/kind/Kind.js

@@ -11,6 +11,9 @@ Ext.define('saas.view.document.kind.Kind', {
         type: 'document-kind'
     },
     defaultType:'',
+    requires: [
+        'Ext.button.Segmented'
+    ],
     tbar: [{
         xtype: 'segmentedbutton',
         reference: 'dataKind',

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

@@ -19,10 +19,19 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     _readUrl:basePath+'purchase/prodinout/read/',
     _saveUrl:basePath+'purchase/prodinout/save',
     _auditUrl:basePath+'purchase/prodinout/audit',
-    _unAuditUrl: basePath + 'purchase/prodinout/unAudit',
+    _deleteUrl:basePath+'purchase/prodinout/delete',
     _baseVastUrl:basePath+'purchase/prodinout/',
     _turnOutUrl:basePath+'purchase/prodinout/turnProdOut/',
 
+    // _relationColumn: 'pd_piid',
+    // _readUrl:'http://localhost:8800/prodinout/read/',
+    // _saveUrl:'http://localhost:8800/prodinout/save',
+    // _auditUrl:'http://localhost:8800/prodinout/audit',
+    // _deleteUrl:'http://localhost:8800/prodinout/delete/',
+    // _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
+
+
+
     initId:0,
 
     toolBtns: [{
@@ -62,13 +71,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         columnWidth : 0.0
     },{
         xtype: 'hidden',
-        name: 'pu_vendcode',
-        bind: '{pu_vendcode}',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
         fieldLabel: '供应商编号'
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pu_vendname',
-        bind: '{pu_vendname}',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
         fieldLabel: '供应商名称'
     },{
         xtype : "datefield", 
@@ -110,11 +119,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             {
                 text : "id", 
                 dataIndex : "id", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
             },{
                 text : "物料id", 
                 dataIndex : "pd_prodid", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
                 text : "物料编号", 
@@ -141,7 +152,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 dataIndex : "pr_detail",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -149,7 +160,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -177,11 +188,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             },{
                 text : "仓库id", 
                 dataIndex : "pd_whid", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
                 text : "仓库编号", 
-                dataIndex : "pd_whcode"
+                dataIndex : "pd_whcode",
+                hidden:true
             },
             {
                 text : "仓库", 

+ 5 - 5
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -12,7 +12,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
 
@@ -23,9 +23,9 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         dbfinds:[{
                             from:'ve_id',to:'pi_vendid'
                         },{
-                            from:'ve_code',to:'pu_vendcode'
+                            from:'ve_code',to:'pi_vendcode'
                         },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'ve_name',to:'pi_vendname'
                         }],
                         dbtpls:[{
                             field:'ve_code',width:100
@@ -83,14 +83,14 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         },{
                             from:'pr_detail',to:'pr_detail'
                         },{
-                            from:'pr_unit',to:'pd_unit'
+                            from:'pr_spec',to:'pr_spec'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
                         },{
                             field:'pr_detail',width:100
                         },{
-                            field:'pr_unit',width:100
+                            field:'pr_spec',width:100
                         }],
                         dbColumns:[{
                             "text": "物料ID",

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

@@ -107,8 +107,8 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         addTitle:'采购验收单',
         addXtype:'purchase-purchasein-formpanel',
         defaultCondition:' pi_class = \'采购验收单\'',
-        // baseVastUrl:basePath+'purchase/prodinout/',
-        baseVastUrl:"http://localhost:8800/prodinout/",
+        baseVastUrl:basePath+'purchase/prodinout/',
+        // baseVastUrl:"http://localhost:8800/prodinout/",
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 22 - 19
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -17,18 +17,16 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     
     _relationColumn: 'pd_piid',
     _readUrl:basePath+'purchase/prodinout/read/',
-    _saveUrl:basePath+'purchase/prodinout/save/',
-    _auditUrl:basePath+'purchase/prodinout/audit/',
-    _baseVastUrl:basePath+'purchase/prodinout/',
-    _turnOutUrl:basePath+'purchase/prodinout/turnProdOut/',
+    _saveUrl:basePath+'purchase/prodinout/save',
+    _auditUrl:basePath+'purchase/prodinout/audit',
+    _unAuditUrl:basePath+'purchase/prodinout/unAudit',
+    _deleteUrl:basePath+'purchase/prodinout/delete/',
 
     // _relationColumn: 'pd_piid',
     // _readUrl:'http://localhost:8800/prodinout/read/',
-    // _saveUrl:'http://localhost:8800/prodinout/save/',
-    // _auditUrl:'http://localhost:8800/prodinout/audit/',
+    // _saveUrl:'http://localhost:8800/prodinout/save',
+    // _auditUrl:'http://localhost:8800/prodinout/audit',
     // _deleteUrl:'http://localhost:8800/prodinout/delete/',
-    // _baseVastUrl:'http://localhost:8800/prodinout/',
-    // _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
 
 
 
@@ -64,16 +62,17 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         bind : "{pi_vendid}", 
         fieldLabel : "供应商ID", 
         allowBlank : true, 
+        hidden:true,
         columnWidth : 0.0
     },{
         xtype: 'hidden',
-        name: 'pu_vendcode',
-        bind: '{pu_vendcode}',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
         fieldLabel: '供应商编号'
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pu_vendname',
-        bind: '{pu_vendname}',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
         fieldLabel: '供应商名称'
     },{
         xtype : "datefield", 
@@ -109,17 +108,19 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         xtype : "detailGridField",
         storeModel:'saas.model.document.ProductDTO',
         // deleteDetailUrl:'http://localhost:8800/prodinout/deleteDetail/',
-        deleteUrl:basePath+'purchase/prodinout/deleteDetail/',
+        deleteDetailUrl:basePath+'purchase/prodinout/deleteDetail/',
         detnoColumn:  'pd_pdno',
         columns : [
             {
                 text : "id", 
                 dataIndex : "id", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
             },{
                 text : "物料id", 
                 dataIndex : "pd_prodid", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
                 text : "物料编号", 
@@ -146,7 +147,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 dataIndex : "pr_detail",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -154,7 +155,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -182,11 +183,13 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             },{
                 text : "仓库id", 
                 dataIndex : "pd_whid", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
                 text : "仓库编号", 
-                dataIndex : "pd_whcode"
+                dataIndex : "pd_whcode",
+                hidden:true
             }, 
             {
                 text : "仓库", 

+ 3 - 3
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -12,7 +12,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:basePath+'document/vendor/list',
@@ -22,9 +22,9 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         dbfinds:[{
                             from:'ve_id',to:'pi_vendid'
                         },{
-                            from:'ve_code',to:'pu_vendcode'
+                            from:'ve_code',to:'pi_vendcode'
                         },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'ve_name',to:'pi_vendname'
                         }],
                         dbtpls:[{
                             field:'ve_code',width:100

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

@@ -107,8 +107,8 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         addTitle:'采购验退单',
         addXtype:'purchase-purchaseout-formpanel',
         defaultCondition:' pi_class = \'采购验退单\'',
-        // baseVastUrl:basePath+'purchase/prodinout/',
-        baseVastUrl:"http://localhost:8800/prodinout/",
+        baseVastUrl:basePath+'purchase/prodinout/',
+        // baseVastUrl:"http://localhost:8800/prodinout/",
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',

+ 126 - 49
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -4,56 +4,114 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
 
     controller: 'stock-appropriationinout-formpanel',
     viewModel: 'stock-appropriationinout-formpanel',
-    
+
     viewName: 'stock-appropriationinout-formpanel',
     caller:'AppropriationInOut',
-
+    
      //字段属性
-     _title:'调拨单',
-     _idField: 'id',
-     _codeField: 'pi_inoutno',
-     _statusField: 'pi_status',
-     _statusCodeField: 'pi_statuscode',
-     
-    //  _relationColumn: 'pd_piid',
-    //  _readUrl:basePath+'storage/prodinout/read/',
-    //  _saveUrl:basePath+'storage/prodinout/save',
-    //  _auditUrl:basePath+'storage/prodinout/audit',
-    //  _deleteUrl:basePath+'storage/prodinout/delete/',
+    _title:'调拨单',
+    _idField: 'id',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
+    
+    _relationColumn: 'pd_piid',
+    _readUrl:basePath+'storage/prodinout/read/',
+    _saveUrl:basePath+'storage/prodinout/save',
+    _auditUrl:basePath+'storage/prodinout/audit',
+    _deleteUrl:basePath+'storage/prodinout/delete',
+
 
+    // _relationColumn: 'pd_piid',
+    // _readUrl:'http://localhost:9000/prodinout/read/',
+    // _saveUrl:'http://localhost:9000/prodinout/save',
+    // _auditUrl:'http://localhost:9000/prodinout/audit',
+    // _deleteUrl:'http://localhost:9000/prodinout/delete/',
 
-     _relationColumn: 'pd_piid',
-     _readUrl:'http://localhost:9000/prodinout/read/',
-     _saveUrl:'http://localhost:9000/prodinout/save',
-     _auditUrl:'http://localhost:9000/prodinout/audit',
-     _deleteUrl:'http://localhost:9000/prodinout/delete/',
-     _baseVastUrl:'http://localhost:9000/prodinout/',
 
 
 
+    initId:0,
 
-     initId:0,
+    toolBtns: [],
 
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',
+        bind: '{id}',
         fieldLabel: 'id',
+        allowBlank: true,
         columnWidth: 0
+    }, {
+        xtype : "textfield", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "入库单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
     },{
         xtype : "textfield", 
         name : "pi_class", 
+        bind : "{pi_class}", 
         fieldLabel : "单据类型", 
         readOnly:true,
-        allowBlank : false, 
-        defaultValue:'调拨单'
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    },{
+        xtype: 'hidden',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
+        fieldLabel: '供应商名称'
     },{
         xtype : "hidden", 
-        name : "pi_total",  
-        fieldLabel : "单据金额"
+        name : "pi_custid", 
+        bind : "{pi_custid}", 
+        fieldLabel : "客户ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
     },{
+        xtype: 'hidden',
+        name: 'pi_custcode',
+        bind: '{pi_custcode}',
+        fieldLabel: '客户编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_custname',
+        bind: '{pi_custname}',
+        fieldLabel: '客户名称'
+    },{
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : false, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "总额", 
+        allowBlank : true,
+        readOnly: true,
+        columnWidth : 0.25
+    }, {
         name : "detailGridField", 
-        xtype : "detailGridField", 
+        xtype : "detailGridField",
         storeModel:'saas.model.document.ProductDTO',
+        // deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
+        deleteDetailUrl:basePath+'storage/prodinout/deleteDetail/',
         detnoColumn:  'pd_pdno',
         columns : [
             {
@@ -62,8 +120,8 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                 xtype : "numbercolumn",
                 hidden:true
             },{
-                text : "pd_piid", 
-                dataIndex : "pd_piid", 
+                text : "物料id", 
+                dataIndex : "pd_prodid", 
                 xtype : "numbercolumn",
                 hidden:true
             },
@@ -92,7 +150,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                 dataIndex : "pr_detail",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -100,15 +158,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
-                }
-            },
-            {
-                text : "单位", 
-                dataIndex : "pr_unit",
-                ignore:true,
-                renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -122,18 +172,19 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            }, {
+            },{
                 text : "拨出仓库id", 
                 dataIndex : "pd_whid", 
                 xtype : "numbercolumn",
                 hidden:true
-            },{
+            },
+            {
                 text : "拨出仓库编号", 
-                dataIndex : "pd_whcode", 
-                width : 120.0
+                dataIndex : "pd_whcode",
+                hidden:true
             },
             {
-                text : "拨出仓库名称", 
+                text : "拨出仓库", 
                 dataIndex : "pd_whname", 
                 width : 120.0, 
                 items : null,
@@ -155,12 +206,14 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                 dataIndex : "pd_inwhid", 
                 xtype : "numbercolumn",
                 hidden:true
-            },{
+            },
+            {
                 text : "拨入仓库编号", 
-                dataIndex : "pd_inwhcode", 
-                width : 120.0
-            },{
-                text : "拨入仓库名称", 
+                dataIndex : "pd_inwhcode",
+                hidden:true
+            },
+            {
+                text : "拨入仓库", 
                 dataIndex : "pd_inwhname", 
                 width : 120.0, 
                 items : null,
@@ -177,7 +230,31 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                     valueField : "value", 
                     xtype : "dbfindtrigger"
                 }
-            } 
+            },
+            {
+                text : "单价", 
+                dataIndex : "pd_orderprice", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            }, 
+           {
+                text : "含税金额", 
+                dataIndex : "pd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, {
+                text : "税率", 
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "未税金额", 
+                dataIndex : "pd_nettotal", 
+                xtype : "numbercolumn"
+            }
         ]
     }, {
         format : "Y-m-d", 
@@ -198,7 +275,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
         xtype : "textfield", 
         readOnly : true, 
         editable : false, 
-        name : "pu_status", 
+        name : "pi_status", 
         bind : "{pi_status}", 
         fieldLabel : "单据状态", 
         allowBlank : true, 

+ 99 - 12
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -12,7 +12,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendcode]':{
+            'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:basePath+'document/vendor/list',
@@ -20,11 +20,11 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
                         dbfinds:[{
-                            from:'ve_id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid'
                         },{
-                            from:'ve_code',to:'pu_vendcode'
+                            from:'ve_code',to:'pi_vendcode'
                         },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'ve_name',to:'pi_vendname'
                         }],
                         dbtpls:[{
                             field:'ve_code',width:100
@@ -32,10 +32,10 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             field:'ve_name',width:100
                         }],
                         dbColumns:[{
-                            conditionCode:'ve_id',
+                            conditionCode:'id',
                             "text": "供应商ID",
                             "flex": 0,
-                            "dataIndex": "ve_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
@@ -68,6 +68,53 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pi_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+
+                        dataUrl:basePath+'document/customer/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        dbfinds:[{
+                            from:'id',to:'pi_custid'
+                        },{
+                            from:'cu_code',to:'pi_custcode'
+                        },{
+                            from:'cu_name',to:'pi_custname'
+                        }],
+                        dbtpls:[{
+                            field:'pi_custcode',width:100
+                        },{
+                            field:'pi_custname',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'id',
+                            "text": "客户ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'cu_code',
+                            "text": "客户编号",
+                            "flex": 1,
+                            "dataIndex": "cu_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'cu_name',
+                            "text": "客户名称",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },            
+            //放大镜赋值关系 以及 tpl模板
             'dbfindtrigger[name=pd_prodcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
@@ -82,14 +129,14 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         },{
                             from:'pr_detail',to:'pr_detail'
                         },{
-                            from:'pr_unit',to:'pd_unit'
+                            from:'pr_spec',to:'pr_spec'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
                         },{
                             field:'pr_detail',width:100
                         },{
-                            field:'pr_unit',width:100
+                            field:'pr_spec',width:100
                         }],
                         dbColumns:[{
                             "text": "物料ID",
@@ -218,9 +265,51 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                  }, ]
              }) ;   
 
-         }
-     }            
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_inwhname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:basePath+'document/warehouse/list',
+                        // dataUrl:'http://localhost:9480/warehouse/list',
+                        dbfinds:[{
+                            from:'id',to:'pd_inwhid'                          
+                        },{
+                            from:'wh_code',to:'pd_inwhcode'                          
+                        },{
+                            from:'wh_description',to:'pd_inwhname'
+                        }],
+                        dbtpls:[{
+                            field:'pd_inwhcode',width:100
+                        },{
+                            field:'pd_inwhname',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "仓库ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 1,
+                            "dataIndex": "wh_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库名称",
+                            "flex": 1,
+                            "dataIndex": "wh_description",
+                            "xtype": "",
+                            "items": null
+                        }, ]
+                    }) ;   
 
+                }
+            }            
 
         });
 
@@ -249,6 +338,4 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
         }).show();
 
     }
-
-
 });

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

@@ -1,5 +1,8 @@
 Ext.define('saas.view.stock.appropriationInOut.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.stock-appropriationinout-formpanel'
-
+    alias: 'viewmodel.stock-appropriationinout-formpanel',
+    
+    data: {
+        pi_class: '调拨单'
+     }
 });

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

@@ -16,60 +16,62 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         columnWidth: 0
     }, {
         xtype: 'textfield',
-        name: 'pu_code',
+        name: 'pi_inoutno',
+        bind: '{pi_inoutno}',
         fieldLabel: '单据编号',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'condatefield',
-        name: 'pu_date',
-        fieldLabel: '采购日期',
+        name: 'pi_date',
+        bind: '{pi_date}',
+        fieldLabel: '单据日期',
         allowBlank: true,
         columnWidth: 0.5
     }, {
-        xtype: 'dbfindtrigger',
-        name: 'pu_vendcode',
+        xtype: 'textfield',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
         fieldLabel: '供应商编号',
         allowBlank: true,
+        hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'textfield',
-        name: 'pu_vendname',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
         fieldLabel: '供应商名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pd_prodcode#pd_prodcode',
+        name: 'pd_prodcode',
+        bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
-        fieldMode: 'DETAIL',
-        queryType: 'VAG',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'textfield',
         name: 'pr_detail',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'combobox',
-        name: 'pu_statuscode',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
         columnWidth: 0.25,
         queryMode: 'local',
-        displayField: 'pu_status',
-        valueField: 'pu_statuscode',
-        editable:false,
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
-        fields: ['pu_statuscode', 'pu_status'],
-        data: [
-            ["ALL", "全部"],
-            ["AUDITED", "已审核"],
-            ["UNAUDITED", "未审核"]
-        ]
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                ["ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
         }),
         getCondition: function(value) {
             if(value == 'ALL') {
@@ -78,18 +80,6 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
                 return 'pi_statuscode=\'' + value + '\'';
             }
         }
-    }, {
-        xtype: 'multicombo',
-        name: 'pu_acceptstatuscode',
-        bind: '{pu_acceptstatuscode}',
-        fieldLabel: '入库状态',
-        allowBlank: true,
-        columnWidth: 0.25,
-        datas: [
-            ["TURNIN", "已入库"],
-            ["UNTURNIN", "未入库"],
-            ["PARTIN", "部分入库"]
-        ]
     }],
     moreQueryFormItems: [{
         xtype: 'textfield',
@@ -112,12 +102,13 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         columnWidth: 1
     }],
     queryGridConfig: {
-        idField: 'pu_id',
-        codeField: 'pu_code',
-        addTitle: '调拨单',
-        addXtype: 'stock-appropriationinout-formpanel',
+        idField:'id',
+        codeField:'pi_inoutno',
+        addTitle:'调拨单',
+        addXtype:'stock-appropriationinout-formpanel',
         defaultCondition:' pi_class = \'调拨单\'',
-        baseVastUrl: basePath+'storage/prodinout/',
+        baseVastUrl:basePath+'storage/prodinout/',
+        // baseVastUrl:"http://localhost:9000/prodinout/",
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -131,72 +122,94 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             text: '单据状态',
             dataIndex: 'pi_status',
             width: 120
+        }, {
+            text: '单据类型',
+            dataIndex: 'pi_class',
+            width: 120
         }, {
             text: '下单日期',
             dataIndex: 'pi_date',
-            xtype: 'datecolumn',
+            xtype:'datecolumn',
             width: 200
-        }, {
+        },{
+            text: '采购单号',
+            dataIndex: 'pi_pucode',
+            width: 200
+        },{
             text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            dataIndex: 'pi_vendname',
             width: 120
-        }, {
+        },{
             text: '含税金额',
-            dataIndex: 'pu_taxtotal',
-            xtype: 'numbercolumn',
+            dataIndex: 'pi_total',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '金额',
-            dataIndex: 'pu_total',
-            xtype: 'numbercolumn',
+        },{
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
+            xtype:'numbercolumn',
             width: 120,
             flex: 1
         }],
         relativeColumn: [{
             text: 'id',
-            dataIndex: 'id',
-            width: 100,
+            dataIndex: 'pu_id',
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pu_code',
+            dataIndex: 'pd_inoutno',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'pu_status',
+            dataIndex: 'pi_status',
             width: 120
         }, {
             text: '下单日期',
-            dataIndex: 'pu_indate',
-            xtype: 'datecolumn',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
             width: 200
-        }, {
+        },{
             text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            dataIndex: 'pi_vendname',
             width: 120
-        }, {
+        },{
+            text: '采购单号',
+            dataIndex: 'pd_ordercode',
+            width: 120
+        },{
             text: '采购序号',
-            dataIndex: 'pd_detno',
-            xtype: 'numbercolumn',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
             width: 120
-        }, {
+        },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
-        }, {
-            text: '数量',
-            dataIndex: 'pd_qty',
-            xtype: 'numbercolumn',
+        },{
+            text: '验收数量',
+            dataIndex: 'pd_inqty',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '单价',
-            dataIndex: 'pd_price',
-            xtype: 'numbercolumn',
+        },{
+            text: '采购单价',
+            dataIndex: 'pd_orderprice',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
-            xtype: 'numbercolumn',
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
+            xtype:'numbercolumn',
             width: 120,
             flex: 1
         }]

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

@@ -1,6 +1,7 @@
 Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     alias: 'controller.stock-appropriationinout-querypanel',
+    
     init: function (form) {
         var me = this;
         this.control({
@@ -66,7 +67,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                         addTitle: '物料资料',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
-                            from:'pr_detail',to:'pr_detail'
+                            from:'pr_unit',to:'pd_unit'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100

+ 154 - 80
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -4,66 +4,127 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
 
     controller: 'stock-otherin-formpanel',
     viewModel: 'stock-otherin-formpanel',
-    
+
     viewName: 'stock-otherin-formpanel',
     caller:'OtherIn',
-
+    
      //字段属性
-     _title:'其它入库单',
-     _idField: 'id',
-     _codeField: 'pi_inoutno',
-     _statusField: 'pi_status',
-     _statusCodeField: 'pi_statuscode',
-     
-     _relationColumn: 'pd_piid',
+    
+    _title:'其它入库单',
+    _idField: 'id',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
+    
+    _relationColumn: 'pd_piid',
     _readUrl:basePath+'storage/prodinout/read/',
     _saveUrl:basePath+'storage/prodinout/save',
     _auditUrl:basePath+'storage/prodinout/audit',
     _unAuditUrl: basePath + 'storage/prodinout/unAudit',
-    _deleteUrl:basePath+'storage/prodinout/delete/',
-    
+    _deleteUrl:basePath+'storage/prodinout/delete',
+
+    // _relationColumn: 'pd_piid',
+    // _readUrl:'http://localhost:9000/prodinout/read/',
+    // _saveUrl:'http://localhost:9000/prodinout/save',
+    // _auditUrl:'http://localhost:9000/prodinout/audit',
+    // _unAuditUrl:'http://localhost:9000/prodinout/unAudit',
+    // _deleteUrl:'http://localhost:9000/prodinout/delete/',
+
     initId:0,
- 
+
     toolBtns: [],
 
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',
+        bind: '{id}',
         fieldLabel: 'id',
+        allowBlank: true,
         columnWidth: 0
+    }, {
+        xtype : "textfield", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "入库单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
     },{
         xtype : "textfield", 
         name : "pi_class", 
+        bind : "{pi_class}", 
         fieldLabel : "单据类型", 
         readOnly:true,
-        allowBlank : false, 
-        defaultValue:'其它入库单'
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    },{
+        xtype: 'hidden',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
+        fieldLabel: '供应商名称'
     },{
         xtype : "hidden", 
-        name : "pi_total",  
-        fieldLabel : "单据金额"
+        name : "pi_custid", 
+        bind : "{pi_custid}", 
+        fieldLabel : "客户ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    },{
+        xtype: 'hidden',
+        name: 'pi_custcode',
+        bind: '{pi_custcode}',
+        fieldLabel: '客户编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_custname',
+        bind: '{pi_custname}',
+        fieldLabel: '客户名称'
+    },{
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : false, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "总额", 
+        allowBlank : true,
+        readOnly: true,
+        columnWidth : 0.25
     }, {
         name : "detailGridField", 
-        xtype : "detailGridField", 
+        xtype : "detailGridField",
         storeModel:'saas.model.document.ProductDTO',
-        detnoColumn:  'pd_pdno',
+        // deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
         deleteDetailUrl:basePath+'storage/prodinout/deleteDetail/',
+        detnoColumn:  'pd_pdno',
         columns : [
             {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn",
                 hidden:true
-            },{
-                text : "pd_piid", 
-                dataIndex : "pd_piid", 
-                xtype : "numbercolumn",
-                hidden:true
             },{
                 text : "物料id", 
                 dataIndex : "pd_prodid", 
-                xtype : "numbercolumn"
-            },{
+                xtype : "numbercolumn",
+                hidden:true
+            },
+            {
                 text : "物料编号", 
                 width : 200.0, 
                 dataIndex : "pd_prodcode", 
@@ -88,7 +149,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 dataIndex : "pr_detail",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -96,15 +157,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 dataIndex : "pr_spec",
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
-                }
-            },
-            {
-                text : "单位", 
-                dataIndex : "pr_unit",
-                ignore:true,
-                renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
@@ -118,8 +171,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            },
-            {
+            },            {
                 text : "已转数", 
                 dataIndex : "pd_yqty", 
                 editor : {
@@ -130,24 +182,50 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
+            },{
+                text : "仓库id", 
+                dataIndex : "pd_whid", 
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
-                text : "单价", 
-                editor : {
-                    xtype : "numberfield"
-                },
-                format:'0,000.00',
-                dataIndex : "pd_price", 
+                text : "仓库编号", 
+                dataIndex : "pd_whcode",
+                hidden:true
+            },
+            {
+                text : "仓库", 
+                dataIndex : "pd_whname", 
                 width : 120.0, 
-                xtype : "numbercolumn",
                 items : null,
-                summaryType: 'sum'
-            }, 
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }
+            },
             {
+                text : "单价", 
+                dataIndex : "pd_orderprice", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            }, 
+           {
+                text : "含税金额", 
+                dataIndex : "pd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, {
                 text : "税率", 
-                editor : {
-                    xtype : "numberfield"
-                },
                 dataIndex : "pd_taxrate", 
                 width : 120.0, 
                 xtype : "numbercolumn", 
@@ -155,46 +233,42 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
             },
             {
                 text : "未税金额", 
-                dataIndex : "pd_taxtotal", 
+                dataIndex : "pd_nettotal", 
                 xtype : "numbercolumn"
-            },
-            {
-                text : "销售单明细id", 
-                dataIndex : "pd_sdid", 
-                width : 120.0,
-                flex : 1.0,
-                hidden:true
-
-            },{
-                text : "销售单单号", 
-                dataIndex : "pd_sdid", 
-                width : 120.0,
-                flex : 1.0
-            },{
-                text : "销售序号", 
-                dataIndex : "pd_sdid", 
-                width : 120.0,
-                flex : 1.0
             }
         ]
-    },{
-        xtype : "textfield", 
-        name : "pi_recordman", 
-        fieldLabel : "录入人",
-        readOnly:true,
     }, {
         format : "Y-m-d", 
         xtype : "datefield", 
         name : "createTime", 
-        fieldLabel : "创建时间"
+        bind : "{createTime}", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "updateTime", 
+        bind : "{updateTime}", 
+        fieldLabel : "更新时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
     }, {
         xtype : "textfield", 
-        name : "pi_auditman", 
-        fieldLabel : "过账人"
+        readOnly : true, 
+        editable : false, 
+        name : "pi_status", 
+        bind : "{pi_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
     }, {
-        format : "Y-m-d", 
-        xtype : "datefield", 
-        name : "pi_auditman", 
-        fieldLabel : "过账时间"
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
     }]
 });

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

@@ -1,104 +1,161 @@
 Ext.define('saas.view.stock.otherIn.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
     alias: 'controller.stock-otherin-formpanel',
-    
+
     init: function (form) {
         var me = this;
         this.control({
-            /**放大镜新增demo*/
-            "field[name=combo]":{
-                beforerender:function(f){
-                    f.addHandler=me.addCombo;
-                }
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: basePath + 'document/vendor/list',
+                        // dataUrl:'http://localhost:9480/vendor/list',
+                        addXtype: 'document-vendor-formpanel',
+                        addTitle: '供应商资料',
+                        dbfinds: [{
+                            from: 've_id',
+                            to: 'pi_vendid'
+                        }, {
+                            from: 've_code',
+                            to: 'pu_vendcode'
+                        }, {
+                            from: 've_name',
+                            to: 'pu_vendname'
+                        }],
+                        dbtpls: [{
+                            field: 've_code',
+                            width: 100
+                        }, {
+                            field: 've_name',
+                            width: 100
+                        }],
+                        dbColumns: [{
+                            conditionCode: 've_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 've_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 've_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 've_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    });
+                },
             },
-        //放大镜赋值关系 以及 tpl模板
-        'dbfindtrigger[name=pu_vendcode]':{
-            beforerender:function(f){
-                Ext.apply(f,{
-                    dataUrl:basePath+'document/vendor/list',
-                    // dataUrl:'http://localhost:9480/vendor/list',
-                    addXtype: 'document-vendor-formpanel',
-                    addTitle: '供应商资料',
-                    dbfinds:[{
-                        from:'ve_id',to:'pi_vendid'
-                    },{
-                        from:'ve_code',to:'pu_vendcode'
-                    },{
-                        from:'ve_name',to:'pu_vendname'
-                    }],
-                    dbtpls:[{
-                        field:'ve_code',width:100
-                    },{
-                        field:'ve_name',width:100
-                    }],
-                    dbColumns:[{
-                        conditionCode:'ve_id',
-                        "text": "供应商ID",
-                        "flex": 0,
-                        "dataIndex": "ve_id",
-                        "width": 0,
-                        "xtype": "",
-                        "items": null
-                    },{
-                        conditionCode:'ve_code',
-                        "text": "供应商编号",
-                        "flex": 1,
-                        "dataIndex": "ve_code",
-                        "width": 100,
-                        "xtype": "",
-                        "items": null
-                    }, {
-                        conditionCode:'ve_name',
-                        "text": "供应商名称",
-                        "flex": 1,
-                        "dataIndex": "ve_name",
-                        "xtype": "",
-                        "items": null
-                    }, {
-                        conditionCode:'ve_type',
-                        "text": "供应商类型",
-                        "flex": 0,
-                        "dataIndex": "ve_type",
-                        "width": 200,
-                        "xtype": "",
-                        "items": null
-                    }]
-                }) ;   
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pi_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
 
-            }
-        },
+                        dataUrl: basePath + 'document/vendor/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pi_custid'
+                        }, {
+                            from: 'cu_code',
+                            to: 'pi_custcode'
+                        }, {
+                            from: 'cu_name',
+                            to: 'pi_custname'
+                        }],
+                        dbtpls: [{
+                            field: 'pi_custcode',
+                            width: 100
+                        }, {
+                            field: 'pi_custname',
+                            width: 100
+                        }],
+                        dbColumns: [{
+                            conditionCode: 'id',
+                            "text": "客户ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 'cu_code',
+                            "text": "客户编号",
+                            "flex": 1,
+                            "dataIndex": "cu_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 'cu_name',
+                            "text": "客户名称",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
+                            "xtype": "",
+                            "items": null
+                        }]
+                    });
+
+                }
+            },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:basePath+'document/product/list',
+            'dbfindtrigger[name=pd_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: basePath + 'document/product/list',
                         // dataUrl:'http://localhost:9480/product/list',
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
-                        dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
-                        },{
-                            from:'pr_code',to:'pd_prodcode'                          
-                        },{
-                            from:'pr_detail',to:'pr_detail'
-                        },{
-                            from:'pr_unit',to:'pd_unit'
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pd_prodid'
+                        }, {
+                            from: 'pr_code',
+                            to: 'pd_prodcode'
+                        }, {
+                            from: 'pr_detail',
+                            to: 'pr_detail'
+                        }, {
+                            from: 'pr_spec',
+                            to: 'pr_spec'
                         }],
-                        dbtpls:[{
-                            field:'pr_code',width:100
-                        },{
-                            field:'pr_detail',width:100
-                        },{
-                            field:'pr_unit',width:100
+                        dbtpls: [{
+                            field: 'pr_code',
+                            width: 100
+                        }, {
+                            field: 'pr_detail',
+                            width: 100
+                        }, {
+                            field: 'pr_spec',
+                            width: 100
                         }],
-                        dbColumns:[{
+                        dbColumns: [{
                             "text": "物料ID",
                             "flex": 0,
                             "dataIndex": "pr_id",
                             "width": 0,
                             "xtype": "",
                             "items": null
-                        },{
+                        }, {
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",
@@ -126,101 +183,59 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             "xtype": "",
                             "items": null
                         }]
-                    }) ;   
+                    });
 
                 }
             },
-           //放大镜赋值关系 以及 tpl模板
-           'dbfindtrigger[name=pd_whname]':{
-            beforerender:function(f){
-                Ext.apply(f,{
-                    dataUrl:basePath+'document/warehouse/list',
-                    // dataUrl:'http://localhost:9480/warehouse/list',
-                    addXtype: 'other-storeinformation',
-                    addTitle: '仓库资料',
-                    dbfinds:[{
-                        from:'id',to:'pd_whid'                          
-                    },{
-                        from:'wh_code',to:'pd_whcode'                          
-                    },{
-                        from:'wh_description',to:'pd_whname'
-                    }],
-                    dbtpls:[{
-                        field:'pd_whcode',width:100
-                    },{
-                        field:'pd_whname',width:100
-                    }],
-                    dbColumns:[{
-                        "text": "仓库ID",
-                        "flex": 0,
-                        "dataIndex": "id",
-                        "width": 0,
-                        "xtype": "",
-                        "items": null
-                    },{
-                        "text": "仓库编号",
-                        "flex": 1,
-                        "dataIndex": "wh_code",
-                        "width": 100,
-                        "xtype": "",
-                        "items": null
-                    }, {
-                        "text": "仓库名称",
-                        "flex": 1,
-                        "dataIndex": "wh_description",
-                        "xtype": "",
-                        "items": null
-                    }, ]
-                }) ;   
-
-            }
-        }            
-            
-
-        });
-
-    },
-    addCombo:function(){
-        var combo=this.ownerCmp;
-        Ext.create('Ext.window.Window',{
-            layout:'vbox',
-            bodyPadding: 15,
-            width:500,
-            items:[{
-                fieldLabel:'实际值',
-                xtype:'textfield'
-            },{
-                fieldLabel:'显示值',
-                xtype:'textfield'
-            }],
-            buttons:[{
-                text:'确认',
-                handler:function(b){
-                    combo.setValue('ok');
-                    b.up('window').close();
-                }
-            }],
-            renderTo:this.ownerCmp.ownerCt.getEl()
-        }).show();
-
-    },
-
-    turnIn: function() {
-        var me = this,
-        form = me.getView(),
-        id = form.getForm().findField(form._idField);
-        form.BaseUtil.request({
-            url: form._turnInUrl+id.value,
-            method: 'GET',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                showToast('转单成功');
-              
-            }
-        })
-        .catch(function(res) {
-            showToast('转单失败: ' + res.message);
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_whname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: basePath + 'document/warehouse/list',
+                        // dataUrl:'http://localhost:9480/warehouse/list',
+                        addXtype: 'other-storeinformation',
+                        addTitle: '仓库资料',
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pd_whid'
+                        }, {
+                            from: 'wh_code',
+                            to: 'pd_whcode'
+                        }, {
+                            from: 'wh_description',
+                            to: 'pd_whname'
+                        }],
+                        dbtpls: [{
+                            field: 'pd_whcode',
+                            width: 100
+                        }, {
+                            field: 'pd_whname',
+                            width: 100
+                        }],
+                        dbColumns: [{
+                            "text": "仓库ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库编号",
+                            "flex": 1,
+                            "dataIndex": "wh_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "仓库名称",
+                            "flex": 1,
+                            "dataIndex": "wh_description",
+                            "xtype": "",
+                            "items": null
+                        }, ]
+                    });
+                },
+            },
         });
-     }
+    }
 });

+ 4 - 0
frontend/saas-web/app/view/stock/otherIn/FormPanelModel.js

@@ -1,4 +1,8 @@
 Ext.define('saas.view.stock.otherIn.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.stock-otherin-formpanel',
+    
+    data: {
+        pi_class: '其它入库单'
+     }
 });

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

@@ -48,18 +48,13 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
-        fieldMode: 'DETAIL',
-        queryType:'VAG',
-        hidden:true,
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
-        xtype: 'dbfindtrigger',
-        name: 'pr_detail#pd_prodcode',
+        xtype: 'textfield',
+        name: 'pr_detail',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'combobox',
         name: 'pi_statuscode',
@@ -86,14 +81,34 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             }
         }
     }],
-    moreQueryFormItems: [],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员',
+        allowBlank: true
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额',
+        allowBlank: true
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
+        allowBlank: true,
+        columnWidth: 1
+    }],
     queryGridConfig: {
-        idField: 'id',
-        codeField: 'pi_inoutno',
-        addTitle: '其它入库单',
-        addXtype: 'stock-otherin-formpanel',
+        idField:'id',
+        codeField:'pi_inoutno',
+        addTitle:'其它入库单',
+        addXtype:'stock-otherin-formpanel',
         defaultCondition:' pi_class = \'其它入库单\'',
-        baseVastUrl: basePath+'storage/prodinout/',
+        baseVastUrl:basePath+'storage/prodinout/',
+        // baseVastUrl:"http://localhost:9000/prodinout/",
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -116,6 +131,10 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             dataIndex: 'pi_date',
             xtype:'datecolumn',
             width: 200
+        },{
+            text: '采购单号',
+            dataIndex: 'pi_pucode',
+            width: 200
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
@@ -154,21 +173,29 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             text: '供应商名称',
             dataIndex: 'pi_vendname',
             width: 120
+        },{
+            text: '采购单号',
+            dataIndex: 'pd_ordercode',
+            width: 120
+        },{
+            text: '采购序号',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
+            width: 120
         },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '入库数量',
+            text: '验收数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '采购单价',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
-            width: 120,
-            flex: 1
+            width: 120
         },{
             text: '金额',
             dataIndex: 'pd_total',
@@ -179,6 +206,12 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             dataIndex: 'pd_taxrate',
             xtype:'numbercolumn',
             width: 120
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
         }]
     }
 });

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

@@ -1,6 +1,7 @@
 Ext.define('saas.view.stock.otherIn.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     alias: 'controller.stock-otherin-querypanel',
+    
     init: function (form) {
         var me = this;
         this.control({
@@ -67,7 +68,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         addTitle: '物料资料',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
-                            from:'pr_detail',to:'pr_detail'
+                            from:'pr_unit',to:'pd_unit'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100

+ 111 - 54
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -20,7 +20,13 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
     _saveUrl: basePath + 'storage/prodinout/save',
     _auditUrl: basePath + 'storage/prodinout/audit',
     _unAuditUrl: basePath + 'storage/prodinout/unAudit',
-    _deleteUrl: basePath + 'storage/prodinout/delete/',
+    _deleteUrl: basePath + 'storage/prodinout/delete',
+
+    // _relationColumn: 'pd_piid',
+    // _readUrl:'http://localhost:9000/prodinout/read/',
+    // _saveUrl:'http://localhost:9000/prodinout/save',
+    // _auditUrl:'http://localhost:9000/prodinout/audit',
+    // _deleteUrl:'http://localhost:9000/prodinout/delete/',
 
     initId: 0,
 
@@ -29,39 +35,91 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',
+        bind: '{id}',
         fieldLabel: 'id',
+        allowBlank: true,
         columnWidth: 0
+    }, {
+        xtype: "textfield",
+        name: "pi_inoutno",
+        bind: "{pi_inoutno}",
+        fieldLabel: "出库单号",
+        allowBlank: true,
+        columnWidth: 0.25
     }, {
         xtype: "textfield",
         name: "pi_class",
+        bind: "{pi_class}",
         fieldLabel: "单据类型",
         readOnly: true,
-        allowBlank: false,
-        defaultValue: '其它出库单'
+        allowBlank: true,
+        columnWidth: 0.25
     }, {
         xtype: "hidden",
+        name: "pi_vendid",
+        bind: "{pi_vendid}",
+        fieldLabel: "供应商ID",
+        allowBlank: true,
+        columnWidth: 0.0
+    }, {
+        xtype: 'hidden',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
+        fieldLabel: '供应商编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
+        fieldLabel: '供应商名称'
+    }, {
+        xtype: "hidden",
+        name: "pi_custid",
+        bind: "{pi_custid}",
+        fieldLabel: "客户ID",
+        allowBlank: true,
+        columnWidth: 0.0
+    }, {
+        xtype: 'hidden',
+        name: 'pi_custcode',
+        bind: '{pi_custcode}',
+        fieldLabel: '客户编号'
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_custname',
+        bind: '{pi_custname}',
+        fieldLabel: '客户名称'
+    }, {
+        xtype: "datefield",
+        name: "pi_date",
+        bind: "{pi_date}",
+        fieldLabel: "单据日期",
+        allowBlank: false,
+        columnWidth: 0.25
+    }, {
+        xtype: "textfield",
         name: "pi_total",
-        fieldLabel: "单据金额"
+        bind: "{pi_total}",
+        fieldLabel: "总额",
+        allowBlank: true,
+        readOnly: true,
+        columnWidth: 0.25
     }, {
         name: "detailGridField",
         xtype: "detailGridField",
         storeModel: 'saas.model.document.ProductDTO',
-        detnoColumn: 'pd_pdno',
+        // _deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
         deleteDetailUrl: basePath + 'storage/prodinout/deleteDetail/',
+        detnoColumn: 'pd_pdno',
         columns: [{
                 text: "id",
                 dataIndex: "id",
                 xtype: "numbercolumn",
                 hidden: true
-            }, {
-                text: "pd_piid",
-                dataIndex: "pd_piid",
-                xtype: "numbercolumn",
-                hidden: true
             }, {
                 text: "物料id",
                 dataIndex: "pd_prodid",
-                xtype: "numbercolumn"
+                xtype: "numbercolumn",
+                hidden: true
             },
             {
                 text: "物料编号",
@@ -88,7 +146,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 dataIndex: "pr_detail",
                 ignore: true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : '';
+                    return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
                 }
             },
             {
@@ -96,20 +154,12 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 dataIndex: "pr_spec",
                 ignore: true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : '';
-                }
-            },
-            {
-                text: "单位",
-                dataIndex: "pr_unit",
-                ignore: true,
-                renderer: function (v, m, r) {
-                    return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : '';
+                    return r.data["productDTO"] ? r.data["productDTO"][m.column.dataIndex] : v;
                 }
             },
             {
                 text: "数量",
-                dataIndex: "pd_outqty",
+                dataIndex: "pd_inqty",
                 editor: {
                     xtype: "numberfield"
                 },
@@ -118,8 +168,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 format: '0',
                 items: null,
                 summaryType: 'sum'
-            },
-            {
+            }, {
                 text: "已转数",
                 dataIndex: "pd_yqty",
                 editor: {
@@ -130,24 +179,50 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 format: '0',
                 items: null,
                 summaryType: 'sum'
+            }, {
+                text: "仓库id",
+                dataIndex: "pd_whid",
+                xtype: "numbercolumn",
+                hidden: true
             },
             {
-                text: "单价",
+                text: "仓库编号",
+                dataIndex: "pd_whcode",
+                hidden: true
+            },
+            {
+                text: "仓库",
+                dataIndex: "pd_whname",
+                width: 120.0,
+                items: null,
                 editor: {
-                    xtype: "numberfield"
-                },
-                format: '0,000.00',
-                dataIndex: "pd_price",
+                    displayField: "display",
+                    editable: true,
+                    format: "",
+                    hideTrigger: false,
+                    maxLength: 100.0,
+                    minValue: null,
+                    positiveNum: false,
+                    queryMode: "local",
+                    store: null,
+                    valueField: "value",
+                    xtype: "dbfindtrigger"
+                }
+            },
+            {
+                text: "单价",
+                dataIndex: "pd_orderprice",
                 width: 120.0,
                 xtype: "numbercolumn",
-                items: null,
-                summaryType: 'sum'
+                items: null
             },
             {
+                text: "含税金额",
+                dataIndex: "pd_total",
+                width: 120.0,
+                xtype: "numbercolumn"
+            }, {
                 text: "税率",
-                editor: {
-                    xtype: "numberfield"
-                },
                 dataIndex: "pd_taxrate",
                 width: 120.0,
                 xtype: "numbercolumn",
@@ -155,26 +230,8 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
             },
             {
                 text: "未税金额",
-                dataIndex: "pd_taxtotal",
+                dataIndex: "pd_nettotal",
                 xtype: "numbercolumn"
-            },
-            {
-                text: "销售单明细id",
-                dataIndex: "pd_sdid",
-                width: 120.0,
-                flex: 1.0,
-                hidden: true
-
-            }, {
-                text: "销售单单号",
-                dataIndex: "pd_sdid",
-                width: 120.0,
-                flex: 1.0
-            }, {
-                text: "销售序号",
-                dataIndex: "pd_sdid",
-                width: 120.0,
-                flex: 1.0
             }
         ]
     }, {
@@ -196,7 +253,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         xtype: "textfield",
         readOnly: true,
         editable: false,
-        name: "pu_status",
+        name: "pi_status",
         bind: "{pi_status}",
         fieldLabel: "单据状态",
         allowBlank: true,

+ 150 - 73
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -1,6 +1,7 @@
 Ext.define('saas.view.stock.otherOut.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
     alias: 'controller.stock-otherout-formpanel',
+    
     init: function (form) {
         var me = this;
         this.control({
@@ -66,44 +67,143 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]': {
-                beforerender: function (f) {
-                    Ext.apply(f, {
-                        dataUrl: basePath + 'document/product/list',
-                        // dataUrl:'http://localhost:9480/product/list',
-                        addXtype: 'document-product-formpanel',
-                        addTitle: '物料资料',
-                        dbfinds: [{
-                            from: 'id',
-                            to: 'pd_prodid'
-                        }, {
-                            from: 'pr_code',
-                            to: 'pd_prodcode'
+            'dbfindtrigger[name=pi_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+
+                        dataUrl:basePath+'document/vendor/list',
+                        // dataUrl:'http://localhost:9480/vendor/list',
+                        addXtype: 'document-vendor-formpanel',
+                        addTitle: '供应商资料',
+                        dbfinds:[{
+                            from:'id',to:'pi_vendid'
+                        },{
+                            from:'ve_code',to:'pi_vendcode'
+                        },{
+                            from:'ve_name',to:'pi_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
                         }, {
-                            from: 'pr_detail',
-                            to: 'pr_detail'
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
                         }, {
-                            from: 'pr_unit',
-                            to: 'pd_unit'
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pi_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+
+                        dataUrl:basePath+'document/customer/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        dbfinds:[{
+                            from:'id',to:'pi_custid'
+                        },{
+                            from:'cu_code',to:'pi_custcode'
+                        },{
+                            from:'cu_name',to:'pi_custname'
                         }],
-                        dbtpls: [{
-                            field: 'pr_code',
-                            width: 100
-                        }, {
-                            field: 'pr_detail',
-                            width: 100
+                        dbtpls:[{
+                            field:'pi_custcode',width:100
+                        },{
+                            field:'pi_custname',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'id',
+                            "text": "客户ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'cu_code',
+                            "text": "客户编号",
+                            "flex": 1,
+                            "dataIndex": "cu_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
                         }, {
-                            field: 'pr_unit',
-                            width: 100
+                            conditionCode:'cu_name',
+                            "text": "客户名称",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },            
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:basePath+'document/product/list',
+                        // dataUrl:'http://localhost:9480/product/list',
+                        addXtype: 'document-product-formpanel',
+                        addTitle: '物料资料',
+                        dbfinds:[{
+                            from:'id',to:'pd_prodid'                          
+                        },{
+                            from:'pr_code',to:'pd_prodcode'                          
+                        },{
+                            from:'pr_detail',to:'pr_detail'
+                        },{
+                            from:'pr_spec',to:'pr_spec'
                         }],
-                        dbColumns: [{
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',width:100
+                        },{
+                            field:'pr_spec',width:100
+                        }],
+                        dbColumns:[{
                             "text": "物料ID",
                             "flex": 0,
                             "dataIndex": "pr_id",
                             "width": 0,
                             "xtype": "",
                             "items": null
-                        }, {
+                        },{
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",
@@ -131,42 +231,37 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             "xtype": "",
                             "items": null
                         }]
-                    });
+                    }) ;   
 
                 }
-            }, //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_whname]': {
-                beforerender: function (f) {
-                    Ext.apply(f, {
-                        dataUrl: basePath + 'document/warehouse/list',
-                        //  dataUrl:'http://localhost:9480/warehouse/list',
-                        addXtype: 'other-storeinformation',
-                        addTitle: '仓库资料',
-                        dbfinds: [{
-                            from: 'id',
-                            to: 'pd_whid'
-                        }, {
-                            from: 'wh_code',
-                            to: 'pd_whcode'
-                        }, {
-                            from: 'wh_description',
-                            to: 'pd_whname'
+            },
+
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_whname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:basePath+'document/warehouse/list',
+                        // dataUrl:'http://localhost:9480/warehouse/list',
+                        dbfinds:[{
+                            from:'id',to:'pd_whid'                          
+                        },{
+                            from:'wh_code',to:'pd_whcode'                          
+                        },{
+                            from:'wh_description',to:'pd_whname'
                         }],
-                        dbtpls: [{
-                            field: 'pd_whcode',
-                            width: 100
-                        }, {
-                            field: 'pd_whname',
-                            width: 100
+                        dbtpls:[{
+                            field:'pd_whcode',width:100
+                        },{
+                            field:'pd_whname',width:100
                         }],
-                        dbColumns: [{
+                        dbColumns:[{
                             "text": "仓库ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
-                        }, {
+                        },{
                             "text": "仓库编号",
                             "flex": 1,
                             "dataIndex": "wh_code",
@@ -180,10 +275,11 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             "xtype": "",
                             "items": null
                         }, ]
-                    });
+                    }) ;   
 
                 }
             }
+
         });
 
     },
@@ -210,24 +306,5 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
             renderTo: this.ownerCmp.ownerCt.getEl()
         }).show();
 
-    },
-
-    turnIn: function () {
-        var me = this,
-            form = me.getView(),
-            id = form.getForm().findField(form._idField);
-        form.BaseUtil.request({
-                url: form._turnInUrl + id.value,
-                method: 'GET',
-            })
-            .then(function (localJson) {
-                if (localJson.success) {
-                    showToast('转单成功');
-
-                }
-            })
-            .catch(function (res) {
-                showToast('转单失败: ' + res.message);
-            });
     }
 });

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

@@ -1,8 +1,8 @@
 Ext.define('saas.view.stock.otherOut.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.stock-otherout-formpanel',
+    
     data: {
         pi_class: '其它出库单'
      }
-
 });

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

@@ -25,80 +25,90 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         xtype: 'condatefield',
         name: 'pi_date',
         bind: '{pi_date}',
-        fieldLabel: '采购日期',
+        fieldLabel: '单据日期',
         allowBlank: true,
         columnWidth: 0.5
     }, {
-        xtype: 'dbfindtrigger',
-        name: 'pu_vendcode',
-        bind: '{pu_vendcode}',
+        xtype: 'textfield',
+        name: 'pi_vendcode',
+        bind: '{pi_vendcode}',
         fieldLabel: '供应商编号',
         allowBlank: true,
+        hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'textfield',
-        name: 'pu_vendname',
-        bind: '{pu_vendname}',
+        name: 'pi_vendname',
+        bind: '{pi_vendname}',
         fieldLabel: '供应商名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pd_prodcode#pd_prodcode',
-        //#pr_detail
+        name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
-        fieldMode: 'DETAIL',
-        queryType: 'VAG',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'textfield',
         name: 'pr_detail',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
-        allowBlank: true,
-        columnWidth: 0.25
+        showDetail: true
     }, {
         xtype: 'combobox',
-        name: 'pu_statuscode',
-       // bind: '{pu_statuscode}',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
         columnWidth: 0.25,
         queryMode: 'local',
-        displayField: 'pu_status',
-        valueField: 'pu_statuscode',
-        editable:false,
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
-        fields: ['pu_statuscode', 'pu_status'],
-        data: [
-            ["$ALL", "全部"],
-            ["AUDITED", "已审核"],
-            ["UNAUDITED", "未审核"]
-        ]
-        })
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                ["ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
+        }),
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'pi_statuscode=\'' + value + '\'';
+            }
+        }
+    }],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员',
+        allowBlank: true
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额',
+        allowBlank: true
     }, {
-        xtype: 'multicombo',
-        name: 'pu_acceptstatuscode',
-        bind: '{pu_acceptstatuscode}',
-        fieldLabel: '入库状态',
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
         allowBlank: true,
-        columnWidth: 0.25,
-        datas: [
-            ["TURNIN", "已入库"],
-            ["UNTURNIN", "未入库"],
-            ["PARTIN", "部分入库"]
-        ]
+        columnWidth: 1
     }],
-    moreQueryFormItems: [],
     queryGridConfig: {
-        idField: 'pu_id',
-        codeField: 'pu_code',
-        addTitle: '其它出库单',
-        addXtype: 'stock-otherout-formpanel',
+        idField:'id',
+        codeField:'pi_inoutno',
+        addTitle:'其它出库单',
+        addXtype:'stock-otherout-formpanel',
         defaultCondition:' pi_class = \'其它出库单\'',
-        baseVastUrl: basePath+'storage/prodinout/',
+        baseVastUrl:basePath+'storage/prodinout/',
+        // baseVastUrl:"http://localhost:9000/prodinout/",
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -112,72 +122,94 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             text: '单据状态',
             dataIndex: 'pi_status',
             width: 120
+        }, {
+            text: '单据类型',
+            dataIndex: 'pi_class',
+            width: 120
         }, {
             text: '下单日期',
             dataIndex: 'pi_date',
-            xtype: 'datecolumn',
+            xtype:'datecolumn',
             width: 200
-        }, {
+        },{
+            text: '采购单号',
+            dataIndex: 'pi_pucode',
+            width: 200
+        },{
             text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            dataIndex: 'pi_vendname',
             width: 120
-        }, {
+        },{
             text: '含税金额',
-            dataIndex: 'pu_taxtotal',
-            xtype: 'numbercolumn',
+            dataIndex: 'pi_total',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '金额',
-            dataIndex: 'pu_total',
-            xtype: 'numbercolumn',
+        },{
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
+            xtype:'numbercolumn',
             width: 120,
             flex: 1
         }],
         relativeColumn: [{
             text: 'id',
-            dataIndex: 'id',
-            width: 100,
+            dataIndex: 'pu_id',
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pu_code',
+            dataIndex: 'pd_inoutno',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'pu_status',
+            dataIndex: 'pi_status',
             width: 120
         }, {
             text: '下单日期',
-            dataIndex: 'pu_indate',
-            xtype: 'datecolumn',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
             width: 200
-        }, {
+        },{
             text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            dataIndex: 'pi_vendname',
             width: 120
-        }, {
+        },{
+            text: '采购单号',
+            dataIndex: 'pd_ordercode',
+            width: 120
+        },{
             text: '采购序号',
-            dataIndex: 'pd_detno',
-            xtype: 'numbercolumn',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
             width: 120
-        }, {
+        },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
-        }, {
-            text: '数量',
-            dataIndex: 'pd_qty',
-            xtype: 'numbercolumn',
+        },{
+            text: '验收数量',
+            dataIndex: 'pd_inqty',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '单价',
-            dataIndex: 'pd_price',
-            xtype: 'numbercolumn',
+        },{
+            text: '采购单价',
+            dataIndex: 'pd_orderprice',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
-            xtype: 'numbercolumn',
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
+            xtype:'numbercolumn',
             width: 120,
             flex: 1
         }]

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

@@ -1,6 +1,7 @@
 Ext.define('saas.view.stock.otherOut.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     alias: 'controller.stock-otherout-querypanel',
+    
     init: function (form) {
         var me = this;
         this.control({
@@ -65,8 +66,9 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'pr_code',to:'pd_prodcode',
-                            from:'pr_detail',to:'pr_detail'
+                            from:'pr_code',to:'pd_prodcode'
+                        }, {
+                            from:'pr_unit',to:'pd_unit'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100