Browse Source

币别添加

hy 7 years ago
parent
commit
90b432bcf9
34 changed files with 471 additions and 57 deletions
  1. 1 1
      frontend/saas-portal-web/src/pages/invitation_mobile_join/invitation_mobile_join.html
  2. 2 0
      frontend/saas-web/app/model/money/Othreceipts.js
  3. 2 0
      frontend/saas-web/app/model/money/Othspendings.js
  4. 1 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  5. 52 0
      frontend/saas-web/app/view/core/dbfind/types/CurrencyDbfindTrigger.js
  6. 4 0
      frontend/saas-web/app/view/document/bankinformation/DataList.js
  7. 1 0
      frontend/saas-web/app/view/document/bankinformation/DataListModel.js
  8. 14 3
      frontend/saas-web/app/view/document/bankinformation/Window.js
  9. 48 0
      frontend/saas-web/app/view/document/currencys/DataList.js
  10. 49 0
      frontend/saas-web/app/view/document/currencys/DataListModel.js
  11. 25 0
      frontend/saas-web/app/view/document/currencys/DatalistController.js
  12. 35 0
      frontend/saas-web/app/view/document/currencys/Window.js
  13. 9 0
      frontend/saas-web/app/view/document/customer/FormController.js
  14. 7 0
      frontend/saas-web/app/view/document/customer/FormPanel.js
  15. 9 0
      frontend/saas-web/app/view/document/vendor/FormController.js
  16. 8 1
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  17. 14 2
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  18. 11 0
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  19. 14 3
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  20. 11 1
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  21. 12 6
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  22. 12 1
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  23. 12 6
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  24. 11 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  25. 12 6
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  26. 12 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  27. 12 6
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  28. 12 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  29. 12 6
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  30. 12 1
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  31. 12 6
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  32. 12 1
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  33. 6 4
      frontend/saas-web/app/view/sys/baseconfig/FormPanel.js
  34. 5 0
      frontend/saas-web/resources/json/navigation.json

+ 1 - 1
frontend/saas-portal-web/src/pages/invitation_mobile_join/invitation_mobile_join.html

@@ -6,7 +6,7 @@
         <meta name="description" content="">
         <meta name="keywords" content="">
         <meta name="viewport"
-                content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+                content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1.0, user-scalable=no">
         <meta name="renderer" content="webkit">
         <meta http-equiv="Cache-Control" content="no-siteapp"/>
         <title>U企云服 - 邀请加入</title>

+ 2 - 0
frontend/saas-web/app/model/money/Othreceipts.js

