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