Browse Source

优化代码出入库单据代码

zhoudw 7 years ago
parent
commit
14a7f3ccac
41 changed files with 1305 additions and 868 deletions
  1. 1 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  2. 2 2
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java
  3. 4 4
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  4. 6 2
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java
  5. 0 28
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutReqDTO.java
  6. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  7. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  8. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  9. 2 0
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  10. 2 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  11. 2 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdIODetailDTO.java
  12. 5 2
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  13. 5 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java
  14. 4 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  15. 5 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  16. 1 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  17. 8 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInoutServiceImpl.java
  18. 1 1
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  19. 7 2
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  20. 3 2
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml
  21. 17 14
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  22. 11 11
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  23. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  24. 30 27
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  25. 9 9
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  26. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  27. 127 50
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  28. 140 94
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  29. 5 2
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelModel.js
  30. 87 74
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  31. 4 3
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js
  32. 150 81
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  33. 149 101
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  34. 4 0
      frontend/saas-web/app/view/stock/otherIn/FormPanelModel.js
  35. 53 20
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  36. 4 3
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  37. 125 73
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  38. 206 173
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  39. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanelModel.js
  40. 108 76
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  41. 4 3
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

+ 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 {

+ 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;

+ 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/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>

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

@@ -19,7 +19,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     _readUrl:basePath+'purchase/prodinout/read/',
     _saveUrl:basePath+'purchase/prodinout/save',
     _auditUrl:basePath+'purchase/prodinout/audit',
-    _deleteDetailUrl:basePath+'purchase/prodinout/deleteItem/',
+    _deleteUrl:basePath+'purchase/prodinout/delete',
     _baseVastUrl:basePath+'purchase/prodinout/',
     _turnOutUrl:basePath+'purchase/prodinout/turnProdOut/',
 
@@ -28,7 +28,6 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     // _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/',
 
 
@@ -72,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", 
@@ -113,18 +112,20 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         name : "detailGridField", 
         xtype : "detailGridField",
         storeModel:'saas.model.document.ProductDTO',
-        _deleteDetailUrl:'http://localhost:8800/prodinout/deleteItem/',
-        // _deleteUrl:basePath+'purchase/prodinout/delete/',
+        // deleteDetailUrl:'http://localhost:8800/prodinout/deleteItem/',
+        deleteUrl: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 : "物料编号", 
@@ -151,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;
                 }
             },
             {
@@ -159,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;
                 }
             },
             {
@@ -187,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 : "仓库", 

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

@@ -12,18 +12,18 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
 
-                        // dataUrl:basePath+'document/vendor/getVendorsByCondition',
-                        dataUrl:'http://localhost:9480/vendor/list',
+                        dataUrl:basePath+'document/vendor/list',
+                        // dataUrl:'http://localhost:9480/vendor/list',
                         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
@@ -70,8 +70,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
             'dbfindtrigger[name=pd_prodcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        // dataUrl:basePath+'document/product/list',
-                        dataUrl:'http://localhost:9480/product/list',
+                        dataUrl:basePath+'document/product/list',
+                        // dataUrl:'http://localhost:9480/product/list',
                         dbfinds:[{
                             from:'id',to:'pd_prodid'                          
                         },{
@@ -79,14 +79,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",
@@ -132,8 +132,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
             'dbfindtrigger[name=pd_whname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        // dataUrl:basePath+'document/warehouse/list',
-                        dataUrl:'http://localhost:9480/warehouse/list',
+                        dataUrl:basePath+'document/warehouse/list',
+                        // dataUrl:'http://localhost:9480/warehouse/list',
                         dbfinds:[{
                             from:'id',to:'pd_whid'                          
                         },{

+ 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',

+ 30 - 27
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -15,21 +15,19 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     _statusField: 'pi_status',
     _statusCodeField: 'pi_statuscode',
     
-    // _relationColumn: 'pd_piid',
-    // _readUrl:basePath+'purchase/prodinout/read/',
-    // _saveUrl:basePath+'purchase/prodinout/save',
-    // _auditUrl:basePath+'purchase/prodinout/audit',
-    // _deleteDetailUrl:basePath+'purchase/prodinout/deleteItem/',
-    // _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/',
-    _baseVastUrl:'http://localhost:8800/prodinout/',
-    _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
+    _readUrl:basePath+'purchase/prodinout/read/',
+    _saveUrl:basePath+'purchase/prodinout/save',
+    _auditUrl:basePath+'purchase/prodinout/audit',
+    _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',
+    // _deleteUrl:'http://localhost:8800/prodinout/delete/',
 
 
 
@@ -65,16 +63,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,18 +108,20 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
         name : "detailGridField", 
         xtype : "detailGridField",
         storeModel:'saas.model.document.ProductDTO',
-        _deleteDetailUrl:'http://localhost:8800/prodinout/deleteItem/',
-        // _deleteUrl:basePath+'purchase/prodinout/delete/',
-        _detnoColumn:  'pd_pdno',
+        // deleteDetailUrl:'http://localhost:8800/prodinout/deleteItem/',
+        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 : "物料编号", 
@@ -147,7 +148,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;
                 }
             },
             {
@@ -155,7 +156,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;
                 }
             },
             {
@@ -183,11 +184,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 : "仓库", 

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

@@ -12,18 +12,18 @@ 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/getVendorsByCondition',
-                        dataUrl:'http://localhost:9480/vendor/list',
+                        dataUrl:basePath+'document/vendor/list',
+                        // dataUrl:'http://localhost:9480/vendor/list',
                         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
@@ -70,8 +70,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
             'dbfindtrigger[name=pd_prodcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        // dataUrl:basePath+'document/product/list',
-                        dataUrl:'http://localhost:9480/product/list',
+                        dataUrl:basePath+'document/product/list',
+                        // dataUrl:'http://localhost:9480/product/list',
                         dbfinds:[{
                             from:'id',to:'pd_prodid'                          
                         },{
@@ -132,8 +132,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
             'dbfindtrigger[name=pd_whname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        // dataUrl:basePath+'document/warehouse/list',
-                        dataUrl:'http://localhost:9480/warehouse/list',
+                        dataUrl:basePath+'document/warehouse/list',
+                        // dataUrl:'http://localhost:9480/warehouse/list',
                         dbfinds:[{
                             from:'id',to:'pd_whid'                          
                         },{

+ 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',

+ 127 - 50
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -4,57 +4,115 @@ 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',
-        _detnoColumn:  'pd_pdno',
+        // _deleteDetailUrl:'http://localhost:9000/prodinout/deleteDetail/',
+        deleteDetailUrl:basePath+'storage/prodinout/deleteDetail/',
+        detnoColumn:  'pd_pdno',
         columns : [
             {
                 text : "id", 
@@ -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, 

+ 140 - 94
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -12,17 +12,18 @@ 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',
                         // dataUrl:'http://localhost:9480/vendor/list',
                         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
@@ -30,10 +31,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
@@ -66,6 +67,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,{
@@ -78,14 +126,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",
@@ -126,93 +174,93 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
 
                 }
             },
-           //放大镜赋值关系 以及 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
-                    }],
-                    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
-                    }, ]
-                }) ;   
 
-            }
-        },           
-        //放大镜赋值关系 以及 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
-                 }, ]
-             }) ;   
+            //放大镜赋值关系 以及 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
+                        }],
+                        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
+                        }, ]
+                    }) ;   
 