@@ -7,6 +7,8 @@ Ext.define('saas.model.money.Othreceipts', {
         { name: 'ord_ym', type: 'int' },
         { name: 'ord_type', type: 'string' },
         { name: 'ord_nowbalance', type: 'float' },
+        { name: 'ord_currency', type: 'string' },
+        { name: 'ord_rate', type: 'float' },
         { name: 'ord_remark', type: 'string' },
         { name: 'ord_text1', type: 'string' },
         { name: 'ord_text2', type: 'string' },

+ 2 - 0
frontend/saas-web/app/model/money/Othspendings.js

@@ -8,6 +8,8 @@ Ext.define('saas.model.money.Othspendings', {
         { name: 'osd_type', type: 'string' },
         { name: 'osd_nowbalance', type: 'number' },
         { name: 'osd_remark', type: 'string' },
+        { name: 'osd_currency', type: 'string' },
+        { name: 'osd_rate', type: 'float' },
         { name: 'osd_text1', type: 'string' },
         { name: 'osd_text2', type: 'string' },
         { name: 'osd_text3', type: 'string' },

+ 1 - 1
frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js

@@ -134,7 +134,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
         f.judge(f); //form
         var panel = f.up('core-tab-panel'),
             panelEl;
-        if (!f.column && f.ownerCt.ownerCt.id.indexOf('window-') > -1) {
+        if (!f.column && f.ownerCt.ownerCt.id.indexOf('window-') > -1 && f.ownerCt.ownerCt.id.indexOf('document-') <0) {
             panelEl = f.ownerCt.ownerCt.getEl()
         } else {
             panelEl = panel.getEl()

+ 52 - 0
frontend/saas-web/app/view/core/dbfind/types/CurrencyDbfindTrigger.js

@@ -0,0 +1,52 @@
+/**
+ * BOM资料放大镜
+ */
+Ext.define('saas.view.core.dbfind.types.CurrencyDbfindTrigger', {
+    extend: 'saas.view.core.dbfind.DbfindTrigger',
+    xtype: 'currencyDbfindTrigger',
+
+    //数据接口
+    dataUrl: '/api/document/currency/list',
+    addXtype: 'document-currencys-datalist',
+    addTitle: '币别',
+    //联想设置
+    dbtpls: [{
+        field: 'cr_name',
+        width: 150
+    }, {
+        field: 'cr_rate',
+        width: 200
+    }],
+    
+    //defaultCondition: "bo_statuscode='ENABLE'",
+    //窗口字段设置
+    dbSearchFields: [{
+        emptyText: '请输入币别名称',
+        xtype: "textfield",
+        name: "search",
+        width: 200,
+        getCondition: function (v) {
+            return "(upper(cr_name) like '%" + v.toUpperCase() + "%')";
+        },
+        allowBlank: true,
+        columnWidth: 0.25
+    }],
+    //窗口列设置
+    dbColumns: [{
+        text: "ID",
+        hidden: true,
+        dataIndex: "id",
+    }, {
+        text: "币别",
+        dataIndex: "cr_name",
+        width: 150,
+    }, {
+        text: "汇率",
+        width: 150,
+        dataIndex: "cr_rate",
+    },{
+        dataIndex: '',
+        flex: 1
+    }]
+
+});

+ 4 - 0
frontend/saas-web/app/view/document/bankinformation/DataList.js

@@ -34,6 +34,10 @@ Ext.define('saas.view.document.bankinformation.DataList', {
                 text: '账户类别',
                 dataIndex: 'bk_type',
                 width: 100
+            },{
+                text: '币别',
+                dataIndex: 'bk_currency',
+                width: 100
             },{
                 text: '期初金额(元)',
                 dataIndex: 'bk_beginamount',

+ 1 - 0
frontend/saas-web/app/view/document/bankinformation/DataListModel.js

@@ -10,6 +10,7 @@ Ext.define('saas.view.document.bankinformation.DataListModel', {
                 {name: 'id', type: 'int'},
                 {name: 'bk_bankname',  type: 'string'},
                 {name: 'bk_bankcode',  type: 'string'},
+                {name: 'bk_currency',  type: 'string'},
                 {name: 'bk_type',  type: 'string'},
                 {name: 'bk_beginamount',  type: 'float'},
                 {name: 'bk_thisamount',  type: 'float'},

+ 14 - 3
frontend/saas-web/app/view/document/bankinformation/Window.js

@@ -19,6 +19,10 @@ Ext.define('saas.view.document.bankinformation.Window', {
             text: '账户类别',
             dataIndex: 'bk_type',
             flex: 1,
+        },{
+            text: '币别',
+            dataIndex: 'bk_currency',
+            flex: 1,
         },{
             text: '期初金额(元)',
             dataIndex: 'bk_beginamount',
@@ -46,9 +50,7 @@ Ext.define('saas.view.document.bankinformation.Window', {
             dataIndex: 'bk_remark',
             flex: 1
         }],
-        keyField:'id',
-        reqUrl: '/api/document/bankinformation/save',
-        delUrl: '/api/document/bankinformation/delete'
+        keyField:'id'
     },
     etc:{
         bankinformation:{
@@ -68,6 +70,15 @@ Ext.define('saas.view.document.bankinformation.Window', {
                 allowBlank:false,
                 fieldLabel:'账户名称',
                 maxLength: 20
+            },{
+                dbfinds:[{
+                    from:'cr_name',to:'bk_currency'
+                }],
+                xtype:'currencyDbfindTrigger',
+                name:'bk_currency',
+                allowBlank:false,
+                fieldLabel:'币别',
+                maxLength: 20
             },{
                 xtype:'numberfield',
                 name:'bk_beginamount',

+ 48 - 0
frontend/saas-web/app/view/document/currencys/DataList.js

@@ -0,0 +1,48 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.currencys.DataList', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'document-currencys-datalist',
+    viewModel: 'document-currencys-datalist',
+    controller:'document-currencys-datalist',
+    defaultType:'currencys',
+    windowType:'document-currencys-window',
+    tbar: ['->',{
+        xtype:'button',
+        hidden:true,
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }],
+    etc:{
+        currencys:{
+            columns: [{
+                text: '币别',
+                dataIndex: 'cr_name',
+                flex: 1
+            },{
+                text: '默认汇率',
+                dataIndex: 'cr_rate',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl:'/api/document/currency/save',
+            delUrl:'/api/document/currency/delete'
+        }
+    },
+    listeners:{
+        afterrender:function(p){
+            p.getViewModel().setData({title:'币别'});
+        }
+    }
+})
+
+

+ 49 - 0
frontend/saas-web/app/view/document/currencys/DataListModel.js

@@ -0,0 +1,49 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.currencys.DataListModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.document-currencys-datalist',
+    stores: {
+        currencys: {    
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'cr_rate',  type: 'float'},
+                {name: 'cr_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/currency/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list'
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        if(operation.success) {
+                            if(response.timedout) {
+                                saas.util.BaseUtil.showErrorToast('请求超时');
+                            }
+                        }else {
+                            console.error('exception: ', response);
+                            saas.util.BaseUtil.showErrorToast('查询失败:' + (response.responseJson?response.responseJson.message:'请求超时'));
+                        }
+                    }
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        }
+    }
+});

+ 25 - 0
frontend/saas-web/app/view/document/currencys/DatalistController.js

@@ -0,0 +1,25 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.currencys.DatalistController', {
+    extend: 'saas.view.document.kind.KindController',
+    alias: 'controller.document-currencys-datalist',
+    
+    insertActionColumn:function(columns){
+        var me=this;
+        if(columns.length>0 && columns[0].xtype!='actioncolumn'){
+            return Ext.Array.insert(columns,0,[{
+                xtype:'actioncolumn',
+                text:'操作',
+                align: 'center',
+                items: [{
+                    tooltip: '编辑',
+                    iconCls: 'x-fa fa-pencil fa-fw',
+                    handler: me.onEdit,
+                    scope:this
+                }]
+            }]);
+        }
+        return columns;
+    }
+});

+ 35 - 0
frontend/saas-web/app/view/document/currencys/Window.js

@@ -0,0 +1,35 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.currencys.Window', {
+    extend: 'saas.view.document.kind.ChildForm',
+    xtype: 'document-currencys-window',
+    dataKind:'currencys',//类型标识
+    belong:{
+        columns: [{
+            text: '币别',
+            dataIndex: 'cr_name',
+            flex: 1
+        },{
+            text: '默认汇率',
+            dataIndex: 'cr_rate',
+            flex: 1
+        }],
+        keyField:'id'
+    },
+    etc:{
+        currencys:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'numberfield',
+                hideTrigger:true,
+                name:'cr_rate',
+                allowBlank:false,
+                fieldLabel:'汇率',
+                maxLength: 20
+            }]
+        }
+    }
+});

+ 9 - 0
frontend/saas-web/app/view/document/customer/FormController.js

@@ -17,6 +17,15 @@ Ext.define('saas.view.document.customer.FormController', {
                         }],
                     }) ;   
                 }
+            },
+            'currencyDbfindTrigger[name=cu_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'cu_currency'
+                        }],
+                    }) ;   
+                }
             }
         });
     },

