Bläddra i källkod

资金模块-调整字段

huangx 7 år sedan
förälder
incheckning
aaaccf06ef

+ 6 - 2
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -206,8 +206,12 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
                 queryMode : "local",
                 store : null,
                 valueField : "value",
-                xtype : "multidbfindtrigger"
-            }
+                xtype : "multidbfindtrigger",
+                listeners:{
+                    beforetriggerclick:'vendnamechange'
+                }
+            },
+
         }, {
             text: "业务类型",
             dataIndex: "pbd_slkind"

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

@@ -21,6 +21,9 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         },{
                             from: 've_leftamount',
                             to: 've_leftamount'
+                        },{
+                            from: 'id',
+                            to: 'pb_vendid'
                         }],
                         dbtpls: [{
                             field: 've_code',
@@ -113,12 +116,15 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         },{
                             from:'sl_kind',
                             to:'pbd_slkind'
+                        },{
+                            from:'sl_namount',
+                            to:'pbd_nowbalance'
                         }],
                         dbtpls: [{
                             field: 'sl_code',
                             width: 100
                         }],
-                        defaultCondition: "sl_vendid<>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",
@@ -171,7 +177,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 100,
+                            "width": 150,
                             align:'end'
                         }]
                     });
@@ -202,6 +208,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             width: 100
                         }],
                         defaultCondition: "1=1",
+                        otherConditon:'',
                         dbSearchFields:[{
                             emptyText:'输入账户名称或者编号',
                             xtype : "textfield",
@@ -313,4 +320,18 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             me.save();
         }
     },
+    vendnamechange:function(dbfindtrigger){
+        var me = this,
+            viewModel = me.getViewModel();
+
+        var c = viewModel.get('pb_vendname_change');
+        if(c!=null&&c!=''){
+            c = ' and sl_vendid='+c;
+        }else{
+            c ='';
+        }
+        dbfindtrigger.defaultCondition = "sl_vendid<>0 and sl_kind in ('期初余额','采购验收单','采购验退单') and sl_namount<>0" + c;
+        console.log(dbfindtrigger.defaultCondition);
+
+    }
 });

+ 9 - 0
frontend/saas-web/app/view/money/payBalance/FormPanelModel.js

@@ -2,4 +2,13 @@ Ext.define('saas.view.money.payBalance.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.money-paybalance-formpanel',
 
+    formulas: {
+        pb_vendname_change: {
+            bind: '{pb_vendid}',
+            get: function(v) {
+                return v;
+            }
+        }
+    }
+
 });

+ 6 - 3
frontend/saas-web/app/view/money/recBalance/FormPanel.js

@@ -214,7 +214,10 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
                 queryMode : "local",
                 store : null,
                 valueField : "value",
-                xtype : "multidbfindtrigger"
+                xtype : "multidbfindtrigger",
+                listeners:{
+                    beforetriggerclick:'custnamechange'
+                }
             }
         }, {
             text: "业务类型",
@@ -260,7 +263,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_nowbalance",
+            dataIndex: "rbd_nowbalance",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -277,7 +280,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "本次核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_nowbalance",
+            dataIndex: "rbd_nowbalance",
             editor : {
                 xtype : "numberfield",
                 decimalPrecision: 2

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

@@ -194,6 +194,9 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         },{
                             from:'sl_kind',
                             to:'rbd_slkind'
+                        },{
+                            from: 'sl_namount',
+                            to: 'rbd_nowbalance'
                         }],
                         dbtpls: [{
                             field: 'sl_code',
@@ -252,7 +255,7 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 100,
+                            "width": 150,
                             align:'end'
                         }]
                     });
@@ -391,5 +394,18 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
         }else {
             me.save();
         }
+    },
+    custnamechange:function(dbfindtrigger){
+        var me = this,
+            viewModel = me.getViewModel();
+
+        var c = viewModel.get('rb_custname_change');
+        if(c!=null&&c!=''){
+            c = ' and sl_custid='+c;
+        }else{
+            c ='';
+        }
+        dbfindtrigger.defaultCondition = "sl_custid<>0 and sl_kind in ('期初余额','出货单','销售退货单') and sl_namount<>0" + c;
+
     }
 });

+ 8 - 0
frontend/saas-web/app/view/money/recBalance/FormPanelModel.js

@@ -2,4 +2,12 @@ Ext.define('saas.view.money.recBalance.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.money-recbalance-formpanel',
 
+    formulas: {
+        rb_custname_change: {
+            bind: '{rb_custid}',
+            get: function(v) {
+                return v;
+            }
+        }
+    }
 });