Pman.Dialog.XtupleItem.bjs
authorEdward <edward@roojs.com>
Fri, 10 Oct 2014 07:13:48 +0000 (15:13 +0800)
committerEdward <edward@roojs.com>
Fri, 10 Oct 2014 07:13:48 +0000 (15:13 +0800)
Pman.Dialog.XtupleItem.js

Pman.Dialog.XtupleItem.bjs
Pman.Dialog.XtupleItem.js

index a5ec59d..1dd58a5 100644 (file)
                                         {
                                             "listeners" : {
                                                 "render" : "function (_self)\n{\n    _this.partsBox = _self;\n}",
-                                                "select" : "function (combo, record, index)\n{\n    Roo.log('record');\n    Roo.log(record);\n    var id = _this.form.findField('id').getValue() * 1;\n    \n    if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || id < 1){\n        return;\n    }\n    \n    var err = false;\n\n    _this.partsgrid.ds.each(function(d){\n        if(record.data.id == d.data.bomitem_item_id){\n            err = true;\n        }\n    });\n\n    if(err){\n        Roo.MessageBox.alert('Error', record.data.item_number + ' already exists!');\n        _this.partsBox.reset();\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/cal_event_focus.php',\n        method : 'POST',\n        params : {\n            cal_event_id : event_id,\n            interest_id : record.data.id\n        }, \n        success : function(res) {\n            _this.focusBox.reset();\n            _this.fgrid.footer.onClick('first');\n        }\n    }); \n}"
+                                                "select" : "function (combo, record, index)\n{\n    Roo.log('record');\n    Roo.log(record);\n    var id = _this.form.findField('id').getValue() * 1;\n    \n    if(typeof(record) == 'undefined' || !record || record.data.id * 1 < 1 || id < 1){\n        return;\n    }\n    \n    var err = false;\n\n    _this.partsgrid.ds.each(function(d){\n        if(record.data.id == d.data.bomitem_item_id){\n            err = true;\n        }\n    });\n\n    if(err){\n        Roo.MessageBox.alert('Error', record.data.item_number + ' already exists!');\n        _this.partsBox.reset();\n        return;\n    }\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/bomitem.php',\n        method : 'POST',\n        params : {\n            bomitem_parent_item_id : id,\n            bomitem_item_id : record.data.id\n        }, \n        success : function(res) {\n            _this.focusBox.reset();\n            _this.fgrid.footer.onClick('first');\n        }\n    }); \n}"
                                             },
                                             "alwaysQuery" : true,
                                             "triggerAction" : "all",
index 3872e6a..31fa65b 100644 (file)
@@ -1039,11 +1039,11 @@ Pman.Dialog.XtupleItem = {
                                               }
                                               
                                               new Pman.Request({
-                                                  url : baseURL + '/Roo/cal_event_focus.php',
+                                                  url : baseURL + '/Roo/bomitem.php',
                                                   method : 'POST',
                                                   params : {
-                                                      cal_event_id : event_id,
-                                                      interest_id : record.data.id
+                                                      bomitem_parent_item_id : id,
+                                                      bomitem_item_id : record.data.id
                                                   }, 
                                                   success : function(res) {
                                                       _this.focusBox.reset();