+ 7 - 0
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -132,6 +132,13 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 columnWidth: 0.25,
                 group: '交易信息',
             }, {
+                xtype: "currencyDbfindTrigger",
+                name: "cu_currency",
+                fieldLabel: "币别",
+                allowBlank: false,
+                columnWidth: 0.25,
+                group: '交易信息',
+            },{
                 xtype: "numberfield",
                 hideTrigger: true,
                 name: "cu_beginaramount",

+ 9 - 0
frontend/saas-web/app/view/document/vendor/FormController.js

@@ -18,6 +18,15 @@ Ext.define('saas.view.document.vendor.FormController', {
                     }) ;   
 
                 }
+            },
+            'currencyDbfindTrigger[name=ve_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'ve_currency'
+                        }],
+                    }) ;   
+                }
             }
         });
 

+ 8 - 1
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -137,7 +137,14 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 allowBlank: true,
                 columnWidth: 0.25,
                 group: '交易信息',
-            }, {
+            },{
+                xtype: "currencyDbfindTrigger",
+                name: "ve_currency",
+                fieldLabel: "币别",
+                allowBlank: false,
+                columnWidth: 0.25,
+                group: '交易信息',
+            },{
                 xtype: "numberfield",
                 hideTrigger: true,
                 name: "ve_beginapamount",

+ 14 - 2
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -62,6 +62,18 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 fieldLabel: '单据日期',
                 defaultValue: new Date(),
                 allowBlank: false
+            },{
+                xtype: "currencyDbfindTrigger",
+                name: "or_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "or_rate",
+                fieldLabel: "汇率",
+                defaultValue: '1',
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",
@@ -113,7 +125,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                             this.dialog.show();
                         }
                     }
