替换containsAllLable
This commit is contained in:
@ -43,7 +43,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
private modal: NzModalService,
|
||||
private router: Router,
|
||||
public shipperservice: ShipperBaseService
|
||||
) { }
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSF();
|
||||
@ -54,14 +54,14 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
get reqParams() {
|
||||
const a:any = {};
|
||||
if(this.resourceStatus) {
|
||||
a.resourceStatus = this.resourceStatus
|
||||
get reqParams() {
|
||||
const a: any = {};
|
||||
if (this.resourceStatus) {
|
||||
a.resourceStatus = this.resourceStatus
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || {});
|
||||
delete params._$expand;
|
||||
return {
|
||||
return {
|
||||
...a,
|
||||
...params,
|
||||
releaseTime: {
|
||||
@ -72,7 +72,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
start: this.sf?.value?.deadlineTime?.[0] || '',
|
||||
end: this.sf?.value?.deadlineTime?.[1] || '',
|
||||
},
|
||||
};
|
||||
};
|
||||
}
|
||||
search() {
|
||||
this.st?.load(1);
|
||||
@ -82,7 +82,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
console.log(data)
|
||||
return data.map(item => ({
|
||||
...item,
|
||||
disabled: item.auditStatus !== '1'
|
||||
disabled: item.auditStatus !== '1'
|
||||
}));
|
||||
};
|
||||
/**
|
||||
@ -110,9 +110,9 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
default: '',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'service:type' },
|
||||
containAllLable:true,
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
@ -123,9 +123,9 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
containsAllLabel: true,
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
containAllLable:true,
|
||||
containAllLable: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value,
|
||||
},
|
||||
@ -186,7 +186,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
console.log(q)
|
||||
if (!!q) {
|
||||
return this.service
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q})
|
||||
.request(this.service.$api_enterpriceList, { enterpriseName: q })
|
||||
.pipe(map((res: any) => (res as any[]).map((i) => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
|
||||
.toPromise();
|
||||
} else {
|
||||
@ -204,24 +204,24 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
this.freightSchema = {
|
||||
properties: {
|
||||
remarks: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '请输入备注',
|
||||
widget: 'textarea',
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '请输入备注',
|
||||
widget: 'textarea',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
};
|
||||
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } };
|
||||
}
|
||||
};
|
||||
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 16 } } };
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
|
||||
{ title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' },
|
||||
{
|
||||
title: '货源编号',
|
||||
width: '200px',
|
||||
@ -236,12 +236,12 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
{
|
||||
title: '装货地',
|
||||
className: 'text-left',
|
||||
index: 'loadingAddressArr',
|
||||
index: 'loadingAddressArr',
|
||||
width: '200px',
|
||||
}, {
|
||||
title: '卸货地',
|
||||
className: 'text-left',
|
||||
index: 'unloadingAddressArr',
|
||||
index: 'unloadingAddressArr',
|
||||
width: '200px',
|
||||
},
|
||||
{
|
||||
@ -306,7 +306,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
iif: item => item.auditStatus === '1',
|
||||
acl: { ability: ['SUPPLY-INDEX-bulkBatchAudit'] },
|
||||
},
|
||||
{
|
||||
{
|
||||
text: '二维码 ',
|
||||
click: (_record) => this.assignedQrcode(_record),
|
||||
iif: item => item.resourceStatus == 1,
|
||||
@ -314,7 +314,7 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
{
|
||||
text: '修改单价',
|
||||
click: (_record) => this.modification(_record),
|
||||
iif: item => item.resourceStatus == 1 ,
|
||||
iif: item => item.resourceStatus == 1,
|
||||
acl: { ability: ['SUPPLY-INDEX-modificationUnitPrice'] },
|
||||
},
|
||||
{
|
||||
@ -389,86 +389,86 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
tabChange(item: any) {
|
||||
console.log(item)
|
||||
}
|
||||
/**
|
||||
* 审核
|
||||
* status : 1 单个 2:批量
|
||||
* value : 单个单条数据
|
||||
*/
|
||||
audit(value: any, status?: any) {
|
||||
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;
|
||||
/**
|
||||
* 审核
|
||||
* status : 1 单个 2:批量
|
||||
* value : 单个单条数据
|
||||
*/
|
||||
audit(value: any, status?: any) {
|
||||
console.log(value)
|
||||
console.log(status)
|
||||
if (status === 2) {
|
||||
if (this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('未选择货源单!');
|
||||
return
|
||||
}
|
||||
this.isVisible = true;
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* 审核关闭弹窗
|
||||
*/
|
||||
handleCancel(type: any) {
|
||||
this.isVisible = false
|
||||
}
|
||||
/**
|
||||
* 代发货源
|
||||
*/
|
||||
releaseGoods() {
|
||||
this.router.navigate(['/supply-management/bulk-release']);
|
||||
}
|
||||
/**
|
||||
* 代发货源
|
||||
*/
|
||||
releaseGoods() {
|
||||
this.router.navigate(['/supply-management/bulk-release']);
|
||||
}
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK(value: any) {
|
||||
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();
|
||||
if (this.selectedRows.length <= 0) {
|
||||
const params: any = {
|
||||
id: this.auditID,
|
||||
remarks: this.sfFre.value.remarks,
|
||||
}
|
||||
})
|
||||
} 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();
|
||||
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();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// 修改单价
|
||||
modification(item: any) {
|
||||
@ -509,34 +509,34 @@ export class SupplyManagementBulkComponent implements OnInit {
|
||||
nzTitle: '<b>确定取消货源吗?</b>',
|
||||
nzContent: `<b>取消后不可恢复,谨慎操作</b>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_cancelSource, {id: item.id}).subscribe((res) => {
|
||||
if(res) {
|
||||
this.service.request(this.service.$api_cancelSource, { id: item.id }).subscribe((res) => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('已取消货源!')
|
||||
this.st?.reload();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
// 获取货源状态统计
|
||||
getGoodsSourceStatistical() {
|
||||
this.tabs = {
|
||||
totalQuantity: 0,
|
||||
cancelQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0
|
||||
};
|
||||
const params: any = Object.assign({}, this.reqParams || {});
|
||||
delete params.resourceStatus
|
||||
this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => {
|
||||
if (res) {
|
||||
console.log(res)
|
||||
this.tabs = res;
|
||||
}
|
||||
})
|
||||
}
|
||||
userAction() {
|
||||
|
||||
}
|
||||
// 获取货源状态统计
|
||||
getGoodsSourceStatistical() {
|
||||
this.tabs = {
|
||||
totalQuantity: 0,
|
||||
cancelQuantity: 0,
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0
|
||||
};
|
||||
const params: any = Object.assign({}, this.reqParams || {});
|
||||
delete params.resourceStatus
|
||||
this.service.request(this.service.$api_get_goods_resource_statistical, { resourceType: 2, ...params }).subscribe(res => {
|
||||
if (res) {
|
||||
console.log(res)
|
||||
this.tabs = res;
|
||||
}
|
||||
})
|
||||
}
|
||||
userAction() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user