fix style

This commit is contained in:
Lingzi
2022-03-07 20:28:44 +08:00
43 changed files with 540 additions and 972 deletions

View File

@ -51,7 +51,7 @@ export class AppComponent implements OnInit {
}); });
const screen: any = window.screen const screen: any = window.screen
var zoom = window.devicePixelRatio || screen.deviceXDPI / screen?.logicalXDPI; var zoom = window.devicePixelRatio || screen.deviceXDPI / screen?.logicalXDPI;
console.log(zoom) // console.log(zoom)
if (document.body.clientWidth >= 1280) { if (document.body.clientWidth >= 1280) {
if (zoom != 1 && zoom != 2 && zoom != 3) { if (zoom != 1 && zoom != 2 && zoom != 3) {
this.themeService.toggleTheme().then(); this.themeService.toggleTheme().then();

View File

@ -158,7 +158,7 @@ export class RefundRecordComponent implements OnInit {
title: '退款类型', title: '退款类型',
enum: [ enum: [
{ value: '1', label: '平台退款货主' }, { value: '1', label: '平台退款货主' },
{ value: '2', label: '司机退款平' }, { value: '2', label: '司机退款平' },
{ value: '3', label: '车队长退款司机' }, { value: '3', label: '车队长退款司机' },
{ value: '4', label: '车队长退款平台' } { value: '4', label: '车队长退款平台' }
], ],
@ -167,7 +167,7 @@ export class RefundRecordComponent implements OnInit {
placeholder: '请选择' placeholder: '请选择'
} }
}, },
shipperId: { enterpriseInfoName: {
type: 'string', type: 'string',
title: '货主', title: '货主',
ui: { ui: {
@ -184,20 +184,17 @@ export class RefundRecordComponent implements OnInit {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
enterpriseProjectId: { enterpriseProjectName: {
type: 'string', type: 'string',
title: '所属项目', title: '所属项目',
ui: { ui: {
widget: 'select', placeholder: '请输入',
placeholder: '请选择',
allowClear: true,
asyncData: () => this.service.getEnterpriseProject(),
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} }
}, },
resourceId: { resourceCode: {
type: 'string', type: 'string',
title: '货源号', title: '货源号',
ui: { ui: {
@ -220,7 +217,7 @@ export class RefundRecordComponent implements OnInit {
nzShowTime: true nzShowTime: true
} as SFDateWidgetSchema } as SFDateWidgetSchema
}, },
ltdid: { ltdId: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
ui: { ui: {
@ -255,7 +252,7 @@ export class RefundRecordComponent implements OnInit {
{ title: '退款类型', index: 'refundTypeLabel', width: 140 }, { title: '退款类型', index: 'refundTypeLabel', width: 140 },
{ title: '退款金额', render: 'refundAmount', className: 'text-right', width: 180 }, { title: '退款金额', render: 'refundAmount', className: 'text-right', width: 180 },
{ title: '退款时间', index: 'refundExecuteTime', width: 170 }, { title: '退款时间', index: 'refundExecuteTime', width: 170 },
{ title: '企业名称', index: 'enterpriseInfoName', width: 150 }, { title: '货主', index: 'enterpriseInfoName', width: 150 },
{ title: '所属项目', index: 'enterpriseProjectName', width: 140 }, { title: '所属项目', index: 'enterpriseProjectName', width: 140 },
{ title: '支付单', render: 'billRefundPaymentVOS', width: 150 }, { title: '支付单', render: 'billRefundPaymentVOS', width: 150 },
{ title: '订单号', index: 'billCode', width: 150 }, { title: '订单号', index: 'billCode', width: 150 },

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-24 16:58:02 * @Date : 2021-12-24 16:58:02
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-04 14:15:24 * @LastEditTime : 2022-03-07 17:32:05
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -201,8 +201,6 @@
</form> </form>
</nz-card> </nz-card>
<nz-card nzTitle="基本信息" #distannce2> <nz-card nzTitle="基本信息" #distannce2>
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf> <sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4"> <sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
<ng-template sf-template="weight" let-item let-ui="ui"> <ng-template sf-template="weight" let-item let-ui="ui">
@ -256,9 +254,6 @@
</ng-template> </ng-template>
</sf> </sf>
</div>
</div>
</nz-card> </nz-card>
<nz-card nzTitle="运费信息"#distannce3> <nz-card nzTitle="运费信息"#distannce3>

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-24 16:58:02 * @Date : 2021-12-24 16:58:02
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-04 14:15:21 * @LastEditTime : 2022-03-07 17:56:10
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -90,6 +90,7 @@ loadTime: any; // 货源单设置回显
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
fb: FormBuilder, fb: FormBuilder,
private envSrv: EAEnvironmentService, private envSrv: EAEnvironmentService,
private ar: ActivatedRoute,
) { ) {
this.validateForm1 = fb.group({ this.validateForm1 = fb.group({
loadTime: [null, []], loadTime: [null, []],
@ -495,7 +496,7 @@ loadTime: any; // 货源单设置回显
this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => { this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => {
if(res) { if(res) {
this.service.msgSrv.success('修改成功!'); this.service.msgSrv.success('修改成功!');
this.router.navigate(['/order-management/bulk']); this.router.navigate(['/order-management/bulk/bulk-detail/', this.id]);
} else { } else {
this.service.msgSrv.error(res?.msg); this.service.msgSrv.error(res?.msg);
} }
@ -623,7 +624,7 @@ loadTime: any; // 货源单设置回显
}; };
this.ui3 = { this.ui3 = {
'*': { '*': {
spanLabelFixed: 90, spanLabelFixed: 110,
grid: { span: 12 } grid: { span: 12 }
} }
}; };
@ -767,7 +768,7 @@ initSF4() {
}; };
this.ui4 = { this.ui4 = {
'*': { '*': {
spanLabelFixed: 90, spanLabelFixed: 110,
grid: { span: 24 } grid: { span: 24 }
}, },
$weight: { $weight: {

View File

@ -456,15 +456,21 @@ export class OrderManagementBulkComponent implements OnInit {
}, },
{ {
title: '接单数量', title: '接单数量',
className: 'text-right', render: 'receveOrderCountInfo',
index: 'goodsNumber', width: '170px',
width: '180px' className: 'text-left',
format: (item: any) =>
`${item.acceptWeight || '--'}吨/
${item.acceptVolume || '--'}`
}, },
{ {
title: '结算量', title: '结算量',
className: 'text-right', index: '结算数量',
index: 'settlementWeight', width: '170px',
width: '150px' className: 'text-left',
format: (item: any) =>
`${item.settlementWeight || '--'}吨/
${item.settlementVolume || '--'}`
}, },
{ {
title: '承运司机', title: '承运司机',

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-23 13:39:58 * @Date : 2021-12-23 13:39:58
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-04 10:42:33 * @LastEditTime : 2022-03-07 17:29:44
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
--> -->
@ -169,8 +169,6 @@
</form> </form>
</nz-card> </nz-card>
<nz-card nzTitle="基本信息" configuration #distannce2> <nz-card nzTitle="基本信息" configuration #distannce2>
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf> <sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4"> <sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
<ng-template sf-template="weight" let-item let-ui="ui"> <ng-template sf-template="weight" let-item let-ui="ui">
@ -232,8 +230,6 @@
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="unloadTime"></nz-date-picker> <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="unloadTime"></nz-date-picker>
</ng-template> </ng-template>
</sf> </sf>
</div>
</div>
</nz-card> </nz-card>
<nz-card nzTitle="运费信息" #distannce3> <nz-card nzTitle="运费信息" #distannce3>

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-23 13:39:58 * @Date : 2021-12-23 13:39:58
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-04 10:48:50 * @LastEditTime : 2022-03-07 17:56:51
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -98,6 +98,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
private modalService: NzModalService, private modalService: NzModalService,
private amapService: AmapService, private amapService: AmapService,
public shipperservice: ShipperBaseService, public shipperservice: ShipperBaseService,
private ar: ActivatedRoute,
fb: FormBuilder, fb: FormBuilder,
private envSrv: EAEnvironmentService private envSrv: EAEnvironmentService
) { ) {
@ -545,7 +546,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
console.log(res); console.log(res);
if (res) { if (res) {
this.service.msgSrv.success('修改成功!'); this.service.msgSrv.success('修改成功!');
this.router.navigate(['/order-management/vehicle']); this.router.navigate(['/order-management/vehicle/vehicle-detail/', this.id], { relativeTo: this.ar });
} else { } else {
this.service.msgSrv.error(res?.msg); this.service.msgSrv.error(res?.msg);
} }
@ -678,12 +679,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
spanLabelFixed: 110, spanLabelFixed: 110,
grid: { span: 12 } grid: { span: 12 }
}, },
$goodsName: {
grid: { span: 12 }
},
$qita: {
grid: { span: 12 }
}
}; };
} }
changeGoodsType(value: string, data: any) { changeGoodsType(value: string, data: any) {
@ -785,7 +780,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
}; };
this.ui4 = { this.ui4 = {
'*': { '*': {
spanLabelFixed: 90, spanLabelFixed: 110,
grid: { span: 24 } grid: { span: 24 }
}, },
$weight: { $weight: {

View File

@ -1,59 +0,0 @@
<button nz-button nzType="primary" style="margin-bottom: 24px" (click)="add()"><i nz-icon
nzType="plus"></i>添加司机</button>
<!-- 搜索区 -->
<div nz-row nzGutter="8">
<div nz-col [nzSpan]="12">
<div nz-row nzGutter="8">
<div nz-col [nzSpan]="18">
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'"></sf>
</div>
<div nz-col [nzSpan]="6">
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st.load(1)">查询</button>
<button nz-button (click)="resetSF()">重置</button>
</div>
</div>
</div>
</div>
<div nz-row nzGutter="8">
<div nz-col [nzSpan]="14">
<!-- 数据列表 -->
<st #st [bordered]="true" [data]="service.$api_get_practice_car_list" [columns]="columns" size="small"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams,lazyLoad:true }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: resProcess}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="service.http.loading" [widthMode]="{ type: 'strict' }" [scroll]="{ x: '600px' }"
style="margin-top: 22px;" (change)="changeSt($event)">
<ng-template st-row="userCarLicenseDesensitizationVOList" let-item let-index="index">
<nz-select [(ngModel)]="item.default" (ngModelChange)="carChange($event, item)" style="width: 100%;">
<nz-option nzValue="" nzLabel="不限"></nz-option>
<nz-option [nzValue]="cart" [nzLabel]="cart.carNo"
*ngFor="let cart of item.userCarLicenseDesensitizationVOList">
</nz-option>
</nz-select>
</ng-template>
</st>
</div>
<div nz-col [nzSpan]="10">
<!-- 选中列表 -->
<div>已选择{{ st2Data.length }}位司机</div>
<st #st2 [bordered]="true" [data]="st2Data" [columns]="columns2" size="small"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loadingDelay]="500" [loading]="service.http.loading" [widthMode]="{ type: 'strict' }">
<ng-template st-row="carNo" let-item let-index="index">
<span>{{ item.carNo ? item.carNo:'不限' }}</span>
</ng-template>
<ng-template st-row="captain" let-item let-index="index">
<span>{{ item.captainName }}&nbsp;{{ item.captainPhone }}</span> &nbsp;
<a (click)="setCaptain(item)">设置</a>
</ng-template>
</st>
</div>
</div>
<div *nzModalFooter>
<button nz-button nzType="default" (click)="cancel()">取消</button>
<button nz-button nzType="primary" (click)="submit()">发布并指派给司机</button>
</div>

View File

@ -1,24 +0,0 @@
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { SupplyManagementBulkAssignedCarComponent } from './assigned-car-bulk.component';
describe('SupplyManagementBulkAssignedCarComponent', () => {
let component: SupplyManagementBulkAssignedCarComponent;
let fixture: ComponentFixture<SupplyManagementBulkAssignedCarComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [SupplyManagementBulkAssignedCarComponent]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SupplyManagementBulkAssignedCarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,292 +0,0 @@
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { STChange, STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper } from '@delon/theme';
import { isTemplateRef } from 'ng-zorro-antd/core/util';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { SupplyManagementService } from '../../services/supply-management.service';
import { SupplyManagementAddDriversComponent } from '../add-drivers/add-drivers.component';
import { PublishchooseFamifiarAddComponent } from '../choose-famifiar/add/add.component';
const BADGE: STColumnBadge = {
1: { text: '空闲', color: 'success' },
2: { text: '未实名', color: 'error' },
3: { text: '在途', color: 'warning' },
};
@Component({
selector: 'app-supply-management-assigned-car',
templateUrl: './assigned-car-bulk.component.html',
})
export class SupplyManagementBulkAssignedCarComponent implements OnInit {
schema: SFSchema = {};
columns!: STColumn[];
i: any;
ui!: SFUISchema;
sfExpand = false;
@ViewChild('st', { static: false })
st!: STComponent;
@ViewChild('sf', { static: false })
sf!: SFComponent;
@ViewChild('st2', { static: false })
st2!: STComponent;
columns2!: STColumn[];
st2Data: STData[] = [];
@Input()
submitUrl = '';
@Input()
submitParams = {};
hasSelectedDrivers = [];
constructor(
private modal: NzModalRef,
public router: Router,
public ar: ActivatedRoute,
public service: SupplyManagementService,
private modalService: NzModalService,
private modalHelper: ModalHelper,
) { }
/**
* 查询参数
*/
get reqParams() {
return {
...this.sf?.value,
isManage: 0
};
}
ngOnInit() {
this.initSF();
this.initST();
this.initST2();
this.getHasAssignedCar(this.i?.id);
}
initSF() {
this.schema = {
properties: {
nameOrPhone: {
type: 'string',
title: '',
ui: {
placeholder: '请输入司机姓名/手机号'
}
},
carNo: {
type: 'string',
title: '',
ui: {
placeholder: '请输入车牌号'
}
}
}
};
this.ui = {
'*': {
spanLabelFixed: 10,
grid: { span: 12, gutter: 4, }
}
};
}
initST() {
this.columns = [
{
title: '司机姓名',
index: 'name'
},
{
title: '手机号',
index: 'telephone'
},
{
title: '指定车辆',
width: 130,
render: 'userCarLicenseDesensitizationVOList'
},
{
title: '状态',
className: 'text-center',
index: 'certificationStatus',
type: 'badge',
badge: {
'-1': { text: '未提交', color: 'default' },
0: { text: '待审核', color: 'processing' },
1: { text: '已认证', color: 'success' },
2: { text: '未认证', color: 'error' }
}
},
{
title: '操作',
className: 'text-center',
buttons: [
{
text: '选择',
iif: item => !item.checked,
click: (_record, _modal, _instance) => this.choose(_record),
iifBehavior: 'disabled'
}
]
}
];
}
initST2() {
this.columns2 = [
{
title: '司机姓名',
index: 'name',
className: 'text-center',
width: '20%'
},
{
title: '手机号',
index: 'telephone',
className: 'text-center',
width: '15%'
},
{
title: '车队长',
render: 'captain',
className: 'text-center',
width: '30%'
},
{
title: '指定车辆',
render: 'carNo',
className: 'text-center',
width: '15%'
},
{
title: '操作',
className: 'text-center',
width: '20%',
buttons: [
{
text: '移除',
click: (_record, _modal, _instance) => this.remove(_record, _modal, _instance)
}
]
}
];
}
// 选择
choose(record: STData) {
this.st2Data = [...this.st2Data, ...[record]];
this.st.setRow(record, { checked: true });
}
// 移除
remove(record: STData, value1: any, comp: any) {
const index = this.st?.list.findIndex((obj: any) => obj.appUserId === record.appUserId);
if (index >= 0) {
comp!.removeRow(record);
this.st2Data = this.st2Data.filter(item => item.appUserId !== record.appUserId);
this.st.setRow(index, { checked: false });
}
}
//添加司机
add() {
this.modalService.create({
nzTitle: '添加司机',
nzContent: PublishchooseFamifiarAddComponent
});
}
//设置车队长
setCaptain(record: STData) {
this.modalHelper.create(SupplyManagementAddDriversComponent, { dirvierInfo: record }, {
size: 900,
modalOptions: { nzMaskClosable: false, nzTitle: '设置' }
}
).subscribe((res) => {
if (res) {
this.st2Data = this.st2Data.map(_item => {
if (_item?.userId === record?.userId) {
_item.captainName = res?.name;
_item.captainPhone = res?.mobile;
_item.captainAppUserId = res?.appUserId;
}
return _item;
})
}
});
}
/**
* 重置表单
*/
resetSF() {
this.sf.reset();
this.sfExpand = false;
this.st.load(1);
}
expandToggle() {
this.sfExpand = !this.sfExpand;
this.sf?.setValue('/_expand', this.sfExpand);
}
// 熟车请求数据处理
resProcess(data: STData[]): STData[] {
return data.map((i, index) => {
const defaultCart = i.userCarLicenseDesensitizationVOList.find((cart: any) => cart.isDefault);
return { ...i, default: defaultCart || '' };
});
}
cancel() {
this.modal.close();
}
submit() {
if (this.st2Data?.length <= 0) {
this.service.msgSrv.warning('请选择熟车');
return;
}
const data = this.st2Data.map(item => ({ driverId: item.appUserId, carId: item.default?.carId || null, carCaptainId: item.captainAppUserId }));
this.service.request(this.service.$api_save_assign_bulk, { id: this.i?.id, carDriverIds: data }).subscribe(res => {
if (res) {
this.service.msgSrv.success('指派成功');
this.modal.destroy(true);
}
});
}
changeSt(e: STChange) {
if (e?.type === 'loaded' && this.st2Data.length > 0) {
// 页面加载完成时勾选
(e?.loaded || []).forEach((r, index) => {
this.st2Data.forEach((x) => {
if (x.appUserId === r.appUserId) {
this.st.setRow(index, { checked: true });
}
});
});
}
}
carChange(event: any, item: STData) {
// this.st.setRow(item, { carName: event });
}
getHasAssignedCar(id: any) {
this.service.request(this.service.$api_get_has_assigned_car_list, { id }).subscribe(res => {
if (res) {
this.hasSelectedDrivers = res;
this.st2Data = [...res];
this.st.reload();
}
})
}
}

View File

@ -57,7 +57,9 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
return { return {
...this.sf?.value, ...this.sf?.value,
loadingTime: this.params?.loadingTime, loadingTime: this.params?.loadingTime,
unloadingTime: this.params?.unloadingTime enterpriseId: this.params?.shipperAppUserId,
enterpriseProjectId: this.params?.enterpriseProjectId,
unloadingTime: this.params?.unloadingTime,
}; };
} }
@ -107,9 +109,20 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
} }
ngOnInit(): void { ngOnInit(): void {
console.log(this.params)
} }
dataProcess(data: STData[]): STData[] { dataProcess = (data: STData[], rawData: any): STData[] => {
if (rawData.status === 505016) {
this.modalSrv.confirm({
nzTitle: '系统提示',
nzContent: '<b>该司机还未注册,是否邀请他注册?点击"是"系统将发送邀请短信给司机</b>',
nzOkText: '确定',
nzCancelText: '取消',
nzOnOk: () => console.log('OK')
});
return [];
}
return data.map((i, index) => { return data.map((i, index) => {
i.carId = ''; i.carId = '';
i.disabled = (i?.certificationStatus === 1 && i.driverStatus === 1); i.disabled = (i?.certificationStatus === 1 && i.driverStatus === 1);

View File

@ -158,6 +158,9 @@
<sv label="回单类型"> <sv label="回单类型">
{{ i?.supplementaryInformationVO?.receiptTypeLabel }} {{ i?.supplementaryInformationVO?.receiptTypeLabel }}
</sv> </sv>
<sv label="联系人">
{{ i?.supplementaryInformationVO?.receiptUserName ? i?.supplementaryInformationVO?.receiptUserName + '/' : '' }} {{ i?.supplementaryInformationVO?.phon }}
</sv>
<sv label="所在地区"> <sv label="所在地区">
{{ i?.supplementaryInformationVO?.area }} {{ i?.supplementaryInformationVO?.area }}
</sv> </sv>

View File

@ -176,50 +176,31 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} }
} }
}, },
dispatchPhone: {
type: 'string',
title: '手机号',
maxLength: 30,
ui: {
hidden: true,
placeholder: '请输入'
}
},
dispatchName: { dispatchName: {
type: 'string', type: 'string',
title: '名', title: '调度员姓名',
maxLength: 30, maxLength: 30,
ui: { ui: {
hidden: true, optionalHelp: '选若未填写,司机直接联系您',
placeholder: '请输入' placeholder: '请输入'
} }
}, },
dispatchId: { dispatchPhone: {
type: 'string', type: 'string',
title: '调度员', title: '调度员手机号',
ui: { maxLength: 30,
widget: 'select', ui: {
placeholder: '请选择', placeholder: '请输入'
allowClear: true, }
change: (value: any, data: any) => { },
if (data.label) {
const dat = data.label.split('/');
this.sf1.setValue('/dispatchName', dat[0]);
this.sf1.setValue('/dispatchPhone', dat[1]);
}
},
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
asyncData: () => this.shipperSrv.getStaffList2()
} as SFSelectWidgetSchema
}
}, },
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoId', 'deadlineTime'] required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', 'deadlineTime']
}; };
this.ui1 = { this.ui1 = {
'*': { '*': {
spanLabelFixed: 120, spanLabelFixed: 115,
grid: { span: 8 } grid: { span: 12 }
} },
}; };
} }
initSF3() { initSF3() {
@ -281,6 +262,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -289,7 +271,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
} }
} }
}, },
required: ['goodsTypeId', 'goodsName', 'goodsNameId'] required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1']
}; };
this.ui3 = { this.ui3 = {
'*': { '*': {
@ -717,7 +699,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
...this.sf1.value, ...this.sf1.value,
...this.sf7.value, ...this.sf7.value,
unLoadingPlaceDTOList: LoadingList, unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoDTOList goodsInfoDTOList: goodsInfoDTOList,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
}; };
params.freightPrice = this.totalFees; params.freightPrice = this.totalFees;
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
@ -904,6 +888,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
if (res?.enterpriseProjectId) { if (res?.enterpriseProjectId) {
this.enterpriseProjectIds = res.enterpriseProjectId; this.enterpriseProjectIds = res.enterpriseProjectId;
} }
this.totalDistance = res?.estimatedKilometers;
this.totalTime = res?.estimatedTravelTime;
this.sf1data = { this.sf1data = {
dispatchPhone: res?.dispatchPhone, dispatchPhone: res?.dispatchPhone,
dispatchName: res?.dispatchName, dispatchName: res?.dispatchName,
@ -911,7 +897,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
enterpriseProjectId: res?.enterpriseProjectId || '', enterpriseProjectId: res?.enterpriseProjectId || '',
enterpriseInfoName: res?.enterpriseInfoName || '', enterpriseInfoName: res?.enterpriseInfoName || '',
externalResourceCode: res?.externalResourceCode || '', externalResourceCode: res?.externalResourceCode || '',
dispatchId: res?.dispatchId || '',
deadlineTime: res?.deadlineTime || '' deadlineTime: res?.deadlineTime || ''
}; };
if (this.PageStatus === '大宗修改') { if (this.PageStatus === '大宗修改') {
@ -1022,9 +1007,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
this.sf7data = { this.sf7data = {
stateReceipt: res?.stateReceipt, stateReceipt: res?.stateReceipt,
receiptType: res?.receiptType || '', receiptType: res?.receiptType || '',
receiptUserName: res?.receiptUserName || '', receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '',
receiptAddressArea: res?.receiptAddressArea || '', receiptAddressArea: res?.supplementaryInformationVO?.area || '',
receiptUserPhone: res?.receiptUserPhone || '', receiptUserPhone: res?.supplementaryInformationVO?.phon || '',
receiptAddress: res?.receiptAddress || '', receiptAddress: res?.receiptAddress || '',
paymentDays: res?.paymentDays || '', paymentDays: res?.paymentDays || '',
remarks: res?.remarks || '' remarks: res?.remarks || ''

View File

@ -7,13 +7,9 @@
</page-header-wrapper> </page-header-wrapper>
<nz-card> <nz-card>
<div class="card-title">货源单设置</div> <div class="card-title">货源单设置</div>
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data"> <sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data">
<ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template> <ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template>
</sf> </sf>
</div>
</div>
</nz-card> </nz-card>
<nz-card> <nz-card>

View File

@ -199,42 +199,23 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
}, },
} }
}, },
dispatchPhone: {
type: 'string',
title: '手机号',
maxLength: 11,
ui: {
hidden: true,
placeholder: '请输入'
}
},
dispatchName: { dispatchName: {
type: 'string', type: 'string',
title: '名', title: '调度员姓名',
maxLength: 30, maxLength: 30,
ui: { ui: {
hidden: true, optionalHelp: '选若未填写,司机直接联系您',
placeholder: '请输入' placeholder: '请输入'
} }
}, },
dispatchId: { dispatchPhone: {
type: 'string', type: 'string',
title: '调度员', title: '调度员手机号',
ui: { maxLength: 30,
widget: 'select', ui: {
placeholder: '请选择', placeholder: '请输入'
allowClear: true, }
change: (value: any, data: any) => { },
if(data.label) {
const dat = data.label.split('/')
this.sf1.setValue('/dispatchName', dat[0]);
this.sf1.setValue('/dispatchPhone', dat[1]);
}
},
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
asyncData: () => this.shipperSrv.getStaffList2()
} as SFSelectWidgetSchema
}
}, },
required: ['shipperAppUserId', 'enterpriseProjectId','enterpriseInfoName','enterpriseInfoId', 'deadlineTime',] required: ['shipperAppUserId', 'enterpriseProjectId','enterpriseInfoName','enterpriseInfoId', 'deadlineTime',]
}; };
@ -307,6 +288,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -315,7 +297,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
} }
} }
}, },
required: ['goodsTypeId', 'goodsName', 'goodsNameId'] required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1']
}; };
this.ui3 = { this.ui3 = {
'*': { '*': {
@ -638,7 +620,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
...this.sf1.value, ...this.sf1.value,
unLoadingPlaceDTOList: LoadingList, unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoList, goodsInfoDTOList: goodsInfoList,
...this.sf6.value ...this.sf6.value,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
}; };
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzTitle: '运输协议', nzTitle: '运输协议',

View File

@ -2,14 +2,12 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme'; import { _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared'; import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementService } from '../../services/supply-management.service';
import { SupplyManagementBulkAssignedCarComponent } from '../assigned-car-bulk/assigned-car-bulk.component';
import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component';
import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component'; import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component';
import { SupplyManagementUpdatePriceComponent } from '../update-price/update-price.component'; import { SupplyManagementUpdatePriceComponent } from '../update-price/update-price.component';

View File

@ -1,17 +1,15 @@
import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core'; import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { STColumn, STComponent, STData } from '@delon/abc/st';
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { ModalHelper } from '@delon/theme'; import { ModalHelper } from '@delon/theme';
import { EAEnvironmentService, processSingleSort } from '@shared'; import { EAEnvironmentService } from '@shared';
import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer'; import { NzDrawerService } from 'ng-zorro-antd/drawer';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { SupplyManagementAddDriversComponent } from 'src/app/routes/supply-management/components/add-drivers/add-drivers.component'; import { SupplyManagementAddDriversComponent } from 'src/app/routes/supply-management/components/add-drivers/add-drivers.component';
import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementService } from '../../services/supply-management.service';
import { CarAddmodalComponent } from '../addmodal/addmodal.component'; import { CarAddmodalComponent } from '../addmodal/addmodal.component';
import { PublishchooseFamifiarAddComponent } from './add/add.component';
import { PublishchooseFamifiarSetCaptainComponent } from './set-captain/set-captain.component';
@Component({ @Component({
selector: 'app-publish-goods-choose-famifiar', selector: 'app-publish-goods-choose-famifiar',
@ -37,7 +35,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
submitUrl = ''; submitUrl = '';
@Input() @Input()
submitParams:any; submitParams: any;
constructor( constructor(
private modal: NzModalRef, private modal: NzModalRef,
@ -241,7 +239,17 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
} }
// 熟车请求数据处理 // 熟车请求数据处理
reqProcess(data: STData[]): STData[] { reqProcess = (data: STData[], rawData: any): STData[] => {
if (rawData.status === 505016) {
this.modalService.confirm({
nzTitle: '系统提示',
nzContent: '<b>该司机还未注册,是否邀请他注册?点击"是"系统将发送邀请短信给司机</b>',
nzOkText: '确定',
nzCancelText: '取消',
nzOnOk: () => console.log('OK')
});
return [];
}
return data.map((i, index) => { return data.map((i, index) => {
const defaultCart = i.userCarLicenseDesensitizationVOList.find((cart: any) => cart.isDefault); const defaultCart = i.userCarLicenseDesensitizationVOList.find((cart: any) => cart.isDefault);
return { ...i, default: defaultCart || '' }; return { ...i, default: defaultCart || '' };
@ -271,52 +279,52 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
} }
carChange(event: any, item: STData) { carChange(event: any, item: STData) {
} }
/** /**
* 验证车辆的状态 * 验证车辆的状态
*/ */
verifyVechicleStatus(_record: STData) { verifyVechicleStatus(_record: STData) {
const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = _record; const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = _record;
const carInfo: any = { carId, driverId, carCaptainId }; const carInfo: any = { carId, driverId, carCaptainId };
const goodsInfoList = this.submitParams?.goodsInfoList; const goodsInfoList = this.submitParams?.goodsInfoList;
this.service.request(this.service.$api_verify_vehicle_status, { ...carInfo, goodsInfoList }).subscribe((res: any) => { this.service.request(this.service.$api_verify_vehicle_status, { ...carInfo, goodsInfoList }).subscribe((res: any) => {
if (res) { if (res) {
const { title, alert, subContent, content } = res; const { title, alert, subContent, content } = res;
switch (alert) { switch (alert) {
case 'Error': case 'Error':
this.error(title, content, subContent); this.error(title, content, subContent);
break; break;
case 'Warn': case 'Warn':
this.showConfirm(_record, title, content, subContent); this.showConfirm(_record, title, content, subContent);
break; break;
case 'Success': case 'Success':
this.choose(_record); this.choose(_record);
break; break;
}
} }
}); }
});
}
}
error(title: string, content: string, subContent: string): void {
this.modalService.error({ error(title: string, content: string, subContent: string): void {
nzTitle: title, this.modalService.error({
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`, nzTitle: title,
nzOkText: '知道了' nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
}); nzOkText: '知道了'
} });
}
showConfirm(_record: STData, title: string, content: string, subContent: string): void {
this.modalService.confirm({ showConfirm(_record: STData, title: string, content: string, subContent: string): void {
nzTitle: title, this.modalService.confirm({
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`, nzTitle: title,
nzOkText: '继续', nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
nzCancelText: '取消', nzOkText: '继续',
nzOnOk: () => { nzCancelText: '取消',
this.choose(_record); nzOnOk: () => {
} this.choose(_record);
}); }
} });
}
} }

View File

@ -177,6 +177,7 @@
<ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template> <ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template>
</form> </form>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">货物信息</div> <div class="card-title">货物信息</div>
<div nz-row> <div nz-row>
@ -187,47 +188,32 @@
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<ng-template sf-template="weight" let-i let-ui="ui"> <ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''"> <nz-input-group [nzAddOnAfter]="''">
<input <input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
nz-input placeholder="总重量,必填" oninput="if(value>99999)value=99999;if(value<0)value=0" />
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总重量,必填"
oninput="if(value>99999)value=99999;if(value<0)value=0"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
<ng-template sf-template="volume" let-i let-ui="ui"> <ng-template sf-template="volume" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''"> <nz-input-group [nzAddOnAfter]="''">
<input <input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
nz-input placeholder="体积" oninput="if(value>99999)value=99999;if(value<0)value=0" />
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="体积"
oninput="if(value>99999)value=99999;if(value<0)value=0"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
<ng-template sf-template="number" let-i let-ui="ui"> <ng-template sf-template="number" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''"> <nz-input-group [nzAddOnAfter]="''">
<input <input nz-input type="number" [ngModel]="i.value" min="0" (ngModelChange)="i.setValue($event)" placeholder="件数"
nz-input oninput="if(value>99999)value=99999;if(value<0)value=0" />
type="number"
[ngModel]="i.value"
min="0"
(ngModelChange)="i.setValue($event)"
placeholder="车次"
oninput="if(value>99999)value=99999;if(value<0)value=0"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
<ng-template sf-template="goodsValue" let-i let-ui="ui">
<div class="align-center">
<nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="2000000" [nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入50000-2000000之间数值">
</nz-input-number>
</div>
</ng-template>
</sf> </sf>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">服务信息</div> <div class="card-title">服务信息</div>
<div nz-row> <div nz-row>
@ -239,34 +225,8 @@
<ng-template sf-template="freeInsurance2" let-i let-ui="ui"> <ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template> </ng-template>
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template> <ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保单次运输保额仅限200万元以内详见<a target="_blank" [queryParams]="{ type: 10 }"
<ng-template sf-template="goodsValue" let-i let-ui="ui"> [routerLink]="['/agreement']">《投保告知》</a></ng-template>
<div class="align-center">
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="2000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-2000000之间数值"
></nz-input-number>
</div>
</ng-template>
<ng-template sf-template="insurancePremium" let-i let-ui="ui">
<div class="align-center">
<input nz-input placeholder="保价费金额" [ngModel]="i.value" [disabled]="true" />
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
></span>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知函》;</p>
<p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p>
<p>③最低保费12元/每单单次运输保额仅限200万元以内</p>
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
</ng-template>
</div>
</ng-template>
</sf> </sf>
</div> </div>
</div> </div>

View File

@ -50,3 +50,7 @@ input[type='number']::-webkit-outer-spin-button {
margin: 0; margin: 0;
-webkit-appearance: none; -webkit-appearance: none;
} }
.hides {
margin-left: 10px;
color: aqua;
}

View File

@ -188,6 +188,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
widget: 'text' widget: 'text'
} }
}, },
externalResourceCode: { externalResourceCode: {
type: 'string', type: 'string',
title: '外部货源号', title: '外部货源号',
@ -196,50 +197,58 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
dispatchPhone: {
type: 'string',
title: '手机号',
maxLength: 30,
ui: {
hidden: true,
placeholder: '请输入'
}
},
dispatchName: { dispatchName: {
type: 'string', type: 'string',
title: '名', title: '调度员姓名',
maxLength: 30, maxLength: 30,
ui: { ui: {
hidden: true, optionalHelp: '选若未填写,司机直接联系您',
placeholder: '请输入' placeholder: '请输入'
} }
}, },
dispatchId: { dispatchPhone: {
type: 'string', type: 'string',
title: '调度员', title: '调度员手机号',
ui: { maxLength: 30,
widget: 'select', ui: {
placeholder: '请选择', placeholder: '请输入'
allowClear: true, }
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您', },
change: (_value: any, data: any) => { // dispatchId: {
if (data.label) { // type: 'string',
const dat = data.label.split('/'); // title: '调度员',
this.sf1.setValue('/dispatchName', dat[0]); // ui: {
this.sf1.setValue('/dispatchPhone', dat[1]); // widget: 'select',
} // placeholder: '请选择',
}, // allowClear: true,
asyncData: () => this.shipperSrv.getStaffList2() // optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
} as SFSelectWidgetSchema // change: (_value: any, data: any) => {
} // if (data.label) {
// const dat = data.label.split('/');
// this.sf1.setValue('/dispatchName', dat[0]);
// this.sf1.setValue('/dispatchPhone', dat[1]);
// }
// },
// asyncData: () => this.shipperSrv.getStaffList2()
// } as SFSelectWidgetSchema
// },
}, },
required: ['shipperAppUserId', 'enterpriseProjectId'] required: ['shipperAppUserId', 'enterpriseProjectId']
}; };
this.ui1 = { this.ui1 = {
'*': { '*': {
spanLabelFixed: 120, spanLabelFixed: 115,
grid: { span: 8 } grid: { span: 12 }
} },
$enterpriseInfoName: {
grid: { span: 12 }
},
$shipperAppUserId: {
grid: { span: 12 }
},
$enterpriseProjectId: {
grid: { span: 12 }
},
}; };
} }
initSF3() { initSF3() {
@ -301,6 +310,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -309,7 +319,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
} }
}, },
required: ['goodsTypeId', 'goodsName', 'goodsNameId'] required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1']
}; };
this.ui3 = { this.ui3 = {
'*': { '*': {
@ -327,7 +337,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入', placeholder: '请输入',
errors: { required: '必填项' } errors: { required: '必填项' },
validator: val => this.customValidator(val)
} }
}, },
volume: { volume: {
@ -335,7 +346,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
number: { number: {
@ -343,7 +354,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
carModel: { carModel: {
@ -375,37 +386,60 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
change: (tag: any, org: any) => { change: (tag: any, org: any) => {
if (tag.includes('999')) { if (tag.includes('999')) {
this.sf4.setValue('/carModel', ['999']); this.sf4.setValue('/carLength', ['999']);
} }
} }
} }
} },
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
}
},
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
} as SFSelectWidgetSchema
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
}
},
}, },
required: ['weight', 'carModel', 'carLength'] required: ['weight', 'carModel', 'carLength']
}; };
this.ui4 = { this.ui4 = {
'*': { '*': {
spanLabelFixed: 90, spanLabelFixed: 115,
grid: { span: 24 }
},
$weight: {
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
},
$volume: {
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
},
$number: {
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
},
$carModel: {
spanLabelFixed: 100,
grid: { span: 8 }
},
$carLength: {
grid: { span: 8 } grid: { span: 8 }
} }
}; };
} }
initSF5() { initSF5() {
this.schema5 = { this.schema5 = {
properties: { properties: {
@ -435,73 +469,30 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
type1: { type1: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +10', '车源匹配率 +10'], enum: ['源曝光率 +10', '车源匹配率 +10'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '0' } visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +10', '车源匹配率 +10'] default: ['源曝光率 +10', '车源匹配率 +10']
}, },
type2: { type2: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +20', '车源匹配率 +20'], enum: ['源曝光率 +20', '车源匹配率 +20'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '1' } visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +20', '车源匹配率 +20'] default: ['源曝光率 +20', '车源匹配率 +20']
},
freeInsurance1: {
type: 'string',
title: '赠送基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '赠送综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
visibleIf: { insuranceType: (value: string) => value !== '3' }
} as SFSelectWidgetSchema
},
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
}
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
}, },
insurancePremium: { insurancePremium: {
type: 'string', type: 'string',
title: '', title: '服务包费用',
readOnly:true,
ui: { ui: {
widget: 'custom',
validator: val => this.customValidator(val),
visibleIf: { insuranceType: (value: string) => value !== '3' } visibleIf: { insuranceType: (value: string) => value !== '3' }
} }
}, },
@ -511,9 +502,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: { ui: {
hidden: true hidden: true
} }
} },
freeInsurance1: {
type: 'string',
title: '预投基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '预投综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
}, },
required: ['insurancePackagedGoods', 'insurancePremium'] required: [ 'insurancePremium']
}; };
this.ui5 = { this.ui5 = {
'*': { '*': {
@ -534,6 +543,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
}; };
} }
/** /**
* 自定义校验数据 * 自定义校验数据
* @param val * @param val
@ -648,19 +658,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
prePay: { prePay: {
type: 'number', type: 'number',
title: '预付', title: '预付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
toPay: { toPay: {
type: 'number', type: 'number',
title: '到付', title: '到付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
receiptPay: { receiptPay: {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
@ -992,7 +999,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
...this.sf5.value, ...this.sf5.value,
...this.sf6.value, ...this.sf6.value,
expenseDTOList: expenseList, expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays paymentDays: this.sf7.value.paymentDays,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods:this.sf4.value.insurancePackagedGoods,
goodsValue:this.sf4.value.goodsValue,
}; };
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzTitle: '运输协议', nzTitle: '运输协议',
@ -1117,13 +1128,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
if (res?.enterpriseProjectId) { if (res?.enterpriseProjectId) {
this.enterpriseProjectIds = res.enterpriseProjectId; this.enterpriseProjectIds = res.enterpriseProjectId;
} }
this.totalDistance = res?.estimatedKilometers;
this.totalTime = res?.estimatedTravelTime;
this.sf1data = { this.sf1data = {
enterpriseInfoName: res?.enterpriseInfoName, enterpriseInfoName: res?.enterpriseInfoName,
enterpriseInfoId: res?.enterpriseInfoId, enterpriseInfoId: res?.enterpriseInfoId,
dispatchPhone: res?.dispatchPhone, dispatchPhone: res?.dispatchPhone,
dispatchName: res?.dispatchName, dispatchName: res?.dispatchName,
externalResourceCode: res?.externalResourceCode, externalResourceCode: res?.externalResourceCode,
dispatchId: res?.dispatchId
}; };
if (this.PageStatus === '整车修改') { if (this.PageStatus === '整车修改') {
this.sf1data.id = res?.id; this.sf1data.id = res?.id;
@ -1233,7 +1245,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
volume: res?.goodsInfoVOList[0]?.volume || '', volume: res?.goodsInfoVOList[0]?.volume || '',
number: res?.goodsInfoVOList[0]?.number || '', number: res?.goodsInfoVOList[0]?.number || '',
carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [], carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [],
carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [] carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [],
goodsValue: res?.goodsValue || '',
insurancePackagedGoods: res?.insurancePackagedGoods || '',
}; };
if (this.PageStatus === '整车修改') { if (this.PageStatus === '整车修改') {
this.sf4data.id = res?.goodsInfoVOList[0]?.id; this.sf4data.id = res?.goodsInfoVOList[0]?.id;
@ -1241,18 +1255,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.totalFees = res?.shippingInformationVO?.totalFee || '0'; this.totalFees = res?.shippingInformationVO?.totalFee || '0';
this.sf5data = { this.sf5data = {
insuranceType: res?.insuranceType || '', insuranceType: res?.insuranceType || '',
goodsValue: res?.goodsValue || '',
insurancePremium: res?.insurancePremium || '', insurancePremium: res?.insurancePremium || '',
insuranceRate: res?.insuranceRate || '', insuranceRate: res?.insuranceRate || '',
insurancePackagedGoods: res?.insurancePackagedGoods || ''
}; };
this.sf6data = { this.sf6data = {
stateReceipt: res?.stateReceipt, stateReceipt: res?.stateReceipt,
receiptType: res?.receiptType || '', receiptType: res?.receiptType || '',
receiptUserName: res?.receiptUserName || '', receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '',
receiptAddressArea: res?.receiptAddressArea || '', receiptAddressArea: res?.supplementaryInformationVO?.area || '',
receiptUserPhone: res?.receiptUserPhone || '', receiptUserPhone: res?.supplementaryInformationVO?.phon || '',
receiptAddress: res?.receiptAddress || '', receiptAddress: res?.supplementaryInformationVO.address || '',
remarks: res?.supplementaryInformationVO?.remarks || '' remarks: res?.supplementaryInformationVO?.remarks || ''
}; };
this.sf7data = { this.sf7data = {
@ -1371,17 +1383,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
// 计算保价费金额 // 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) {
const params = { const params = {
insuranceType, insuranceType,
goodsValue: this.sf5.value.goodsValue, goodsValue: this.sf4.value.goodsValue,
km: this.totalDistance km: this.totalDistance
}; };
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
if (res) { if (res) {
this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insurancePremium', res.insurancePremium);
this.sf5.setValue('/insuranceRate', res.insuranceRate); this.sf5.setValue('/insuranceRate', res.insuranceRate);
} else { }else{
this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null); this.sf5.setValue('/insuranceRate', null);
} }

View File

@ -7,13 +7,9 @@
</page-header-wrapper> </page-header-wrapper>
<nz-card> <nz-card>
<div class="card-title">货源单设置</div> <div class="card-title">货源单设置</div>
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data"> <sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data">
<ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template> <ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template>
</sf> </sf>
</div>
</div>
</nz-card> </nz-card>
<nz-card> <nz-card>
@ -184,55 +180,43 @@
</form> </form>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">货物信息</div> <div class="card-title">货物信息</div>
<div nz-row> <div nz-row>
<div nz-col nzSpan="24"> <div nz-col nzSpan="16">
<sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf> <sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf>
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总重量,必填"
/>
</nz-input-group>
</ng-template>
<ng-template sf-template="volume" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总体积"
/>
</nz-input-group>
</ng-template>
<ng-template sf-template="number" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input
nz-input
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总车次"
/>
</nz-input-group>
</ng-template>
</sf>
</div> </div>
</div> </div>
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<ng-template sf-template="weight" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
placeholder="总重量,必填" oninput="if(value>99999)value=99999;if(value<0)value=0" />
</nz-input-group>
</ng-template>
<ng-template sf-template="volume" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
placeholder="体积" oninput="if(value>99999)value=99999;if(value<0)value=0" />
</nz-input-group>
</ng-template>
<ng-template sf-template="number" let-i let-ui="ui">
<nz-input-group [nzAddOnAfter]="''">
<input nz-input type="number" [ngModel]="i.value" min="0" (ngModelChange)="i.setValue($event)" placeholder="件数"
oninput="if(value>99999)value=99999;if(value<0)value=0" />
</nz-input-group>
</ng-template>
<ng-template sf-template="goodsValue" let-i let-ui="ui">
<div class="align-center">
<nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="2000000" [nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入50000-2000000之间数值">
</nz-input-number>
</div>
</ng-template>
</sf>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">服务信息</div> <div class="card-title">服务信息</div>
<div nz-row> <div nz-row>
@ -244,34 +228,8 @@
<ng-template sf-template="freeInsurance2" let-i let-ui="ui"> <ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template> </ng-template>
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template> <ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保单次运输保额仅限200万元以内详见<a target="_blank" [queryParams]="{ type: 10 }"
<ng-template sf-template="goodsValue" let-i let-ui="ui"> [routerLink]="['/agreement']">《投保告知》</a></ng-template>
<div class="align-center">
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="2000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-2000000之间数值"
></nz-input-number>
</div>
</ng-template>
<ng-template sf-template="insurancePremium" let-i let-ui="ui">
<div class="align-center">
<input nz-input placeholder="保价费金额" [ngModel]="i.value" [disabled]="true" />
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
></span>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知函》;</p>
<p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p>
<p>③最低保费12元/每单单次运输保额仅限200万元以内</p>
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
</ng-template>
</div>
</ng-template>
</sf> </sf>
</div> </div>
</div> </div>

View File

@ -176,14 +176,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
allowClear: true allowClear: true
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
// enterpriseInfoName: {
// type: 'string',
// title: '网络货运人',
// ui: {
// widget: 'custom'
// },
// default: '天津市怡亚通XXXX有限公司'
// },
enterpriseInfoName: { enterpriseInfoName: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
@ -203,52 +195,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
placeholder: '请输入' placeholder: '请输入'
} }
}, },
dispatchPhone: {
type: 'string',
title: '手机号',
maxLength: 30,
ui: {
hidden: true,
placeholder: '请输入'
}
},
dispatchName: { dispatchName: {
type: 'string', type: 'string',
title: '名', title: '调度员姓名',
maxLength: 30, maxLength: 30,
ui: { ui: {
hidden: true, optionalHelp: '选若未填写,司机直接联系您',
placeholder: '请输入' placeholder: '请输入'
} }
}, },
dispatchId: { dispatchPhone: {
type: 'string', type: 'string',
title: '调度员', title: '调度员手机号',
ui: { maxLength: 30,
widget: 'select', ui: {
placeholder: '请选择', placeholder: '请输入'
allowClear: true, }
change: (_value: any, data: any) => { },
if (data.label) {
const dat = data.label.split('/');
this.sf1.setValue('/dispatchName', dat[0]);
this.sf1.setValue('/dispatchPhone', dat[1]);
}
},
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
asyncData: () => this.shipperSrv.getStaffList2()
} as SFSelectWidgetSchema
}
}, },
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName'] required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName']
}; };
this.ui1 = { this.ui1 = {
'*': { '*': {
spanLabelFixed: 110, spanLabelFixed: 115,
grid: { span: 12 } grid: { span: 12 }
}, },
$enterpriseInfoName: { $enterpriseInfoName: {
grid: { span: 24 } grid: { span: 12 }
},
$shipperAppUserId: {
grid: { span: 12 }
},
$enterpriseProjectId: {
grid: { span: 12 }
},
$dispatchId: {
grid: { span: 12 }
} }
}; };
} }
@ -311,6 +293,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -346,7 +329,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
number: { number: {
@ -354,7 +337,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
carModel: { carModel: {
@ -390,7 +373,45 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
} }
} }
} },
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
}
},
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
} as SFSelectWidgetSchema
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
}
},
}, },
required: ['weight', 'carModel', 'carLength'] required: ['weight', 'carModel', 'carLength']
}; };
@ -398,10 +419,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
'*': { '*': {
spanLabelFixed: 115, spanLabelFixed: 115,
grid: { span: 8 } grid: { span: 8 }
},
$carModel: {
spanLabelFixed: 100,
grid: { span: 8 }
} }
}; };
} }
@ -435,73 +452,30 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
type1: { type1: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +10', '车源匹配率 +10'], enum: ['源曝光率 +10', '车源匹配率 +10'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '0' } visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +10', '车源匹配率 +10'] default: ['源曝光率 +10', '车源匹配率 +10']
}, },
type2: { type2: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +20', '车源匹配率 +20'], enum: ['源曝光率 +20', '车源匹配率 +20'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '1' } visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +20', '车源匹配率 +20'] default: ['源曝光率 +20', '车源匹配率 +20']
},
freeInsurance1: {
type: 'string',
title: '赠送基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '赠送综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
visibleIf: { insuranceType: (value: string) => value !== '3' }
} as SFSelectWidgetSchema
},
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
}
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
}, },
insurancePremium: { insurancePremium: {
type: 'string', type: 'string',
title: '', title: '服务包费用',
readOnly:true,
ui: { ui: {
widget: 'custom',
validator: val => this.customValidator(val),
visibleIf: { insuranceType: (value: string) => value !== '3' } visibleIf: { insuranceType: (value: string) => value !== '3' }
} }
}, },
@ -511,9 +485,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
ui: { ui: {
hidden: true hidden: true
} }
} },
freeInsurance1: {
type: 'string',
title: '预投基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '预投综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
}, },
required: ['insurancePackagedGoods', 'insurancePremium'] required: [ 'insurancePremium']
}; };
this.ui5 = { this.ui5 = {
'*': { '*': {
@ -535,6 +527,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}; };
} }
initSF6() { initSF6() {
this.schema6 = { this.schema6 = {
properties: { properties: {
@ -632,19 +625,16 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
prePay: { prePay: {
type: 'number', type: 'number',
title: '预付', title: '预付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
toPay: { toPay: {
type: 'number', type: 'number',
title: '到付', title: '到付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
receiptPay: { receiptPay: {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
@ -942,20 +932,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' },
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' }
]; ];
console.log(this.sf55?.value);
// const params = {
// id: '',
// ...this.sf1.value,
// unLoadingPlaceDTOList: LoadingList,
// unloadingTime: format(this.validateForm1.value?.unloadingTime, 'yyyy-MM-dd HH:mm:ss'),
// loadingTime: format(this.validateForm1.value?.loadingTime, 'yyyy-MM-dd HH:mm:ss'),
// goodsInfoDTOList: goodsInfoList,
// ...this.sf5.value,
// ...this.sf6.value,
// expenseDTOList: expenseList,
// paymentDays: this.sf7.value?.paymentDays,
// insuranceType:this.sf55?.value?.insuranceType,
// };
const params = { const params = {
id: '', id: '',
...this.sf1.value, ...this.sf1.value,
@ -966,7 +942,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
...this.sf5.value, ...this.sf5.value,
...this.sf6.value, ...this.sf6.value,
expenseDTOList: expenseList, expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays paymentDays: this.sf7.value.paymentDays,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods:this.sf4.value.insurancePackagedGoods,
goodsValue:this.sf4.value.goodsValue,
}; };
console.log(params); console.log(params);
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
@ -1182,17 +1162,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
// 计算保价费金额 // 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) {
const params = { const params = {
insuranceType, insuranceType,
goodsValue: this.sf5.value.goodsValue, goodsValue: this.sf4.value.goodsValue,
km: this.totalDistance km: this.totalDistance
}; };
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
if (res) { if (res) {
this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insurancePremium', res.insurancePremium);
this.sf5.setValue('/insuranceRate', res.insuranceRate); this.sf5.setValue('/insuranceRate', res.insuranceRate);
} else { }else{
this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null); this.sf5.setValue('/insuranceRate', null);
} }

View File

@ -163,7 +163,32 @@ export class SupplyManagementVehicleComponent implements OnInit {
}); });
modalRef.afterClose.subscribe(result => { modalRef.afterClose.subscribe(result => {
if (result) { if (result) {
this.st.reload(); const tipsModal = this.modal.create({
nzTitle: '上传提示',
nzWidth: 600,
nzContent: `<div>文件上传完成!成功<span class="text-blue-dark">${result?.successNumber}</span>条,失败<span class="text-red-dark">${result?.failNumber}</span>条!</div>`,
nzFooter: [
{
label: '取 消',
type: 'default',
onClick: () => {
tipsModal.destroy();
}
},
{
label: '下载失败数据',
type: 'primary',
onClick: () => {
this.service.request(this.service.$api_getFailUploadGoodsOperateResource, result.ids).subscribe((res: any) => {
if(res) {
console.log(res);
}
})
console.log(111);
}
},
]
})
} }
}); });
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-03-01 15:13:03 * @Date : 2022-03-01 15:13:03
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-07 11:09:33 * @LastEditTime : 2022-03-07 13:50:55
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -32,6 +32,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
files2: any; files2: any;
schema: SFSchema = {}; schema: SFSchema = {};
ui: SFUISchema = {}; ui: SFUISchema = {};
networkTransporter: any; // 网络货运人id
uploadUrl = apiConf.file_upload_url; uploadUrl = apiConf.file_upload_url;
@ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sf', { static: false }) sf!: SFComponent;
constructor( constructor(
@ -78,7 +79,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
} }
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
netTranName: { enterpriseInfoId: {
type: 'string', type: 'string',
title: '网络货运人', title: '网络货运人',
ui: { ui: {
@ -109,7 +110,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
} }
}, },
}, },
required: ['shipperAppUserId', 'enterpriseProjectId','netTranName','fileName'], required: ['shipperAppUserId', 'enterpriseProjectId','enterpriseInfoId','fileName'],
}; };
this.ui = { this.ui = {
'*': { '*': {
@ -146,23 +147,22 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
console.log(regionCode); console.log(regionCode);
return this.service return this.service
.request(this.service.$api_getNetworkTransporter, { id: regionCode }).subscribe((res: any) => { .request(this.service.$api_getNetworkTransporter, { id: regionCode }).subscribe((res: any) => {
console.log(res?.netTranName) console.log(res)
console.log(res?.networkTransporter) this.networkTransporter = res.networkTransporter
this.sf.getProperty('/netTranName')!.widget.reset(res?.netTranName); this.sf.getProperty('/enterpriseInfoId')!.widget.reset(res?.netTranName);
this.sf.setValue('/netTranName', res?.netTranName) this.sf.setValue('/enterpriseInfoId', res?.netTranName)
}); });
} }
save(): void { save(): void {
console.log(this.files) const formData : any= new FormData();
console.log(this.sf.value)
const formData = new FormData();
this.files.forEach((file: any) => { this.files.forEach((file: any) => {
formData.append('file', file); formData.append('file', file);
formData.append('shipperAppUserId', this.sf.value?.shipperAppUserId);
formData.append('enterpriseInfoId', this?.networkTransporter);
formData.append('enterpriseProjectId', this.sf.value?.enterpriseProjectId);
}); });
console.log(formData) console.log(formData)
let params = { file: formData ,...this.sf.value} this.service.request(this.service.$api_goodsResourceOperateImport, formData).subscribe(res => {
console.log(params)
this.service.request(this.service.$api_goodsResourceOperateImport, params).subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success('导入成功'); this.service.msgSrv.success('导入成功');
this.modal.destroy({ ...res }); this.modal.destroy({ ...res });

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-03 11:10:14 * @Date : 2021-12-03 11:10:14
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-02 14:27:18 * @LastEditTime : 2022-03-07 13:54:46
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\services\\supply-management.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -161,6 +161,8 @@ export class SupplyManagementService extends BaseService {
public $api_exportGoodsResourceOperateTemplate = '/api/sdc/uploadGoodsResource/exportGoodsResourceOperateTemplate'; public $api_exportGoodsResourceOperateTemplate = '/api/sdc/uploadGoodsResource/exportGoodsResourceOperateTemplate';
// 导入货源-运营后台 // 导入货源-运营后台
public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport'; public $api_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport';
// 下载失败数据-运营后台
public $api_getFailUploadGoodsOperateResource = '/api/sdc/uploadGoodsResource/getFailUploadGoodsOperateResource';
// 根据货主ID查询网络货运人信息 // 根据货主ID查询网络货运人信息
public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter'; public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter';
$api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`; // 发布货源校验司机/车队长的状态 $api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`; // 发布货源校验司机/车队长的状态

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-20 10:13:02 * @Date : 2021-12-20 10:13:02
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-01 15:38:17 * @LastEditTime : 2022-03-07 15:59:05
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\supply-management.module.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\supply-management.module.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -14,7 +14,6 @@ import { SharedModule } from '@shared';
import { CarAddDriverComponent } from './components/add-driver/add-driver.component'; import { CarAddDriverComponent } from './components/add-driver/add-driver.component';
import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component'; import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component';
import { CarAddmodalComponent } from './components/addmodal/addmodal.component'; import { CarAddmodalComponent } from './components/addmodal/addmodal.component';
import { SupplyManagementBulkAssignedCarComponent } from './components/assigned-car-bulk/assigned-car-bulk.component';
import { SupplyManagementVehicleAssignedCarComponent } from './components/assigned-car/assigned-car.component'; import { SupplyManagementVehicleAssignedCarComponent } from './components/assigned-car/assigned-car.component';
import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component'; import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component';
import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component'; import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component';
@ -62,7 +61,6 @@ const COMPONENTS: Type<void>[] = [
SupplyManagementReleasePublishComponent, SupplyManagementReleasePublishComponent,
SupplyManagementBulkReleasePublishComponent, SupplyManagementBulkReleasePublishComponent,
TranAgreementComponent, TranAgreementComponent,
SupplyManagementBulkAssignedCarComponent,
SupplyManagementImportSupplyComponent SupplyManagementImportSupplyComponent
]; ];

View File

@ -496,7 +496,7 @@ export class NetworkFreightComponent implements OnInit {
.subscribe(res => { .subscribe(res => {
if (res) { if (res) {
this.st.load(1); this.st.load(1);
this.service.msgSrv.success('开户成功'); this.service.msgSrv.success(bankType === '1' ? res?.paMsg : res?.pfMsg);
} }
}); });
} }

View File

@ -46,7 +46,7 @@ export class SettingRoleEditComponent implements OnInit {
roleDescription: { roleDescription: {
title: '角色描述', title: '角色描述',
type: 'string', type: 'string',
maxLength: 100, maxLength: 50,
default: this.roleInfoData.roleDescription, default: this.roleInfoData.roleDescription,
ui: { ui: {
autosize: { minRows: 3 }, autosize: { minRows: 3 },

View File

@ -20,6 +20,6 @@
<button nz-button nzType="primary" (click)="roleAction()" acl [acl-ability]="['SYSTEM-ROLE-add']">新建角色</button> <button nz-button nzType="primary" (click)="roleAction()" acl [acl-ability]="['SYSTEM-ROLE-add']">新建角色</button>
</div> </div>
</div> </div>
<st #st [data]="params.listUrl" [columns]="columns" [req]="{ process: beforeReq }" [loading]="service.http.loading" <st #st [data]="params.listUrl" [columns]="columns" [req]="{ process: beforeReq }" [loading]="service.http.loading" [page]="{}"
[scroll]="{ y: '370px' }"></st> [scroll]="{ y: '370px' }"></st>
</nz-card> </nz-card>

View File

@ -34,6 +34,7 @@ export class RoleManagementComponent implements OnInit {
{ title: '创建人手机号', className: 'text-center', index: 'telephone' }, { title: '创建人手机号', className: 'text-center', index: 'telephone' },
{ {
title: '创建时间', title: '创建时间',
width: 170,
index: 'createTime', index: 'createTime',
type: 'date', type: 'date',
className: 'text-center' className: 'text-center'

View File

@ -32,7 +32,7 @@
</nz-alert> </nz-alert>
</div> </div>
<st #st [data]="service.$api_get_enterprise_staff_page" [columns]="columns" <st #st [data]="service.$api_get_enterprise_staff_page" [columns]="columns" [page]="{}"
[req]="{ params: {nameOrPhone: this.sf.value?.nameOrPhone} }" [loading]="service.http.loading" [req]="{ params: {nameOrPhone: this.sf.value?.nameOrPhone} }" [loading]="service.http.loading"
[scroll]="{ y: '370px' }" (change)="stChange($event)"></st> [scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
</nz-card> </nz-card>

View File

@ -1,6 +1,7 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { STComponent, STColumn, STChange } from '@delon/abc/st'; import { STComponent, STColumn, STChange } from '@delon/abc/st';
import { SFComponent, SFSchema } from '@delon/form'; import { SFComponent, SFSchema } from '@delon/form';
import { SettingsService } from '@delon/theme';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { SystemService } from '../../services/system.service'; import { SystemService } from '../../services/system.service';
import { SystemStaffStaffModalComponent } from './staff-modal/staff-modal.component'; import { SystemStaffStaffModalComponent } from './staff-modal/staff-modal.component';
@ -35,8 +36,13 @@ export class StaffManagementComponent implements OnInit {
{ {
title: '最后登录时间', title: '最后登录时间',
index: 'lastLoginDate', index: 'lastLoginDate',
<<<<<<< HEAD
className: 'text-center', className: 'text-center',
type: 'date' type: 'date'
=======
type: 'date',
format: item => `${item.lastLoginDate || '-'}`
>>>>>>> 9894aafcc1c3326f1d6dcb9a0c3eb42079a623a9
}, },
{ {
title: '成员状态', title: '成员状态',
@ -55,31 +61,31 @@ export class StaffManagementComponent implements OnInit {
{ {
text: '编辑', text: '编辑',
click: item => this.staffAction(item), click: item => this.staffAction(item),
acl: { ability: ['SYSTEM-STAFF-edit'] }, acl: { ability: ['SYSTEM-STAFF-edit'] }
}, },
{ {
text: '恢复', text: '恢复',
iif: item => item.stateLocked === 1, iif: item => item.stateLocked === 1 && item.telephone !== this.user.phone,
click: item => this.action(item, 2), click: item => this.action(item, 2),
acl: { ability: ['SYSTEM-STAFF-lock'] }, acl: { ability: ['SYSTEM-STAFF-lock'] }
}, },
{ {
text: '冻结', text: '冻结',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1, iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
click: item => this.action(item, 1), click: item => this.action(item, 1),
acl: { ability: ['SYSTEM-STAFF-lock'] }, acl: { ability: ['SYSTEM-STAFF-lock'] }
}, },
{ {
text: '超管转授', text: '超管转授',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1, iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1,
click: item => this.transpowerAction(item), click: item => this.transpowerAction(item),
acl: { ability: ['SYSTEM-STAFF-shiftAdmin'] }, acl: { ability: ['SYSTEM-STAFF-shiftAdmin'] }
}, },
{ {
text: '删除', text: '删除',
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1, iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1 && item.telephone !== this.user.phone,
click: item => this.action(item, 3), click: item => this.action(item, 3),
acl: { ability: ['SYSTEM-STAFF-delete'] }, acl: { ability: ['SYSTEM-STAFF-delete'] }
} }
] ]
} }
@ -92,7 +98,9 @@ export class StaffManagementComponent implements OnInit {
2: { title: '确认恢复?', text: '恢复后用户在本系统的权限将一并重新开启。' }, 2: { title: '确认恢复?', text: '恢复后用户在本系统的权限将一并重新开启。' },
3: { title: '确认删除?', text: '删除后该用户ID将在本系统中将无法登录使用并删除请谨慎操作' } 3: { title: '确认删除?', text: '删除后该用户ID将在本系统中将无法登录使用并删除请谨慎操作' }
}; };
constructor(public service: SystemService, private nzModalService: NzModalService) {}
user = this.setting.user;
constructor(public service: SystemService, private nzModalService: NzModalService, private setting: SettingsService) {}
ngOnInit(): void {} ngOnInit(): void {}

View File

@ -27,7 +27,7 @@ export class SystemStaffStaffModalComponent implements OnInit {
staffName: { staffName: {
title: '员工姓名', title: '员工姓名',
type: 'string', type: 'string',
maxLength: 11, maxLength: 10,
ui: { widget: staff?.appUserId ? 'text' : 'string', placeholder: '请输入员工姓名' }, ui: { widget: staff?.appUserId ? 'text' : 'string', placeholder: '请输入员工姓名' },
default: staff.name default: staff.name
}, },

View File

@ -19,6 +19,11 @@
<div class="mt-md mb-sm"> <div class="mt-md mb-sm">
<button nz-button nzType="primary" (click)="printOrder()">打印面单</button> <button nz-button nzType="primary" (click)="printOrder()">打印面单</button>
</div> </div>
<<<<<<< HEAD
<st #st [data]="url" [columns]="columns" [req]="{ process:beforeReq }" [loading]="service.http.loading" [page]="{}" <st #st [data]="url" [columns]="columns" [req]="{ process:beforeReq }" [loading]="service.http.loading" [page]="{}"
(change)="stChange($event)" [scroll]="{ x: '1200px' }" ></st> (change)="stChange($event)" [scroll]="{ x: '1200px' }" ></st>
=======
<st #st [data]="url" [columns]="columns" [req]="{ process:beforeReq }" [loading]="service.http.loading" [page]="{}" [scroll]="{x:'1200px'}"
(change)="stChange($event)"></st>
>>>>>>> 9894aafcc1c3326f1d6dcb9a0c3eb42079a623a9
</nz-card> </nz-card>

View File

@ -279,14 +279,14 @@
<sv label="自有载具"> <sv label="自有载具">
{{ carDatail?.isSelf?'否':'是' }} {{ carDatail?.isSelf?'否':'是' }}
</sv> </sv>
<sv label="行驶证照片" col="3"> <sv label="行驶证照片" col="1">
<app-imagelist [imgList]="[carDatail?.certificatePhotoFrontWatermark,carDatail?.certificatePhotoBackWatermark]"> <app-imagelist [imgList]="[carDatail?.certificatePhotoFrontWatermark,carDatail?.certificatePhotoBackWatermark]">
</app-imagelist> </app-imagelist>
</sv> </sv>
<sv label="道路运输证照片" col="3"> <sv label="道路运输证照片" col="3">
<app-imagelist [imgList]="[carDatail?.roadTransportPhotoWatermark]"></app-imagelist> <app-imagelist [imgList]="[carDatail?.roadTransportPhotoWatermark]"></app-imagelist>
</sv> </sv>
<sv label="车头照" col="3"> <sv label="车头照" col="2">
<app-imagelist [imgList]="[carDatail?.carFrontPhotoWatermark]"></app-imagelist> <app-imagelist [imgList]="[carDatail?.carFrontPhotoWatermark]"></app-imagelist>
</sv> </sv>
<nz-divider></nz-divider> <nz-divider></nz-divider>

View File

@ -377,12 +377,12 @@ export class FreightComponentsListComponent implements OnInit {
{ {
title: '操作', title: '操作',
width: '110px', width: '110px',
fixed: 'right',
className: 'text-center', className: 'text-center',
fixed: 'right',
buttons: [ buttons: [
{ type: 'divider' }, { type: 'divider' },
{ {
text: '查看<br>', text: '查看  <br>',
acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] }, acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] },
click: item => { click: item => {
this.router.navigate(['./detail', item.id], { relativeTo: this.ar }); this.router.navigate(['./detail', item.id], { relativeTo: this.ar });

View File

@ -273,16 +273,21 @@ tabs = {
}, },
{ {
title: '接单数量', title: '接单数量',
render: 'receveOrderCountInfo',
width: '170px',
className: 'text-left', className: 'text-left',
width: '200px', format: (item: any) =>
index: 'orderReceivingQuantity' `${item.acceptWeight || '--'}吨/
${item.acceptVolume || '--'}`
}, },
{ {
title: '结算量', title: '结算量',
index: '结算数量',
width: '170px',
className: 'text-left', className: 'text-left',
width: '200px', format: (item: any) =>
index: 'settlementWeight' `${item.settlementWeight || '--'}吨/
${item.settlementVolume || '--'}`
}, },
{ {
title: '承运司机', title: '承运司机',

View File

@ -29,7 +29,7 @@ export class AccountDetailComponent implements OnInit {
} }
const params = { const params = {
ltdId: item.ltdId || this.params.ltdId, ltdId: item.ltdId || this.params.ltdId,
roleId: item.roleId|| this.params.roleId, roleId: item.roleId || this.params.roleId,
projectId: item.projectId || this.params.projectId, projectId: item.projectId || this.params.projectId,
enterpriseId: item.enterpriseId || this.params.roleId, enterpriseId: item.enterpriseId || this.params.roleId,
ctfId: this.params.ctfId, ctfId: this.params.ctfId,
@ -46,7 +46,7 @@ export class AccountDetailComponent implements OnInit {
}) })
.subscribe(res => { .subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success(res?.pfMsg); this.service.msgSrv.success(type === '1' ? res?.paMsg : res?.pfMsg);
this.modalHelp.destroy(); this.modalHelp.destroy();
} }
}); });
@ -60,7 +60,7 @@ export class AccountDetailComponent implements OnInit {
}) })
.subscribe(res => { .subscribe(res => {
if (res) { if (res) {
this.service.msgSrv.success(res?.paMsg); this.service.msgSrv.success(type === '1' ? res?.paMsg : res?.pfMsg);
this.modalHelp.destroy(); this.modalHelp.destroy();
} }
}); });

View File

@ -45,13 +45,11 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
]; ];
this.setData(this.pathList); this.setData(this.pathList);
this.setPathIndex(this.selectedIndex); this.setPathIndex(this.selectedIndex);
console.log(this.MapList);
} }
} }
ngOnInit(): void { ngOnInit(): void {
this.mapInit(); this.mapInit();
console.log(this.MapList);
// this.DataInit();
} }
ngOnDestroy(): void { ngOnDestroy(): void {
if (this.aMap) { if (this.aMap) {

View File

@ -11,7 +11,7 @@
<input id="pickerInput" [(ngModel)]="addressInput" placeholder="请输入地址" /> <input id="pickerInput" [(ngModel)]="addressInput" placeholder="请输入地址" />
</div> </div>
</div> </div>
<div class="map-container" id="container" tabindex="0" style="width: 100%; height: 500px"></div> <div class="map-container" id="modal-container" tabindex="0" style="width: 100%; height: 500px"></div>
<div *nzModalFooter> <div *nzModalFooter>
<button nz-button nzType="default" (click)="cancel()">取消</button> <button nz-button nzType="default" (click)="cancel()">取消</button>
<button nz-button nzType="primary" (click)="sure()">确定</button> <button nz-button nzType="primary" (click)="sure()">确定</button>

View File

@ -3,6 +3,7 @@ import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular
import { amapConf } from '@conf/amap.config'; import { amapConf } from '@conf/amap.config';
import { NzModalRef } from 'ng-zorro-antd/modal'; import { NzModalRef } from 'ng-zorro-antd/modal';
import { throwError } from 'rxjs'; import { throwError } from 'rxjs';
import { Script } from 'vm';
import { AmapService } from '../amap.service'; import { AmapService } from '../amap.service';
declare var AMap: any; declare var AMap: any;
declare var AMapUI: any; declare var AMapUI: any;
@ -73,7 +74,7 @@ export class AmapPoiPickerComponent implements OnInit {
}); });
// 地图 // 地图
this.aMap = new AMap.Map('container', { this.aMap = new AMap.Map('modal-container', {
resizeEnable: true, resizeEnable: true,
zoom: 16 zoom: 16
}); });

View File

@ -1,3 +1,10 @@
<div class="imgBox"> <div class="imgBox">
<img *ngFor="let item of imgList; let i = index" nz-image [nzSrc]="item" /> <ng-container *ngFor="let item of imgList; let i = index">
<ng-container *ngIf="item; else elseTemplate">
<img nz-image [nzSrc]="item" />
</ng-container>
<ng-template #elseTemplate>
<div style="background-color: darkgrey;border-radius: 5px;width: 200px;height: 160px;" class="mr-sm"></div>
</ng-template>
</ng-container>
</div> </div>

View File

@ -1,9 +1,11 @@
.imgBox { .imgBox {
width: 100%; width : 100%;
overflow: hidden; overflow: hidden;
display : flex;
img { img {
width: 100px; width : 100px;
margin: 0 10px; margin : 0 10px;
vertical-align: middle; vertical-align: middle;
} }
} }