-                }, {
+                },{
                     text: "金额(元)",
                     xtype: 'numbercolumn',
                     dataIndex: "ord_nowbalance",
@@ -127,7 +139,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     },
                     summaryType: 'sum',
-                    summaryRenderer: function (v) {
+                    summaryRenderer: function (v,m,r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {

+ 11 - 0
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -105,6 +105,17 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                     });
 
                 }
+            },
+            'currencyDbfindTrigger[name=or_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'or_currency'
+                        },{
+                            from:'cr_rate',to:'or_rate'
+                        }],
+                    }) ;   
+                }
             }
         });
     },

+ 14 - 3
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -56,6 +56,18 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 name: "os_bankname",
                 fieldLabel: "账户名称",
                 allowBlank: false
+            },{
+                xtype: "currencyDbfindTrigger",
+                name: "os_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "os_rate",
+                fieldLabel: "汇率",
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
             }, {
                 xtype: 'datefield',
                 name: 'os_date',
@@ -68,7 +80,6 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 storeModel: 'saas.model.money.Othspendings',
                 detnoColumn: 'osd_detno',
                 deleteDetailUrl: '/api/money/othspendings/deleteDetail',
-                columnWidth: 1,
                 columns: [{
                     text: "id",
                     dataIndex: "id",
@@ -123,11 +134,11 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                         xtype: "numberfield",
                         decimalPrecision: 2
                     },
-                    renderer: function (v) {
+                    renderer: function (v,m,r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     },
                     summaryType: 'sum',
-                    summaryRenderer: function (v) {
+                    summaryRenderer: function (v,m,r) {
                         return saas.util.BaseUtil.numberFormat(v, 2, true);
                     }
                 }, {

+ 11 - 1
frontend/saas-web/app/view/money/othspendings/FormPanelController.js

@@ -96,8 +96,18 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                     });
 
                 }
+            },
+            'currencyDbfindTrigger[name=os_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'os_currency'
+                        },{
+                            from:'cr_rate',to:'os_rate'
+                        }],
+                    }) ;   
+                }
             }
