This commit is contained in:
wangshiming
2022-05-11 15:30:45 +08:00
parent 2579a38d01
commit c95afd09f7

View File

@ -3,7 +3,6 @@ import { ActivatedRoute } from '@angular/router';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { RecordedService } from '../../services/recorded.service'; import { RecordedService } from '../../services/recorded.service';
@Component({ @Component({
selector: 'app-partner-recored-detail', selector: 'app-partner-recored-detail',
templateUrl: './detail.component.html', templateUrl: './detail.component.html',
@ -87,18 +86,28 @@ export class PartnerRecordedDetailComponent implements OnInit {
this.service.msgSrv.warning('请填写拒绝原因 '); this.service.msgSrv.warning('请填写拒绝原因 ');
return; return;
} }
this.audit({ ids: params, rejectReason: this.msg, sts: '3' }, () => { this.audit(
{ ids: params, rejectReason: this.msg, sts: '3' },
() => {
modal.destroy(true); modal.destroy(true);
}, '审核拒绝成功'); },
'审核拒绝成功'
);
} }
}, },
{ {
label: '通过', label: '通过',
type: 'primary', type: 'primary',
onClick: () => { onClick: () => {
this.audit({ ids: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 }, () => { console.log(this.formData?.sts);
this.audit(
{ ids: params, rejectReason: this.msg, sts: this.formData?.sts === '0' ? 1 : 2 },
() => {
modal.destroy(true); modal.destroy(true);
}, `${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`); },
`${this.formData?.sts === '1' ? '审核' : '复审'}通过成功`
);
} }
} }
] ]
@ -117,9 +126,7 @@ export class PartnerRecordedDetailComponent implements OnInit {
* 审核 * 审核
*/ */
audit(params: any, callback: Function, msg = '成功') { audit(params: any, callback: Function, msg = '成功') {
this.service this.service.request(this.service.$api_audit_recored, {...params}).subscribe(res => {
.request(this.service.$api_audit_recored, ...params)
.subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success(msg); this.service.msgSrv.success(msg);
callback(); callback();