1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.XtuplePurchaseOrderEdit = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
35 this.layout.getRegion('center').showPanel(0);
43 title : "Change Location",
47 xtype: 'ContentPanel',
55 actioncomplete : function(_self,action)
57 if (action.type == 'setdata') {
58 if(_this.data.pohead_id){
59 _this.dialog.el.mask("Loading");
60 this.load({ method: 'GET', params: { '_id' : _this.data.pohead_id }});
64 if (action.type == 'load') {
65 _this.dialog.el.unmask();
68 if (action.type =='submit') {
70 _this.dialog.el.unmask();
74 _this.callback.call(_this, _this.form.getValues());
80 rendered : function (form)
86 style : 'margin:10px;',
87 url : baseURL + '/Roo/pohead.php',
93 name : 'pohead_number',
101 displayField : 'fname',
103 fieldLabel : 'Change Type',
104 hiddenName : 'change_type',
107 name : 'change_type_name',
108 tpl : '<div class="x-grid-cell-text x-btn button"><b>{fname}</b> </div>',
109 triggerAction : 'all',
111 valueField : 'ftype',
114 xtype: 'SimpleStore',
117 [ 'A', "Change All Location"],
118 [ 'E', "Change The Location Of PO And un-signed Item"]
121 fields : [ 'ftype', 'fname']
128 displayField : 'location_name',
130 emptyText : "Select a location",
131 fieldLabel : 'Location',
132 forceSelection : true,
133 hiddenName : 'pohead_location_id',
135 loadingText : "Searching...",
137 name : 'pohead_location_id_location_name',
139 qtip : "Select terms",
140 queryParam : 'query[location_name]',
141 selectOnFocus : true,
142 tpl : '<div class="x-grid-cell-text x-btn button"><b>{location_name}</b> </div>',
143 triggerAction : 'all',
145 valueField : 'location_id',
151 beforeload : function (_self, o){
152 o.params = o.params || {};
154 o.params.location_netable = 1;
158 sortInfo : { direction : 'ASC', field: 'location_name' },
163 url : baseURL + '/Roo/location.php'
170 totalProperty : 'total',
171 fields : [{"name":"location_id","type":"int"},"location_name"]
186 xtype: 'LayoutRegion',
194 click : function (_self, e)
205 click : function (_self, e)
210 // _this.dialog.el.mask("Saving");
211 _this.form.doAction("submit");