-         }
-     }            
+                }
+            },
+            //放大镜赋值关系 以及 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
+                        }, ]
+                    }) ;   
 
+                }
+            }            
 
         });
 
@@ -241,6 +289,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
         }]

+ 4 - 3
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({
@@ -8,7 +9,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath + 'document/vendor/list',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -60,10 +61,10 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath + 'document/product/list',
+                        dataUrl:basePath+'document/product/list',
                         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

+ 150 - 81
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -4,73 +4,129 @@ 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',
-    _deleteUrl:basePath+'storage/prodinout/delete/',
-    _deleteDetailUrl:basePath+'storage/prodinout/deleteItem/',
+    _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/',
-    // _baseVastUrl:'http://localhost:9000/prodinout/',
+
+
 
 
     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", 
@@ -95,7 +151,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;
                 }
             },
             {
@@ -103,15 +159,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;
                 }
             },
             {
@@ -125,8 +173,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            },
-            {
+            },            {
                 text : "已转数", 
                 dataIndex : "pd_yqty", 
                 editor : {
@@ -137,24 +184,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", 
@@ -162,46 +235,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
     }]
 });

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

@@ -11,60 +11,108 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                     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',
-                    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_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
 
-            }
-        },
+                        dataUrl:basePath+'document/vendor/list',
+                        // dataUrl:'http://localhost:9480/vendor/list',
+                        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
+                        }, {
+                            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){
@@ -78,14 +126,14 @@ Ext.define('saas.view.stock.otherIn.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",
@@ -126,50 +174,50 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
 
                 }
             },
-           //放大镜赋值关系 以及 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
-                    }],
-                    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
-                    }, ]
-                }) ;   
 
+            //放大镜赋值关系 以及 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
+                        }],
+                        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
+                        }, ]
+                    }) ;   
+
+                }
             }
-        }            
-            
 
         });
 
@@ -198,14 +246,13 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
         }).show();
 
     },
-
-    turnIn: function() {
+    turnOut: function() {
         var me = this,
         form = me.getView(),
         id = form.getForm().findField(form._idField);
         form.BaseUtil.request({
-            url: form._turnInUrl+id.value,
-            method: 'GET',
+            url: form._turnOutUrl+id.value,
+            method: 'POST',
         })
         .then(function(localJson) {
             if(localJson.success){
@@ -214,6 +261,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
             }
         })
         .catch(function(res) {
+            console.error(res);
             showToast('转单失败: ' + res.message);
         });
      }

+ 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
         }]
     }
 });

