Browse Source

销售订单

rainco 7 years ago
parent
commit
84cf830fa0

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

@@ -34,18 +34,25 @@ Ext.define('saas.view.main.Navigation', {
                             formType:'purchase-purchaseOut-formpanel',
                             queryType: 'purchase-purchaseOut-querypanel'
                         },{
-                            id: 'form1',
-                            text: '测试-采购单明细界面',
-                            formType: 'test-order-formpanel'
-                        }, {
-                            id: 'myform',
-                            text: '测试-明细界面',
-                            formType: 'test-myform-formpanel'
-                        }, {
-                            id: 'myquerytest',
-                            text: '测试-采购单查询界面',
-                            queryType: 'test-query-querypanel',
-                        }]
+                            id: 'inquiry',
+                            text: '采购询价单',
+                            formType:'purchase-inquiry-formpanel',
+                            queryType: 'purchase-inquiry-querypanel'
+                        }
+                        // ,{
+                        //     id: 'form1',
+                        //     text: '测试-采购单明细界面',
+                        //     formType: 'test-order-formpanel'
+                        // }, {
+                        //     id: 'myform',
+                        //     text: '测试-明细界面',
+                        //     formType: 'test-myform-formpanel'
+                        // }, {
+                        //     id: 'myquerytest',
+                        //     text: '测试-采购单查询界面',
+                        //     queryType: 'test-query-querypanel',
+                        // }
+                    ]
                     }, {
                         text: '报表',
                         items: [{
@@ -57,6 +64,210 @@ Ext.define('saas.view.main.Navigation', {
                 }, {
                     text: '销售',
                     iconCls: 'x-fa fa-shopping-cart',
+                    items: [{
+                        text: '制单',
+                        items: [{
+                            id: 'sale',
+                            text: '销售订单',
+                            formType:'sale-sale-formpanel',
+                            queryType: 'sale-sale-querypanel'
+                        },{
+                            id: 'saleOut',
+                            text: '销售出货单',
+                            formType:'sale-saleOut-formpanel',
+                            queryType: 'sale-saleOut-querypanel'
+                        },{
+                            id: 'saleIn',
+                            text: '销售退货单',
+                            formType:'sale-saleIn-formpanel',
+                            queryType: 'sale-saleIn-querypanel'
+                        },{
+                            id: 'saleToPur',
+                            text: '以销定购',
+                            formType:'sale-saleToPur-formpanel',
+                            queryType: 'sale-saleToPur-querypanel'
+                        }]
+                    }, {
+                        text: '报表',
+                        items: [{
+                            text: '销售明细表'
+                        },{
+                            text: '销售收款一览表'
+                        },{
+                            text: '销售利润表'
+                        }]
+                    }]
+                }, {
+                    text: '库存',
+                    iconCls: 'x-fa fa-shopping-cart',
+                    items: [{
+                        text: '制单',
+                        items: [{
+                            id: 'appropriationInOut',
+                            text: '调拨单',
+                            formType:'stock-appropriationInOut-formpanel',
+                            queryType: 'stock-appropriationInOut-querypanel'
+                        },{
+                            id: 'make',
+                            text: '制造单',
+                            formType:'stock-make-formpanel',
+                            queryType: 'stock-make-querypanel'
+                        },{
+                            id: 'otherIn',
+                            text: '其它入库单',
+                            formType:'stock-otherIn-formpanel',
+                            queryType: 'stock-otherIn-querypanel'
+                        },{
+                            id: 'otherOut',
+                            text: '其它出库单',
+                            formType:'stock-otherOut-formpanel',
+                            queryType: 'stock-otherOut-querypanel'
+                        },{
+                            id: 'inventory',
+                            text: '盘点单',
+                            formType:'stock-inventory-formpanel',
+                            queryType: 'stock-inventory-querypanel'
+                        }]
+                    }, {
+                        text: '报表',
+                        items: [{
+                            text: '物料出入库明细表'
+                        },{
+                            text: '物料收发汇总表'
+                        },{
+                            text: '物料库存数量金额表'
+                        }]
+                    }]
+                }, {
+                    text: '资金',
+                    iconCls: 'x-fa fa-shopping-cart',
+                    items: [{
+                        text: '制单',
+                        items: [{
+                            id: 'payBalance',
+                            text: '付款单',
+                            formType:'money-payBalance-formpanel',
+                            queryType: 'money-payBalance-querypanel'
+                        },{
+                            id: 'recBbalance',
+                            text: '收款单',
+                            formType:'money-recBbalance-formpanel',
+                            queryType: 'money-recBbalance-querypanel'
+                        },{
+                            id: 'verification',
+                            text: '核销单',
+                            formType:'money-verification-formpanel',
+                            queryType: 'money-verification-querypanel'
+                        },{
+                            id: 'othReceipts',
+                            text: '其它收支单',
+                            formType:'money-othReceipts-formpanel',
+                            queryType: 'money-othReceipts-querypanel'
+                        },{
+                            id: 'fundTransfer',
+                            text: '资金转存',
+                            formType:'money-fundTransfer-formpanel',
+                            queryType: 'money-fundTransfer-querypanel'
+                        }]
+                    }, {
+                        text: '报表',
+                        items: [{
+                            text: '供应商对账单'
+                        },{
+                            text: '应付账款明细表'
+                        },{
+                            text: '客户对账单'
+                        },{
+                            text: '应收款明细表'
+                        },{
+                            text: '资金账户余额表'
+                        }]
+                    }]
+                }, {
+                    text: '资料',
+                    iconCls: 'x-fa fa-shopping-cart',
+                    items: [{
+                        text: '基础资料',
+                        items: [{
+                            id: 'vendor',
+                            text: '供应商资料',
+                            formType:'document-vendor-formpanel',
+                            queryType: 'document-vendor-querypanel'
+                        },{
+                            id: 'customer',
+                            text: '客户资料',
+                            formType:'document-customer-formpanel',
+                            queryType: 'document-customer-querypanel'
+                        },{
+                            id: 'product',
+                            text: '物料资料',
+                            formType:'document-product-formpanel',
+                            queryType: 'document-product-querypanel'
+                        },{
+                            id: 'warehouse',
+                            text: '仓库资料',
+                            formType:'document-warehouse-formpanel',
+                            queryType: 'document-warehouse-querypanel'
+                        },{
+                            id: 'bom',
+                            text: 'BOM资料',
+                            formType:'document-bom-formpanel',
+                            queryType: 'document-bom-querypanel'
+                        },{
+                            id: 'moneyAccount',
+                            text: '资金账户',
+                            formType:'document-moneyAccount-formpanel',
+                            queryType: 'document-moneyAccount-querypanel'
+                        },{
+                            id: 'employee',
+                            text: '人员资料',
+                            formType:'document-employee-formpanel',
+                            queryType: 'document-employee-querypanel'
+                        }]
+                    }, {
+                        text: '辅助资料',
+                        items: [{
+                            id: 'vendorType',
+                            text: '供应商类型',
+                            formType:'document-vendorType-formpanel',
+                            queryType: 'document-vendorType-querypanel'
+                        },{
+                            id: 'purcAddress',
+                            text: '采购交货地址',
+                            formType:'document-purcAddress-formpanel',
+                            queryType: 'document-purcAddress-querypanel'
+                        },{
+                            id: 'customerType',
+                            text: '客户类型',
+                            formType:'document-customerType-formpanel',
+                            queryType: 'document-customerType-querypanel'
+                        },{
+                            id: 'unit',
+                            text: '计量单位',
+                            formType:'document-unit-formpanel',
+                            queryType: 'document-unit-querypanel'
+                        },{
+                            id: 'productType',
+                            text: '物料类型',
+                            formType:'document-productType-formpanel',
+                            queryType: 'document-productType-querypanel'
+                        },{
+                            id: 'productBrand',
+                            text: '物料品牌',
+                            formType:'document-productBrand-formpanel',
+                            queryType: 'document-productBrand-querypanel'
+                        },{
+                            id: 'moneyinoutType',
+                            text: '收支类别',
+                            formType:'document-moneyinoutType-formpanel',
+                            queryType: 'document-moneyinoutType-querypanel'
+                        },{
+                            id: 'role',
+                            text: '用户角色',
+                            formType:'document-role-formpanel',
+                            queryType: 'document-role-querypanel'
+                        }]
+                    }]
                 }],
             }),
             tpl : new Ext.XTemplate('<ul class="x-navlist">',

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.purchase.purchase.FormController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -66,7 +66,7 @@ Ext.define('saas.view.purchase.purchase.FormController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
                         }],

+ 10 - 7
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -5,6 +5,8 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     controller: 'purchase-purchase-formcontroller',
     viewModel: 'purchase-purchase-formmodel',
     
+    caller:'Purchase',
+    
      //字段属性
      _title:'采购单',
      _idField: 'id',
@@ -13,17 +15,18 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
      _statusCodeField: 'pu_statuscode',
      _detnoColumn:  'pd_detno',
      _relationColumn: 'pd_puid',
-     _readUrl:'http://localhost:8800/purchase/read/',
-     _saveUrl:'http://localhost:8800/purchase/save',
-     _auditUrl:'http://localhost:8800/purchase/audit',
-     _deleteUrl:'http://localhost:8800/purchase/delete/',
-     _deleteDetailUrl:'http://localhost:8800/purchase/deleteItem/',
-     _turnInUrl:'http://localhost:8800/purchase/turnProdin/',
+     _readUrl:'http://192.168.0.181:8560/api/purchase/purchase/read/',
+     _saveUrl:'http://192.168.0.181:8560/api/purchase/purchase/save',
+     _auditUrl:'http://192.168.0.181:8560/api/purchase/purchase/audit',
+     _deleteUrl:'http://192.168.0.181:8560/api/purchase/purchase/delete/',
+     _deleteDetailUrl:'http://192.168.0.181:8560/api/purchase/purchase/deleteItem/',
+    // _turnInUrl:'http://192.168.0.181:8560/api/purchase/purchase/turnProdin/',
+     _turnInUrl:'http://192.168.253.228:8800/purchase/turnProdin/',
      initId:0,
  
      toolBtns: [{
          xtype: 'button',
-         text: '转验收单按钮',
+         text: '转采购验收单',
          handler: 'turnIn'
      }],
 

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

@@ -5,7 +5,6 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
     controller: 'purchase-purchase-querypanel',
     viewModel: 'purchase-purchase-querypanel',
     viewName: 'purchase-purchase-formpanel',
-    _baseVastUrl: 'http://192.168.253.58:8800/purchase/',
     _idField: 'pu_id',
     _codeField: 'pu_code',
     queryFormItems: [{
@@ -118,7 +117,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         _title: '采购单',
         _defaultCondition:'',
         _addXtype: 'purchase-purchase-formpanel',
-        _baseVastUrl: 'http://localhost:8800/purchase/',
+        _baseVastUrl: 'http://192.168.0.181:8560/api/purchase/purchase/',
         _baseColumn: [{
             text: '序号',
             width: 80,

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -66,7 +66,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
                             from:'pr_unit',to:'pd_unit'

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

@@ -4,7 +4,9 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
 
     controller: 'purchase-purchaseIn-formcontroller',
     viewModel: 'purchase-purchaseIn-formmodel',
+    caller:'PurchaseIn',
     
+     //字段属性
     _title:'采购验收单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
@@ -23,7 +25,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
 
     toolBtns: [{
         xtype: 'button',
-        text: '转验退单按钮',
+        text: '转采购验退单',
         handler: 'turnOut'
     }],
 

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

@@ -14,7 +14,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormController', {
             'dbfindtrigger[name=pu_vendcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/vendor/getVendorsByCondition',
                         dbfinds:[{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -66,7 +66,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         conditionCode:'pr_code',
-                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dataUrl:'http://192.168.0.181:8570/api/document/product/getProductsByCondition',
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode',
                             from:'pr_unit',to:'pd_unit'

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

@@ -5,6 +5,9 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     controller: 'purchase-purchaseOut-formcontroller',
     viewModel: 'purchase-purchaseOut-formmodel',
     
+    caller:'PurchaseOut',
+    
+    //字段属性
     _title:'采购验退单',
     _idField: 'id',
     _codeField: 'pi_inoutno',

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

@@ -0,0 +1,158 @@
+Ext.define('saas.view.sale.sale.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.sale-sale-formcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    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();
+
+    },
+
+    turnOut: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnOutUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
+});

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

@@ -0,0 +1,5 @@
+Ext.define('saas.view.sale.sale.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.sale-sale-formmodel',
+
+});

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

@@ -0,0 +1,270 @@
+Ext.define('saas.view.sale.sale.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'sale-sale-formpanel',
+
+    controller: 'sale-sale-formcontroller',
+    viewModel: 'sale-sale-formmodel',
+    
+    caller:'Sale',
+    
+     //字段属性
+     _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'
+     }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype : 'hidden', 
+        name : 'sa_cudid', 
+        bind : '{sa_cudid}', 
+        fieldLabel : '客户ID', 
+        allowBlank : true, 
+        columnWidth : 0
+    }, {
+        xtype : 'textfield', 
+        name : 'sa_code', 
+        bind : '{sa_code}', 
+        fieldLabel : '销售单号', 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : 'hidden', 
+        name : 'sa_cucode', 
+        bind : '{sa_cucode}', 
+        fieldLabel : '客户编号', 
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "sa_cuname", 
+        bind : "{sa_cuname}", 
+        fieldLabel : "客户名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "datefield", 
+        name : "sa_recorddate", 
+        bind : "{sa_recorddate}", 
+        fieldLabel : "订单日期", 
+        allowBlank : false, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_recorder", 
+        bind : "{sa_recorder}", 
+        fieldLabel : "录入人", 
+        allowBlank : true, 
+        readOnly:true,
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_total", 
+        bind : "{sa_total}", 
+        fieldLabel : "单据金额", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : 'textfield', 
+        name : 'sa_sendstatus', 
+        bind : '{sa_sendstatus}', 
+        fieldLabel : '出货状态', 
+        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
+    // }
+    ,{
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columnWidth : 1,
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "sd_detno", 
+                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 : "sd_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 : "sd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "单价", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                format:'0,000.00',
+                dataIndex : "sd_price", 
+                width : 120.0, 
+                xtype : "numbercolumn",
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                dataIndex : "sd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "含税金额", 
+                dataIndex : "sd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, 
+            {
+                text : "未税金额", 
+                dataIndex : "sd_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'
+            },
+        ]
+    }, {
+        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 : "sa_status", 
+        bind : "{sa_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "sa_statuscode", 
+        bind : "{sa_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

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

@@ -0,0 +1,206 @@
+Ext.define('saas.view.sale.sale.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'sale-sale-querypanel',
+
+    controller: 'sale-sale-querypanel',
+    viewModel: 'sale-sale-querypanel',
+    viewName: 'sale-sale-formpanel',
+    _idField: 'sa_id',
+    _codeField: 'sa_code',
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'sa_id',
+        bind: '{sa_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'sa_code',
+        bind: '{sa_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'sa_recorddate',
+        bind: '{sa_recorddate}',
+        fieldLabel: '单据日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'sa_custcode',
+        bind: '{sa_custcode}',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'sa_custname',
+        bind: '{sa_custname}',
+        fieldLabel: '客户名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType: 'VAG',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'sa_statuscode',
+        bind: '{sa_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'sa_status',
+        valueField: 'sa_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['sa_statuscode', 'sa_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
+    }],
+    queryGridConfig: {
+        _idField: 'sa_id',
+        _codeField: 'sa_code',
+        _title: '销售订单',
+        _defaultCondition:'',
+        _addXtype: 'sale-sale-formpanel',
+        _baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
+        _baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '单据日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'sa_total',
+            xtype: 'numbercolumn',
+            width: 120
+        }],
+        _relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '明细序号',
+            dataIndex: 'sd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'sd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'sd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'sd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'sd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已出货数',
+            dataIndex: 'sd_sendqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已审核采购单数',
+            dataIndex: 'sd_pdqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '备注',
+            dataIndex: 'sd_remark',
+            width: 250,
+            flex: 1
+        }]
+    }
+});

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

