zhuth 7 years ago
parent
commit
8e5ececfec

+ 157 - 0
frontend/saas-web/app/view/stock/otherIn/FormController.js

@@ -0,0 +1,157 @@
+Ext.define('saas.view.stock.otherIn.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.stock-otherIn-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.253.41:9480/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.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_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();
+
+    },
+
+    turnIn: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnInUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(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/stock/otherIn/FormModel.js

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

+ 238 - 0
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -0,0 +1,238 @@
+Ext.define('saas.view.stock.otherIn.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'stock-otherIn-formpanel',
+
+    controller: 'stock-otherIn-formcontroller',
+    viewModel: 'stock-otherIn-formmodel',
+    
+     //字段属性
+     _title:'其它入库单',
+     _idField: 'id',
+     _codeField: 'pi_inoutno',
+     _statusField: 'pi_status',
+     _statusCodeField: 'pi_statuscode',
+     _detnoColumn:  'pd_pdno',
+     _relationColumn: 'pd_piid',
+     _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/',
+     initId:0,
+ 
+     toolBtns: [{
+         xtype: 'button',
+         text: '转其他出库',
+         handler: 'turnIn'
+     }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    },{
+        xtype : "hidden", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "pi_vendcode", 
+        bind : "{pi_vendcode}", 
+        fieldLabel : "供应商编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pi_vendname", 
+        bind : "{pi_vendname}", 
+        fieldLabel : "供应商名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "numberfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "单据金额", 
+        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",
+                hidden:true
+            },{
+                text : "pd_piid", 
+                dataIndex : "id", 
+                xtype : "numbercolumn",
+                hidden:true
+            },
+            {
+                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 : "pr_unit",
+                ignore:true
+            },
+            {
+                text : "数量", 
+                dataIndex : "pd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "已转数", 
+                dataIndex : "pd_yqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "单价", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                format:'0,000.00',
+                dataIndex : "pd_price", 
+                width : 120.0, 
+                xtype : "numbercolumn",
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "未税金额", 
+                dataIndex : "pd_taxtotal", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "销售单明细id", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0,
+                hidden:true
+
+            },{
+                text : "销售单单号", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0
+            }
+        ]
+    }, {
+        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 : "pu_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
+    }]
+});

+ 212 - 0
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -0,0 +1,212 @@
+Ext.define('saas.view.stock.otherIn.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'stock-otherIn-querypanel',
+
+    controller: 'stock-otherIn-querypanel',
+    viewModel: 'stock-otherIn-querypanel',
+
+    viewName: 'stock-otherIn-querypanel',
+
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pu_id',
+        bind: '{pu_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'pu_code',
+        bind: '{pu_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        bind: '{pu_date}',
+        fieldLabel: '采购日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        bind: '{pu_vendcode}',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        //#pr_detail
+        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: 'pu_statuscode',
+       // bind: '{pu_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pu_status',
+        valueField: 'pu_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['pu_statuscode', 'pu_status'],
+        data: [
+            ["$ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ]
+        })
+    }, {
+        xtype: 'multicombo',
+        name: 'pu_acceptstatuscode',
+        bind: '{pu_acceptstatuscode}',
+        fieldLabel: '入库状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["TURNIN", "已入库"],
+            ["UNTURNIN", "未入库"],
+            ["PARTIN", "部分入库"]
+        ]
+    }],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员',
+        allowBlank: true
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额',
+        allowBlank: true
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
+        allowBlank: true,
+        columnWidth: 1
+    }],
+    queryGridConfig: {
+        idField: 'pu_id',
+        codeField: 'pu_code',
+        addTitle: '采购单',
+        addXtype: 'purchase-purchase-formpanel',
+        defaultCondition:'',
+        baseVastUrl: 'http://localhost:8800/purchase/',
+        baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '含税金额',
+            dataIndex: 'pu_taxtotal',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'pu_total',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '采购序号',
+            dataIndex: 'pd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'pd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'pd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'pd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }]
+    }
+});

+ 115 - 0
frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js

@@ -0,0 +1,115 @@
+Ext.define('saas.view.stock.otherIn.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.stock-otherIn-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/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.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_detail',to:'pr_detail'
+                        }],
+                        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/stock/otherIn/QueryPanelModel.js

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

+ 157 - 0
frontend/saas-web/app/view/stock/otherOut/FormController.js

