This commit is contained in:
wangshiming
2021-12-13 09:31:22 +08:00
parent 7d7f32aa8d
commit 7da8395f88
9 changed files with 148 additions and 87 deletions

View File

@ -57,12 +57,10 @@ export class SupplyManagementBulkComponent implements OnInit {
* 查询参数
*/
get reqParams() {
console.log(this.resourceStatus)
const a:any = {};
if(this.resourceStatus) {
a.resourceStatus = this.resourceStatus
}
console.log(a)
return {
...a,
...this.sf?.value,
@ -366,6 +364,11 @@ export class SupplyManagementBulkComponent implements OnInit {
},
nzFooter: null,
});
modalRef.afterClose.subscribe(res => {
if (res) {
this.st.reload();
}
})
}
/**

View File

@ -1,17 +1,19 @@
<!--
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-07 19:50:54
* @LastEditTime: 2021-12-10 15:14:11
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\update-price\update-price.component.html
-->
<div class="mb-lg">
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<sf *ngIf="i" #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
<ng-template sf-template="description3" let-me let-ui="ui" let-schema="schema">
<input [max]="99999999" placeholder="请输入" type="number" [ngModel]="me.value" style="width: 200px;" nz-input />
<span> 元/吨</span>
<sf *ngIf="i" #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="ii" button="none">
<ng-template sf-template="freightPrice" let-me let-ui="ui" let-schema="schema">
<nz-input-group [nzAddOnAfter]="freightType[i?.freightType]">
<input [max]="99999999" placeholder="请输入" type="number" [ngModel]="me.value"
(ngModelChange)="me.setValue($event)" nz-input />
</nz-input-group>
</ng-template>
<div class="modal-footer text-center">
<button nz-button type="button" (click)="close()">取消</button>
@ -23,10 +25,13 @@
</div>
<div>
<h4>变更日志</h4>
<!-- <st #st [data]="service.$api_get_catalogue_member" [bordered]="true" [columns]="columns" [page]="{show:false}">
<st #st [data]="service.$api_get_catalogue_member" [bordered]="true" [columns]="columns" [page]="{show:false}">
<ng-template st-row="operator" let-item let-index="index">
<div>黎日湛</div>
<div>18811112222</div>
</ng-template>
</st> -->
</div>
</st>
</div>
<ng-template #addOnAfterTemplate>
<span> {{freightType[i?.freightType]}}</span>
</ng-template>

View File

@ -1,11 +1,4 @@
/*
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-07 19:50:40
* @LastEditors: your name
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \tms-obc-web\src\app\routes\supply-management\components\update-price\update-price.component.ts
*/
import { Params } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
@ -21,60 +14,71 @@ import { SupplyManagementService } from '../../services/supply-management.servic
export class SupplyManagementUpdatePriceComponent implements OnInit {
record: any = {};
i: any;
ii: any;
schema: SFSchema = {};
ui: SFUISchema = {};
columns: STColumn[] = [];
@ViewChild('sf', { static: false }) sf!: SFComponent;
freightType: any = {
1: '元/吨',
2: '元/方',
3: '元/车'
} // 运单类型
constructor(
private modal: NzModalRef,
private msgSrv: NzMessageService,
public service: SupplyManagementService
) { }
ngOnInit(): void {
this.initSF();
this.initSt();
if (this.record.id > 0)
this.service.request(`/user/${this.record.id}`).subscribe(res => (this.i = res));
console.log(this.i)
const Params = {
id: this.i.id
}
this.service.request(this.service.$api_get_listModifyPrice, Params).subscribe((res) =>{
console.log(res)
this.ii = res[0];
})
}
initSF() {
this.schema = {
properties: {
no1: {
resourceCode: {
type: 'string',
title: '货源编号',
ui: {
widget: 'text'
},
default: 0
},
description3: {
freightPrice: {
type: 'string',
title: '运费单价',
ui: {
widget: 'custom'
}
},
description1: {
rule: {
type: 'string',
title: '取整规则',
enum: [
{ label: '保留小数', value: 0 },
{ label: '抹除小数', value: 1 },
{ label: '抹除个位', value: 2 },
{ label: '保留小数', value: '1' },
{ label: '抹除小数', value: '2' },
{ label: '抹除个位', value: '3' },
],
default: 0,
ui: {
widget: 'select',
optionalHelp: {
text: '例如:付司机运费 = 重量*单价 = 999.99; 保留小数:即 999.99; 抹除小数:即 999.00; 抹除个位,即 990.00',
text: '例如:付司机运费= 重量*单价 = 999.99;\n 保留小数:即 999.99; \n 抹除小数:即 999.00;\n 抹除个位,即 990.00',
}
}
},
},
required: ['owner', 'callNo', 'description1', 'description3'],
required: ['freightPrice', 'rule',],
};
this.ui = {
'*': {
@ -95,9 +99,13 @@ export class SupplyManagementUpdatePriceComponent implements OnInit {
];
}
save(value: any): void {
this.service.request(`/user/${this.record.id}`, value).subscribe(res => {
this.msgSrv.success('保存成功');
this.modal.close(true);
console.log(value)
const { id, freightType, freightPrice, resourceCode, rule, resourceId } = value;
this.service.request(this.service.$api_update_price, { id, freightType, freightPrice, resourceCode, rule, resourceId }).subscribe(res => {
if (res) {
this.msgSrv.success('保存成功');
this.modal.close(true);
}
});
}

View File

@ -55,12 +55,10 @@ export class SupplyManagementVehicleComponent implements OnInit {
* 查询参数
*/
get reqParams() {
console.log(this.resourceStatus)
const a:any = {};
if(this.resourceStatus) {
a.resourceStatus = this.resourceStatus
}
console.log(a)
return {
...a,
...this.sf?.value,

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-12-03 11:10:14
* @LastEditTime: 2021-12-09 21:13:41
* @LastEditTime: 2021-12-10 15:03:10
* @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-management\services\supply-management.service.ts
@ -33,7 +33,9 @@ export class SupplyManagementService extends BaseService {
$api_delete_Wholedeletebatch = `/api/sdc/unLoadingPlace/deletebatch`;
// 删除货物信息
$api_delete_bulkdeletebatch = `/api/sdc/goodsInfo/deletebatch`;
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
$api_get_listModifyPrice = `/api/sdc/goodsInfo/listModifyPrice`;
$api_update_price = `/api/sdc/goodsInfo/modifyPrice`; // 根据货物ID修改单价
constructor(public injector: Injector) {
super(injector)
}

View File

@ -3,7 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal';
import { UsermanageService } from '../../../vehicle/services/vehicle.service';
import { VehicleService } from '../../../vehicle/services/vehicle.service';
@Component({
selector: 'app-Freight-components-list',
templateUrl: './audit.component.html',
@ -46,7 +46,7 @@ export class VehicleComponentsListComponent implements OnInit {
@ViewChild('st', { static: false }) st!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
constructor(public service: UsermanageService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
constructor(public service: VehicleService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {}
/**
* 查询字段个数navigate
*/

View File

@ -27,8 +27,7 @@
</sv-container>
<sv-container col="1">
<sv label="车头照">
<span>{{detailData?.carFrontPhotoWatermark}}</span>
<app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark]"></app-imagelist>
<app-imagelist [imgList]="[detailData?.carFrontPhotoWatermark, detailData?.carFrontPhotoWatermark]"></app-imagelist>
</sv>
</sv-container>
</ng-template>
@ -37,46 +36,46 @@
<sv-container col="3">
<sv-title style="font-weight: 700;">行驶证信息</sv-title>
<sv label="档案编号">
{{ detailData?.contactsName }}
{{ detailData?.archivesNo }}
</sv>
<sv label="准驾车型">
{{ detailData?.contactsPhone }}
{{ detailData?.carModel }}
</sv>
<sv label="行驶证注册日期">
{{ detailData?.contactsPhone }}
{{ detailData?.driverLicenseRegisterTime }}
</sv>
</sv-container>
<sv-container col="2">
<sv label="行驶证到期日">
{{ detailData?.contactsPhone }}
{{ detailData?.driverLicenseEndTime }}
</sv>
<sv label="行驶证签发机关">
{{ detailData?.contactsPhone }}
{{ detailData?.driverLicenseSigningOrg }}
</sv>
</sv-container>
<sv-container col="3">
<sv label="行驶证发证日期">
{{ detailData?.contactsName }}
{{ detailData?.driverLicenseGetTime }}
</sv>
<sv label="车辆识别代码">
{{ detailData?.contactsPhone }}
{{ detailData?.carDistinguishCode }}
</sv>
<sv label="使用性质">
{{ detailData?.contactsPhone }}
{{ detailData?.useNature === '1' ? '营运' : '非营运'}}
</sv>
</sv-container>
<sv-container col="3">
<sv label="载重(吨)">
{{ detailData?.contactsName }}
{{ detailData?.carLoad }}
</sv>
<sv label="整备质量">
{{ detailData?.contactsPhone }}
{{ detailData?.curbWeight }}
</sv>
<sv label="所有人">
{{ detailData?.contactsPhone }}
{{ detailData?.carOwner }}
</sv>
</sv-container>
<sv-container col="1">
@ -84,40 +83,73 @@
{{ detailData?.contactsName }}
</sv>
<sv label="行驶证照片">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
<app-imagelist [imgList]="[detailData?.certificatePhotoFront,detailData?.certificatePhotoBack,detailData?.certificatePhotoFrontWatermark,detailData?.certificatePhotoBackWatermark]"></app-imagelist>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="3" class="mt16">
<sv-title style="font-weight: 700;">道路运输证信息</sv-title>
<sv label="道路运输证号">
{{ detailData?.enterpriseName }}
{{ detailData?.roadTransportNo }}
</sv>
<sv label="许可证起始有效期">
{{ detailData?.unifiedSocialCreditCode }}
<sv label="经营许可证">
{{ detailData?.roadTransportLicenceNo }}
</sv>
<sv label="许可证截至有效期">
{{ detailData?.enterpriseType }}
<sv label="发证日期">
{{ detailData?.roadTransportStartTime }}
</sv>
<sv label="营业执照">
<!-- <app-imagelist [imgList]="detailData?.enterpriseQualificationCertificate"></app-imagelist> -->
<sv label="有效期至">
{{detailData?.roadTransportEndTime}}
</sv>
<sv label="道路运输证照片">
<app-imagelist [imgList]="[detailData?.roadTransportPhoto,detailData?.roadTransportPhotoWatermark ]"></app-imagelist>
</sv>
</sv-container>
<nz-divider></nz-divider>
<sv-container col="2" class="mt16">
<sv-title style="font-weight: 700;">认证司机</sv-title>
</sv-container>
<!-- <st
<st
#st
[bordered]="true"
[columns]="columns"
[data]="servi"
[data]="service.$api_get_queryDriverByCarId"
[req]="{ method: 'POST', allInBody: true, params: reqParams }"
[res]="{ reName: { list: 'data', total: 'data' } }"
[ngStyle]="{ margin: '1rem 0' }"
multiSort
size="small"
[page]="{ show: false }"
>
</st> -->
<ng-template st-row="isSelf" let-item let-index="index">
<div nz-tooltip [nzTooltipTitle]="item.enterpriseName">
<div>
{{ item?.isSelf ? '是' : '否' }}
</div>
</div>
</ng-template>
</st>
</nz-card>
</ng-container>
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel('2')">
<ng-container *nzModalContent>
<nz-tabset>
<nz-tab nzTitle="我的评价">
<div>
评分: <nz-rate [ngModel]="2.5" nzAllowHalf></nz-rate>
<div><span>评价内容:</span></div>
</div>
</nz-tab>
<nz-tab nzTitle="司机评价">
<div>
暂无评价内容
</div>
</nz-tab>
</nz-tabset>
</ng-container>
<ng-template #nzModalFooterEvaluate>
<button nz-button nzType="default" (click)="handleCancel('2')">取消</button>
<button nz-button nzType="primary" (click)="handleOK()">确定</button>
</ng-template>
</nz-modal>

View File

@ -22,28 +22,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
modalTitle = '有效期';
modalName = '';
ui!: SFUISchema;
columns: STColumn[] = [
{ title: '认证司机', index: 'perPrice', width: 300, className: 'text-center' },
{ title: '司机手机号', index: 'goodsQuantity', width: 300, className: 'text-center' },
{ title: '是否挂靠', index: 'goodsQuantity', width: 300, className: 'text-center' },
{ title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' },
{
title: '车主申明/挂靠协议',
fixed: 'right',
width: '200px',
className: 'text-left',
buttons: [
{
text: '查看协议',
click: (_record) => this.viewEvaluate(_record),
},
{
text: '上传协议',
click: (_record) => this.updateEvaluate(_record),
},
],
},
];
columns!: STColumn[];
detailData: any;
schema!: SFSchema;
@ViewChild('sf', { static: false }) sf!: SFComponent;
@ -62,10 +41,17 @@ export class VehicleComponentsListDetailComponent implements OnInit {
) {}
ngOnInit() {
this.getDetailList();
this.initSF();
this.initSF1();
this.getDetailList();
this.initST();
}
/**
* 查询参数
*/
get reqParams() {
return { id: this.route.snapshot?.params?.id };
}
/**
* 初始化查询表单
*/
@ -87,6 +73,30 @@ export class VehicleComponentsListDetailComponent implements OnInit {
};
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
}
initST() {
this.columns =[
{ title: '认证司机', index: 'name', width: 300, className: 'text-center' },
{ title: '司机手机号', index: 'mobile', width: 300, className: 'text-center' },
{ title: '是否挂靠', render: 'isSelf', width: 300, className: 'text-center' },
{ title: '录入人员', index: 'totalPrice', width: 300, className: 'text-center' },
{
title: '车主申明/挂靠协议',
fixed: 'right',
width: '200px',
className: 'text-left',
buttons: [
{
text: '查看协议',
click: (_record) => this.viewEvaluate(_record),
},
{
text: '上传协议',
click: (_record) => this.updateEvaluate(_record),
},
],
},
]
}
initSF1() {
this.schema1 = {
properties: {
@ -128,6 +138,7 @@ export class VehicleComponentsListDetailComponent implements OnInit {
}
// 获取录单员
getDetailList() {
console.log( this.route.snapshot?.params?.id)
const params = {
id: this.route.snapshot?.params?.id
};

View File

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-11-29 15:22:34
* @LastEditTime: 2021-12-10 10:51:34
* @LastEditTime: 2021-12-10 15:35:40
* @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\usercenter\services\usercenter.service.ts
@ -20,6 +20,8 @@ export class VehicleService extends BaseService {
$api_get_operate_list = `/api/mdc/cuc/carLicense/operate/list/page`;
// 获取车辆认证表
$api_get_operate_get = `/api/mdc/cuc/carLicense/operate/get`;
// 获取车辆认证司机列表
$api_get_queryDriverByCarId = `/api/mdc/cuc/userCarLicense/operate/queryDriverByCarId`;
constructor(public injector: Injector) {
super(injector);