@@ -0,0 +1,116 @@
+Ext.define('saas.view.sale.sale.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.sale-sale-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

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

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

+ 158 - 0
frontend/saas-web/app/view/sale/saleIn/FormController.js

@@ -0,0 +1,158 @@
+Ext.define('saas.view.sale.sale.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.sale-sale-formcontroller',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    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();
+
+    },
+
+    turnOut: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnOutUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
+});

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

@@ -0,0 +1,5 @@
+Ext.define('saas.view.sale.sale.FormModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.sale-sale-formmodel',
+
+});

+ 267 - 0
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -0,0 +1,267 @@
+Ext.define('saas.view.sale.sale.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'sale-sale-formpanel',
+
+    controller: 'sale-sale-formcontroller',
+    viewModel: 'sale-sale-formmodel',
+    
+    caller:'Sale',
+    
+     //字段属性
+     _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'
+     }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype : "textfield", 
+        name : "sa_code", 
+        bind : "{sa_code}", 
+        fieldLabel : "销售单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "sa_cudid", 
+        bind : "{sa_cudid}", 
+        fieldLabel : "客户ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "sa_cucode", 
+        bind : "{sa_cucode}", 
+        fieldLabel : "客户编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "sa_cuname", 
+        bind : "{sa_cuname}", 
+        fieldLabel : "客户名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "datefield", 
+        name : "sa_recorddate", 
+        bind : "{sa_recorddate}", 
+        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, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "sa_total", 
+        bind : "{sa_total}", 
+        fieldLabel : "单据金额", 
+        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 : "出货状态", 
+        allowBlank : true, 
+        readOnly:true,
+        columnWidth : 0
+    }, {
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "sd_detno", 
+                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 : "sd_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 : "sd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "单价", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                format:'0,000.00',
+                dataIndex : "sd_price", 
+                width : 120.0, 
+                xtype : "numbercolumn",
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                dataIndex : "sd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "含税金额", 
+                dataIndex : "sd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, 
+            {
+                text : "未税金额", 
+                dataIndex : "sd_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'
+            },
+        ]
+    }, {
+        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 : "sa_status", 
+        bind : "{sa_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "sa_statuscode", 
+        bind : "{sa_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

+ 206 - 0
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -0,0 +1,206 @@
+Ext.define('saas.view.sale.sale.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'sale-sale-querypanel',
+
+    controller: 'sale-sale-querypanel',
+    viewModel: 'sale-sale-querypanel',
+    viewName: 'sale-sale-formpanel',
+    _idField: 'sa_id',
+    _codeField: 'sa_code',
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'sa_id',
+        bind: '{sa_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'sa_code',
+        bind: '{sa_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'sa_recorddate',
+        bind: '{sa_recorddate}',
+        fieldLabel: '单据日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'sa_custcode',
+        bind: '{sa_custcode}',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'sa_custname',
+        bind: '{sa_custname}',
+        fieldLabel: '客户名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType: 'VAG',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'sa_statuscode',
+        bind: '{sa_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'sa_status',
+        valueField: 'sa_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['sa_statuscode', 'sa_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
+    }],
+    queryGridConfig: {
+        _idField: 'sa_id',
+        _codeField: 'sa_code',
+        _title: '销售订单',
+        _defaultCondition:'',
+        _addXtype: 'sale-sale-formpanel',
+        _baseVastUrl: 'http://192.168.0.181:8560/api/sale/sale/',
+        _baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '单据日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'sa_total',
+            xtype: 'numbercolumn',
+            width: 120
+        }],
+        _relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'sa_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'sa_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'sa_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'sa_recorddate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '客户名称',
+            dataIndex: 'sa_cuname',
+            width: 120
+        }, {
+            text: '明细序号',
+            dataIndex: 'sd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'sd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'sd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'sd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'sd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已出货数',
+            dataIndex: 'sd_sendqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已审核采购单数',
+            dataIndex: 'sd_pdqty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '备注',
+            dataIndex: 'sd_remark',
+            width: 250,
+            flex: 1
+        }]
+    }
+});

+ 116 - 0
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -0,0 +1,116 @@
+Ext.define('saas.view.sale.sale.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.sale-sale-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custcode]':{
+                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
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 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:'sd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

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

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