Browse Source

修改采购,仓库模块前端

zhoudw 7 years ago
parent
commit
d44593cc74

+ 1 - 1
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductDTO.java

@@ -40,7 +40,7 @@ public class ProductDTO implements Serializable {
     protected Date updateTime;
     protected String updaterName;
     //productonhand
-    private Long po_onhand;
+    private Double po_onhand;
 
 
 

+ 1 - 1
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -45,7 +45,7 @@
         <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
         <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
         <!--productonhand-->
-        <result column="po_onhand" property="po_onhand" jdbcType="INTEGER" />
+        <result column="po_onhand" property="po_onhand" jdbcType="DOUBLE" />
         <!--productonhand-->
         <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
         <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />

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

@@ -179,11 +179,18 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
                             align:'end'
                         },{
                             "text": "类型",

+ 8 - 1
frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js

@@ -144,12 +144,19 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align: 'end'
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

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

@@ -172,11 +172,18 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
                             align:'end'
                         },{
                             "text": "类型",

+ 8 - 1
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -148,12 +148,19 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align: 'end'
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

+ 7 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -171,11 +171,18 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
                             align:'end'
                         },{
                             "text": "类型",

+ 8 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -144,12 +144,19 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align: 'end'
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

+ 7 - 0
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -251,11 +251,18 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
                             align:'end'
                         },{
                             "text": "类型",

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

@@ -148,12 +148,19 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align: 'end'
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

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

@@ -145,7 +145,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         },{
                             from:'pr_spec',to:'pr_spec'
                         },{
-                            from:'pr_unit',to:'pr_spec'
+                            from:'pr_unit',to:'pr_unit'
                         }],
                         //联想设置
                         dbtpls:[{
@@ -201,11 +201,18 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
                             align:'end'
                         },{
                             "text": "类型",
@@ -359,106 +366,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                 }
             },
             //从表多选放大镜赋值关系 以及 tpl模板
-            'multidbfindtrigger[name=pd_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        //数据接口
-                        dataUrl:'/api/document/product/list',
-                        addXtype: 'document-product-formpanel',
-                        addTitle: '物料资料',
-                        //放大镜赋值设置
-                        dbfinds:[{
-                            from:'pr_code',to:'pd_prodcode'
-                        },{
-                            from:'pr_unit',to:'pd_unit'
-                        }],
-                        //联想设置
-                        dbtpls:[{
-                            field:'pr_code',width:100
-                        },{
-                            field:'pr_detail',width:100
-                        }],
-                        defaultCondition:"pr_statuscode='OPEN'",
-                        //窗口字段设置
-                        dbSearchFields:[{
-                            emptyText:'输入物料编号、名称或规格',
-                            xtype : "textfield", 
-                            name : "search", 
-                            width: 200,
-                            getCondition: function(v) {
-                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
-                            },
-                            allowBlank : true, 
-                            columnWidth : 0.25
-                        }],
-                        //窗口列设置
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "hidden": true,
-                            "dataIndex": "id",
-                        }, {
-                            "text": "物料编号",       
-                            "dataIndex": "pr_code",
-                            "width": 200,
-                        }, {
-                            "text": "物料名称",
-                            "width": 200,
-                            "dataIndex": "pr_detail",
-                        }, {
-                            "text": "规格",
-                            "dataIndex": "pr_spec",
-                            "width": 100,
-                        }, {
-                            "text": "单位",
-                            "dataIndex": "pr_unit",
-                            "width": 100,
-                        },{
-                            "text": "仓库id",
-                            "dataIndex": "pr_whid",
-                            "hidden": true,
-                        },{
-                            "text": "仓库编号",
-                            "dataIndex": "pr_whcode",
-                            "hidden": true,
-                        },{
-                            "text": "仓库",
-                            "dataIndex": "pr_whname",
-                            "width": 200,
-                        },{
-                            "text": "总库存数",
-                            "dataIndex": "po_onhand",
-                            "width": 100,
-                            align: 'end'
-                        },{
-                            "text": "类型",
-                            "dataIndex": "pr_kind",
-                            "width": 100,
-                        },{
-                            "text": "型号",
-                            "dataIndex": "pr_orispeccode",
-                            "width": 100,
-                        },{
-                            "text": "品牌",
-                            "dataIndex": "pr_brand",
-                            "width": 100,
-                        },{
-                            "text": "供应商",
-                            "dataIndex": "pr_vendname",
-                            "width": 100,
-                        },{
-                            "text": "最小包装",
-                            "dataIndex": "pr_zxbzs",
-                            "width": 100,
-                            align: 'end'
-                        },{
-                            "text": "L/T",
-                            "dataIndex": "pr_leadtime",
-                            "width": 100,
-                        }]
-                    }) ;   
 
