Project

General

Profile

Feature #2007 » ViewExportMDBIAPerawatan.js

Tri Rizqiaty, 02/20/2023 01:52 PM

 
1
Ext.define('MinovaES.view.masterdata.ViewExportMDBIAPerawatan', {
2
    extend: 'Ext.panel.Panel',
3
    alias: 'widget.masterdata-ViewExportMDBIAPerawatan',
4
    requires: [
5
		'MinovaES.controller.masterdata.CtrlExportMD',
6
    ],
7
    controller: 'CtrlExportMD',
8
    renderTo: 'exportMD',
9
    anchor: '50%',
10
    initComponent: function () {
11
        var me = this;
12
        var LangId = localStorage.LangId;
13
        Ext.applyIf(me, {
14
            items: [{
15
                xtype: 'form',
16
                bodyPadding: 30,
17
                collapsible: true,
18
                name: 'ExportMasterData',
19
                title: 'Export Master Data - Perawatan',
20
                buttons: [{
21
                    xtype: 'button',
22
                    text: 'Download Template',
23
                    action: 'DownloadTemplat',
24
                    name: 'DownloadTemplat',
25
                }, {
26
                    xtype: 'button',
27
                    text: 'Export',
28
                    action: 'Export',
29
                    name: 'Export',
30
                }],
31
                items: [{
32
                    xtype: 'textfield',
33
                    name: 'Module',
34
                    fieldLabel: 'Module Type',
35
                    value: 'PR',
36
                    hidden: true
37
                }, {
38
                    xtype: "minovacombobox",
39
                    fieldLabel: "Master Data",
40
                    name: "Table",
41
                    allowBlank: false,
42
                    tableName: "PCMEPMDLIST",
43
                    param: 'ModuleType[equal]PR,Language[equal]' + LangId,
44
                    displayField: 'LabelName',
45
                    valueField: 'TableName',
46
                }, {
47
                    items: [{
48
                        xtype: 'fieldcontainer',
49
                        name: 'Date',
50
                        fieldLabel: 'Date',
51
                        labelWidth: 100,
52
                        layout: 'hbox',
53
                        items: [{
54
                            xtype: 'datefield',
55
                            flex: 1,
56
                            name: 'periodSt',
57
                            format: 'd/m/Y',
58
                            submitFormat: 'Ymd'
59
                        }, {
60
                            items: [{
61
                                xtype: 'fieldcontainer',
62
                                name: 'Todate',
63
                                margin: '0 0 0 16',
64
                                fieldLabel: 'To',
65
                                labelWidth: 30,
66
                                layout: 'hbox',
67
                                items: [{
68
                                    xtype: 'datefield',
69
                                    name: 'periodEnd',
70
                                    flex: 1,
71
                                    format: 'd/m/Y',
72
                                    submitFormat: 'Ymd'
73
                                }]
74
                            }],
75
                        }]
76
                    }],
77
                }, {
78
                    xtype: "lookupemployee",
79
                    fieldLabel: 'Employee ID From',
80
                    fieldname: 'empStart',
81
                    tableName: 'PDSEMP0002',
82
                    name: 'empStart',
83
                    anchor: '50%',
84
                    triggerCls: 'x-form-search-trigger',
85
                    //allowBlank: false,
86
                }, {
87
                    xtype: "lookupemployee",
88
                    fieldLabel: 'Employee ID To',
89
                    fieldname: 'empEnd',
90
                    tableName: 'PDSEMP0002',
91
                    name: 'empEnd',
92
                    anchor: '50%',
93
                    triggerCls: 'x-form-search-trigger',
94
                    //allowBlank: false,
95
                    //items: [{
96
                    //    xtype: 'fieldcontainer',
97
                    //    //name: 'EmployeeID',
98
                    //    fieldLabel: 'Employee ID',
99
                    //    labelWidth: 100,
100
                    //    layout: 'hbox',
101
                    //    items: [{
102
                    //        xtype: 'textfield',
103
                    //        name: 'empStart',
104
                    //        flex: 1
105
                    //        //xtype: "minovalookupgrid",
106
                    //        //fieldLabel: "EmployeeID",
107
                    //        //name: "EmployeeID",
108
                    //        //tableName: 'PDSEMP0001', //name tabel yang jadi ref-nya
109
                    //        //triggerCls: 'x-form-search-trigger',
110
                    //        //vtype: 'alphanum', // disable space
111
                    //        //allowBlank: false,
112
                    //        //formtarget: 'ExportMasterData', // nama form  yang akan di set value-nya
113
                    //    }, {
114
                    //        items: [{
115
                    //            xtype: 'fieldcontainer',
116
                    //            name: 'Toemployee',
117
                    //            margin: '0 0 0 16',
118
                    //            fieldLabel: 'To',
119
                    //            labelWidth: 30,
120
                    //            layout: 'hbox',
121
                    //            items: [{
122
                    //                xtype: 'textfield',
123
                    //                name: 'empEnd',
124
                    //                flex: 1
125
                    //            }]
126
                    //        }],
127
                    //    }]
128
                    //}],
129
                }, {
130
                    xtype: 'textfield',
131
                    name: 'CreateBy',
132
                    fieldLabel: 'Create By ',
133
                    anchor: '50%',
134
                }, {
135
                    items: [{
136
                        xtype: 'fieldcontainer',
137
                        name: 'CreateDate',
138
                        fieldLabel: 'Create Date',
139
                        labelWidth: 100,
140
                        layout: 'hbox',
141
                        items: [{
142
                            xtype: 'datefield',
143
                            flex: 1,
144
                            name: 'createSt',
145
                            format: 'd/m/Y',
146
                            submitFormat: 'Ymd'
147
                        }, {
148
                            items: [{
149
                                xtype: 'fieldcontainer',
150
                                name: 'Tocreate',
151
                                margin: '0 0 0 16',
152
                                fieldLabel: 'To',
153
                                labelWidth: 30,
154
                                layout: 'hbox',
155
                                items: [{
156
                                    xtype: 'datefield',
157
                                    flex: 1,
158
                                    name: 'createEnd',
159
                                    format: 'd/m/Y',
160
                                    submitFormat: 'Ymd'
161
                                }]
162
                            }],
163
                        }]
164
                    }],
165
                }, {
166
                    xtype: 'textfield',
167
                    name: 'ChangeBy',
168
                    fieldLabel: 'Change By',
169
                    anchor: '50%',
170
                }, {
171
                    items: [{
172
                        xtype: 'fieldcontainer',
173
                        name: 'ChangeDate',
174
                        fieldLabel: 'Change Date',
175
                        labelWidth: 100,
176
                        layout: 'hbox',
177
                        items: [{
178
                            xtype: 'datefield',
179
                            flex: 1,
180
                            name: 'changeSt',
181
                            format: 'd/m/Y',
182
                            submitFormat: 'Ymd'
183
                        }, {
184
                            items: [{
185
                                xtype: 'fieldcontainer',
186
                                name: 'Tochange',
187
                                margin: '0 0 0 16',
188
                                fieldLabel: 'To',
189
                                labelWidth: 30,
190
                                layout: 'hbox',
191
                                items: [{
192
                                    xtype: 'datefield',
193
                                    flex: 1,
194
                                    name: 'changeEnd',
195
                                    format: 'd/m/Y',
196
                                    submitFormat: 'Ymd'
197
                                }]
198
                            }],
199
                        }]
200
                    }],
201
                }, {
202
                    xtype: 'textfield',
203
                    name: 'isContent',
204
                    fieldLabel: 'Is Content',
205
                    anchor: '50%',
206
                    hidden: true,
207
                    value: '1'
208
                }],
209
            }],
210
        });
211
        me.callParent(arguments);
212
    }
213
});
(2-2/6)