车队长列表
This commit is contained in:
@ -2,15 +2,15 @@
|
||||
* @Description:
|
||||
* @Author: wsm
|
||||
* @Date: 2021-07-15 09:42:57
|
||||
* @LastEditTime: 2021-12-01 14:45:06
|
||||
* @LastEditTime: 2021-12-01 19:59:38
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @Reference:
|
||||
*/
|
||||
import { AfterViewInit, Component, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
import { STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { STChange, STColumn, STComponent } from '@delon/abc/st';
|
||||
import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFTextWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { filter } from 'rxjs/operators';
|
||||
@ -23,12 +23,17 @@ import { filter } from 'rxjs/operators';
|
||||
})
|
||||
export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterViewInit {
|
||||
@ViewChild('st', { static: true }) st!: STComponent;
|
||||
@ViewChild('stAssign', { static: true }) stAssign!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
validateForm!: FormGroup;
|
||||
@ViewChild('exportTemplate')
|
||||
exportTemplate!: TemplateRef<any>;
|
||||
@ViewChild('sfAssign', { static: false }) sfAssign!: SFComponent;
|
||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||
isVisible = false;
|
||||
isVisibleAssign = false;
|
||||
ColumnsAssign!: STColumn[];
|
||||
ui: SFUISchema = {};
|
||||
uiFre: SFUISchema = {};
|
||||
mode: any = 'search';
|
||||
demoValue: any;
|
||||
tabs = ['全部', '待接单', '已接单', '已取消'];
|
||||
listData: any =[
|
||||
{
|
||||
@ -38,6 +43,14 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
id4: 4,
|
||||
}
|
||||
]
|
||||
listData2: any = [
|
||||
{
|
||||
clientGroupName: '姓名',
|
||||
clientCount: '姓名',
|
||||
clientCount2: '姓名',
|
||||
clientCount3: '姓名',
|
||||
}
|
||||
]
|
||||
orderStatus: any = '0'; // 订单状态, 10为已提交待付款, 20为已付款待发,30为已发货待收货,50取消订单,40 已完成
|
||||
nzSelectedIndex = 0;
|
||||
total = 1;
|
||||
@ -49,8 +62,10 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
addTimeEnd = '';
|
||||
sfExpand = false;
|
||||
_$expand = false;
|
||||
|
||||
ssdsad: any;
|
||||
schema!: SFSchema;
|
||||
schemaAssign!: SFSchema;
|
||||
freightSchema!: SFSchema;
|
||||
payStatus: any;
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
@ -64,6 +79,8 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
this.getList();
|
||||
this.initSF();
|
||||
this.initUI();
|
||||
this.initSFFre();
|
||||
this.initSFAssign();
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
@ -71,7 +88,99 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
//
|
||||
// });
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定客户分组查询参数
|
||||
*/
|
||||
get reqParamsAssign() {
|
||||
const params = Object.assign({});
|
||||
return { ...params, ...this.sfAssign?.value };
|
||||
}
|
||||
change(change: STChange) {
|
||||
console.log(change.checkbox)
|
||||
}
|
||||
initSFFre() {
|
||||
this.freightSchema = {
|
||||
properties: {
|
||||
btn: {
|
||||
type: 'string',
|
||||
title: '是否回单',
|
||||
enum: ['需要', '不需要'],
|
||||
ui: {
|
||||
widget: 'radio',
|
||||
} as SFRadioWidgetSchema,
|
||||
default: '需要',
|
||||
},
|
||||
contactsName: {
|
||||
title: '预付',
|
||||
type: 'string',
|
||||
ui: {
|
||||
showRequired: false,
|
||||
},
|
||||
},
|
||||
unifiedSocialCreditCode: {
|
||||
title: '到付',
|
||||
type: 'string',
|
||||
ui: {
|
||||
showRequired: false,
|
||||
},
|
||||
},
|
||||
unifiedSocialCreditCode2: {
|
||||
title: '油卡',
|
||||
type: 'string',
|
||||
ui: {
|
||||
showRequired: false,
|
||||
},
|
||||
},
|
||||
unifiedSocialCreditCode3: {
|
||||
title: '回单付',
|
||||
type: 'string',
|
||||
ui: {
|
||||
showRequired: false,
|
||||
},
|
||||
},
|
||||
'小计': { type: 'number', ui: { widget: 'text', defaultText: '5000 text' } as SFTextWidgetSchema },
|
||||
fujia: { type: 'string',title: '附加费', ui: { widget: 'custom'}},
|
||||
manys: { type: 'string',title: '总费用', ui: { widget: 'custom'}},
|
||||
unifiedSocia: { type: 'string',title: '总费用', ui: { widget: 'custom'}},
|
||||
|
||||
},
|
||||
};
|
||||
this.schemaAssign = {
|
||||
properties: {
|
||||
clientGroupName: {
|
||||
title: '分组名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入司机姓名/手机号',
|
||||
enter: (e: KeyboardEvent) => {
|
||||
this.stAssign.load();
|
||||
},
|
||||
},
|
||||
},
|
||||
clientGroupName2: {
|
||||
title: '分组名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入车牌号',
|
||||
enter: (e: KeyboardEvent) => {
|
||||
this.stAssign.load();
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
this.uiFre = { '*': { spanLabelFixed: 90, grid: { span: 16 }, enter: () => this.st.load() } };
|
||||
}
|
||||
initSFAssign() {
|
||||
this.ColumnsAssign = [
|
||||
{ title: '', type: 'checkbox', width: '40px', className: 'text-center' },
|
||||
{ title: '司机姓名', index: 'clientGroupName', width: '300px', className: 'text-center' },
|
||||
{ title: '手机号', index: 'clientCount', width: '300px', className: 'text-center' },
|
||||
{ title: '车牌号', index: 'clientCount2', width: '300px', className: 'text-center' },
|
||||
{ title: '状态', index: 'clientCount3', width: '300px', className: 'text-center' },
|
||||
];
|
||||
}
|
||||
|
||||
initSF() {
|
||||
this.schema = {
|
||||
properties: {
|
||||
@ -135,6 +244,7 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
this.ui = { '*': { spanLabelFixed: 90, grid: { span: 8, gutter: 4 }, enter: () => this.st.load() } };
|
||||
}
|
||||
initUI() {
|
||||
@ -205,7 +315,7 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
// this.service.exportStart(params, this.service.$api_export);
|
||||
this.modal.create({
|
||||
nzTitle: '订单导出',
|
||||
nzContent: this.exportTemplate,
|
||||
// nzContent: this.exportTemplate,
|
||||
// nzContent: `待导出订单总数:${this.pageInfo.total}条,确定要导出吗?`,
|
||||
nzOnOk: () => {
|
||||
const params: any = {
|
||||
@ -239,10 +349,21 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
}
|
||||
|
||||
showApply() {
|
||||
this.isVisible = true
|
||||
}
|
||||
showAssign() {
|
||||
this.isVisibleAssign = true
|
||||
}
|
||||
handleOK() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
handleCancel(type: any) {
|
||||
if(type === 'suppliersType') {
|
||||
this.isVisible = false
|
||||
} else if(type === 'assign') {
|
||||
this.isVisibleAssign = false
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
@ -250,6 +371,9 @@ export class SupplyGoodsComponentListCarloadComponent implements OnInit, AfterVi
|
||||
this.sf.reset();
|
||||
this.sfExpand = false;
|
||||
}
|
||||
resetSFAssign() {
|
||||
this.sfAssign.reset();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user