Jelajahi Sumber

销售出货

rainco 7 tahun lalu
induk
melakukan
3ec6dba379
26 mengubah file dengan 1071 tambahan dan 400 penghapusan
  1. 37 37
      frontend/saas-web/app/view/main/Navigation.js
  2. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormController.js
  3. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormModel.js
  4. 6 6
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  5. 5 5
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  6. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  7. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelModel.js
  8. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormController.js
  9. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormModel.js
  10. 6 6
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  11. 5 5
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  12. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  13. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js
  14. 16 17
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  15. 39 25
      frontend/saas-web/app/view/sale/saleIn/FormController.js
  16. 5 3
      frontend/saas-web/app/view/sale/saleIn/FormModel.js
  17. 123 113
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  18. 112 113
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  19. 6 52
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  20. 2 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanelModel.js
  21. 147 0
      frontend/saas-web/app/view/sale/saleOut/FormController.js
  22. 7 0
      frontend/saas-web/app/view/sale/saleOut/FormModel.js
  23. 262 0
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  24. 205 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  25. 68 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  26. 4 0
      frontend/saas-web/app/view/sale/saleOut/QueryPanelModel.js

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

@@ -26,31 +26,31 @@ Ext.define('saas.view.main.Navigation', {
                             }, {
                                 id: 'purchaseIn',
                                 text: '采购验收单',
-                                addType: 'purchase-purchaseIn-formpanel',
-                                viewType: 'purchase-purchaseIn-querypanel'
+                                addType: 'purchase-purchasein-formpanel',
+                                viewType: 'purchase-purchasein-querypanel'
                             }, {
                                 id: 'purchaseOut',
                                 text: '采购验退单',
-                                addType: 'purchase-purchaseOut-formpanel',
-                                viewType: 'purchase-purchaseOut-querypanel'
+                                addType: 'purchase-purchaseout-formpanel',
+                                viewType: 'purchase-purchaseout-querypanel'
                             }, {
                                 id: 'inquiry',
                                 text: '采购询价单',
-                                formType: 'purchase-inquiry-formpanel',
-                                queryType: 'purchase-inquiry-querypanel'
+                                addType: 'purchase-inquiry-formpanel',
+                                viewType: 'purchase-inquiry-querypanel'
                             }
                             // ,{
                             //     id: 'form1',
                             //     text: '测试-采购单明细界面',
-                            //     formType: 'test-order-formpanel'
+                            //     addType: 'test-order-formpanel'
                             // }, {
                             //     id: 'myform',
                             //     text: '测试-明细界面',
-                            //     formType: 'test-myform-formpanel'
+                            //     addType: 'test-myform-formpanel'
                             // }, {
                             //     id: 'myquerytest',
                             //     text: '测试-采购单查询界面',
-                            //     queryType: 'test-query-querypanel',
+                            //     viewType: 'test-query-querypanel',
                             // }
                         ]
                     }, {
@@ -69,23 +69,23 @@ Ext.define('saas.view.main.Navigation', {
                         items: [{
                             id: 'sale',
                             text: '销售订单',
-                            formType: 'sale-sale-formpanel',
-                            queryType: 'sale-sale-querypanel'
+                            addType: 'sale-sale-formpanel',
+                            viewType: 'sale-sale-querypanel'
                         }, {
                             id: 'saleOut',
                             text: '销售出货单',
-                            formType: 'sale-saleOut-formpanel',
-                            queryType: 'sale-saleOut-querypanel'
+                            addType: 'sale-saleout-formpanel',
+                            viewType: 'sale-saleout-querypanel'
                         }, {
                             id: 'saleIn',
                             text: '销售退货单',
-                            formType: 'sale-saleIn-formpanel',
-                            queryType: 'sale-saleIn-querypanel'
+                            addType: 'sale-salein-formpanel',
+                            viewType: 'sale-salein-querypanel'
                         }, {
                             id: 'saleToPur',
                             text: '以销定购',
-                            formType: 'sale-saleToPur-formpanel',
-                            queryType: 'sale-saleToPur-querypanel'
+                            addType: 'sale-saletopur-formpanel',
+                            viewType: 'sale-saletopur-querypanel'
                         }]
                     }, {
                         text: '报表',
@@ -105,28 +105,28 @@ Ext.define('saas.view.main.Navigation', {
                         items: [{
                             id: 'appropriationInOut',
                             text: '调拨单',
-                            formType: 'stock-appropriationInOut-formpanel',
-                            queryType: 'stock-appropriationInOut-querypanel'
+                            addType: 'stock-appropriationinout-formpanel',
+                            viewType: 'stock-appropriationinout-querypanel'
                         }, {
                             id: 'make',
                             text: '制造单',
-                            formType: 'stock-make-formpanel',
-                            queryType: 'stock-make-querypanel'
+                            addType: 'stock-make-formpanel',
+                            viewType: 'stock-make-querypanel'
                         }, {
                             id: 'otherIn',
                             text: '其它入库单',
-                            formType: 'stock-otherIn-formpanel',
-                            queryType: 'stock-otherIn-querypanel'
+                            addType: 'stock-otherin-formpanel',
+                            viewType: 'stock-otherin-querypanel'
                         }, {
                             id: 'otherOut',
                             text: '其它出库单',
-                            formType: 'stock-otherOut-formpanel',
-                            queryType: 'stock-otherOut-querypanel'
+                            addType: 'stock-otherout-formpanel',
+                            viewType: 'stock-otherout-querypanel'
                         }, {
                             id: 'inventory',
                             text: '盘点单',
-                            formType: 'stock-inventory-formpanel',
-                            queryType: 'stock-inventory-querypanel'
+                            addType: 'stock-inventory-formpanel',
+                            viewType: 'stock-inventory-querypanel'
                         }]
                     }, {
                         text: '报表',
@@ -146,28 +146,28 @@ Ext.define('saas.view.main.Navigation', {
                         items: [{
                             id: 'payBalance',
                             text: '付款单',
-                            formType: 'money-payBalance-formpanel',
-                            queryType: 'money-payBalance-querypanel'
+                            addType: 'money-paybalance-formpanel',
+                            viewType: 'money-paybalance-querypanel'
                         }, {
                             id: 'recBbalance',
                             text: '收款单',
-                            formType: 'money-recBbalance-formpanel',
-                            queryType: 'money-recBbalance-querypanel'
+                            addType: 'money-recbalance-formpanel',
+                            viewType: 'money-recbalance-querypanel'
                         }, {
                             id: 'verification',
                             text: '核销单',
-                            formType: 'money-verification-formpanel',
-                            queryType: 'money-verification-querypanel'
+                            addType: 'money-verification-formpanel',
+                            viewType: 'money-verification-querypanel'
                         }, {
                             id: 'othReceipts',
                             text: '其它收支单',
-                            formType: 'money-othReceipts-formpanel',
-                            queryType: 'money-othReceipts-querypanel'
+                            addType: 'money-othreceipts-formpanel',
+                            viewType: 'money-othreceipts-querypanel'
                         }, {
                             id: 'fundTransfer',
                             text: '资金转存',
-                            formType: 'money-fundTransfer-formpanel',
-                            queryType: 'money-fundTransfer-querypanel'
+                            addType: 'money-fundtransfer-formpanel',
+                            viewType: 'money-fundtransfer-querypanel'
                         }]
                     }, {
                         text: '报表',

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

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchaseIn.FormController', {
+Ext.define('saas.view.purchase.purchasein.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-purchaseIn-formcontroller',
+    alias: 'controller.purchase-purchasein-formcontroller',
     init: function (form) {
         var me = this;
         this.control({

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

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchaseIn.FormModel', {
+Ext.define('saas.view.purchase.purchasein.FormModel', {
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-purchaseIn-formmodel',
+    alias: 'viewmodel.purchase-purchasein-formmodel',
     data: {
         pi_class: '采购验收单'
      }

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

@@ -1,17 +1,17 @@
-Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
+Ext.define('saas.view.purchase.purchasein.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'purchase-purchaseIn-formpanel',
+    xtype: 'purchase-purchasein-formpanel',
 
-    controller: 'purchase-purchaseIn-formcontroller',
-    viewModel: 'purchase-purchaseIn-formmodel',
+    controller: 'purchase-purchasein-formcontroller',
+    viewModel: 'purchase-purchasein-formmodel',
     caller:'PurchaseIn',
     
      //字段属性
     _title:'采购验收单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
-    _statusField: 'pu_status',
-    _statusCodeField: 'pu_statuscode',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
     _detnoColumn:  'pd_pdno',
     _relationColumn: 'pd_piid',
     _readUrl:'http://192.168.253.228:8800/prodinout/read/',

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

@@ -1,9 +1,9 @@
-Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
+Ext.define('saas.view.purchase.purchasein.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
-    xtype: 'purchase-purchaseIn-querypanel',
+    xtype: 'purchase-purchasein-querypanel',
 
-    controller: 'purchase-purchaseIn-queryformcontroller',
-    viewModel: 'purchase-purchaseIn-queryformmodel',
+    controller: 'purchase-purchasein-queryformcontroller',
+    viewModel: 'purchase-purchasein-queryformmodel',
     _baseVastUrl:'http://192.168.253.58:8800/purchase/',
     _idField:'id',
     _codeField:'pi_inoutno',
@@ -104,7 +104,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         _codeField:'pi_inoutno',
         _title:'采购验收单',
         _defaultCondition:' pi_class = \'采购验收单\'',
-        _addXtype:'purchase-purchaseIn-formpanel',
+        _addXtype:'purchase-purchasein-formpanel',
         _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
         _baseColumn: [{
             text: '序号',

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

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
+Ext.define('saas.view.purchase.purchasein.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.purchase-purchaseIn-queryformcontroller',
+    alias: 'controller.purchase-purchasein-queryformcontroller',
     init: function (form) {
         var me = this;
         this.control({

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

@@ -1,5 +1,5 @@
-Ext.define('saas.view.purchase.purchaseIn.QueryPanelModel', {
+Ext.define('saas.view.purchase.purchasein.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchaseIn-queryformmodel'
+    alias: 'viewmodel.purchase-purchasein-queryformmodel'
 
 });

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

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchaseOut.FormController', {
+Ext.define('saas.view.purchase.purchaseout.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-purchaseOut-formcontroller',
+    alias: 'controller.purchase-purchaseout-formcontroller',
     init: function (form) {
         var me = this;
         this.control({

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

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchaseOut.FormModel', {
+Ext.define('saas.view.purchase.purchaseout.FormModel', {
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-purchaseOut-formmodel',
+    alias: 'viewmodel.purchase-purchaseout-formmodel',
     data: {
         pi_class: '采购验退单'
      }

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

@@ -1,9 +1,9 @@
-Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
+Ext.define('saas.view.purchase.purchaseout.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'purchase-purchaseOut-formpanel',
+    xtype: 'purchase-purchaseout-formpanel',
 
-    controller: 'purchase-purchaseOut-formcontroller',
-    viewModel: 'purchase-purchaseOut-formmodel',
+    controller: 'purchase-purchaseout-formcontroller',
+    viewModel: 'purchase-purchaseout-formmodel',
     
     caller:'PurchaseOut',
     
@@ -11,8 +11,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     _title:'采购验退单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
-    _statusField: 'pu_status',
-    _statusCodeField: 'pu_statuscode',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
     _detnoColumn:  'pd_pdno',
     _relationColumn: 'pd_piid',
     _readUrl:'http://192.168.253.228:8800/prodinout/read/',

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

@@ -1,9 +1,9 @@
-Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
+Ext.define('saas.view.purchase.purchaseout.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
-    xtype: 'purchase-purchaseOut-querypanel',
+    xtype: 'purchase-purchaseout-querypanel',
 
-    controller: 'purchase-purchaseOut-queryformcontroller',
-    viewModel: 'purchase-purchaseOut-queryformmodel',
+    controller: 'purchase-purchaseout-queryformcontroller',
+    viewModel: 'purchase-purchaseout-queryformmodel',
     _baseVastUrl:'http://192.168.253.58:8800/purchase/',
     _idField:'id',
     _codeField:'pi_inoutno',
@@ -104,7 +104,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         _codeField:'pi_inoutno',
         _title:'采购验退单',
         _defaultCondition:' pi_class = \'采购验退单\'',
-        _addXtype:'purchase-purchaseOut-formpanel',
+        _addXtype:'purchase-purchaseout-formpanel',
         _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
         _baseColumn: [{
             text: '序号',

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

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
+Ext.define('saas.view.purchase.purchaseout.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.purchase-purchaseOut-queryformcontroller',
+    alias: 'controller.purchase-purchaseout-queryformcontroller',
     init: function (form) {
         var me = this;
         this.control({

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

@@ -1,4 +1,4 @@
-Ext.define('saas.view.purchase.purchaseOut.QueryPanelModel', {
+Ext.define('saas.view.purchase.purchaseout.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchaseOut-queryformmodel'
+    alias: 'viewmodel.purchase-purchaseout-queryformmodel'
 });

+ 16 - 17
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -95,23 +95,22 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         allowBlank : true, 
         readOnly:true,
         columnWidth : 0.25
-     }
-     //, {
-    //     xtype : "textfield", 
-    //     name : "sa_toplace", 
-    //     bind : "{sa_toplace}", 
-    //     fieldLabel : "交货地址", 
-    //     allowBlank : true, 
-    //     columnWidth : 0.5
-    // }
-    // , {
-    //     xtype : "textfield", 
-    //     name : "sa_remark", 
-    //     bind : "{sa_remark}", 
-    //     fieldLabel : "备注", 
-    //     allowBlank : true, 
-    //     columnWidth : 1
-    // }
+     }, {
+        xtype : "textfield", 
+        name : "sa_toplace", 
+        bind : "{sa_toplace}", 
+        fieldLabel : "交货地址", 
+        allowBlank : true, 
+        columnWidth : 0.5
+    }
+    , {
+        xtype : "textfield", 
+        name : "sa_remark", 
+        bind : "{sa_remark}", 
+        fieldLabel : "备注", 
+        allowBlank : true, 
+        columnWidth : 1
+    }
     ,{
         name : "detailGridField", 
         xtype : "detailGridField", 

+ 39 - 25
frontend/saas-web/app/view/sale/saleIn/FormController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.sale.sale.FormController', {
+Ext.define('saas.view.sale.salein.FormController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.sale-sale-formcontroller',
+    alias: 'controller.sale-salein-formcontroller',
     init: function (form) {
         var me = this;
         this.control({
@@ -11,50 +11,48 @@ Ext.define('saas.view.sale.sale.FormController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sa_custcode]':{
+            'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.0.181:8570/api/document/customer/getCustomerByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
-                            from:'cu_id',to:'sa_custid'
+                            from:'ve_code',to:'pu_vendcode'
                         },{
-                            from:'cu_code',to:'sa_custcode'
-                        },{
-                            from:'cu_name',to:'sa_custname'
+                            from:'ve_name',to:'pu_vendname'
                         }],
                         dbtpls:[{
-                            field:'cu_code',width:100
+                            field:'ve_code',width:100
                         },{
-                            field:'cu_name',width:100
+                            field:'ve_name',width:100
                         }],
                         dbColumns:[{
-                            conditionCode:'cu_id',
-                            "text": "客户ID",
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
                             "flex": 0,
-                            "dataIndex": "cu_id",
+                            "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
                             "flex": 1,
-                            "dataIndex": "cu_code",
+                            "dataIndex": "ve_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
                             "flex": 1,
-                            "dataIndex": "cu_name",
+                            "dataIndex": "ve_name",
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
                             "flex": 0,
-                            "dataIndex": "cu_type",
+                            "dataIndex": "ve_type",
                             "width": 200,
                             "xtype": "",
                             "items": null
@@ -70,12 +68,21 @@ Ext.define('saas.view.sale.sale.FormController', {
                         conditionCode:'pr_code',
                         dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
-                            from:'pr_code',to:'sd_prodcode'
-                        }],
+                            from:'pr_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",
@@ -104,6 +111,13 @@ Ext.define('saas.view.sale.sale.FormController', {
                             "width": 200,
                             "xtype": "",
                             "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
                         }]
                     }) ;   
 
@@ -136,7 +150,6 @@ Ext.define('saas.view.sale.sale.FormController', {
         }).show();
 
     },
-
     turnOut: function() {
         var me = this,
         form = me.getView(),
@@ -149,6 +162,7 @@ Ext.define('saas.view.sale.sale.FormController', {
             var localJson = new Ext.decode(res.responseText);
             if(localJson.success){
                 Ext.Msg.alert('提示','转单成功');
+              
             }
         })
         .catch(function() {

+ 5 - 3
frontend/saas-web/app/view/sale/saleIn/FormModel.js

@@ -1,5 +1,7 @@
-Ext.define('saas.view.sale.sale.FormModel', {
+Ext.define('saas.view.sale.salein.FormModel', {
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.sale-sale-formmodel',
-
+    alias: 'viewmodel.sale-salein-formmodel',
+    data: {
+        pi_class: '销售退货单'
+     }
 });

+ 123 - 113
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -1,34 +1,33 @@
-Ext.define('saas.view.sale.sale.FormPanel', {
+Ext.define('saas.view.sale.salein.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'sale-sale-formpanel',
+    xtype: 'sale-salein-formpanel',
 
-    controller: 'sale-sale-formcontroller',
-    viewModel: 'sale-sale-formmodel',
-    
-    caller:'Sale',
+    controller: 'sale-salein-formcontroller',
+    viewModel: 'sale-salein-formmodel',
+    caller:'SaleIn',
     
      //字段属性
-     _title:'销售订单',
-     _idField: 'id',
-     _codeField: 'sa_code',
-     _statusField: 'sa_status',
-     _statusCodeField: 'sa_statuscode',
-     _detnoColumn:  'sd_detno',
-     _relationColumn: 'sd_puid',
-     _readUrl:'',
-     _saveUrl:'',
-     _auditUrl:'',
-     _deleteUrl:'',
-     _deleteDetailUrl:'',
-     _turnInUrl:'',
-     _turnOutUrl:'',
-     initId:0,
- 
-     toolBtns: [{
-         xtype: 'button',
-         text: '转出货单',
-         handler: 'turnIn'
-     }],
+    _title:'销售退货单',
+    _idField: 'id',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
+    _detnoColumn:  'pd_pdno',
+    _relationColumn: 'pd_piid',
+    _readUrl:'',
+    _saveUrl:'',
+    _auditUrl:'',
+    _deleteUrl:'',
+    _deleteDetailUrl:'',
+   _baseVastUrl:'',
+   _turnOutUrl:'',
+    initId:0,
+
+    // toolBtns: [{
+    //     xtype: 'button',
+    //     text: '',
+    //     handler: 'turnOut'
+    // }],
 
     defaultItems: [{
         xtype: 'hidden',
@@ -39,84 +38,77 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         columnWidth: 0
     }, {
         xtype : "textfield", 
-        name : "sa_code", 
-        bind : "{sa_code}", 
-        fieldLabel : "销售单号", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "退货单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_class", 
+        bind : "{pi_class}", 
+        fieldLabel : "单据类型", 
+        readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
     }, {
         xtype : "hidden", 
-        name : "sa_cudid", 
-        bind : "{sa_cudid}", 
+        name : "pi_custid", 
+        bind : "{pi_custid}", 
         fieldLabel : "客户ID", 
         allowBlank : true, 
         columnWidth : 0.0
     }, {
         xtype : "textfield", 
-        name : "sa_cucode", 
-        bind : "{sa_cucode}", 
+        name : "pi_custcode", 
+        bind : "{pi_custcode}", 
         fieldLabel : "客户编号", 
         hidden:true,
         allowBlank : true, 
         columnWidth : 0, 
     }, {
         xtype : "dbfindtrigger", 
-        name : "sa_cuname", 
-        bind : "{sa_cuname}", 
+        name : "pi_custname", 
+        bind : "{pi_custname}", 
         fieldLabel : "客户名称", 
         allowBlank : true, 
         columnWidth : 0.25
     },{
         xtype : "datefield", 
-        name : "sa_recorddate", 
-        bind : "{sa_recorddate}", 
-        fieldLabel : "单日期", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单日期", 
         allowBlank : false, 
         columnWidth : 0.25
-    }, {
-        xtype : "textfield", 
-        name : "sa_recorder", 
-        bind : "{sa_recorder}", 
-        fieldLabel : "录入人", 
-        allowBlank : true, 
-        readOnly:true,
-        columnWidth : 0.0
-    }, {
+    },{
         xtype : "textfield", 
-        name : "sa_toplace", 
-        bind : "{sa_toplace}", 
-        fieldLabel : "交货地址", 
-        allowBlank : true, 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "总额", 
+        allowBlank : true,
+        readOnly: true,
         columnWidth : 0.25
     }, {
-        xtype : "textfield", 
-        name : "sa_total", 
-        bind : "{sa_total}", 
-        fieldLabel : "单据金额", 
+        xtype : "hidden", 
+        name : "pi_said", 
+        bind : "{pi_said}", 
+        fieldLabel : "销售单id", 
         allowBlank : true, 
         columnWidth : 0.25
-    }, {
-        xtype : "textfield", 
-        name : "sa_remark", 
-        bind : "{sa_remark}", 
-        fieldLabel : "备注", 
-        allowBlank : true, 
-        columnWidth : 1
     },{
         xtype : "textfield", 
-        name : "sa_sendstatus", 
-        bind : "{sa_sendstatus}", 
-        fieldLabel : "出货状态", 
+        name : "pi_sacode", 
+        bind : "{pi_sacode}", 
+        fieldLabel : "采购单号", 
         allowBlank : true, 
-        readOnly:true,
-        columnWidth : 0
+        columnWidth : 0.25
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
         columns : [
             {
                 text : "序号", 
-                dataIndex : "sd_detno", 
+                dataIndex : "pd_pdno", 
                 width : 100, 
                 xtype : "numbercolumn",
                 align : 'center',
@@ -129,11 +121,16 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "id", 
                 dataIndex : "id", 
                 xtype : "numbercolumn"
+            },{
+                text : "物料id", 
+                dataIndex : "pd_prodid", 
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
                 text : "物料编号", 
                 width : 200.0, 
-                dataIndex : "sd_prodcode", 
+                dataIndex : "pd_prodcode", 
                 xtype : "", 
                 items : null,
                 editor : {
@@ -159,10 +156,10 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "规格", 
                 dataIndex : "pr_spec",
                 ignore:true
-            },
+            }, 
             {
                 text : "数量", 
-                dataIndex : "sd_qty", 
+                dataIndex : "pd_inqty", 
                 editor : {
                     xtype : "numberfield"
                 },
@@ -171,64 +168,77 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            },
-            {
-                text : "单价", 
+            },            {
+                text : "已转数", 
+                dataIndex : "pd_yqty", 
                 editor : {
                     xtype : "numberfield"
                 },
-                format:'0,000.00',
-                dataIndex : "sd_price", 
                 width : 120.0, 
-                xtype : "numbercolumn",
+                xtype : "numbercolumn", 
+                format:'0',
                 items : null,
                 summaryType: 'sum'
             }, 
             {
-                text : "税率", 
+                text : "仓库", 
+                dataIndex : "pd_whname", 
+                width : 120.0, 
+                items : null,
                 editor : {
-                    xtype : "numberfield"
-                },
-                dataIndex : "sd_taxrate", 
+                    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_sendprice", 
                 width : 120.0, 
                 xtype : "numbercolumn", 
                 items : null
-            },
-            {
+            }, 
+           {
                 text : "含税金额", 
-                dataIndex : "sd_total", 
+                dataIndex : "pd_total", 
                 width : 120.0, 
                 xtype : "numbercolumn"
-            }, 
+            }, {
+                text : "税率", 
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
             {
                 text : "未税金额", 
-                dataIndex : "sd_nettotal", 
+                dataIndex : "pd_nettotal", 
                 xtype : "numbercolumn"
-            },{
-                text : "交货日期", 
-                dataIndex : "sd_delivery", 
-                flex : 1.0, 
-                xtype:'datecolumn',
-                format : "Y-m-d H:i:s", 
-                editor : {
-                    xtype : "datefield",
-                    editable : true, 
-                    format : "Y-m-d H:i:s", 
-                    hideTrigger : false
-                }
             },
             {
-                text : "已转数", 
-                dataIndex : "sd_yqty", 
-                editor : {
-                    xtype : "numberfield"
-                },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                text : "销售订单明细id", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                hidden:true
             },
+            {
+                text : "销售单号", 
+                dataIndex : "pd_ordercode", 
+                width : 120.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_orderdetno", 
+                xtype : "numbercolumn",
+                flex:1
+            }
         ]
     }, {
         format : "Y-m-d", 
@@ -249,8 +259,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         xtype : "textfield", 
         readOnly : true, 
         editable : false, 
-        name : "sa_status", 
-        bind : "{sa_status}", 
+        name : "pi_status", 
+        bind : "{pi_status}", 
         fieldLabel : "单据状态", 
         allowBlank : true, 
         columnWidth : 0.25
@@ -258,8 +268,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         xtype : "hidden", 
         readOnly : true, 
         editable : false, 
-        name : "sa_statuscode", 
-        bind : "{sa_statuscode}", 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
         fieldLabel : "单据状态码", 
         allowBlank : true, 
         columnWidth : 0.0

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

@@ -1,205 +1,204 @@
-Ext.define('saas.view.sale.sale.QueryPanel', {
+Ext.define('saas.view.sale.salein.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
-    xtype: 'sale-sale-querypanel',
+    xtype: 'sale-salein-querypanel',
 
-    controller: 'sale-sale-querypanel',
-    viewModel: 'sale-sale-querypanel',
-    viewName: 'sale-sale-formpanel',
-    _idField: 'sa_id',
-    _codeField: 'sa_code',
+    controller: 'sale-salein-queryformcontroller',
+    viewModel: 'sale-salein-queryformmodel',
+    _baseVastUrl:'http://192.168.253.58:8800/salein/',
+    _idField:'id',
+    _codeField:'pi_inoutno',
     queryFormItems: [{
         xtype: 'hidden',
-        name: 'sa_id',
-        bind: '{sa_id}',
+        name: 'id',
+        bind: '{id}',
         fieldLabel: 'ID',
         allowBlank: true,
         columnWidth: 0
     }, {
         xtype: 'textfield',
-        name: 'sa_code',
-        bind: '{sa_code}',
+        name: 'pi_inoutno',
+        bind: '{pi_inoutno}',
         fieldLabel: '单据编号',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'condatefield',
-        name: 'sa_recorddate',
-        bind: '{sa_recorddate}',
+        name: 'pi_date',
+        bind: '{pi_date}',
         fieldLabel: '单据日期',
         allowBlank: true,
         columnWidth: 0.5
     }, {
-        xtype: 'dbfindtrigger',
-        name: 'sa_custcode',
-        bind: '{sa_custcode}',
+        xtype: 'textfield',
+        name: 'pi_custcode',
+        bind: '{pi_custcode}',
         fieldLabel: '客户编号',
         allowBlank: true,
+        hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'textfield',
-        name: 'sa_custname',
-        bind: '{sa_custname}',
+        name: 'pi_custname',
+        bind: '{pi_custname}',
         fieldLabel: '客户名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pd_prodcode#pd_prodcode',
+        name: 'pd_prodcode',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
         fieldMode: 'DETAIL',
-        queryType: 'VAG',
+        queryType:'VAG',
+        hidden:true,
         allowBlank: true,
         columnWidth: 0.25
     }, {
-        xtype: 'textfield',
-        name: 'pr_detail',
+        xtype: 'dbfindtrigger',
+        name: 'pr_detail#pd_prodcode',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
         xtype: 'combobox',
-        name: 'sa_statuscode',
-        bind: '{sa_statuscode}',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
         columnWidth: 0.25,
         queryMode: 'local',
-        displayField: 'sa_status',
-        valueField: 'sa_statuscode',
-        editable:false,
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
-        fields: ['sa_statuscode', 'sa_status'],
-        data: [
-            ["$ALL", "全部"],
-            ["AUDITED", "已审核"],
-            ["UNAUDITED", "未审核"]
-        ]
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                ["$ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
         })
-    }, {
-        xtype: 'multicombo',
-        name: 'sa_sendstatuscode',
-        bind: '{sa_sendstatuscode}',
-        fieldLabel: '出库状态',
-        allowBlank: true,
-        columnWidth: 0.25,
-        datas: [
-            ["TURNOUT", "已出库"],
-            ["UNTURNOUT", "未出库"],
-            ["PARTOUT", "部分出库"]
-        ]
-    }],
-    moreQueryFormItems: [{
-        xtype: 'textfield',
-        name: 'pu_buyername',
-        bind: '{pu_buyername}',
-        fieldLabel: '采购员',
-        allowBlank: true
     }],
+    moreQueryFormItems: [],
     queryGridConfig: {
-        _idField: 'sa_id',
-        _codeField: 'sa_code',
-        _title: '销售订单',
-        _defaultCondition:'',
-        _addXtype: 'sale-sale-formpanel',
-        _baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
+        _idField:'id',
+        _codeField:'pi_inoutno',
+        _title:'销售出货单',
+        _defaultCondition:' pi_class = \'销售出货单\'',
+        _addXtype:'purchase-purchaseIn-formpanel',
+        _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
         _baseColumn: [{
             text: '序号',
             width: 80,
             xtype: 'rownumberer'
         }, {
             text: 'id',
-            dataIndex: 'sa_id',
+            dataIndex: 'id',
             width: 100,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'sa_code',
+            dataIndex: 'pi_inoutno',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'sa_status',
+            dataIndex: 'pi_status',
             width: 120
         }, {
-            text: '单据日期',
-            dataIndex: 'sa_recorddate',
-            xtype: 'datecolumn',
-            width: 200
+            text: '单据类型',
+            dataIndex: 'pi_class',
+            width: 120
         }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '销售单号',
+            dataIndex: 'pi_pucode',
+            width: 200
+        },{
             text: '客户名称',
-            dataIndex: 'sa_cuname',
+            dataIndex: 'pi_custname',
             width: 120
-        }, {
-            text: '金额',
-            dataIndex: 'sa_total',
-            xtype: 'numbercolumn',
+        },{
+            text: '含税金额',
+            dataIndex: 'pi_total',
+            xtype:'numbercolumn',
             width: 120
+        },{
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
         }],
         _relativeColumn: [{
-            text: '序号',
-            width: 80,
-            xtype: 'rownumberer'
+            text : "序号", 
+            dataIndex : "pd_pdno", 
+            width : 100, 
+            xtype : "numbercolumn",
+            align : 'center'
         }, {
             text: 'id',
-            dataIndex: 'sa_id',
-            width: 100,
+            dataIndex: 'pu_id',
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'sa_code',
+            dataIndex: 'pd_inoutno',
             width: 120
         }, {
             text: '单据状态',
-            dataIndex: 'sa_status',
+            dataIndex: 'pi_status',
             width: 120
         }, {
-            text: '单日期',
-            dataIndex: 'sa_recorddate',
-            xtype: 'datecolumn',
+            text: '单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
             width: 200
-        }, {
+        },{
             text: '客户名称',
-            dataIndex: 'sa_cuname',
+            dataIndex: 'pi_custname',
             width: 120
-        }, {
-            text: '明细序号',
-            dataIndex: 'sd_detno',
-            xtype: 'numbercolumn',
+        },{
+            text: '销售单号',
+            dataIndex: 'pd_ordercode',
             width: 120
-        }, {
+        },{
+            text: '销售序号',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
+            width: 120
+        },{
             text: '物料编号',
-            dataIndex: 'sd_prodcode',
+            dataIndex: 'pd_prodcode',
             width: 120
-        }, {
-            text: '数量',
-            dataIndex: 'sd_qty',
-            xtype: 'numbercolumn',
+        },{
+            text: '验收数量',
+            dataIndex: 'pd_inqty',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '单价',
-            dataIndex: 'sd_price',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '已转数',
-            dataIndex: 'sd_ytqy',
-            xtype: 'numbercolumn',
+        },{
+            text: '销售单价',
+            dataIndex: 'pd_sendprice',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '已出货数',
-            dataIndex: 'sd_sendqty',
-            xtype: 'numbercolumn',
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '已审核采购单数',
-            dataIndex: 'sd_pdqty',
-            xtype: 'numbercolumn',
+        },{
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype:'numbercolumn',
             width: 120
-        }, {
-            text: '备注',
-            dataIndex: 'sd_remark',
-            width: 250,
+        },{
+            text: '成本单价',
+            dataIndex: 'pd_price',
+            xtype:'numbercolumn',
+            width: 120,
             flex: 1
         }]
     }

+ 6 - 52
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -1,60 +1,13 @@
-Ext.define('saas.view.sale.sale.QueryPanelController', {
+Ext.define('saas.view.sale.salein.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.sale-sale-querypanel',
+    alias: 'controller.sale-salein-queryformcontroller',
     init: function (form) {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=sa_custcode]':{
+            'dbfindtrigger[name=pu_vendname]':{
                 beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:'http://192.168.0.181:8570/api/document/customer/getCustomerByCondition',
-                        dbfinds:[{
-                            from:'cu_id',to:'sa_custid'
-                        },{
-                            from:'cu_code',to:'sa_custcode'
-                        },{
-                            from:'cu_name',to:'sa_custname'
-                        }],
-                        dbtpls:[{
-                            field:'cu_code',width:100
-                        },{
-                            field:'cu_name',width:100
-                        }],
-                        dbColumns:[{
-                            conditionCode:'cu_id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "cu_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
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
-                    }) ;   
-
+                  //Todo  
                 }
             },
             //放大镜赋值关系 以及 tpl模板
@@ -64,7 +17,8 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                         conditionCode:'pr_code',
                         dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
                         dbfinds:[{
-                            from:'pr_code',to:'sd_prodcode'
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100

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

@@ -1,5 +1,5 @@
-Ext.define('saas.view.sale.sale.QueryPanelModel', {
+Ext.define('saas.view.sale.salein.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.sale-sale-querypanel'
+    alias: 'viewmodel.sale-salein-queryformmodel'
 
 });

+ 147 - 0
frontend/saas-web/app/view/sale/saleOut/FormController.js

@@ -0,0 +1,147 @@
+Ext.define('saas.view.sale.saleout.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.sale-saleout-formcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            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=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    addCombo:function(){
+        var combo=this.ownerCmp;
+        Ext.create('Ext.window.Window',{
+            layout:'vbox',
+            bodyPadding: 15,
+            width:500,
+            items:[{
+                fieldLabel:'实际值',
+                xtype:'textfield'
+            },{
+                fieldLabel:'显示值',
+                xtype:'textfield'
+            }],
+            buttons:[{
+                text:'确认',
+                handler:function(b){
+                    combo.setValue('ok');
+                    b.up('window').close();
+                }
+            }],
+            renderTo:this.ownerCmp.ownerCt.getEl()
+        }).show();
+
+    }
+});

+ 7 - 0
frontend/saas-web/app/view/sale/saleOut/FormModel.js

@@ -0,0 +1,7 @@
+Ext.define('saas.view.sale.saleout.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.sale-saleout-formmodel',
+    data: {
+        pi_class: '销售出货单'
+     }
+});

+ 262 - 0
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -0,0 +1,262 @@
+Ext.define('saas.view.sale.saleout.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'sale-saleout-formpanel',
+
+    controller: 'sale-saleout-formcontroller',
+    viewModel: 'sale-saleout-formmodel',
+    
+    caller:'saleOut',
+    
+    //字段属性
+    _title:'销售出货单',
+    _idField: 'id',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pi_status',
+    _statusCodeField: 'pi_statuscode',
+    _detnoColumn:  'pd_pdno',
+    _relationColumn: 'pd_piid',
+    _readUrl:'http://192.168.253.228:8800/prodinout/read/',
+    _saveUrl:'http://192.168.253.228:8800/prodinout/save',
+    _auditUrl:'http://192.168.253.228:8800/prodinout/audit',
+    _deleteUrl:'http://192.168.253.228:8800/prodinout/delete/',
+    _deleteDetailUrl:'http://192.168.253.228:8800/prodinout/deleteItem/',
+    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 : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pi_custid", 
+        bind : "{pi_custid}", 
+        fieldLabel : "客户ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "pi_custcode", 
+        bind : "{pi_custcode}", 
+        fieldLabel : "客户编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pi_custname", 
+        bind : "{pi_custname}", 
+        fieldLabel : "客户名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        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
+    }, {
+        xtype : "textfield", 
+        name : "pi_said", 
+        bind : "{pi_said}", 
+        fieldLabel : "销售单id", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_sacode", 
+        bind : "{pi_sacode}", 
+        fieldLabel : "销售单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pi_inid", 
+        bind : "{pi_inid}", 
+        fieldLabel : "出入库单id", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "pd_pdno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
+            }, {
+                text : "id", 
+                dataIndex : "id", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                xtype : "", 
+                items : null,
+                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 : "pr_detail",
+                ignore:true
+            },
+            {
+                text : "规格", 
+                dataIndex : "pr_spec",
+                ignore:true
+            }, 
+            {
+                text : "出货数量", 
+                dataIndex : "pd_outqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "仓库", 
+                dataIndex : "pd_whname", 
+                width : 120.0, 
+                items : null,
+                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_sendprice", 
+                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"
+            },
+            {
+                text : "销售单号", 
+                dataIndex : "pd_ordercode", 
+                width : 120.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_orderdetno", 
+                xtype : "numbercolumn",
+                flex:1
+            }, {
+                text : "出入库明细id", 
+                dataIndex : "pd_ioid", 
+                width : 120.0,
+                hidden:true
+            }
+        ]
+    }, {
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "createTime", 
+        bind : "{createTime}", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "updateTime", 
+        bind : "{updateTime}", 
+        fieldLabel : "更新时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_status", 
+        bind : "{pi_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

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

@@ -0,0 +1,205 @@
+Ext.define('saas.view.sale.saleout.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'sale-saleout-querypanel',
+
+    controller: 'sale-saleout-queryformcontroller',
+    viewModel: 'sale-saleout-queryformmodel',
+    _baseVastUrl:'http://192.168.253.58:8800/sale/',
+    _idField:'id',
+    _codeField:'pi_inoutno',
+    queryFormItems: [{
+        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: 'condatefield',
+        name: 'pi_date',
+        bind: '{pi_date}',
+        fieldLabel: '单据日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'textfield',
+        name: 'pi_custcode',
+        bind: '{pi_custcode}',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        hidden:true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pi_custname',
+        bind: '{pi_custname}',
+        fieldLabel: '客户名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType:'VAG',
+        hidden:true,
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pr_detail#pd_prodcode',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'pi_statuscode',
+        bind: '{pi_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pi_status',
+        valueField: 'pi_statuscode',
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['pi_statuscode', 'pi_status'],
+            data: [
+                ["$ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
+        })
+    }],
+    moreQueryFormItems: [],
+    queryGridConfig: {
+        _idField:'id',
+        _codeField:'pi_inoutno',
+        _title:'销售出货单',
+        _defaultCondition:' pi_class = \'销售出货单\'',
+        _addXtype:'sale-saleout-formpanel',
+        _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
+        _baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pi_inoutno',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pi_status',
+            width: 120
+        },{
+            text: '单据类型',
+            dataIndex: 'pi_class',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '销售单号',
+            dataIndex: 'pi_sacode',
+            width: 200
+        },{
+            text: '客户名称',
+            dataIndex: 'pi_custname',
+            width: 120
+        },{
+            text: '含税金额',
+            dataIndex: 'pi_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '不含税金额',
+            dataIndex: 'pi_nettotal',
+            xtype:'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        _relativeColumn: [{
+            text : "序号", 
+            dataIndex : "pd_pdno", 
+            width : 100, 
+            xtype : "numbercolumn",
+            align : 'center'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 0,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pd_inoutno',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pi_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pi_date',
+            xtype:'datecolumn',
+            width: 200
+        },{
+            text: '客户名称',
+            dataIndex: 'pi_custname',
+            width: 120
+        },{
+            text: '销售单号',
+            dataIndex: 'pd_ordercode',
+            width: 120
+        },{
+            text: '销售序号',
+            dataIndex: 'pd_orderdetno',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        },{
+            text: '出货数量',
+            dataIndex: 'pd_outqty',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '销售单价',
+            dataIndex: 'pd_sendprice',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            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
+        }]
+    }
+});

+ 68 - 0
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -0,0 +1,68 @@
+Ext.define('saas.view.sale.saleout.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.sale-saleout-queryformcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custname]':{
+                beforerender:function(f){}
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
+                        }],
+                        dbtpls:[{
+                            field:'pr_code',width:100
+                        },{
+                            field:'pr_detail',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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

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

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.saleout.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.sale-saleout-queryformmodel'
+});