车队长列表

This commit is contained in:
wangshiming
2021-12-01 20:38:44 +08:00
parent 3e4e9ee49e
commit acee22b1f3
16 changed files with 1315 additions and 20 deletions

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-01 09:58:58
* @LastEditTime: 2021-12-01 14:44:51
* @LastEditTime: 2021-12-01 20:00:33
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\supply-goods\components\carload\carload.component.html
@ -69,7 +69,7 @@
<ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
<thead>
<tr>
<th nzAlign="center">货源编号</th>
<th nzAlign="center" nzWidth="100px">货源编号</th>
<th nzWidth="100px" nzAlign="center">货源类型</th>
<th nzWidth="100px" nzAlign="center">货主</th>
<th nzWidth="100px" nzAlign="center">项目名称</th>
@ -145,7 +145,7 @@
<div>
<a nz-button nzType="link" (click)="showApply()">货源审核</a>
<a nz-button nzType="link" (click)="showApply()">修改运费</a>
<a nz-button nzType="link" nzDanger (click)="showApply()">指派熟车</a>
<a nz-button nzType="link" nzDanger (click)="showAssign()">指派熟车</a>
<a nz-button nzType="link" nzDanger (click)="showApply()">修改单价</a>
</div>
</td>
@ -155,3 +155,58 @@
</nz-tab>
</nz-tabset>
</nz-card>
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="修改运费" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('suppliersType')">
<ng-container *nzModalContent>
<sf #sfFre [schema]="freightSchema" [ui]="uiFre" [compact]="false" [button]="'none'">
<ng-template sf-template="manys" let-me let-ui="ui" let-schema="schema">
<div>
<span>{{this.sfFre.value.contactsName}}</span>
</div>
</ng-template>
<ng-template sf-template="unifiedSocia" let-me let-ui="ui" let-schema="schema">
<nz-input-number
[(ngModel)]="ssdsad"
[nzMin]="0"
[nzMax]="30"
nzPlaceHolder="请输入1-30"
id="margin"
width=400
ngDefaultControl
required
></nz-input-number
>&nbsp; &nbsp;天内支付运费。
</ng-template>
<ng-template sf-template="fujia" let-me let-ui="ui" let-schema="schema">
15.00(费率:<a href="javaccript:;">5.3</a>
</ng-template>
</sf>
</ng-container>
<ng-template #nzModalFooter>
<button nz-button nzType="default" (click)="handleCancel('suppliersType')">取消</button>
<button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认修改</button>
</ng-template>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleAssign" [nzWidth]="900" [nzFooter]="nzModalFooter" nzTitle="指派熟车" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('assign')">
<ng-container *nzModalContent>
<sf #sfAssign [schema]="schemaAssign" [ui]="ui" [mode]="'search'" (formSubmit)="stAssign?.load(1)"
(formReset)="resetSFAssign()"></sf>
<st
#stAssign
multiSort
[scroll]="{ x: '900px' }"
[data]="listData2"
[columns]="ColumnsAssign"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParamsAssign }"
[res]="{ reName: { list: 'data', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
(change)="change($event)"
>
</st>
</ng-container>
<ng-template #nzModalFooter>
<button nz-button nzType="default" (click)="handleCancel('assign')">取消</button>
<button nz-button nzType="primary" (click)="handleOK()" [disabled]="">确认修改</button>
</ng-template>
</nz-modal>

View File

@ -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();
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-01 09:58:58
* @LastEditTime: 2021-12-01 15:20:33
* @LastEditTime: 2021-12-01 20:00:41
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\supply-goods\components\carload\carload.component.html
@ -69,7 +69,7 @@
<ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
<thead>
<tr>
<th nzAlign="center">货源编号</th>
<th nzAlign="center" nzWidth="100px">货源编号</th>
<th nzWidth="100px" nzAlign="center">货源类型</th>
<th nzWidth="100px" nzAlign="center">货主</th>
<th nzWidth="100px" nzAlign="center">项目名称</th>