Browse Source

修改采购模块

zhoudw 7 years ago
parent
commit
a2251b900c

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

@@ -94,6 +94,8 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         // dataUrl:'http://192.168.253.31:9480/product/getProductsByCondition',
                         // dataUrl:'http://localhost:9480/product/list',
                         dataUrl: '/api/document/product/list',
+                        addXtype: 'document-product-formpanel',
+                        addTitle: '物料资料',
                         defaultCondition:"pr_statuscode='OPEN'",
                         //放大镜赋值设置
                         dbfinds:[{

+ 62 - 68
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -16,11 +16,11 @@ Ext.define('saas.view.stock.make.FormPanel', {
      _statusCodeField: 'ma_statuscode',
      _relationColumn: 'mm_maid',
 
-     _readUrl:'/api/purchase/purchase/read/',
-     _saveUrl:'/api/purchase/purchase/save',
-     _auditUrl:'/api/purchase/purchase/audit',
-     _deleteUrl:'/api/purchase/purchase/delete/',
-     _turnInUrl:'/api/purchase/prodinout/turnProdin/',
+     _readUrl:'/api/storage/make/read/',
+     _saveUrl:'/api/storage/make/save',
+     _auditUrl:'/api/storage/make/audit',
+    _unAuditUrl: '/api/storage/make/unAudit/',
+     _deleteUrl:'/api/storage/make/delete/',
      initId:0,
  
      toolBtns: [],
@@ -82,16 +82,22 @@ Ext.define('saas.view.stock.make.FormPanel', {
         fieldLabel : "仓库id",
         columnWidth: 0.2
     },{
-        xtype : "textfield", 
+        xtype : "hidden",
         name : "ma_whcode", 
-        fieldLabel : "仓库",
+        fieldLabel : "仓库编号",
         columnWidth: 0.2
     },{
+        xtype : "dbfindtrigger",
+        name : "ma_whname",
+        fieldLabel : "仓库名称",
+        columnWidth: 0.2
+        },
+        {
         name : "detailGridField", 
         xtype : "detailGridField", 
-        storeModel:'saas.model.document.Product',
-        detnoColumn:  'pd_detno',
-        deleteDetailUrl:'/api/purchase/purchase/deleteDetail/',
+        storeModel:'saas.model.stock.Makematerial',
+        detnoColumn:  'mm_detno',
+        deleteDetailUrl:'/api/storage/make/deleteDetail/',
         columns : [
             {
                 text : "id", 
@@ -120,25 +126,36 @@ Ext.define('saas.view.stock.make.FormPanel', {
                     queryMode : "local", 
                     store : null, 
                     valueField : "value", 
-                    xtype : "dbfindtrigger"
+                    xtype : "multidbfindtrigger"
                 }
             },
             {
                 text : "名称", 
                 dataIndex : "pr_detail",
+                width : 100.0,
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
             {
                 text : "规格", 
                 dataIndex : "pr_spec",
+                width : 100.0,
                 ignore:true,
                 renderer: function (v, m, r) {
-                    return r.data["product"]?r.data["product"][m.column.dataIndex]:'';
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
                 }
             },
+            {
+                text : "单位", 
+                dataIndex : "pr_unit",
+                width : 100.0,
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:'';
+                }
+            },            
             {
                 text : "数量", 
                 dataIndex : "pd_qty", 
@@ -150,69 +167,46 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
+            },{
+                text : "仓库id",
+                dataIndex : "mm_whid",
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
-                text : "已转数", 
-                dataIndex : "pd_yqty", 
-                editor : {
-                    xtype : "numberfield"
-                },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                text : "仓库编号",
+                dataIndex : "mm_whcode",
+                hidden:true
             },
             {
-                text : "单价", 
-                editor : {
-                    xtype : "numberfield"
-                },
-                format:'0,000.00',
-                dataIndex : "pd_price", 
-                width : 120.0, 
-                xtype : "numbercolumn",
+                text : "仓库",
+                dataIndex : "mm_whname",
+                width : 120.0,
                 items : null,
-                summaryType: 'sum'
-            }, 
-            {
-                text : "税率", 
                 editor : {
-                    xtype : "numberfield"
-                },
-                dataIndex : "pd_taxrate", 
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
-            },
-            {
-                text : "含税金额", 
-                dataIndex : "pd_total", 
-                width : 120.0, 
-                xtype : "numbercolumn"
-            }, 
-            {
-                text : "未税金额", 
-                dataIndex : "pd_taxtotal", 
-                xtype : "numbercolumn"
-            },{
-                text : "需求日期", 
-                dataIndex : "pd_delivery", 
-                flex : 1.0, 
-                xtype:'datecolumn',
-                editor : {
-                    xtype : "datefield",
-                    editable : true, 
-                    hideTrigger : false
+                    displayField : "display",
+                    editable : true,
+                    format : "",
+                    hideTrigger : false,
+                    maxLength : 100.0,
+                    minValue : null,
+                    positiveNum : false,
+                    queryMode : "local",
+                    store : null,
+                    valueField : "value",
+                    xtype : "dbfindtrigger"
                 }
-            },
-            {
-                text : "关联销售单号", 
-                dataIndex : "pd_salecode", 
+            },{
+                text : "替代料",
+                dataIndex : "mm_repprodcode",
+                width : 200.0,
+                hidden:true
+            }, {
+                text : "备注",
+                dataIndex : "mm_remark",
                 width : 120.0,
-                flex : 1.0
-            }
-        ]
+                hidden:true
+            }]
     },{
         xtype : "datefield", 
         name : "createTime", 

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

@@ -5,70 +5,70 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         var me = this;
         this.control({
             //主表单选放大镜模板
-            'dbfindtrigger[name=pu_vendcode]':{
-                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_name',to:'pu_vendname'
-                        }],
-                        //联想设置
-                        dbtpls:[{
-                            field:'ve_code',width:100
-                        },{
-                            field:'ve_name',width:100
-                        }],
-                        //联想查询条件
-                        dbCondition:"CONCAT(ve_code, ve_name) like '{0}%'",
-                        //放大镜窗口字段
-                        dbSearchFields:[{
-                            xtype : "textfield", 
-                            name : "ve_name", 
-                            conditionExpression:"ve_name like '{0}%'",//传入后台条件  替换占位符
-                            fieldLabel : "供应商名称", 
-                            columnWidth : 0.25
-                        }],
-                        //放大镜窗口列表
-                        dbColumns:[{
-                            "text": "供应商ID",
-                            "flex": 0,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "供应商编号",
-                            "flex": 1,
-                            "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "供应商名称",
-                            "flex": 1,
-                            "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "供应商类型",
-                            "flex": 0,
-                            "dataIndex": "ve_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
-                    }) ;   
+            // 'dbfindtrigger[name=pu_vendcode]':{
+            //     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_name',to:'pu_vendname'
+            //             }],
+            //             //联想设置
+            //             dbtpls:[{
+            //                 field:'ve_code',width:100
+            //             },{
+            //                 field:'ve_name',width:100
+            //             }],
+            //             //联想查询条件
+            //             dbCondition:"CONCAT(ve_code, ve_name) like '{0}%'",
+            //             //放大镜窗口字段
+            //             dbSearchFields:[{
+            //                 xtype : "textfield", 
+            //                 name : "ve_name", 
+            //                 conditionExpression:"ve_name like '{0}%'",//传入后台条件  替换占位符
+            //                 fieldLabel : "供应商名称", 
+            //                 columnWidth : 0.25
+            //             }],
+            //             //放大镜窗口列表
+            //             dbColumns:[{
+            //                 "text": "供应商ID",
+            //                 "flex": 0,
+            //                 "dataIndex": "ve_id",
+            //                 "width": 0,
+            //                 "xtype": "",
+            //                 "items": null
+            //             },{
+            //                 "text": "供应商编号",
+            //                 "flex": 1,
+            //                 "dataIndex": "ve_code",
+            //                 "width": 100,
+            //                 "xtype": "",
+            //                 "items": null
+            //             }, {
+            //                 "text": "供应商名称",
+            //                 "flex": 1,
+            //                 "dataIndex": "ve_name",
+            //                 "xtype": "",
+            //                 "items": null
+            //             }, {
+            //                 "text": "供应商类型",
+            //                 "flex": 0,
+            //                 "dataIndex": "ve_type",
+            //                 "width": 200,
+            //                 "xtype": "",
+            //                 "items": null
+            //             }]
+            //         }) ;   
 
-                }
-            },
+            //     }
+            // },
             //从表单选放大镜赋值关系 以及 tpl模板
-            'dbfindtrigger[name=pd_prodcode]':{
+            'dbfindtrigger[name=mm_prodcode]':{
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
@@ -77,7 +77,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         addTitle: '物料资料',
                         //放大镜赋值设置
                         dbfinds:[{
-                            from:'pr_code',to:'pd_prodcode'
+                            from:'pr_code',to:'mm_prodcode'
                         },{
                             from:'pr_unit',to:'pd_unit'
                         }],

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

@@ -99,12 +99,12 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         columnWidth: 1
     }],
     queryGridConfig: {
-        idField: 'pu_id',
-        codeField: 'pu_code',
-        addTitle: '采购单',
-        addXtype: 'purchase-purchase-formpanel',
+        idField: 'id',
+        codeField: 'ma_code',
+        addTitle: '制造单',
+        addXtype: 'stock-make-formpanel',
         defaultCondition:'',
-        baseVastUrl: '/api/purchase/purchase/',
+        baseVastUrl: '/api/storage/make/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'pu_id',