-
         });
 
     },

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

@@ -73,6 +73,18 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     });
                     this.dialog.show();
                 }
+            }, {
+                xtype: "currencyDbfindTrigger",
+                name: "pu_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "pu_rate",
+                fieldLabel: "汇率",
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",
@@ -350,12 +362,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 name: "pu_date",
                 fieldLabel: "单据日期",
                 defaultValue: new Date()
-            }, {
-                xtype: "textfield",
-                name: "pu_currency",
-                fieldLabel: "币别",
-                readOnly: true,
-                defaultValue: 'RMB'
             }, {
                 xtype: "numberfield",
                 name: "pu_total",

+ 12 - 1
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -67,7 +67,18 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                     });
 
                 }
-            }
+            },
+            'currencyDbfindTrigger[name=pu_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'pu_currency'
+                        },{
+                            from:'cr_rate',to:'pu_rate'
+                        }],
+                    }) ;   
+                }
+            },
         });
     },
 

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

@@ -72,6 +72,18 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 columnWidth: 0.25,
                 defaultValue: new Date()
             }, {
+                xtype: "currencyDbfindTrigger",
+                name: "pi_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "pi_rate",
+                fieldLabel: "汇率",
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
+            },{
                 xtype: "hidden",
                 name: "pi_puid",
                 fieldLabel: "采购单id",
@@ -373,12 +385,6 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 name: "pi_remark",
                 fieldLabel: "备注",
                 columnWidth: 1
-            }, {
-                xtype: "textfield",
-                name: "pi_currency",
-                fieldLabel: "币别",
-                readOnly: true,
-                defaultValue: 'RMB'
             }, {
                 xtype: "numberfield",
                 name: "pi_nettotal",

+ 11 - 0
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -92,6 +92,17 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                     }) ;   
                 }
             },
+            'currencyDbfindTrigger[name=pi_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
+                        }],
+                    }) ;   
+                }
+            },
 
         });
 

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

@@ -67,6 +67,18 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 allowBlank: false,
                 columnWidth: 0.25,
                 defaultValue: new Date()
+            }, {
+                xtype: "currencyDbfindTrigger",
+                name: "pi_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "pi_rate",
+                fieldLabel: "汇率",
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
             }, {
                 xtype: "hidden",
                 name: "pi_puid",
@@ -371,12 +383,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 name: "pi_remark",
                 fieldLabel: "备注",
                 columnWidth: 1
-            }, {
-                xtype: "textfield",
-                name: "pi_currency",
-                fieldLabel: "币别",
-                readOnly: true,
-                defaultValue: 'RMB'
             }, {
                 xtype: "numberfield",
                 name: "pi_nettotal",

+ 12 - 1
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -94,7 +94,18 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         }]
                     }) ;   
                 }
-            }
+            },
+            'currencyDbfindTrigger[name=pi_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
+                        }],
+                    }) ;   
+                }
+            },
         });
 
     },

+ 12 - 6
frontend/saas-web/app/view/sale/sale/FormPanel.js

@@ -96,6 +96,18 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 storeUrl: '/api/document/customer/getAddressCombo',
                 hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
+                xtype: "currencyDbfindTrigger",
+                name: "sa_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "sa_rate",
+                fieldLabel: "汇率",
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
+            },{
                 name: "detailGridField",
                 xtype: "detailGridField",
                 detnoColumn: 'sd_detno',
@@ -365,12 +377,6 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 name: "sa_date",
                 fieldLabel: "单据日期",
                 defaultValue: new Date()
-            }, {
-                xtype: "textfield",
-                name: "sa_currency",
-                fieldLabel: "币别",
-                readOnly: true,
-                defaultValue: 'RMB'
             }, {
                 xtype: "numberfield",
                 name: "sa_nettotal",

+ 12 - 1
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -95,7 +95,18 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                         f.picker.setHeight(33*f.store.getCount())
                     }
                 }
