Explorar o código

制造单审核

zhoudw %!s(int64=7) %!d(string=hai) anos
pai
achega
8c3b7c0524

+ 32 - 23
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -178,34 +178,43 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                 }
             },           
             //放大镜赋值关系 以及 tpl模板
-            'multidbfindtrigger[name=pd_prodcode]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:'/api/document/product/list',
+            'multidbfindtrigger[name=pd_prodcode]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/product/list',
                         // dataUrl:'http://localhost:9480/product/list',
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
-                        dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
-                        },{
-                            from:'pr_code',to:'pd_prodcode'                          
-                        },{
-                            from:'pr_detail',to:'pr_detail'
-                        },{
-                            from:'pr_spec',to:'pr_spec'
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'pd_prodid',ignore:true
+                        }, {
+                            from: 'pr_code',
+                            to: 'pd_prodcode'
+                        }, {
+                            from: 'pr_detail',
+                            to: 'pr_detail'
+                        }, {
+                            from: 'pr_spec',
+                            to: 'pr_spec'
                         },{
                             from:'pr_whid',to:'pd_whid'
                         },{
                             from:'pr_whcode',to:'pd_whcode'
                         },{
                             from:'pr_whname',to:'pd_whname'
-                        }],
-                        dbtpls:[{
-                            field:'pr_code',width:100
-                        },{
-                            field:'pr_detail',width:100
                         },{
-                            field:'pr_spec',width:100
+                            from:'pr_purcprice',to:'pd_orderprice'
+                        }],
+                        dbtpls: [{
+                            field: 'pr_code',
+                            width: 100
+                        }, {
+                            field: 'pr_detail',
+                            width: 100
+                        }, {
+                            field: 'pr_spec',
+                            width: 100
                         }],
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
@@ -218,7 +227,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             },
                             allowBlank : true, 
                             columnWidth : 0.25
-                        }],                   
+                        }],                        
                         dbColumns:[{
                             "text": "物料ID",
                             "hidden": true,
@@ -259,7 +268,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             xtype: 'numbercolumn',
                             renderer : function(v) {
                                 var arr = (v + '.').split('.');
-                                var xr = (new Array(arr[1].length)).fill('0');
+                                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
                                 var format = '0,000.' + xr.join();
                                 return Ext.util.Format.number(v, format);
                             },                            
@@ -285,13 +294,13 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
                             xtype: 'numbercolumn',
-                            align:'end'
+                            align: 'end'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",
                             "width": 100,
                         }]
-                    }) ;   
+                    });
 
                 }
             },
@@ -355,7 +364,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                 }) ;   
 
             }
-        },           
+            },           
         //放大镜赋值关系 以及 tpl模板
         'dbfindtrigger[name=pd_inwhname]':{
             beforerender:function(f){