This commit is contained in:
wangshiming
2022-05-11 17:57:00 +08:00
parent ba22540580
commit c0dc0f1a85
6 changed files with 65 additions and 34 deletions

View File

@ -42,30 +42,59 @@ export class ParterChannelSalesEditComponent implements OnInit {
ngOnInit(): void {
this.initSF();
console.log(this.sts);
if (!this.sts) {
this.service.request(this.service.$api_getChannelSalesInfo, { id: this.i?.id }).subscribe(res => {
const List: any = [];
const List2: any = [];
const List3: any = [];
if (res) {
let value1 = Object.assign({}, res);
delete value1.employeeVO;
let value = res.employeeVO;
List.push({ label: value.empName + '/' + value.empNo, value: value.empNo });
setTimeout(() => {
if (this.sf) {
console.log(this.sf.getProperty('/employeeVO')!.schema);
List2.push({ label: value.roleName, value: value.id });
res.roleInfoVOList.forEach((element: any) => {
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')!.widget.reset(List);
}
if (value.empNo) {
this.sf.setValue('/employeeVO', value.empNo);
this.currentOAItem = value;
this.sf.setValue('/phoneNumber', res.telephone);
}
})
this.sf.getProperty('/employeeVO')!.schema.enum = List;
this.sf.getProperty('/employeeVO')!.widget.reset(List);
this.sf.getProperty('/roleIds')!.schema.enum = List2;
this.sf.getProperty('/roleIds')!.widget.reset(List2);
}
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;
}
});
} 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() {
@ -88,6 +117,7 @@ export class ParterChannelSalesEditComponent implements OnInit {
title: '手机号',
type: 'string',
maxLength: 11,
readOnly: !this.sts,
ui: {
placeholder: '请输入'
}
@ -114,6 +144,7 @@ export class ParterChannelSalesEditComponent implements OnInit {
title: '关联OA员工',
type: 'string',
maxLength: 30,
readOnly: !this.sts,
ui: {
widget: 'select',
// serverSearch: true,
@ -163,17 +194,17 @@ export class ParterChannelSalesEditComponent implements OnInit {
placeholder: '授权角色',
mode: 'multiple',
maxMultipleCount: 5,
asyncData: () => {
return this.service.request(this.service.$api_getAppRoleList).pipe(
map((res: any) => {
return res
.filter((role: any) => role.roleCode !== 'Administrator')
.map((item: any) => {
return { label: item.roleName, value: item.id };
});
})
);
},
// asyncData: () => {
// return this.service.request(this.service.$api_getAppRoleList).pipe(
// map((res: any) => {
// return res
// .filter((role: any) => role.roleCode !== 'Administrator')
// .map((item: any) => {
// return { label: item.roleName, value: item.id };
// });
// })
// );
// },
visibleIf: { isAuthorization: (value: string) => value === '1' }
}
},
@ -203,14 +234,14 @@ export class ParterChannelSalesEditComponent implements OnInit {
close() {
this.modalRef.destroy();
}
save() {
save() {
this.sf.validator({ emitError: true });
if (!this.sf.valid) return;
let params: any= {
...this.sf?.value,
}
delete params.telephone
let params: any = {
...this.sf?.value
};
delete params.telephone;
this.service.request(this.service.$api_save, { ...params, employeeVO: this.currentOAItem }).subscribe(res => {
if (res) {
this.service.msgSrv.success(res.msg);

View File

@ -268,6 +268,6 @@ export class TaxManagementIndividualCollectComponent extends BasicTableComponent
// 导出
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);
}
}

View File

@ -431,7 +431,7 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent
// 导出
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 = '提示') {

View File

@ -349,7 +349,7 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
// 导出
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() {}

View File

@ -312,7 +312,7 @@ export class TaxManagementInvoiceReportingComponent extends BasicTableComponent
* 异步导出
*/
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 = '提示') {

View File

@ -467,7 +467,7 @@ export class TaxManagementOrderReportingComponent extends BasicTableComponent im
* 异步导出
*/
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 = '提示') {