Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

zhoudw 7 years ago
parent
commit
4b02c9e21d

+ 12 - 0
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -8,6 +8,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
 
     initComponent: function() {
         var me = this;
+        me.initColumns();
         if(me.columns){
             var fields = me.columns.map(column => column.dataIndex);
             me.store = Ext.create('Ext.data.Store',{
@@ -124,6 +125,17 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
         }
     },
 
+    initColumns: function() {
+        var me = this,
+        columns = me.columns || [];
+
+        Ext.Array.each(columns, function(c) {
+            Ext.applyIf(c, {
+                width: 200
+            });
+        });
+    },
+
     /**
      * 获得过滤条件
      */

+ 5 - 0
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -428,6 +428,11 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
                 trueData.push(d);
             }else {
                 if(typeof d.id == "number") {
+                    for(k in d) {
+                        if(Ext.isDate(d[k])) {
+                            d[k] = Ext.Date.format(d[k], 'Y-m-d H:i:s');
+                        }
+                    }
                     trueData.push(d);
                 }
             }

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

@@ -8,7 +8,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
     caller:'Bom',
 
     //字段属性
-    _title:'客户资料',
+    _title:'BOM资料',
     _idField: 'id',
     _codeField: 'bo_mothercode',
     _statusField: 'bo_status',
@@ -33,17 +33,10 @@ Ext.define('saas.view.document.bom.FormPanel', {
     }, {
         xtype: 'button',
         text: '保存',
-        handler: 'onSave',
-        // bind: {
-        //     // disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
-        //     disabled: '{!base.valid || '+ me._statusCodeField + ' == "' + me.auditTexts.auditCode + '"}'
-        // }
+        handler: 'onSave'
     }, {
         xtype: 'button',
         text: '删除',
-        // bind: {
-        //     hidden: '{deleteHidden || ' + me._statusCodeField + '=="' + me.auditTexts.auditCode + '"}'
-        // },
         handler: 'delete'
     }, {
         xtype: 'button',
@@ -107,6 +100,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 xtype : "numbercolumn"
             },
             {
+                allowBlank:false,
                 text : "子件编号", 
                 editor : {
                     xtype : "textfield"
@@ -114,6 +108,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 dataIndex : "bd_soncode", 
             },
             {
+                allowBlank:false,
                 text : "单位", 
                 editor : {
                     xtype : "textfield"
@@ -121,6 +116,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 dataIndex : "bd_unit", 
             },
             {
+                allowBlank:false,
                 text : "单位用量", 
                 editor : {
                     xtype : "textfield"
@@ -128,6 +124,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 dataIndex : "bd_baseqty", 
             },
             {
+                allowBlank:false,
                 text : "替代料", 
                 editor : {
                     xtype : "textfield"
@@ -141,7 +138,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
         auditText: '已关闭',
         unAuditCode: 'OPEN',
         unAuditText: '已开启',
-        auditBtnText: '关闭',
+        auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }
 });

+ 85 - 41
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -33,25 +33,13 @@ Ext.define('saas.view.document.customer.FormPanel', {
         name: 'cu_name',
         fieldLabel: '客户名称',
         allowBlank: false,
-        columnWidth: 0.25
+        columnWidth: 0.5
     },{
         xtype: 'textfield',
         name: 'cu_code',
         fieldLabel: '客户编号',
         allowBlank: true,
         columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 'cu_status',
-        fieldLabel: '状态',
-        allowBlank: true,
-        columnWidth: 0.25
-    },{
-        xtype: 'hidden',
-        name: 'cu_statuscode',
-        fieldLabel: '状态码',
-        allowBlank: true,
-        columnWidth: 0.25
     },{
         editable:false,
         xtype : "remotecombo", 
@@ -79,11 +67,17 @@ Ext.define('saas.view.document.customer.FormPanel', {
             this.dialog.show();
         }
     },{
-        xtype : "datefield", 
-        name : "createTime", 
-        fieldLabel : "创建时间", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        xtype: 'hidden',
+        name: 'cu_status',
+        fieldLabel: '状态',
+        allowBlank: true,
+        columnWidth: 0
+    },{
+        xtype: 'hidden',
+        name: 'cu_statuscode',
+        fieldLabel: '状态码',
+        allowBlank: true,
+        columnWidth: 0.25
     },{
         xtype : "datefield", 
         name : "cu_begindate", 
@@ -104,39 +98,90 @@ Ext.define('saas.view.document.customer.FormPanel', {
         fieldLabel : "期初预收", 
         allowBlank : true, 
         columnWidth : 0.25    
+    },{
+        xtype : "numberfield", 
+        name : "cu_taxrate", 
+        fieldLabel : "税率", 
+        allowBlank : false, 
+        columnWidth : 0.25   
     },{ 
         xtype : "numberfield", 
         hideTrigger:true,
         name : "cu_promisedays", 
         fieldLabel : "承付天数", 
         allowBlank : true, 
-        columnWidth : 0.25      
+        columnWidth : 0.25        
     },{
         xtype : "numberfield", 
-        name : "cu_taxrate", 
-        fieldLabel : "税率", 
-        allowBlank : false, 
-        columnWidth : 0.25   
+        hideTrigger:true,
+        name : "cu_credit", 
+        fieldLabel : "额度", 
+        allowBlank : true, 
+        columnWidth : 0.25
     },{
-        // xtype : "numberfield", 
-        // name : "cu_ta", 
-        // fieldLabel : "应收款余额", 
-        // allowBlank : true, 
-        // readOnly:true,
-        // editable:false,
-        // columnWidth : 0.25     
+        xtype : "textfield", 
+        name : "cu_sellername", 
+        fieldLabel : "业务员", 
+        ignore:true,
+        editable:false,
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "cu_1", 
+        fieldLabel : "纳税人识别号", 
+        ignore:true,
+        editable:false,
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "cu_2", 
+        fieldLabel : "开户银行", 
+        ignore:true,
+        editable:false,
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "cu_3", 
+        fieldLabel : "银行账户", 
+        ignore:true,
+        editable:false,
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
     },{
         xtype:'textfield',
         name : "cu_uu", 
         fieldLabel : "客户UU", 
         allowBlank : true, 
         columnWidth : 0.25
+    },{
+        xtype:'textfield',
+        name : "cu_leftamount", 
+        fieldLabel : "应收款余额", 
+        allowBlank : true, 
+        readOnly:true,
+        ignore:true,
+        columnWidth : 0.25
+    },{
+        xtype : "datefield", 
+        name : "createTime", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        hidden:true,
+        columnWidth : 0
     },{  
         xtype : "datefield", 
         name : "updateTime", 
         fieldLabel : "更新时间", 
         allowBlank : true, 
-        columnWidth : 0.25
+        hidden:true,
+        columnWidth : 0
     }, {
         height: 169,
         xtype : "detailGridField", 
@@ -158,6 +203,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 xtype : "numbercolumn"
             },
             {
+                allowBlank:false,
                 text : "联系人", 
                 editor : {
                     xtype : "textfield"
@@ -167,16 +213,18 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null
             },
             {
+                allowBlank:false,
                 text : "电话", 
                 editor : {
                     hideTrigger:true,
-                    xtype : "numberfield"
+                    xtype : "textfield"
                 },
                 dataIndex : "cc_tel", 
                 xtype : "", 
                 items : null
             },
             {
+                allowBlank:false,
                 text : "微信/QQ", 
                 editor : {
                     xtype : "textfield"
@@ -262,6 +310,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 xtype : "numbercolumn"
             },
             {
+                allowBlank:false,
                 text : "送货地址", 
                 editor : {
                     xtype : "textfield"
@@ -271,6 +320,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null
             },  
             {
+                allowBlank:false,
                 text : "联系人", 
                 editor : {
                     xtype : "textfield"
@@ -280,9 +330,10 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null   
             },
             {
+                allowBlank:false,
                 text : "联系电话", 
                 editor : {
-                    xtype : "numberfield",
+                    xtype : "textfield",
                     hideTrigger:true,
                 },
                 dataIndex : "ca_phone", 
@@ -348,16 +399,9 @@ Ext.define('saas.view.document.customer.FormPanel', {
         xtype: 'button',
         text: '保存',
         handler: 'onSave',
-        // bind: {
-        //     // disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
-        //     disabled: '{!base.valid || '+ me._statusCodeField + ' == "' + me.auditTexts.auditCode + '"}'
-        // }
     }, {
         xtype: 'button',
         text: '删除',
-        // bind: {
-        //     hidden: '{deleteHidden || ' + me._statusCodeField + '=="' + me.auditTexts.auditCode + '"}'
-        // },
         handler: 'delete'
     }, {
         xtype: 'button',
@@ -371,7 +415,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
         auditText: '已关闭',
         unAuditCode: 'OPEN',
         unAuditText: '已开启',
-        auditBtnText: '关闭',
+        auditBtnText: '禁用',
         unAuditBtnText: '启用',
     }
 });

+ 30 - 7
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -178,12 +178,35 @@ Ext.define('saas.view.document.product.FormPanel', {
         columnWidth : 0.25
     }],
 
+    defaultButtons:[{
+        cls: 'x-formpanel-btn-orange',
+        xtype: 'button',
+        text: '新增',
+        bind: {
+            hidden: '{!id}'
+        },
+        handler: 'add'
+    }, {
+        xtype: 'button',
+        text: '保存',
+        handler: 'onSave',
+    }, {
+        xtype: 'button',
+        text: '删除',
+        handler: 'delete'
+    }, {
+        xtype: 'button',
+        bind: {
+            text: '{auditBtnText}'
+        },
+        handler: "auditBtnClick",
+    }],
     auditTexts: {
-        auditCode: 'OPEN',
-        auditText: '已开启',
-        unAuditCode: 'CLOSE',
-        unAuditText: '已关闭',
-        auditBtnText: '启用',
-        unAuditBtnText: '关闭',
-    },
+        auditCode: 'CLOSE',
+        auditText: '已关闭',
+        unAuditCode: 'OPEN',
+        unAuditText: '已开启',
+        auditBtnText: '用',
+        unAuditBtnText: '启用',
+    }
 });

+ 2 - 1
frontend/saas-web/app/view/document/vendor/FormModel.js

@@ -3,7 +3,8 @@ Ext.define('saas.view.document.vendor.FormModel', {
     alias: 'viewmodel.document-vendor-formpanel',
 
     data: {
-        id: 0
+        id: 0,
+        ve_begindate:new Date()
     },
 
     formulas:{

+ 80 - 23
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -33,7 +33,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         name: 've_name',
         fieldLabel: '供应商名称',
         allowBlank: false,
-        columnWidth: 0.25
+        columnWidth: 0.5
     },{
         xtype: 'textfield',
         name: 've_code',
@@ -41,7 +41,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         allowBlank: true,
         columnWidth: 0.25
     },{
-        xtype: 'textfield',
+        xtype: 'hidden',
         name: 've_status',
         fieldLabel: '状态',
         allowBlank: true,
@@ -82,10 +82,12 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         name : "createTime", 
         fieldLabel : "创建时间", 
         allowBlank : true, 
-        columnWidth : 0.25
+        hidden:true,
+        columnWidth : 0
     },{
         xtype : "datefield", 
         name : "ve_begindate", 
+        format:'Y-m-d',
         fieldLabel : "期初日期", 
         allowBlank : true, 
         columnWidth : 0.25  
@@ -103,6 +105,13 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         fieldLabel : "期初预收", 
         allowBlank : true, 
         columnWidth : 0.25    
+    },{
+        xtype : "numberfield", 
+        name : "ve_taxrate", 
+        hideTrigger:true,
+        fieldLabel : "税率", 
+        allowBlank : false, 
+        columnWidth : 0.25   
     },{ 
         xtype : "numberfield", 
         hideTrigger:true,
@@ -111,19 +120,32 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         allowBlank : true, 
         columnWidth : 0.25      
     },{
-        xtype : "numberfield", 
-        name : "ve_taxrate", 
-        fieldLabel : "税率", 
-        allowBlank : false, 
-        columnWidth : 0.25   
+        xtype : "textfield", 
+        name : "ve_1", 
+        fieldLabel : "纳税人识别号", 
+        ignore:true,
+        editable:false,
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
     },{
-        // xtype : "numberfield", 
-        // name : "ve_ta", 
-        // fieldLabel : "应收款余额", 
-        // allowBlank : true, 
-        // readOnly:true,
-        // editable:false,
-        // columnWidth : 0.25     
+        xtype : "textfield", 
+        name : "ve_2", 
+        fieldLabel : "开户银行", 
+        ignore:true,
+        editable:false,
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "ve_3", 
+        fieldLabel : "银行账户", 
+        ignore:true,
+        editable:false,
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
     },{
         xtype:'textfield',
         name : "ve_uu", 
@@ -135,7 +157,16 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         name : "updateTime", 
         fieldLabel : "更新时间", 
         allowBlank : true, 
-        columnWidth : 0.25
+        hidden:true,
+        columnWidth : 0.25  
+    },{  
+        xtype : "numberfield", 
+        name : "ve_leftamount", 
+        fieldLabel : "应付款金额", 
+        allowBlank : true, 
+        readOnly:true,
+        ignore:true,
+        columnWidth : 0.25  
     }, {
         xtype : "detailGridField", 
         storeModel:'saas.model.document.vendorcontact',
@@ -156,6 +187,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 xtype : "numbercolumn"
             },
             {
+                allowBlank:false,
                 text : "联系人", 
                 editor : {
                     xtype : "textfield"
@@ -164,6 +196,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 xtype : "", 
             },
             {
+                allowBlank:false,
                 text : "电话", 
                 editor : {
                     hideTrigger:true,
@@ -173,6 +206,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 xtype : "", 
             },
             {
+                allowBlank:false,
                 text : "微信/QQ", 
                 editor : {
                     xtype : "textfield"
@@ -237,12 +271,35 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         }
     ],
 
+    defaultButtons:[{
+        cls: 'x-formpanel-btn-orange',
+        xtype: 'button',
+        text: '新增',
+        bind: {
+            hidden: '{!id}'
+        },
+        handler: 'add'
+    }, {
+        xtype: 'button',
+        text: '保存',
+        handler: 'onSave',
+    }, {
+        xtype: 'button',
+        text: '删除',
+        handler: 'delete'
+    }, {
+        xtype: 'button',
+        bind: {
+            text: '{auditBtnText}'
+        },
+        handler: "auditBtnClick",
+    }],
     auditTexts: {
-        auditCode: 'OPEN',
-        auditText: '已开启',
-        unAuditCode: 'CLOSE',
-        unAuditText: '已关闭',
-        auditBtnText: '启用',
-        unAuditBtnText: '关闭',
-    },
+        auditCode: 'CLOSE',
+        auditText: '已关闭',
+        unAuditCode: 'OPEN',
+        unAuditText: '已开启',
+        auditBtnText: '用',
+        unAuditBtnText: '启用',
+    }
 });

+ 128 - 97
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -5,115 +5,146 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=or_custname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:'/api/document/customer/dbfind',
+            'dbfindtrigger[name=or_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
-                        dbfinds:[{
-                            from:'id',to:'or_custid'
-                        },{
-                            from:'cu_code',to:'or_custcode'
-                        },{
-                            from:'cu_name',to:'or_custname'
+                        defaultCondition: "cu_statuscode='OPEN'",
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'or_custid'
+                        }, {
+                            from: 'cu_code',
+                            to: 'or_custcode'
+                        }, {
+                            from: 'cu_name',
+                            to: 'or_custname'
+                        }],
+                        dbtpls: [{
+                            field: 'cu_code',
+                            width: 100
+                        }, {
+                            field: 'cu_name',
+                            width: 100
                         }],
-                        dbtpls:[{
-                            field:'cu_code',width:100
-                        },{
-                            field:'cu_name',width:100
+                        dbSearchFields: [{
+                            emptyText: '输入客户编号或客户名称',
+                            xtype: "textfield",
+                            name: "search",
+                            getCondition: function (v) {
+                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                            },
+                            allowBlank: true,
+                            columnWidth: 0.25
                         }],
-                        dbColumns:[
-                            {
-                                conditionCode:'id',
-                                "text": "客户ID",
-                                "flex": 0,
-                                "dataIndex": "id",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
-                            },{
-                                conditionCode:'cu_code',
-                                "text": "客户编号",
-                                "flex": 1,
-                                "dataIndex": "cu_code",
-                                "width": 100,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                conditionCode:'cu_name',
-                                "text": "客户名称",
-                                "flex": 1,
-                                "dataIndex": "cu_name",
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                conditionCode:'cu_type',
-                                "text": "客户类型",
-                                "flex": 1,
-                                "dataIndex": "cu_type",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "业务员编号",
-                                "flex": 1,
-                                "dataIndex": "cu_sellercode",
-                                "width": 100
-                            }, {
-                                "text": "业务员",
-                                "flex": 1,
-                                "dataIndex": "cu_sellername",
-                                "width": 100
-                            }, {
-                                "text": "税率",
-                                "flex": 1,
-                                "dataIndex": "cu_taxrate",
-                                "width": 100
-                            }, {
-                                "text": "承付天数",
-                                "flex": 1,
-                                "dataIndex": "cu_promisedays",
-                                "width": 100
-                            }, {
-                                "text": "额度",
-                                "flex": 1,
-                                "dataIndex": "cu_credit",
-                                "width": 100
-                            }, {
-                                "text": "客户地址",
-                                "flex": 1,
-                                "dataIndex": "ca_address",
-                                "width": 250
-                            }]
-                    }) ;   
+                        dbColumns: [{
+                            conditionCode: 'id',
+                            "text": "客户ID",
+                            "flex": 0,
+                            "dataIndex": "id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 'cu_code',
+                            "text": "客户编号",
+                            "flex": 1,
+                            "dataIndex": "cu_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 'cu_name',
+                            "text": "客户名称",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode: 'cu_type',
+                            "text": "客户类型",
+                            "flex": 1,
+                            "dataIndex": "cu_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "业务员编号",
+                            "flex": 1,
+                            "dataIndex": "cu_sellercode",
+                            "width": 100
+                        }, {
+                            "text": "业务员",
+                            "flex": 1,
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "cu_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "cu_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "额度",
+                            "flex": 1,
+                            "dataIndex": "cu_credit",
+                            "width": 100
+                        }, {
+                            "text": "客户地址",
+                            "flex": 1,
+                            "dataIndex": "ca_address",
+                            "width": 250
+                        }]
+                    });
 
                 }
-          },
+            },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=or_bankname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:'/api/document/bankinformation/list',
-                        dbfinds:[{
-                            from:'bk_bankcode',to:'or_bankcode'
-                        },{
-                            from:'bk_bankname',to:'or_bankname'
-                        },{
-                            from:'id',to:'or_bankid'
-                    }],
-                        dbtpls:[{
-                            field:'bk_bankcode',width:100
-                        },{
-                            field:'bk_bankname',width:100
+            'dbfindtrigger[name=or_bankname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/bankinformation/list',
+                        dbfinds: [{
+                            from: 'bk_bankcode',
+                            to: 'or_bankcode'
+                        }, {
+                            from: 'bk_bankname',
+                            to: 'or_bankname'
+                        }, {
+                            from: 'id',
+                            to: 'or_bankid'
                         }],
-                        dbColumns:[{
+                        // defaultCondition: "bk_statuscode='OPEN'",
+                        dbtpls: [{
+                            field: 'bk_bankcode',
+                            width: 100
+                        }, {
+                            field: 'bk_bankname',
+                            width: 100
+                        }],
+                        dbSearchFields: [{
+                            emptyText: '输入银行账户编号或名称',
+                            xtype: "textfield",
+                            name: "search",
+                            getCondition: function (v) {
+                                return "CONCAT(bk_bankcode, bk_bankname) like '%" + v + "%'";
+                            },
+                            allowBlank: true,
+                            columnWidth: 0.25
+                        }],
+                        dbColumns: [{
                             "text": "账户ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": ""
-                        },{
+                        }, {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
@@ -144,7 +175,7 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             "width": 120,
                             "xtype": "datecolumn"
                         }]
-                    }) ;   
+                    });
 
                 }
             }

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

@@ -80,8 +80,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         }, {
             text: '备注',
             dataIndex: 'or_remark',
-            width: 250,
-            flex: 1
+            width: 250
         }],
         relativeColumn: []
     }

