批量审核
This commit is contained in:
@ -24,7 +24,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
auditMany = false;
|
||||
isVisible = false;
|
||||
_$expand = false;
|
||||
|
||||
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||
@ -36,6 +36,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
stayQuantity: 0
|
||||
};
|
||||
resourceStatus: any;
|
||||
auditID: any;
|
||||
constructor(
|
||||
public service: SupplyManagementService,
|
||||
private modal: NzModalService,
|
||||
@ -67,7 +68,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
this.initSFFre();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化查询表单
|
||||
*/
|
||||
@ -75,7 +75,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
initSFFre() {
|
||||
this.freightSchema = {
|
||||
properties: {
|
||||
roleDescription: {
|
||||
remarks: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
@ -84,7 +84,8 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
widget: 'textarea'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
require: ['remarks']
|
||||
};
|
||||
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||
}
|
||||
@ -191,8 +192,18 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
console.log(value);
|
||||
console.log(status);
|
||||
if (status === 2) {
|
||||
if(this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('未选择货源单!');
|
||||
return
|
||||
}
|
||||
let list: any[] = [];
|
||||
this.selectedRows.forEach(item => {
|
||||
list.push(item.id);
|
||||
});
|
||||
this.auditID = list;
|
||||
this.auditMany = true;
|
||||
} else {
|
||||
this.auditID = value.id
|
||||
this.auditMany = false;
|
||||
}
|
||||
this.isVisible = true;
|
||||
@ -206,7 +217,50 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() {}
|
||||
handleOK(value: any) {
|
||||
console.log(this.sfFre.valid)
|
||||
console.log(this.sfFre.value)
|
||||
if(this.selectedRows.length <= 0) {
|
||||
const params: any = {
|
||||
id: this.auditID,
|
||||
remarks: this.sfFre.value.remarks,
|
||||
}
|
||||
if(value == 1) {
|
||||
params.auditStatus = 2
|
||||
} else {
|
||||
params.auditStatus = 3
|
||||
}
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_goodsResourceAudit, params).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('审核成功!');
|
||||
this.isVisible = false;
|
||||
this.st?.reload();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const params: any = {
|
||||
ids: this.auditID,
|
||||
remarks: this.sfFre.value.remarks,
|
||||
}
|
||||
if(value == 1) {
|
||||
params.auditStatus = 2
|
||||
} else {
|
||||
params.auditStatus = 3
|
||||
}
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_batchGoodsResourceAudit, params).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('审核成功!');
|
||||
this.isVisible = false;
|
||||
this.st?.reload();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 跳转修改货源
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user