-                }
-            }
         });
     },
 

+ 23 - 3
frontend/saas-web/app/view/stock/make/QueryPanel.js

@@ -20,11 +20,31 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         name: 'ma_code',
         fieldLabel: '单据编号'
     },{
-        xtype: 'textfield',
+        xtype: 'combobox',
         name: 'ma_type',
-        fieldLabel: '类型'
+        fieldLabel: '类型',
+        allowBlank: true,
+        editable:false,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'name',
+        valueField: 'value',
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['name', 'value'],
+            data: [
+                ["组装", "组装"],
+                ["拆件", "拆件"]
+            ]
+        }),
+        getCondition: function(value) {
+            if(value == 'ALL') {
+                return '1=1';
+            }else {
+                return 'ma_type=\'' + value + '\'';
+            }
+        }
     },{
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'ma_prodcode',
         fieldLabel: '产品编号'
     }],

+ 69 - 1
frontend/saas-web/app/view/stock/make/QueryPanelController.js

@@ -182,7 +182,75 @@ Ext.define('saas.view.stock.make.QueryPanelController', {
                     }) ;   
 
                 }
-            }
+            },
+            'dbfindtrigger[name=ma_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //数据接口
+                        dataUrl:'/api/document/bom/list',
+                        addXtype: 'document-bom-formpanel',
+                        addTitle: 'BOM资料',
+                        //放大镜赋值设置
+                        dbfinds:[{
+                            from:'bo_motherid',to:'ma_prodid'
+                        },{
+                            from:'bo_mothercode',to:'ma_prodcode'
+                        },{
+                            from:'bo_mothername',to:'ma_proddetail'
+                        },{
+                            from:'pr_spec',to:'ma_prodspec'
+                        },{
+                            from:'bo_version',to:'ma_version'
+                        }],
+                        //联想设置
+                        dbtpls:[{
+                            field:'bo_mothercode',width:100
+                        },{
+                            field:'bo_mothername',width:100
+                        }],
+                        aftertrigger:function(f,record){
+                            me.getBomData(record.data.id)
+                        },
+                        defaultCondition:"bo_statuscode='OPEN'",
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入BOM编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(bo_mothercode) like '%"+v.toUpperCase()+"%' or upper(bo_mothername) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        //窗口列设置
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "产品编号",       
+                            "dataIndex": "bo_mothercode",
+                            "width": 200,
+                        }, {
+                            "text": "产品名称",
+                            "width": 200,
+                            "dataIndex": "bo_mothername",
+                        }, {
+                            "text": "产品规格",
+                            "width": 200,
+                            "dataIndex": "pr_spec",
+                        }, {
+                            "text": "版本",
+                            "width": 200,
+                            "dataIndex": "bo_version",
+                        }]
+                    }) ;   
+
+                }
+            },
+
         });
 
     }

+ 8 - 1
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -251,12 +251,19 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align: 'end'
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

+ 8 - 1
frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js

@@ -148,12 +148,19 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align: 'end'
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

+ 7 - 0
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -242,11 +242,18 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
                             align:'end'
                         },{
                             "text": "类型",

+ 8 - 1
frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

@@ -148,12 +148,19 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                             "text": "仓库",
                             "dataIndex": "pr_whname",
                             "width": 200,
+                            "hidden": true
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align: 'end'
+                            renderer : function(v) {
+                                var arr = (v + '.').split('.');
+                                var xr = (new Array(arr[1].length)).fill('0');
+                                var format = '0,000.' + xr.join();
+                                return Ext.util.Format.number(v, format);
+                            },                            
+                            align:'end'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",