+ 13 - 92
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -31,77 +31,48 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
-                            name : "ve_name", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "CONCAT(ve_code, ve_name) like '%" + v + "%'";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         //放大镜窗口列表
                         dbColumns:[{
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "供应商编号",
-                            "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "供应商名称",
-                            "flex": 1,
-                            "width": 100,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "供应商类型",
-                            "flex": 0,
                             "dataIndex": "ve_type",
-                            "width": 80,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "税率",
-                            "flex": 0,
                             "dataIndex": "ve_taxrate",
                             "width": 80,
                             "xtype": "",
                             "items": null
                         },{
                             "text": "承付天数",
-                            "flex": 0,
                             "dataIndex": "ve_promisedays",
                             "width": 80,
                             "xtype": "",
                             "items": null
                         },{
                             "text": "纳税人识别号",
-                            "flex": 0,
                             "dataIndex": "ve_nsrzh",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "开户银行",
-                            "flex": 0,
                             "dataIndex": "ve_bankcode",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "银行账户",
-                            "flex": 0,
                             "dataIndex": "ve_bankaccount",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
                         }]
                     }) ;   
 
@@ -134,8 +105,6 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         },{
                             from:'pr_spec',to:'pr_spec'
                         }],
-                        //联想查询条件
-                        dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
                         //联想设置
                         dbtpls:[{
                             field:'pr_code',width:100
@@ -147,115 +116,67 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             emptyText:'输入物料编号或物料名称',
                             xtype : "textfield", 
                             name : "search", 
+                            getCondition: function(v) {
+                                return "CONCAT(pr_code, pr_detail) like '%"+v+"%'";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
-                            "text": "物料编号",       
+                            "text": "物料编号",
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "物料名称",
-                            "width": 100,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "规格",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "单位",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库id",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "pr_whid",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库编号",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "pr_whcode",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库",
-                            "flex": 0,
                             "dataIndex": "pr_whname",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "总库存数",
-                            "flex": 0,
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "类型",
-                            "flex": 0,
                             "dataIndex": "pr_kind",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "型号",
-                            "flex": 0,
                             "dataIndex": "pr_orispeccode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "品牌",
-                            "flex": 0,
                             "dataIndex": "pr_brand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "供应商",
-                            "flex": 0,
                             "dataIndex": "pr_vendname",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "最小包装",
-                            "flex": 0,
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "L/T",
-                            "flex": 0,
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }]
                     }) ;   
 

