Browse Source

修改仓库模块前端界面

zhoudw 7 years ago
parent
commit
7250c3aa17

+ 2 - 2
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -227,7 +227,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
         xtype : "textfield", 
         name : "pi_remark", 
         fieldLabel : "备注", 
-        columnWidth : 0.75
+        columnWidth : 1
     }, {
         xtype : "textfield", 
         name : "pi_recordman", 
@@ -235,7 +235,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
         readOnly:true
     }, {
         xtype : "datefield", 
-        name : "pi_recorddate", 
+        name : "createTime", 
         fieldLabel : "录入日期",
         readOnly:true
     }, {

+ 30 - 24
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -15,17 +15,20 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
             'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
+                        //数据接口
                         dataUrl:'/api/document/vendor/list',
-                        // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
+                        defaultCondition:"ve_statuscode='OPEN'",
+                        //赋值 
                         dbfinds:[{
-                            from:'id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
                             from:'ve_name',to:'pi_vendname'
                         }],
+                        //联想设置
                         dbtpls:[{
                             field:'ve_code',width:100
                         },{
@@ -42,6 +45,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25
                         }],
+                        //放大镜窗口列表
                         dbColumns:[{
                             "text": "供应商ID",
                             "hidden": true,
@@ -72,7 +76,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "dataIndex": "ve_promisedays",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align:'end'
+                            align: 'end'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -91,24 +95,26 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pi_custname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
+            'dbfindtrigger[name=pi_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl: '/api/document/customer/list',
                         // dataUrl:'http://localhost:9480/customer/list',
-                        dbfinds:[{
-                            from:'id',to:'pi_custid'
-                        },{
-                            from:'cu_code',to:'pi_custcode'
-                        },{
-                            from:'cu_name',to:'pi_custname'
+                        dbfinds: [{
+                            from: 'id',to: 'pi_custid',ignore:true
+                        }, {
+                            from: 'cu_code',to: 'pi_custcode'
+                        }, {
+                            from: 'cu_name',to: 'pi_custname'
                         }],
-                        dbtpls:[{
-                            field:'cu_code',width:100
-                        },{
-                            field:'cu_name',width:100
+                        dbtpls: [{
+                            field: 'cu_code',
+                            width: 100
+                        }, {
+                            field: 'cu_name',
+                            width: 100
                         }],
                         defaultCondition:"cu_statuscode='OPEN'",
                         //放大镜窗口字段
@@ -119,7 +125,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%'";
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
                             }
                         }],
                         dbColumns:[{
@@ -161,10 +167,10 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             xtype: 'numbercolumn',
                             align:'end'
                         }]
-                    }) ;   
+                    });
 
                 }
-            },            
+            },           
             //放大镜赋值关系 以及 tpl模板
             'multidbfindtrigger[name=pd_prodcode]':{
                 beforerender:function(f){
@@ -292,9 +298,9 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         from:'wh_description',to:'pd_whname'
                     }],
                     dbtpls:[{
-                        field:'pd_whcode',width:100
+                        field:'wh_code',width:100
                     },{
-                        field:'pd_whname',width:100
+                        field:'wh_description',width:100
                     }],
                     dbSearchFields:[{
                         emptyText:'输入仓库编号或名称',
@@ -353,9 +359,9 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         from:'wh_description',to:'pd_inwhname'
                     }],
                     dbtpls:[{
-                        field:'pd_whcode',width:100
+                        field:'wh_code',width:100
                     },{
-                        field:'pd_whname',width:100
+                        field:'wh_description',width:100
                     }],
                     dbSearchFields:[{
                         emptyText:'输入仓库编号或名称',

+ 72 - 46
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -26,25 +26,38 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         allowBlank: true,
         columnWidth: 0.5
     }, {
-        xtype: 'textfield',
+        xtype: 'hidden',
         name: 'pi_vendcode',
         fieldLabel: '供应商编号',
         allowBlank: true,
         hidden:true,
         columnWidth: 0.25
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
         allowBlank: true,
         columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'pi_custcode',
+        fieldLabel: '客户编号',
+        allowBlank: true,
+        hidden:true,
+        columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
+        name: 'pi_custname',
+        fieldLabel: '客户名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'hidden',
         name: 'pd_prodcode',
         fieldLabel: '物料编号',
         showDetail: true
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pr_detail',
         fieldLabel: '物料名称',
         showDetail: true
@@ -53,6 +66,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         name: 'pi_statuscode',
         fieldLabel: '审核状态',
         allowBlank: true,
+        editable:false,
         columnWidth: 0.25,
         queryMode: 'local',
         displayField: 'pi_status',
@@ -84,92 +98,99 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
+            hidden:true,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
             width: 200
-        }, {
-            text: '单据状态',
-            dataIndex: 'pi_status',
-            width: 120
-        }, {
+        },{
             text: '单据类型',
             dataIndex: 'pi_class',
             width: 120
-        }, {
+        },{
             text: '单据日期',
             dataIndex: 'pi_date',
             xtype:'datecolumn',
             width: 200
         },{
-            text: '采购单号',
-            dataIndex: 'pi_pucode',
-            width: 200
+            text: '审核状态',
+            dataIndex: 'pi_status',
+            width: 120
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
             width: 120
         },{
-            text: '含税金额',
-            dataIndex: 'pi_total',
-            xtype:'numbercolumn',
+            text: '客户名称',
+            dataIndex: 'pi_custname',
             width: 120
         },{
-            text: '未税金额',
-            dataIndex: 'pi_nettotal',
-            xtype:'numbercolumn',
-            width: 120,
+            text: '制单人',
+            dataIndex: 'pi_recordman',
+            width: 120
+        },{
+            text: '审核人',
+            dataIndex: 'pi_auditman',
+            width: 120
+        },{
+            text: '备注',
+            dataIndex: 'pi_remark',
+            width: 200
         }],
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
-            text: '单据状态',
-            dataIndex: 'pi_status',
-            width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
             width: 200
         },{
-            text: '供应商名称',
-            dataIndex: 'pi_vendname',
+            text: '审核状态',
+            dataIndex: 'pi_status',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '客户编号',
+            dataIndex: 'pi_custcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '客户名称',
+            dataIndex: 'pi_custname',
             width: 120
         },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '验收数量',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 120
