车辆接口更新
This commit is contained in:
@ -22,19 +22,27 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
uiView: SFUISchema = {};
|
||||
schema: SFSchema = {};
|
||||
schemaView: SFSchema = {};
|
||||
changeId: any; // 主页面查看运费变更记录id - 用于运费变更记录
|
||||
auditId: any;
|
||||
auditMany = false;
|
||||
isVisibleView = false;
|
||||
isVisibleEvaluate = false;
|
||||
isVisible = false;
|
||||
isVisibleRE = false;
|
||||
_$expand = false;
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
|
||||
@ViewChild('stFloat') private readonly stFloat!: STComponent;
|
||||
@ViewChild('stFloatView') private readonly stFloatView!: STComponent;
|
||||
columns: STColumn[] = [];
|
||||
columnsFloat: STColumn[] = [];
|
||||
resourceStatus: any;
|
||||
tabs = {
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0,
|
||||
totalCount: 0
|
||||
totalCount: 0,
|
||||
qualifiedtity: 0,
|
||||
spotQuantity: 0,
|
||||
unstayQuantity: 0
|
||||
};
|
||||
constructor(
|
||||
public service: OrderManagementService,
|
||||
@ -62,6 +70,11 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
get changeParams() {
|
||||
return {
|
||||
id: this.changeId
|
||||
};
|
||||
}
|
||||
get selectedRows() {
|
||||
return this.st?.list.filter(item => item.checked) || [];
|
||||
}
|
||||
@ -71,20 +84,23 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
}
|
||||
getGoodsSourceStatistical() {
|
||||
this.tabs = {
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0,
|
||||
totalCount: 0
|
||||
totalCount: 0,
|
||||
qualifiedtity: 0,
|
||||
spotQuantity: 0,
|
||||
unstayQuantity: 0
|
||||
};
|
||||
const params: any = Object.assign({}, this.reqParams || {});
|
||||
delete params.billStatus
|
||||
this.service.request(this.service.$api_get_getAuditStatistical, { ...this.reqParams }).subscribe(res => {
|
||||
this.service.request(this.service.$api_get_getComplianceStatisticalStatus, { ...this.reqParams }).subscribe(res => {
|
||||
if (res) {
|
||||
let totalCount = 0;
|
||||
res.forEach((element: any) => {
|
||||
if (element.billStatusLabel === '待审核') {
|
||||
this.tabs.receivedQuantity = element.quantity;
|
||||
} else if (element.billStatusLabel === '已审核') {
|
||||
this.tabs.stayQuantity = element.quantity;
|
||||
if (element.complianceStatusLabel === '待抽查') {
|
||||
this.tabs.spotQuantity = element.quantity;
|
||||
} else if (element.complianceStatusLabel === '合格') {
|
||||
this.tabs.qualifiedtity = element.quantity;
|
||||
} else if (element.complianceStatusLabel === '不合格') {
|
||||
this.tabs.qualifiedtity = element.quantity;
|
||||
}
|
||||
totalCount += element.quantity;
|
||||
});
|
||||
@ -239,19 +255,19 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
settlementBasis: {
|
||||
title: '装卸凭证',
|
||||
createTime: {
|
||||
title: '创建时间',
|
||||
type: 'string',
|
||||
ui: {
|
||||
widget: 'dict-select',
|
||||
containsAllLable: true,
|
||||
params: { dictKey: 'goodresource:settlement:type' },
|
||||
containAllLable: true,
|
||||
widget: 'date',
|
||||
mode: 'range',
|
||||
format: 'yyyy-MM-dd',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
}
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
},
|
||||
type: 'object'
|
||||
};
|
||||
@ -272,7 +288,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
render: 'billCode'
|
||||
},
|
||||
{
|
||||
title: '运费明细',
|
||||
title: '费用明细',
|
||||
width: '250px',
|
||||
className: 'text-right',
|
||||
render: 'mybidDetailInfo'
|
||||
@ -280,6 +296,7 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
{ title: '网络货运人', index: 'enterpriseInfoName', width: '220px', className: 'text-left' },
|
||||
{ title: '货主', index: 'shipperAppUserName', width: '220px', className: 'text-left' },
|
||||
{ title: '所属项目', index: 'enterpriseProjectName', width: '220px', className: 'text-left' },
|
||||
{ title: '关联运单号', index: 'wayBillCode', width: '220px', className: 'text-left' },
|
||||
{ title: '货源编号', index: 'resourceCode', width: '180px', className: 'text-left' },
|
||||
{ title: '装货地', index: 'loadingAddressArr', width: '180px', className: 'text-left' },
|
||||
{
|
||||
@ -315,16 +332,28 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
render: 'loadingTime'
|
||||
},
|
||||
{
|
||||
title: '装货凭证',
|
||||
title: '创建时间',
|
||||
width: '180px',
|
||||
className: 'text-left',
|
||||
render: 'loadingLadingBillFilePath'
|
||||
index: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '卸货凭证',
|
||||
title: '审核人',
|
||||
width: '180px',
|
||||
className: 'text-left',
|
||||
render: 'unloadingLadingBillFilePath'
|
||||
index: 'loadingLadingBillFilePath'
|
||||
},
|
||||
{
|
||||
title: '审核时间',
|
||||
width: '180px',
|
||||
className: 'text-left',
|
||||
index: 'loadingLadingBillFilePath'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
width: '180px',
|
||||
className: 'text-left',
|
||||
index: 'loadingLadingBillFilePath'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -333,18 +362,18 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
className: 'text-left',
|
||||
buttons: [
|
||||
{
|
||||
text: '通过',
|
||||
text: '查看申诉记录',
|
||||
click: _record => console.log('1'),
|
||||
// iif: item => item.billStatus == '5'
|
||||
},
|
||||
{
|
||||
text: '生成电子单据',
|
||||
click: _record => this.generate(_record),
|
||||
text: '运费变更记录',
|
||||
click: _record => this.OpenPrice(_record),
|
||||
// iif: item => item.billStatus == '4'
|
||||
},
|
||||
{
|
||||
text: '修改',
|
||||
click: _record => this.modification(_record),
|
||||
text: '合规抽查',
|
||||
click: _record => this.audit(_record),
|
||||
// iif: item => item.billStatus == '4'
|
||||
},
|
||||
]
|
||||
@ -377,70 +406,144 @@ export class OrderManagementComplianceAuditComponent implements OnInit {
|
||||
* 导入货源
|
||||
*/
|
||||
importGoodsSource() {}
|
||||
audit(item: any) {}
|
||||
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() {}
|
||||
OpenPrice(item: any) {
|
||||
this.changeId = item.id;
|
||||
this.isVisible = true;
|
||||
}
|
||||
// 修改
|
||||
modification(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '修改',
|
||||
nzWidth: '50%',
|
||||
nzContent: orderManagementVoucherViewComponent,
|
||||
nzComponentParams: {
|
||||
i: item,
|
||||
Status: 1
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe((result: any) => {
|
||||
this.st.load(1);
|
||||
this.getGoodsSourceStatistical()
|
||||
});
|
||||
}
|
||||
// 生成电子单据
|
||||
generate(item: any) {
|
||||
const modalRef = this.modal.create({
|
||||
nzTitle: '查看凭证',
|
||||
nzWidth: '50%',
|
||||
nzContent: orderManagementVoucherViewComponent,
|
||||
nzComponentParams: {
|
||||
i: item,
|
||||
Status: 2
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe((result: any) => {
|
||||
this.st.load(1);
|
||||
this.getGoodsSourceStatistical()
|
||||
});
|
||||
}
|
||||
// 取消订单
|
||||
cancellation(item: any) {
|
||||
// api_get_cancelAnOrder
|
||||
this.modal.confirm({
|
||||
nzTitle: '<b>确定取消该订单吗?</b>',
|
||||
nzContent: `<b>取消后无法恢复,请确认</b>`,
|
||||
nzOnOk: () =>
|
||||
this.service.request(this.service.$api_get_cancelAnOrder, { id: item.id }).subscribe(res => {
|
||||
if (res === true) {
|
||||
this.service.msgSrv.success('操作成功!');
|
||||
this.st?.reload(1);
|
||||
this.getGoodsSourceStatistical();
|
||||
this.initST();
|
||||
|
||||
initSTAudit(value: number) {
|
||||
if (value == 1) {
|
||||
this.schemaView = {
|
||||
properties: {
|
||||
billCode: {
|
||||
title: '订单号',
|
||||
type: 'string',
|
||||
default: this.auditId,
|
||||
ui: {
|
||||
widget: 'text'
|
||||
}
|
||||
},
|
||||
complianceRemark: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '合格可以不用填写原因 ,不合格必须说明原因',
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
}
|
||||
}
|
||||
this.st?.reload(1);
|
||||
this.getGoodsSourceStatistical();
|
||||
})
|
||||
}
|
||||
};
|
||||
} else {
|
||||
this.schemaView = {
|
||||
properties: {
|
||||
billCode: {
|
||||
title: '',
|
||||
type: 'string',
|
||||
default: `已选${this.selectedRows?.length}条订单`,
|
||||
ui: {
|
||||
widget: 'text'
|
||||
}
|
||||
},
|
||||
complianceRemark: {
|
||||
title: '备注',
|
||||
type: 'string',
|
||||
maxLength: 50,
|
||||
ui: {
|
||||
placeholder: '合格可以不用填写原因 ,不合格必须说明原因',
|
||||
widget: 'textarea',
|
||||
autosize: { minRows: 3, maxRows: 6 }
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
this.uiView = { '*': { spanLabelFixed: 110, grid: { span: 24 } } };
|
||||
}
|
||||
/*
|
||||
* 审核关闭弹窗
|
||||
*/
|
||||
handleCancel(value?: string) {
|
||||
if(value === '0') {
|
||||
this.isVisible = false;
|
||||
} else if(value === '1') {
|
||||
this.isVisibleRE = false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 审核通过按钮
|
||||
*/
|
||||
handleOK() {
|
||||
let idList: any[] = [];
|
||||
if(this.selectedRows.length > 0) {
|
||||
this.selectedRows.forEach(item => {
|
||||
idList.push(item.id);
|
||||
});
|
||||
} else {
|
||||
idList.push(this.sfView.value.billCode)
|
||||
}
|
||||
const parms = {
|
||||
ids: idList,
|
||||
complianceRemark: this.sfView.value.complianceRemark,
|
||||
complianceStatus: 1,
|
||||
};
|
||||
this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('提交成功!');
|
||||
this.isVisibleRE = false;
|
||||
this.st?.load(1);
|
||||
this.getGoodsSourceStatistical()
|
||||
}
|
||||
});
|
||||
}
|
||||
// 修改订单
|
||||
changeOrder(value: any) {
|
||||
this.router.navigate(['order-management/bulk-detailChange', value.id]);
|
||||
/**
|
||||
* 审核拒绝按钮
|
||||
*/
|
||||
reject() {
|
||||
if(!this.sfView.value.complianceRemark) {
|
||||
this.service.msgSrv.error('备注不能为空!');
|
||||
return;
|
||||
}
|
||||
let idList: any[] = [];
|
||||
if(this.selectedRows.length > 0) {
|
||||
this.selectedRows.forEach(item => {
|
||||
idList.push(item.id);
|
||||
});
|
||||
} else {
|
||||
idList.push(this.sfView.value.billCode)
|
||||
}
|
||||
const parms = {
|
||||
ids: idList,
|
||||
complianceRemark: this.sfView.value.complianceRemark,
|
||||
complianceStatus: 2,
|
||||
};
|
||||
this.service.request(this.service.$api_get_updateBillByCompliance, parms).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('提交成功!');
|
||||
this.isVisibleRE = false;
|
||||
this.st?.load(1);
|
||||
this.getGoodsSourceStatistical()
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
*合规抽查
|
||||
*/
|
||||
audit(item?: any) {
|
||||
if (item) {
|
||||
this.isVisibleRE = true;
|
||||
this.auditId = item.id;
|
||||
this.initSTAudit(1);
|
||||
} else {
|
||||
if(this.selectedRows.length <= 0) {
|
||||
this.service.msgSrv.error('请选择订单!')
|
||||
return;
|
||||
} else {
|
||||
this.isVisibleRE = true;
|
||||
this.initSTAudit(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user