+ 10 - 0
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -27,6 +27,16 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或客户名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                             {
                                 conditionCode:'id',

+ 11 - 0
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -11,6 +11,7 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
+                        defaultCondition:"cu_statuscode='OPEN'",
                         dbfinds:[
                             {
                                 from:'id',to:'pi_custid'
@@ -27,6 +28,16 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或客户名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                         {
                             conditionCode:'id',

+ 11 - 0
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -12,6 +12,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                         dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
+                        defaultCondition:"cu_statuscode='OPEN'",
                         dbfinds:[
                         {
                             from:'id',to:'pi_custid'
@@ -28,6 +29,16 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或客户名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                             {
                                 "text": "客户ID",

+ 1 - 150
frontend/saas-web/app/view/sys/config/FormPanelController.js

@@ -5,48 +5,6 @@ Ext.define('saas.view.sys.config.FormPanelController', {
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     FormUtil: Ext.create('saas.util.FormUtil'),
 
-    auditBtnClick: function() {
-        var me = this,
-        form = me.getView(),
-        statusCodeField = form._statusCodeField,
-        viewModel = me.getViewModel(),
-        status = viewModel.get(statusCodeField);
-
-        status == 'AUDITED' ? me.unAudit() : me.audit();
-    },
-
-    add: function(){
-        var form = this.getView();
-        var id = form.xtype + '-add';
-        openTab(form.xtype,'新增' + form._title, id);
-    },
-    
-    delete: function(){
-        var me = this;
-        var form = this.getView();
-        var viewModel = me.getViewModel();
-        var id = viewModel.get(form._idField);
-        var code = viewModel.get(form._codeField);
-        if(id&&id.value!=0){
-            me.BaseUtil.request({
-                url: form._deleteUrl+id,
-                method: 'POST',
-            })
-            .then(function(localJson) {
-                if(localJson.success){
-                    var mainTab = Ext.getCmp('main-tab-panel');
-                    mainTab.getActiveTab().close();
-                    //解析参数
-                    showToast('删除成功');
-                }
-            })
-            .catch(function(res) {
-                console.error(res);
-                showToast('删除失败: ' + res.message);
-            });
-        }
-    },
-
     onSave: function() {
         var me = this,
         form = this.getView();
@@ -111,113 +69,6 @@ Ext.define('saas.view.sys.config.FormPanelController', {
             console.error(res);
             showToast('保存失败: ' + res.message);
         });
-    },
-
-    audit: function(){
-        var me = this,
-        form = this.getView(),
-        detailCount = form.detailCount,
-        viewModel = me.getViewModel(),
-        modelData = viewModel.getData();
-
-        var valid = form.isValid();
-
-        if(!valid) {
-            showToast('表单校验有误,请检查');
-            return false;
-        }
-        
-        if(form.getForm().wasDirty==false){
-            showToast('未修改数据,请修改后保存');
-            return false;
-        }
-        //form里面数据
-        var formData = form.getFormData();
-        var params = {
-            main: formData.main
-        };
-
-        for(var i = 0; i < detailCount; i++) {
-            params['items' + ( i + 1)] = formData['detail' + i];
-        }
-
-        // 只有一个从表时从表字段改为items
-        if(detailCount == 1) {
-            params.items = params.items1;
-            delete params.items1;
-        }
-
-        me.BaseUtil.request({
-            url: form._auditUrl,
-            params: JSON.stringify(params),
-            method: 'POST',
-        })
-        .then(function(localJson) {
-            if(localJson.success){
-                // 未保存直接审核会返回id
-                if(localJson.data) {
-                    var id = localJson.data.id;
-                    var code = localJson.data.code;
-                    
-                    form.initId = id;
-
-                    var newId = form.xtype + '-' + id;
-                    var newTitle = form._title + '(' + code + ')';
-
-                    refreshTabTitle(newId, newTitle);
-                }
-                form.FormUtil.loadData(form);
-                form.setEditable(false);
-                showToast('审核成功');
-            }
-        })
-        .catch(function(res) {
-            console.error(res);
-            showToast('审核失败: ' + res.message);
-        });
-    },
-    unAudit: function() {
-        var me = this;
-        var form = this.getView();
-        var viewModel = me.getViewModel();
-        var id = viewModel.get(form._idField);
-        var code = viewModel.get(form._codeField);
-        if(id&&id.value!=0){
-            me.BaseUtil.request({
-                url: form._unAuditUrl+id,
-                method: 'POST',
-            })
-            .then(function(localJson) {
-                if(localJson.success){
-                    //解析参数
-                    showToast('反审核成功');
-                    form.FormUtil.loadData(form);
-                }
-            })
-            .catch(function(res) {
-                console.error(res);
-                showToast('反审核失败: ' + res.message);
-            });
-        }
-    },
-    codeEditorBlur: function(e) {
-        var me = this,
-        viewModel = me.getViewModel(),
-        targetEl = event.target,
-        faEl = targetEl.getElementsByClassName('fa')[0];
-
-        if(faEl && faEl.classList.contains('fa-check-circle')) {
-            // 处理重复触发事件
-            // viewModel.set('base.codeEditable', false);
-        }else {
-            viewModel.set('base.codeEditable', false);
-        }
-    },
-    codeEditorClick: function() {
-        var me = this,
-        viewModel = me.getViewModel(),
-        codeEditable = viewModel.get('base.codeEditable');
-
-        viewModel.set('base.codeEditable', !codeEditable);
     }
+
 });