+ 4 - 3
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({
@@ -8,7 +9,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath + 'document/vendor/list',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -60,10 +61,10 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath + 'document/product/list',
+                        dataUrl:basePath+'document/product/list',
                         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

+ 125 - 73
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -4,73 +4,126 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
 
     controller: 'stock-otherout-formpanel',
     viewModel: 'stock-otherout-formpanel',
-    
+
     viewName: 'stock-otherout-formpanel',
     caller:'OtherOut',
-
+    
      //字段属性
-     _title:'其它出库单',
-     _idField: 'id',
-     _codeField: 'pi_inoutno',
-     _statusField: 'pi_status',
-     _statusCodeField: 'pi_statuscode',
-     
-     _relationColumn: 'pd_piid',
-     _readUrl:basePath+'storage/prodinout/read/',
+    _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/',
-    _deleteDetailUrl:basePath+'storage/prodinout/deleteItem/',
+    _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/',
-    // _baseVastUrl:'http://localhost:9000/prodinout/',
 
 
 
-     initId:0,
- 
-     toolBtns: [],
+
+    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 : "物料编号", 
@@ -97,7 +150,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;
                 }
             },
             {
@@ -105,20 +158,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"
                 },
@@ -127,8 +172,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            },
-            {
+            },            {
                 text : "已转数", 
                 dataIndex : "pd_yqty", 
                 editor : {
@@ -139,24 +183,50 @@ Ext.define('saas.view.stock.otherOut.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", 
@@ -164,26 +234,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
             }
         ]
     }, {
@@ -205,7 +257,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, 

+ 206 - 173
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({
@@ -10,163 +11,214 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                     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',
-                    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_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
 
-            }
-        },
-           //放大镜赋值关系 以及 tpl模板
-           'dbfindtrigger[name=pd_prodcode]':{
-            beforerender:function(f){
-                Ext.apply(f,{
-                    dataUrl:basePath+'document/product/list',
-                    // dataUrl:'http://localhost:9480/product/list',
-                    dbfinds:[{
-                        from:'id',to:'pd_prodid'                          
-                    },{
-                        from:'pr_code',to:'pd_prodcode'                          
-                    },{
-                        from:'pr_detail',to:'pr_detail'
-                    },{
-                        from:'pr_unit',to:'pd_unit'
-                    }],
-                    dbtpls:[{
-                        field:'pr_code',width:100
-                    },{
-                        field:'pr_detail',width:100
-                    },{
-                        field:'pr_unit',width:100
-                    }],
-                    dbColumns:[{
-                        "text": "物料ID",
-                        "flex": 0,
-                        "dataIndex": "pr_id",
-                        "width": 0,
-                        "xtype": "",
-                        "items": null
-                    },{
-                        "text": "物料编号",
-                        "flex": 1,
-                        "dataIndex": "pr_code",
-                        "width": 100,
-                        "xtype": "",
-                        "items": null
-                    }, {
-                        "text": "物料名称",
-                        "flex": 1,
-                        "dataIndex": "pr_detail",
-                        "xtype": "",
-                        "items": null
-                    }, {
-                        "text": "物料规格",
-                        "flex": 0,
-                        "dataIndex": "pr_spec",
-                        "width": 200,
-                        "xtype": "",
-                        "items": null
-                    }, {
-                        "text": "物料单位",
-                        "flex": 0,
-                        "dataIndex": "pr_unit",
-                        "width": 200,
-                        "xtype": "",
-                        "items": null
-                    }]
-                }) ;   
+                        dataUrl:basePath+'document/vendor/list',
+                        // dataUrl:'http://localhost:9480/vendor/list',
+                        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
+                        }, {
+                            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/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,{
+                        dataUrl:basePath+'document/product/list',
+                        // dataUrl:'http://localhost:9480/product/list',
+                        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_spec',width:100
+                        }],
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "flex": 0,
+                            "dataIndex": "pr_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "物料编号",
+                            "flex": 1,
+                            "dataIndex": "pr_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料名称",
+                            "flex": 1,
+                            "dataIndex": "pr_detail",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料规格",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "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',
+                        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
+                        }, ]
+                    }) ;   
+
+                }
             }
-        },           //放大镜赋值关系 以及 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
-                 }],
-                 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
-                 }, ]
-             }) ;   
 
-         }
-     } 
         });
 
     },
@@ -193,24 +245,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 - 3
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({
@@ -8,7 +9,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
             'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:basePath + 'document/vendor/list',
+                        dataUrl:basePath+'document/vendor/list',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -60,10 +61,10 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:basePath + 'document/product/list',
+                        dataUrl:basePath+'document/product/list',
                         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