-
Samart authored8b1f5385
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<div class="container-fluid">
<form-header formID="SNWR037"></form-header>
<mat-tab-group (selectedTabChange)="SelectedTabChange($event)">
<mat-tab label="Outer case">
<ng-template matTabContent>
<div class="form-box">
<div class="row">
<div class="col-md-2">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Outer Case Type</mat-label>
<input matInput autocompleteOff class="can-input text-uppercase" type="text" [(ngModel)]="paramSearchOuter.CASE_TYPE" (change)="autoCompleteCaseType.query()"/>
<auto-complete-query matSuffix [config]="lookupOuterCaseTypeConfig" [textInput]="paramSearchOuter.CASE_TYPE"
(datacallback)="SetSelectedOuterCaseType($event)" #autoCompleteCaseType></auto-complete-query>
</mat-form-field>
</div>
<div class="col-md-2">
<button mat-raised-button (click)="Search()">
<i class="material-icons">search</i>
Search
</button>
</div>
<div class="col text-right">
<button mat-raised-button color="secondary" (click)="OpenPrintDialog()" class="mr-1">
<i class="material-icons">print</i>
Print Outer Case QRcode
</button>
<button mat-raised-button color="primary" (click)="Add()" class="ml-1">
<i class="material-icons">add</i>
Add
</button>
</div>
</div>
</div>
<div class="form-box">
<div class="row">
<div class="col-md-12">
<auto-table tableName="SNWR037" [tableData]="tableDataOuter" [showPagination]="true" (editClick)="Edit($event)" (deleteClick)="Delete($event)"></auto-table>
</div>
</div>
</div>
</ng-template>
</mat-tab>
<mat-tab label="Inner case">
<ng-template matTabContent>
<div class="form-box">
<div class="row">
<div class="col-md-2">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Inner Case Type</mat-label>
<input matInput autocompleteOff class="can-input text-uppercase" type="text" [(ngModel)]="paramSearchInner.CASE_TYPE" (change)="autoCompleteInnerCaseType.query()"/>
<auto-complete-query matSuffix [config]="lookupInnerCaseTypeConfig" [textInput]="paramSearchInner.CASE_TYPE"
(datacallback)="SetSelectedInnerCaseType($event)" #autoCompleteInnerCaseType></auto-complete-query>
</mat-form-field>
</div>
<div class="col-md-2">
<button mat-raised-button (click)="Search()">
<i class="material-icons">search</i>
Search
</button>
</div>
<div class="col text-right">
<button mat-raised-button color="secondary" (click)="OpenPrintDialog()" class="mr-1">
<i class="material-icons">print</i>
Print Inner Case QRcode
</button>
<button mat-raised-button color="primary" (click)="Add()" class="ml-1">
<i class="material-icons">add</i>
Add
</button>
</div>
</div>
</div>
<div class="form-box">
<div class="row">
<div class="col-md-12">
<auto-table tableName="SNWR037_INNER" [tableData]="tableDataInner" [showPagination]="true" (editClick)="Edit($event)" (deleteClick)="Delete($event)"></auto-table>
</div>
</div>
</div>
</ng-template>
</mat-tab>
</mat-tab-group>
</div>
<dialog-template hidden iconName="save" #dialogAction>
<ng-template #content>
<fieldset class="form-box mt-3">
<div class="row">
<div class="col-md-4">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Case Group</mat-label>
<input type="text" class="can-input" maxlength="20" matInput autocompleteOff required disabled [ngModelOptions]="{updateOn: 'blur'}"
[(ngModel)]="formData.CASE_GROUP_TEXT" [disabled]="true"/>
</mat-form-field>
</div>
<div class="col-md-2" *ngIf="formData.CASE_GROUP == 'OT'">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Can Config</mat-label>
<mat-select class="can-input" [(ngModel)]="formData.CAN_CONFIG" required>
<mat-option [value]="'Y'">Yes</mat-option>
<mat-option [value]="'N'">No</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-md-6">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Case Name</mat-label>
<input type="text" class="can-input text-uppercase" maxlength="20" matInput autocompleteOff required [ngModelOptions]="{updateOn: 'blur'}"
[(ngModel)]="formData.CASE_NAME"/>
</mat-form-field>
</div>
</div>
<div class="row">
<div class="col-md-5" *ngIf="formData.CASE_GROUP == 'OT'">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Case Type</mat-label>
<input matInput autocompleteOff class="can-input text-uppercase" type="text" required [(ngModel)]="formData.CASE_TYPE" (change)="autoCompleteTypeListDialog.query()"/>
<auto-complete-query matSuffix [config]="lookupTypeListConfigDialog" [textInput]="formData.CASE_TYPE"
(datacallback)="SetSelectedTypeListDialog($event)" #autoCompleteTypeListDialog></auto-complete-query>
</mat-form-field>
</div>
<div class="col-md-5" *ngIf="formData.CASE_GROUP == 'IN'">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Case Type</mat-label>
<input matInput autocompleteOff class="can-input text-uppercase" type="text" [(ngModel)]="formData.CASE_TYPE" (change)="autoCompleteTypeListDialog.query()"/>
<auto-complete-query matSuffix [config]="lookupInnerTypeListConfigDialog" [textInput]="formData.CASE_TYPE"
(datacallback)="SetSelectedTypeListDialog($event)" #autoCompleteTypeListDialog></auto-complete-query>
</mat-form-field>
</div>
<div class="col-md-7">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Case Type Description</mat-label>
<input type="text" class="can-input" matInput autocompleteOff [(ngModel)]="formData.CASE_TYPE_DESCRIPTION" disabled/>
</mat-form-field>
</div>
</div>
<div class="row">
<div class="col-md-6">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Width (mm)</mat-label>
<input type="number" class="can-input text-right" min="0" max="99999" maxlength="5" matInput autocompleteOff [ngModelOptions]="{updateOn: 'blur'}"
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
[(ngModel)]="formData.CASE_WIDTH" [required]="formData.CAN_CONFIG == 'N'"/>
</mat-form-field>
</div>
<div class="col-md-6">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Depth (mm)</mat-label>
<input type="number" class="can-input text-right" min="0" max="99999" maxlength="5" matInput autocompleteOff [ngModelOptions]="{updateOn: 'blur'}"
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
[(ngModel)]="formData.CASE_DEPTH" [required]="formData.CAN_CONFIG == 'N'"/>
</mat-form-field>
</div>
<div class="col-md-6">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Height (mm)</mat-label>
<input type="number" class="can-input text-right" min="0" max="99999" maxlength="5" matInput autocompleteOff [ngModelOptions]="{updateOn: 'blur'}"
oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
[(ngModel)]="formData.CASE_HEIGHT" [required]="formData.CAN_CONFIG == 'N'"/>
</mat-form-field>
</div>
<div class="col-md-6">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>ETG Code</mat-label>
<input type="text" class="can-input text-uppercase" maxlength="10" matInput autocompleteOff required [ngModelOptions]="{updateOn: 'blur'}"
[(ngModel)]="formData.ETG_CODE"/>
</mat-form-field>
</div>
</div>
<div class="row" *ngIf="formData.TYPE == 'EDIT'">
<div class="col-md-6">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Update By</mat-label>
<input class="can-input" type="text" matInput autocompleteOff [(ngModel)]="formData.LAST_UPD_BY" disabled />
</mat-form-field>
</div>
<div class="col-md-6">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Update Date</mat-label>
<input class="can-input" type="text" matInput autocompleteOff [ngModel]="formData.LAST_UPD_DATE | dateTimeFormat" disabled />
</mat-form-field>
</div>
</div>
</fieldset>
</ng-template>
<ng-template #action>
<div class="col-md-12">
<div class="row justify-content-center" *ngIf="formData.TYPE == 'ADD'">
<div class="col-md-4">
<button mat-raised-button color="primary" (click)="SaveAdd()" [disabled]="!formData">
<i class="material-icons">save</i>
Save
</button>
</div>
<div class="col-md-4">
<button mat-raised-button (click)="CancelAdd()">
<i class="material-icons">close</i>
Cancel
</button>
</div>
</div>
<div class="row justify-content-center" *ngIf="formData.TYPE == 'EDIT'">
<div class="col-md-4">
<button mat-raised-button color="primary" (click)="SaveEdit()" [disabled]="!formData">
<i class="material-icons">save</i>
Save
</button>
</div>
<div class="col-md-4">
<button mat-raised-button (click)="CancleEdit()">
<i class="material-icons">close</i>
Cancel
</button>
</div>
</div>
</div>
</ng-template>
</dialog-template>
<dialog-template hidden iconName="save" #dialogPrint>
<ng-template #content>
<fieldset class="form-box mt-3">
<div class="row">
<div class="col-md-3">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>ETG Code</mat-label>
<input type="text" class="can-input text-uppercase" maxlength="20" matInput autocompleteOff [ngModelOptions]="{updateOn: 'blur'}"
[(ngModel)]="formDataPrint.ETG_CODE" disabled/>
</mat-form-field>
</div>
<div class="col-md-3">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>Case Type</mat-label>
<input type="text" class="can-input text-uppercase" maxlength="20" matInput autocompleteOff [ngModelOptions]="{updateOn: 'blur'}"
[(ngModel)]="formDataPrint.CASE_TYPE" disabled/>
</mat-form-field>
</div>
<div class="col-md-4">
<ng-template [ngIf]="formDataPrint.CASE_GROUP == 'OT'">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>{{caseGroup.TEXT}} Name</mat-label>
<input matInput autocompleteOff required class="can-input" [(ngModel)]="formDataPrint.CASE_NAME" (change)="autoCompleteOuterCaseName.query()" />
<auto-complete-query matSuffix [config]="lookupOuterCaseNameConfig" [textInput]="formDataPrint.CASE_NAME"
(datacallback)="SetSelectedCaseName($event)" #autoCompleteOuterCaseName></auto-complete-query>
</mat-form-field>
</ng-template>
<ng-template [ngIf]="formDataPrint.CASE_GROUP == 'IN'">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>{{caseGroup.TEXT}} Name</mat-label>
<input matInput autocompleteOff required class="can-input" [(ngModel)]="formDataPrint.CASE_NAME" (change)="autoCompleteInnerCaseName.query()" />
<auto-complete-query matSuffix [config]="lookupInnerCaseNameConfig" [textInput]="formDataPrint.CASE_NAME"
(datacallback)="SetSelectedCaseName($event)" #autoCompleteInnerCaseName></auto-complete-query>
</mat-form-field>
</ng-template>
</div>
<div class="col-md-2">
<mat-form-field class="w-100" floatLabel="always">
<mat-label>No. to print</mat-label>
<input type="number" class="can-input text-right" step="1" min="0" max="10000"
matInput autocompleteOff [(ngModel)]="formDataPrint.QTY"
onchange="this.value = Math.abs(this.value) >= this.max ? Math.abs(this.max) : Math.abs(this.value)">
</mat-form-field>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="w-100 flex-fill" *ngIf="fileUrl">
<iframe [src]="fileUrl | safe: 'RESOURCE_URL'"
style="width: 100%; height: 400px"
#iframe></iframe>
</div>
</div>
</div>
</fieldset>
</ng-template>
<ng-template #action>
<div class="col-md-12">
<div class="row justify-content-center">
<div class="col-md-4">
<button mat-raised-button color="primary" (click)="PreviewCaseNameQRCode()" [disabled]="!formDataPrint.CASE_NAME">
<i class="material-icons">print</i>
Preview QR Code
</button>
<!-- <button mat-raised-button color="primary" (click)="PrintCaseNameQRCode()" [disabled]="!formDataPrint.CASE_NAME">
<i class="material-icons">print</i>
Print
</button> -->
</div>
<div class="col-md-4">
<button mat-raised-button (click)="dialogPrint.Close();">
<i class="material-icons">close</i>
Cancel
</button>
</div>
</div>
</div>
</ng-template>
</dialog-template>