fix bug
This commit is contained in:
@ -42,30 +42,59 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.initSF();
|
this.initSF();
|
||||||
|
console.log(this.sts);
|
||||||
|
|
||||||
if (!this.sts) {
|
if (!this.sts) {
|
||||||
this.service.request(this.service.$api_getChannelSalesInfo, { id: this.i?.id }).subscribe(res => {
|
this.service.request(this.service.$api_getChannelSalesInfo, { id: this.i?.id }).subscribe(res => {
|
||||||
const List: any = [];
|
const List: any = [];
|
||||||
|
const List2: any = [];
|
||||||
|
const List3: any = [];
|
||||||
if (res) {
|
if (res) {
|
||||||
let value1 = Object.assign({}, res);
|
let value1 = Object.assign({}, res);
|
||||||
delete value1.employeeVO;
|
delete value1.employeeVO;
|
||||||
let value = res.employeeVO;
|
let value = res.employeeVO;
|
||||||
List.push({ label: value.empName + '/' + value.empNo, value: value.empNo });
|
List.push({ label: value.empName + '/' + value.empNo, value: value.empNo });
|
||||||
setTimeout(() => {
|
List2.push({ label: value.roleName, value: value.id });
|
||||||
if (this.sf) {
|
res.roleInfoVOList.forEach((element: any) => {
|
||||||
console.log(this.sf.getProperty('/employeeVO')!.schema);
|
List2.push({ label: element.roleName, value: element.id });
|
||||||
|
List3.push(element.id);
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.sf) {
|
||||||
|
console.log(this.sf.getProperty('/employeeVO')!.schema);
|
||||||
|
|
||||||
this.sf.getProperty('/employeeVO')!.schema.enum = List;
|
this.sf.getProperty('/employeeVO')!.schema.enum = List;
|
||||||
this.sf.getProperty('/employeeVO')!.widget.reset(List);
|
this.sf.getProperty('/employeeVO')!.widget.reset(List);
|
||||||
}
|
|
||||||
if (value.empNo) {
|
this.sf.getProperty('/roleIds')!.schema.enum = List2;
|
||||||
this.sf.setValue('/employeeVO', value.empNo);
|
this.sf.getProperty('/roleIds')!.widget.reset(List2);
|
||||||
this.currentOAItem = value;
|
}
|
||||||
this.sf.setValue('/phoneNumber', res.telephone);
|
if (value.empNo) {
|
||||||
}
|
this.sf.setValue('/employeeVO', value.empNo);
|
||||||
})
|
this.sf.setValue('/roleIds', value.List3);
|
||||||
|
this.currentOAItem = value;
|
||||||
|
this.sf.setValue('/phoneNumber', res.telephone);
|
||||||
|
}
|
||||||
|
});
|
||||||
this.record = value1;
|
this.record = value1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.service.request(this.service.$api_getAppRoleList).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
let List: any = [];
|
||||||
|
res.forEach((element: any) => {
|
||||||
|
List.push({ label: element.roleName, value: element.id });
|
||||||
|
});
|
||||||
|
console.log(List);
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.sf) {
|
||||||
|
this.sf.getProperty('/roleIds')!.schema.enum = List;
|
||||||
|
this.sf.getProperty('/roleIds')!.widget.reset(List);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initSF() {
|
initSF() {
|
||||||
@ -88,6 +117,7 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
title: '手机号',
|
title: '手机号',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxLength: 11,
|
maxLength: 11,
|
||||||
|
readOnly: !this.sts,
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
@ -114,6 +144,7 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
title: '关联OA员工',
|
title: '关联OA员工',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
maxLength: 30,
|
maxLength: 30,
|
||||||
|
readOnly: !this.sts,
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
// serverSearch: true,
|
// serverSearch: true,
|
||||||
@ -163,17 +194,17 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
placeholder: '授权角色',
|
placeholder: '授权角色',
|
||||||
mode: 'multiple',
|
mode: 'multiple',
|
||||||
maxMultipleCount: 5,
|
maxMultipleCount: 5,
|
||||||
asyncData: () => {
|
// asyncData: () => {
|
||||||
return this.service.request(this.service.$api_getAppRoleList).pipe(
|
// return this.service.request(this.service.$api_getAppRoleList).pipe(
|
||||||
map((res: any) => {
|
// map((res: any) => {
|
||||||
return res
|
// return res
|
||||||
.filter((role: any) => role.roleCode !== 'Administrator')
|
// .filter((role: any) => role.roleCode !== 'Administrator')
|
||||||
.map((item: any) => {
|
// .map((item: any) => {
|
||||||
return { label: item.roleName, value: item.id };
|
// return { label: item.roleName, value: item.id };
|
||||||
});
|
// });
|
||||||
})
|
// })
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
visibleIf: { isAuthorization: (value: string) => value === '1' }
|
visibleIf: { isAuthorization: (value: string) => value === '1' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -203,14 +234,14 @@ export class ParterChannelSalesEditComponent implements OnInit {
|
|||||||
close() {
|
close() {
|
||||||
this.modalRef.destroy();
|
this.modalRef.destroy();
|
||||||
}
|
}
|
||||||
save() {
|
save() {
|
||||||
this.sf.validator({ emitError: true });
|
this.sf.validator({ emitError: true });
|
||||||
|
|
||||||
if (!this.sf.valid) return;
|
if (!this.sf.valid) return;
|
||||||
let params: any= {
|
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 => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.service.msgSrv.success(res.msg);
|
this.service.msgSrv.success(res.msg);
|
||||||
|
|||||||
@ -268,6 +268,6 @@ export class TaxManagementIndividualCollectComponent extends BasicTableComponent
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
exprot() {
|
exprot() {
|
||||||
this.service.exportStart({ ...this.sfValue, pageSize: -1 }, this.service.$api_taxSummary_export);
|
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_taxSummary_export);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -431,7 +431,7 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
exprot() {
|
exprot() {
|
||||||
this.service.exportStart({ ...this.sfValue, pageSize: -1 }, this.service.$api_taxDeclaration_export);
|
this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_taxDeclaration_export);
|
||||||
}
|
}
|
||||||
|
|
||||||
openWainingModal(content: string, title = '提示') {
|
openWainingModal(content: string, title = '提示') {
|
||||||
|
|||||||
@ -349,7 +349,7 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
|
|||||||
|
|
||||||
// 导出
|
// 导出
|
||||||
exprot() {
|
exprot() {
|
||||||
this.service.exportStart({ ...this.sfValue, pageSize: -1 }, this.service.$api_taxIncome_export);
|
this.service.exportStart({ ...this.sfValue,declareStatus: this.selectedIndex, pageSize: -1 }, this.service.$api_taxIncome_export);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOK() {}
|
handleOK() {}
|
||||||
|
|||||||
@ -312,7 +312,7 @@ export class TaxManagementInvoiceReportingComponent extends BasicTableComponent
|
|||||||
* 异步导出
|
* 异步导出
|
||||||
*/
|
*/
|
||||||
export() {
|
export() {
|
||||||
this.service.exportStart(this.reqParams, this.service.$api_invoiceUpload_export);
|
this.service.exportStart({...this.reqParams, pageSize: -1 }, this.service.$api_invoiceUpload_export);
|
||||||
}
|
}
|
||||||
|
|
||||||
openWainingModal(content: string, title = '提示') {
|
openWainingModal(content: string, title = '提示') {
|
||||||
|
|||||||
@ -467,7 +467,7 @@ export class TaxManagementOrderReportingComponent extends BasicTableComponent im
|
|||||||
* 异步导出
|
* 异步导出
|
||||||
*/
|
*/
|
||||||
export() {
|
export() {
|
||||||
this.service.exportStart(this.sf?.value, this.service.$api_async_export_order_reporting_list);
|
this.service.exportStart({...this.reqParams, pageSize: -1} ,this.service.$api_async_export_order_reporting_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
openWainingModal(content: string, title = '提示') {
|
openWainingModal(content: string, title = '提示') {
|
||||||
|
|||||||
Reference in New Issue
Block a user