@@ -0,0 +1,157 @@
+Ext.define('saas.view.stock.otherOut.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.stock-otherOut-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.253.41:9480/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.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_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();
+
+    },
+
+    turnIn: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnInUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(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/stock/otherOut/FormModel.js

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

+ 234 - 0
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -0,0 +1,234 @@
+Ext.define('saas.view.stock.otherOut.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'stock-otherOut-formpanel',
+
+    controller: 'stock-otherOut-formcontroller',
+    viewModel: 'stock-otherOut-formmodel',
+    
+     //字段属性
+     _title:'其它入库单',
+     _idField: 'id',
+     _codeField: 'pi_inoutno',
+     _statusField: 'pi_status',
+     _statusCodeField: 'pi_statuscode',
+     _detnoColumn:  'pd_pdno',
+     _relationColumn: 'pd_piid',
+     _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/',
+     initId:0,
+ 
+     toolBtns: [],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    },{
+        xtype : "hidden", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "pi_vendcode", 
+        bind : "{pi_vendcode}", 
+        fieldLabel : "供应商编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pi_vendname", 
+        bind : "{pi_vendname}", 
+        fieldLabel : "供应商名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "numberfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "单据金额", 
+        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",
+                hidden:true
+            },{
+                text : "pd_piid", 
+                dataIndex : "id", 
+                xtype : "numbercolumn",
+                hidden:true
+            },
+            {
+                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 : "pr_unit",
+                ignore:true
+            },
+            {
+                text : "数量", 
+                dataIndex : "pd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "已转数", 
+                dataIndex : "pd_yqty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                text : "单价", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                format:'0,000.00',
+                dataIndex : "pd_price", 
+                width : 120.0, 
+                xtype : "numbercolumn",
+                items : null,
+                summaryType: 'sum'
+            }, 
+            {
+                text : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "未税金额", 
+                dataIndex : "pd_taxtotal", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "销售单明细id", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0,
+                hidden:true
+
+            },{
+                text : "销售单单号", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0
+            }
+        ]
+    }, {
+        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 : "pu_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
+    }]
+});

+ 212 - 0
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -0,0 +1,212 @@
+Ext.define('saas.view.stock.otherOut.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'stock-otherOut-querypanel',
+
+    controller: 'stock-otherOut-querypanel',
+    viewModel: 'stock-otherOut-querypanel',
+
+    viewName: 'stock-otherOut-querypanel',
+
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pu_id',
+        bind: '{pu_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'pu_code',
+        bind: '{pu_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        bind: '{pu_date}',
+        fieldLabel: '采购日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        bind: '{pu_vendcode}',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        //#pr_detail
+        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: 'pu_statuscode',
+       // bind: '{pu_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pu_status',
+        valueField: 'pu_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['pu_statuscode', 'pu_status'],
+        data: [
+            ["$ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ]
+        })
+    }, {
+        xtype: 'multicombo',
+        name: 'pu_acceptstatuscode',
+        bind: '{pu_acceptstatuscode}',
+        fieldLabel: '入库状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["TURNIN", "已入库"],
+            ["UNTURNIN", "未入库"],
+            ["PARTIN", "部分入库"]
+        ]
+    }],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员',
+        allowBlank: true
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额',
+        allowBlank: true
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
+        allowBlank: true,
+        columnWidth: 1
+    }],
+    queryGridConfig: {
+        idField: 'pu_id',
+        codeField: 'pu_code',
+        addTitle: '采购单',
+        addXtype: 'purchase-purchase-formpanel',
+        defaultCondition:'',
+        baseVastUrl: 'http://localhost:8800/purchase/',
+        baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '含税金额',
+            dataIndex: 'pu_taxtotal',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'pu_total',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '采购序号',
+            dataIndex: 'pd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'pd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'pd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'pd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }]
+    }
+});

+ 115 - 0
frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

@@ -0,0 +1,115 @@
+Ext.define('saas.view.stock.otherOut.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.stock-otherOut-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/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.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_detail',to:'pr_detail'
+                        }],
+                        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/stock/otherOut/QueryPanelModel.js

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

+ 0 - 3
frontend/saas-web/packages/local/theme-default/resources/Readme.md

@@ -1,3 +0,0 @@
-# theme-default/resources
-
-This folder contains static resources (typically an `"images"` folder as well).

+ 4 - 4
frontend/saas-web/resources/json/navigation.json

@@ -86,13 +86,13 @@
         }, {
             "id": "otherIn",
             "text": "其它入库单",
-            "addType": "stock-otherin-formpanel",
-            "viewType": "stock-otherin-querypanel"
+            "addType": "stock-otherIn-formpanel",
+            "viewType": "stock-otherIn-querypanel"
         }, {
             "id": "otherOut",
             "text": "其它出库单",
-            "addType": "stock-otherout-formpanel",
-            "viewType": "stock-otherout-querypanel"
+            "addType": "stock-otherOut-formpanel",
+            "viewType": "stock-otherOut-querypanel"
         }, {
             "id": "inventory",
             "text": "盘点单",