Commit dcd55187 by Nattana Chaiyamat

ทะเบียนพนักงาน แก้ select option

parent 0cfe742a
...@@ -200,8 +200,9 @@ ...@@ -200,8 +200,9 @@
<label class="col-span-3 ti-form-label text-primary mt-2 align-center">สถานภาพพนักงาน<span <label class="col-span-3 ti-form-label text-primary mt-2 align-center">สถานภาพพนักงาน<span
class="text-danger">*</span></label> class="text-danger">*</span></label>
<div class="col-span-4 "> <div class="col-span-4 ">
<select class="ti-form-select" [(ngModel)]="employee.select.status"> <select class="ti-form-select" [(ngModel)]="employee.select.status.statusCode"
<option *ngFor="let item of empStatus.dataList" [value]="item">{{item.tdesc}}</option> (ngModelChange)="selectStatus()">
<option *ngFor="let item of empStatus.dataList" [ngValue]="item.statusCode">{{item.tdesc}}</option>
</select> </select>
</div> </div>
</div> </div>
...@@ -590,7 +591,8 @@ ...@@ -590,7 +591,8 @@
ย้อนกลับ ย้อนกลับ
</button> </button>
<button type="button" class="ti-btn ti-btn-success" <button type="button" class="ti-btn ti-btn-success"
data-hs-overlay="#sub-employee-registration-alert-add-modal" [class.ti-btn-disabled]="checkEmployeeModel()||(modalType=='add'&&checkPrimary())" data-hs-overlay="#sub-employee-registration-alert-add-modal"
[class.ti-btn-disabled]="checkEmployeeModel()||(modalType=='add'&&checkPrimary())"
[disabled]="checkEmployeeModel()||(modalType=='add'&&checkPrimary())"> [disabled]="checkEmployeeModel()||(modalType=='add'&&checkPrimary())">
บันทึกข้อมูล บันทึกข้อมูล
</button> </button>
......
...@@ -608,6 +608,10 @@ export class SubEmployeeRegistrationComponent { ...@@ -608,6 +608,10 @@ export class SubEmployeeRegistrationComponent {
selectBoss(data: any) { selectBoss(data: any) {
this.employee.select.boss = new MyBossModel({ ...data, empType: data.empType.codeId }) this.employee.select.boss = new MyBossModel({ ...data, empType: data.empType.codeId })
} }
selectStatus() {
this.employee.select.status = new MyStatusModel(this.empStatus.dataList.find(x => x.statusCode == this.employee.select.status.statusCode) || {})
}
changeDate(target: { [key: string]: any }, field: string, dateIso: string) { changeDate(target: { [key: string]: any }, field: string, dateIso: string) {
target[field] = this.toYYYYMMDD(dateIso) target[field] = this.toYYYYMMDD(dateIso)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment