Browse Source

资金模块-调整资金模块单据界面

huangx 7 years ago
parent
commit
ae15b13184

+ 9 - 32
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -107,40 +107,17 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: '结算账户ID',
             dataIndex: 'pd_bankid',
-            xtype:'hidden'
+            hidden: true
         }, {
-        //     text: '结算账户编号',
-        //     dataIndex: 'paybalancedet'
-        // }, {
             text: '资金账户',
             dataIndex: 'pd_bankname',
-            editable:false,
             editor:{
-                xtype : "remotecombo",
-                storeUrl:'/api/document/bankinformation/getCombo',
-                name : "bk_bankname",
-                allowBlank : false, //不能为空
-                columnWidth : 0.25,//布局
-                hiddenBtn:false,//true 则会关闭新增按钮功能
-                addHandler:function(b){
-                    var document = Ext.create('saas.view.document.kind.Kind',{});
-                    var form = this.ownerCmp.ownerCt;
-                    this.dialog = form.getController().getView().add({
-                        xtype: 'document-kind-childwin',
-                        bind: {
-                            title: '新增资金账户'
-                        },
-                        dataKind:'bankinformation',
-                        belong:document.etc['bankinformation'],
-                        _parent:form,
-                        _combo:this.ownerCmp,
-                        record:null,
-                        session: true
-                    });
-                    this.dialog.show();
-                }
+                xtype:'dbfindtrigger'
             }
-
+        },{
+            text: '资金账户编号',
+            dataIndex: 'pd_bankcode',
+            hidden: true
         }, {
             text: "付款金额",
             dataIndex: "pd_amount",
@@ -210,11 +187,11 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: '期间',
             dataIndex: 'pbd_ym',
-            xtype:'hidden'
+            hidden: true
         }, {
             text: '来源ID',
             dataIndex: 'pbd_slid',
-            xtype:'hidden'
+            hidden: true
         }, {
             text: '来源单号',
             dataIndex: 'pbd_slcode'
@@ -321,7 +298,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             text: '备注',
             dataIndex: 'pbd_remark',
             width: 250,
-            xtype: 'hidden'
+            hidden: true
         }]
     }, {
         xtype: 'hidden',

+ 57 - 2
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -14,7 +14,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         addTitle: '供应商资料',
                         dbfinds: [{
                             from: 've_code',
-                            to: 'pd_vendcode'
+                            to: 'pb_vendcode'
                         }, {
                             from: 've_name',
                             to: 'pb_vendname'
@@ -125,7 +125,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             field: 'sl_code',
                             width: 100
                         }],
-                        defaultCondition: "sl_vendtid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0",
+                        defaultCondition: "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0",
                         dbSearchFields:[{
                             emptyText:'输入源单编号',
                             xtype : "textfield",
@@ -166,6 +166,61 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         }]
                     });
 
+                }
+            },
+            'dbfindtrigger[name=pd_bankname]':{
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/bankinformation/list',
+                        // addXtype: 'document-banksubledger-formpanel',
+                        addTitle: '账户资料',
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pd_bankid'
+                        }, {
+                            from: 'bk_bankcode',
+                            to: 'pd_bankcode'
+                        },{
+                            from: 'bk_bankname',
+                            to: 'pd_bankname'
+                        }],
+                        dbtpls: [{
+                            field: 'bk_bankcode',
+                            width: 100
+                        }, {
+                            field: 'bk_bankname',
+                            width: 100
+                        }],
+                        defaultCondition: "1=1",
+                        dbSearchFields:[{
+                            emptyText:'输入账户名称或者编号',
+                            xtype : "textfield",
+                            name : "search",
+                            getCondition: function(v) {
+                                return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true,
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "账户id",
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "numbercolumn"
+                        },{
+                            "text": "账户编号",
+                            "flex": 1,
+                            "dataIndex": "bk_bankcode",
+                            "width": 100
+                        }, {
+                            "text": "账户名称",
+                            "flex": 1,
+                            "dataIndex": "bk_bankname",
+                            "width": 100
+                        }]
+                    });
+
                 }
             }
         });

+ 2 - 25
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -111,32 +111,9 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             hidden: true
         }, {
             text: '资金账户',
-            dataIndex: 'pd_bankname',
-            editable:false,
+            dataIndex: 'rd_bankname',
             editor:{
-                xtype : "remotecombo",
-                storeUrl:'/api/document/bankinformation/getCombo',
-                name : "bk_bankname",
-                allowBlank : false, //不能为空
-                columnWidth : 0.25,//布局
-                hiddenBtn:false,//true 则会关闭新增按钮功能
-                addHandler:function(b){
-                    var document = Ext.create('saas.view.document.kind.Kind',{});
-                    var form = this.ownerCmp.ownerCt;
-                    this.dialog = form.getController().getView().add({
-                        xtype: 'document-kind-childwin',
-                        bind: {
-                            title: '新增资金账户'
-                        },
-                        dataKind:'bankinformation',
-                        belong:document.etc['bankinformation'],
-                        _parent:form,
-                        _combo:this.ownerCmp,
-                        record:null,
-                        session: true
-                    });
-                    this.dialog.show();
-                }
+                xtype:'dbfindtrigger'
             }
         }, {
             text: "收款金额",

+ 56 - 1
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -179,7 +179,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             field: 'sl_code',
                             width: 100
                         }],
-                        defaultCondition: "sl_vendtid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0",
+                        defaultCondition: "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0",
                         dbSearchFields:[{
                             emptyText:'输入源单编号',
                             xtype : "textfield",
@@ -220,6 +220,61 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         }]
                     });
 
+                }
+            },
+            'dbfindtrigger[name=rd_bankname]':{
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/bankinformation/list',
+                        // addXtype: 'document-banksubledger-formpanel',
+                        addTitle: '账户资料',
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'rd_bankid'
+                        }, {
+                            from: 'bk_bankcode',
+                            to: 'rd_bankcode'
+                        },{
+                            from: 'bk_bankname',
+                            to: 'rd_bankname'
+                        }],
+                        dbtpls: [{
+                            field: 'bk_bankcode',
+                            width: 100
+                        }, {
+                            field: 'bk_bankname',
+                            width: 100
+                        }],
+                        defaultCondition: "1=1",
+                        dbSearchFields:[{
+                            emptyText:'输入账户名称或者编号',
+                            xtype : "textfield",
+                            name : "search",
+                            getCondition: function(v) {
+                                return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true,
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "账户id",
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "numbercolumn"
+                        },{
+                            "text": "账户编号",
+                            "flex": 1,
+                            "dataIndex": "bk_bankcode",
+                            "width": 100
+                        }, {
+                            "text": "账户名称",
+                            "flex": 1,
+                            "dataIndex": "bk_bankname",
+                            "width": 100
+                        }]
+                    });
+
                 }
             }
         });