This commit is contained in:
wangshiming
2022-04-26 14:05:17 +08:00
parent 6d91d68598
commit 47a5dfedad
2 changed files with 17 additions and 23 deletions

View File

@ -48,28 +48,21 @@ export class ParterChannelSalesEditComponent implements OnInit {
if (res) { if (res) {
let value1 = Object.assign({}, res); let value1 = Object.assign({}, res);
delete value1.employeeVO; delete value1.employeeVO;
console.log(value1);
console.log(this.record);
let value = res.employeeVO; let value = res.employeeVO;
console.log(value);
List.push({ label: value.empName + '/' + value.empNo, value: value.empNo }); List.push({ label: value.empName + '/' + value.empNo, value: value.empNo });
console.log(List); setTimeout(() => {
if (this.sf) {
console.log(this.sf.getProperty('/employeeVO')!.schema);
setTimeout(() => { this.sf.getProperty('/employeeVO')!.schema.enum = List;
if (this.sf) { this.sf.getProperty('/employeeVO')!.widget.reset(List);
console.log(this.sf.getProperty('/employeeVO')!.schema); }
if (value.empNo) {
this.sf.getProperty('/employeeVO')!.schema.enum = List; this.sf.setValue('/employeeVO', value.empNo);
this.sf.getProperty('/employeeVO')!.widget.reset(List); this.currentOAItem = value;
} this.sf.setValue('/phoneNumber', res.telephone);
if (value.empNo) { }
this.sf.setValue('/employeeVO', value.empNo); })
this.currentOAItem = value;
this.sf.setValue('/phoneNumber', res.telephone);
}
});
this.record = value1; this.record = value1;
} }
}); });
@ -212,9 +205,10 @@ export class ParterChannelSalesEditComponent implements OnInit {
} }
save() { save() {
this.sf.validator({ emitError: true }); this.sf.validator({ emitError: true });
if (!this.sf.valid) return; if (!this.sf.valid) return;
let params = { let params: any= {
...this.sf.value ...this.sf.value,
} }
delete params.telephone delete params.telephone
this.service.request(this.service.$api_save, { ...params, employeeVO: this.currentOAItem }).subscribe(res => { this.service.request(this.service.$api_save, { ...params, employeeVO: this.currentOAItem }).subscribe(res => {

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-02-24 20:09:49 * @Date : 2022-02-24 20:09:49
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-04-26 10:53:50 * @LastEditTime : 2022-04-26 14:04:41
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -61,7 +61,7 @@
</sv> </sv>
<sv label="规则说明" col="1" > <sv label="规则说明" col="1" >
<sf #sf mode="edit" [disabled]="hiden" [formData]="formData" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 12 }} }" <sf #sf mode="edit" [disabled]="hiden" [formData]="formData" [schema]="schema1" [ui]="{ '*': { spanLabelFixed: 10, grid: { span: 16 }} }"
button="none"> </sf> button="none"> </sf>
</sv> </sv>