Browse Source

物料资料界面调整

rainco 7 years ago
parent
commit
cf14ce0850

+ 44 - 24
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -44,7 +44,6 @@ Ext.define('saas.view.document.product.BasePanel', {
     _formXtype:'document-product-formpanel',
     _title:'物料资料',
     _deleteUrl:'/api/document/product/delete/',
-    // _dataUrl:'http://192.168.253.31:9480/product/list',
     _batchOpenUrl:'/api/document/product/batchOpen',
     _batchCloseUrl:'/api/document/product/batchClose',
     _batchDeleteUrl:'/api/document/product/batchDelete',
@@ -62,32 +61,53 @@ Ext.define('saas.view.document.product.BasePanel', {
         },{
             text : "物料编号", 
             width : 200.0, 
-            dataIndex : "pr_code", 
-            xtype : "", 
-        }, 
-        {
+            dataIndex : "pr_code"
+        }, {
             text : "物料名称", 
             dataIndex : "pr_detail", 
-            width : 120.0, 
-            xtype : "", 
-        },
-        {
+            width : 120.0
+        }, {
+            text : "规格", 
+            dataIndex : "pr_spec"
+        }, {
+            text : "类型", 
+            dataIndex : "pr_kind"
+        }, {
+            text : "单位", 
+            dataIndex : "pr_unit"
+        }, {
+            text : "总库存数", 
+            dataIndex : "po_onhand",
+            xtype: 'numbercolumn'
+        }, {
+            text : "单位成本", 
+            dataIndex : "pr_standardprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "最新采购单价", 
+            dataIndex : "pr_purcprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "最新出库单价", 
+            dataIndex : "pr_saleprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "型号", 
+            dataIndex : "pr_orispeccode"
+        }, {
+            text : "品牌", 
+            dataIndex : "pr_brand"
+        }, {
+            text : "最小包装", 
+            dataIndex : "pr_zxbzs",
+            xtype: 'numbercolumn'
+        }, {
+            text : "L/T", 
+            dataIndex : "pr_leadtime",
+            xtype: 'numbercolumn'
+        }, {
             text : "状态", 
-            dataIndex : "pr_status", 
-            width : 120.0, 
-            xtype : ""
-        }, 
-        {
-            text : "状态码", 
-            dataIndex : "pr_statuscode", 
-            width : 0, 
-            xtype : ""
-        }, 
-        {
-            text : "物料种类", 
-            dataIndex : "pr_kind", 
-            width : 120.0, 
-            xtype : "",
+            dataIndex : "pr_status"
         }]
     },
 

+ 51 - 105
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -23,62 +23,51 @@ Ext.define('saas.view.document.product.FormPanel', {
 
     codeInHeader: false,
 
-
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',
         fieldLabel: 'id',
-        allowBlank: true,
-        columnWidth: 0.25
+        allowBlank: true
     },{
         xtype: 'textfield',
         name: 'pr_code',
         fieldLabel: '物料编号',
-        allowBlank: false,
-        columnWidth: 0.25
+        allowBlank: false
     },{
         xtype: 'textfield',
         name: 'pr_detail',
         fieldLabel: '物料名称',
-        allowBlank: false,
-        columnWidth: 0.25
+        allowBlank: false
     },{
         xtype: 'hidden',
         name: 'pr_status',
-        fieldLabel: '状态',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '状态'
     },{
         xtype: 'hidden',
         name: 'pr_statuscode',
-        fieldLabel: '状态码',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '状态码'
     },{
         xtype: 'textfield',
         name: 'pr_spec',
         fieldLabel: '规格',
-        allowBlank: false,
-        columnWidth: 0.25
-    },{  
+        allowBlank: false
+    },{
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/productunit/getCombo',
-        name : "pr_unit", 
-        fieldLabel : "单位", 
+        storeUrl:'/api/document/producttype/getCombo',
+        name : "pr_kind", 
+        fieldLabel : "类型", 
         allowBlank : false, 
-        columnWidth : 0.25,
-        editable:false,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料单位'
+                    title: '新增物料类型'
                 },
-                dataKind:'productunit',
-                belong:document.etc['productunit'],
+                dataKind:'productkind',
+                belong:document.etc['productkind'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -87,35 +76,25 @@ Ext.define('saas.view.document.product.FormPanel', {
             this.dialog.show();
         }
     },{
-        xtype : "dbfindtrigger",   
-        name : "pr_vendcode", 
-        fieldLabel : "供应商编号", 
-        allowBlank : true, 
-        columnWidth : 0.25, 
-    }, {
-        xtype : "textfield", 
-        name : "pr_vendname", 
-        fieldLabel : "供应商名称", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        xtype: 'textfield',
+        name: 'pr_orispeccode',
+        fieldLabel: '型号'
     },{
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/producttype/getCombo',
-        name : "pr_kind", 
-        fieldLabel : "类型", 
-        allowBlank : false, 
-        columnWidth : 0.25,
+        storeUrl:'/api/document/productbrand/getCombo',
+        name : "pr_brand", 
+        fieldLabel : "品牌", 
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料类型'
+                    title: '新增物料品牌'
                 },
-                dataKind:'productkind',
-                belong:document.etc['productkind'],
+                dataKind:'productbrand',
+                belong:document.etc['productbrand'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -123,30 +102,24 @@ Ext.define('saas.view.document.product.FormPanel', {
             });
             this.dialog.show();
         }
-    },{
-        xtype: 'textfield',
-        name: 'pr_orispeccode',
-        fieldLabel: '型号',
-        allowBlank: true,
-        columnWidth: 0.25
-    },{
+    },{  
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/productbrand/getCombo',
-        name : "pr_brand", 
-        fieldLabel : "物料品牌", 
-        allowBlank : true, 
-        columnWidth : 0.25,
+        storeUrl:'/api/document/productunit/getCombo',
+        name : "pr_unit", 
+        fieldLabel : "单位", 
+        allowBlank : false, 
+        editable:false,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料品牌'
+                    title: '新增物料单位'
                 },
-                dataKind:'productbrand',
-                belong:document.etc['productbrand'],
+                dataKind:'productunit',
+                belong:document.etc['productunit'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -154,103 +127,76 @@ Ext.define('saas.view.document.product.FormPanel', {
             });
             this.dialog.show();
         }
-    },{
-        xtype : "hidden", 
-        name : "pr_vendid", 
-        bind : "{pr_vendid}", 
-        fieldLabel : "供应商ID", 
-        allowBlank : true, 
-        columnWidth : 0
     },{
         xtype : "hidden", 
         name : "pr_whid", 
-        bind : "{pr_whid}", 
-        fieldLabel : "仓库ID", 
-        allowBlank : true, 
-        columnWidth : 0
+        fieldLabel : "仓库ID"
     },{  
         xtype : "dbfindtrigger",     
         name : "pr_whcode", 
-        bind : "{pr_whcode}", 
         fieldLabel : "仓库编号", 
-        allowBlank : true, 
-        columnWidth : 0.25, 
     }, {
         xtype : "textfield", 
         name : "pr_whname", 
         fieldLabel : "仓库名称", 
         allowBlank : true, 
         columnWidth : 0.25
+    },{
+        xtype : "hidden", 
+        name : "pr_vendid", 
+        fieldLabel : "供应商ID", 
+        columnWidth : 0
+    },{
+        xtype : "dbfindtrigger",   
+        name : "pr_vendcode", 
+        fieldLabel : "供应商编号"
+    }, {
+        xtype : "textfield", 
+        name : "pr_vendname", 
+        fieldLabel : "供应商名称"
     },{
         xtype : "numberfield", 
-        bind : "{pr_standardprice}",
         name : "pr_standardprice", 
         fieldLabel : "标准单价", 
         allowBlank : true, 
         columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         ignore:true,
         readOnly:true,
         xtype : "numberfield", 
-        bind : "{pr_purcprice}",
         name : "pr_purcprice", 
         fieldLabel : "最新采购单价", 
         allowBlank : true, 
         columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         ignore:true,
         readOnly:true,
         xtype : "numberfield", 
         name : "pr_saleprice", 
         fieldLabel : "最新出货单价", 
-        allowBlank : true, 
-        columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         xtype : "numberfield", 
         name : "pr_zxbzs", 
         fieldLabel : "最小包装数", 
         minValue:0,
         decimalPrecision: 0,
-        allowBlank : true, 
-        columnWidth : 0.25
+        allowBlank : true
     },{  
         hidden:true,
         xtype : "datefield", 
         name : "createTime", 
-        fieldLabel : "创建时间", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        fieldLabel : "创建时间"
     },{  
         hidden:true,
         xtype : "datefield", 
         name : "updateTime", 
-        fieldLabel : "更新时间", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        fieldLabel : "更新时间"
     }],
 
     defaultButtons:[{

+ 0 - 2
frontend/saas-web/app/view/stock/report/ProdinoutCount.js

@@ -24,11 +24,9 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
         fieldLabel: '物料编号',
         columnWidth: 0.2
     }, {
-        //xtype: 'datefield',
         xtype: 'monthdatefield',
         name: 'pwm_yearmonth',
         fieldLabel: '单据日期',
-       defaultValue: new Date(),
         columnWidth: 0.2
     }],
     reportColumns: [{