+        },{
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
+            width: 120
+        },{
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -178,10 +199,15 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
             xtype:'numbercolumn',
-            width: 120,
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
+            xtype:'numbercolumn',
+            width: 120
         }]
     }
 });

+ 88 - 8
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js

@@ -6,16 +6,16 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
         var me = this;
         this.control({
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pu_vendname]':{
+            'dbfindtrigger[name=pi_vendname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:'/api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
                         dbfinds:[{
-                            from:'ve_code',to:'pu_vendcode'
+                            from:'ve_code',to:'pi_vendcode'
                         },{
-                            from:'ve_name',to:'pu_vendname'
+                            from:'ve_name',to:'pi_vendname'
                         }],
                         dbtpls:[{
                             field:'ve_code',width:100
@@ -82,15 +82,19 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                 }
             },
             //放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]':{
+            'dbfindtrigger[name=pr_detail]':{
                 beforerender:function(f){
                     Ext.apply(f,{
+                        conditionCode:'pr_code',
                         dataUrl:'/api/document/product/list',
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
+                            from:'pr_detail',to:'pr_detail',
+                        },{
                             from:'pr_code',to:'pd_prodcode',
-                            from:'pr_unit',to:'pd_unit'
+                        }, {
+                            from:'pr_detail',to:'pr_detail'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
@@ -99,7 +103,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                         }],
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号、名称或规格',
+                            emptyText:'输入物料编号或名称',
                             xtype : "textfield", 
                             name : "search", 
                             width: 200,
@@ -173,11 +177,87 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                        }]
+                        }]   
                     }) ;   
 
                 }
-            }
+            },
+            'dbfindtrigger[name=pi_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        dataUrl: '/api/document/customer/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        dbfinds: [{
+                            from: 'id',to: 'pi_custid',ignore:true
+                        }, {
+                            from: 'cu_code',to: 'pi_custcode'
+                        }, {
+                            from: 'cu_name',to: 'pi_custname'
+                        }],
+                        dbtpls: [{
+                            field: 'cu_code',
+                            width: 100
+                        }, {
+                            field: 'cu_name',
+                            width: 100
+                        }],
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
+                            xtype : "textfield", 
+                            name : "cu_name", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],
+                        dbColumns:[{
+                            "text": "客户ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        },{
+                            "text": "客户编号",
+                            "dataIndex": "cu_code",
+                            "width": 200,
+                        }, {
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
+                            "dataIndex": "cu_name",
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        }]
+                    });
+
+                }
+            },                
         });
 
     }

+ 4 - 1
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -195,7 +195,10 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 width : 100.0,
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                    if(!v){
+                        return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:null;
+                    }
+                    return v;
                 }
             },            
             {

+ 2 - 2
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -83,9 +83,9 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             from:'wh_description',to:'mm_whname'
                         }],
                         dbtpls:[{
-                            field:'pd_whcode',width:100
+                            field:'wh_code',width:100
                         },{
-                            field:'pd_whname',width:100
+                            field:'wh_description',width:100
                         }],
                         dbSearchFields:[{
                             emptyText:'输入仓库编号或名称',

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

@@ -58,6 +58,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
+        editable:false,
         columnWidth: 0.25,
         queryMode: 'local',
         displayField: 'pi_status',

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

@@ -58,6 +58,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         bind: '{pi_statuscode}',
         fieldLabel: '审核状态',
         allowBlank: true,
+        editable:false,
         columnWidth: 0.25,
         queryMode: 'local',
         displayField: 'pi_status',