-            }
+            },
+            'currencyDbfindTrigger[name=sa_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'sa_currency'
+                        },{
+                            from:'cr_rate',to:'sa_rate'
+                        }],
+                    }) ;   
+                }
+            },
         });
 
     },

+ 12 - 6
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -104,6 +104,18 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 storeUrl: '/api/document/customer/getAddressCombo',
                 hiddenBtn: true, //true 则会关闭新增按钮功能
             }, {
+                xtype: "currencyDbfindTrigger",
+                name: "pi_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "pi_rate",
+                fieldLabel: "汇率",
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
+            },{
                 name: "detailGridField",
                 xtype: "detailGridField",
                 detnoColumn: 'pd_pdno',
@@ -393,12 +405,6 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 name: "pi_remark",
                 fieldLabel: "备注",
                 columnWidth: 1
-            }, {
-                xtype: "textfield",
-                name: "pi_currency",
-                fieldLabel: "币别",
-                readOnly: true,
-                defaultValue: 'RMB'
             }, {
                 xtype: "numberfield",
                 name: "pi_nettotal",

+ 12 - 1
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -110,7 +110,18 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         f.picker.setHeight(33*f.store.getCount())
                     }
                 }
-            }
+            },
+            'currencyDbfindTrigger[name=pi_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
+                        }],
+                    }) ;   
+                }
+            },
         });
     }
 });

+ 12 - 6
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -112,6 +112,18 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 allowBlank: false,
                 storeUrl: '/api/document/customer/getAddressCombo',
                 hiddenBtn: true, //true 则会关闭新增按钮功能
+            },{
+                xtype: "currencyDbfindTrigger",
+                name: "pi_currency",
+                fieldLabel: "币别",
+                defaultValue: 'RMB'
+            }, {
+                xtype: "numberfield",
+                name: "pi_rate",
+                fieldLabel: "汇率",
+                defaultValue: 1,
+                decimalPrecision: 6,
+                vtype: 'positiveNumber'
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",
@@ -399,12 +411,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 name: "pi_remark",
                 fieldLabel: "备注",
                 columnWidth: 1
-            }, {
-                xtype: "textfield",
-                name: "pi_currency",
-                fieldLabel: "币别",
-                readOnly: true,
-                defaultValue: 'RMB'
             }, {
                 xtype: "numberfield",
                 name: "pi_nettotal",

+ 12 - 1
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -102,7 +102,18 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                         f.picker.setHeight(33*f.store.getCount())
                     }
                 }
-            }
+            },
+            'currencyDbfindTrigger[name=pi_currency]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dbfinds:[{
+                            from:'cr_name',to:'pi_currency'
+                        },{
+                            from:'cr_rate',to:'pi_rate'
+                        }],
+                    }) ;   
+                }
+            },
         });
     },
     turnProdIn: function() {

+ 6 - 4
frontend/saas-web/app/view/sys/baseconfig/FormPanel.js

@@ -62,11 +62,13 @@ Ext.define('saas.view.sys.baseconfig.FormPanel', {
         fieldLabel : "库存计算方式", 
         allowBlank : false, 
     },{
-        bind:'{printUrl}',
+        bind:'{currency}',
         xtype : "textfield", 
-        name : "printUrl",
-        fieldLabel : "打印地址Url", 
-        allowBlank : false, 
+        name : "currency",
+        fieldLabel : "本位币", 
+        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+        readOnly:true,
+        ignore:true,
         width:500
     }],
 

+ 5 - 0
frontend/saas-web/resources/json/navigation.json

@@ -280,6 +280,11 @@
             "text": "收支类别",
             "viewType": "document-kind",
             "leaf": true
+        }, {
+            "id":"document-currencys-datalist",
+            "text": "币别",
+            "viewType": "document-currencys-datalist",
+            "leaf": true
         }]
     }]
 },{