fix style
This commit is contained in:
@ -51,7 +51,7 @@ export class AppComponent implements OnInit {
|
||||
});
|
||||
const screen: any = window.screen
|
||||
var zoom = window.devicePixelRatio || screen.deviceXDPI / screen?.logicalXDPI;
|
||||
console.log(zoom)
|
||||
// console.log(zoom)
|
||||
if (document.body.clientWidth >= 1280) {
|
||||
if (zoom != 1 && zoom != 2 && zoom != 3) {
|
||||
this.themeService.toggleTheme().then();
|
||||
|
||||
@ -158,7 +158,7 @@ export class RefundRecordComponent implements OnInit {
|
||||
title: '退款类型',
|
||||
enum: [
|
||||
{ value: '1', label: '平台退款货主' },
|
||||
{ value: '2', label: '司机退款平' },
|
||||
{ value: '2', label: '司机退款平台' },
|
||||
{ value: '3', label: '车队长退款司机' },
|
||||
{ value: '4', label: '车队长退款平台' }
|
||||
],
|
||||
@ -167,7 +167,7 @@ export class RefundRecordComponent implements OnInit {
|
||||
placeholder: '请选择'
|
||||
}
|
||||
},
|
||||
shipperId: {
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
ui: {
|
||||
@ -184,20 +184,17 @@ export class RefundRecordComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
enterpriseProjectName: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.service.getEnterpriseProject(),
|
||||
placeholder: '请输入',
|
||||
visibleIf: {
|
||||
expand: (value: boolean) => value
|
||||
}
|
||||
}
|
||||
},
|
||||
resourceId: {
|
||||
resourceCode: {
|
||||
type: 'string',
|
||||
title: '货源号',
|
||||
ui: {
|
||||
@ -220,7 +217,7 @@ export class RefundRecordComponent implements OnInit {
|
||||
nzShowTime: true
|
||||
} as SFDateWidgetSchema
|
||||
},
|
||||
ltdid: {
|
||||
ltdId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
@ -255,7 +252,7 @@ export class RefundRecordComponent implements OnInit {
|
||||
{ title: '退款类型', index: 'refundTypeLabel', width: 140 },
|
||||
{ title: '退款金额', render: 'refundAmount', className: 'text-right', width: 180 },
|
||||
{ title: '退款时间', index: 'refundExecuteTime', width: 170 },
|
||||
{ title: '企业名称', index: 'enterpriseInfoName', width: 150 },
|
||||
{ title: '货主', index: 'enterpriseInfoName', width: 150 },
|
||||
{ title: '所属项目', index: 'enterpriseProjectName', width: 140 },
|
||||
{ title: '支付单', render: 'billRefundPaymentVOS', width: 150 },
|
||||
{ title: '订单号', index: 'billCode', width: 150 },
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-24 16:58:02
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -201,8 +201,6 @@
|
||||
</form>
|
||||
</nz-card>
|
||||
<nz-card nzTitle="基本信息" #distannce2>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf3 [schema]="schema3" [formData]="sf3data" [button]="'none'" [ui]="ui3"></sf>
|
||||
<sf #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
|
||||
<ng-template sf-template="weight" let-item let-ui="ui">
|
||||
@ -256,9 +254,6 @@
|
||||
</ng-template>
|
||||
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</nz-card>
|
||||
|
||||
<nz-card nzTitle="运费信息"#distannce3>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-24 16:58:02
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -90,6 +90,7 @@ loadTime: any; // 货源单设置回显
|
||||
public shipperservice: ShipperBaseService,
|
||||
fb: FormBuilder,
|
||||
private envSrv: EAEnvironmentService,
|
||||
private ar: ActivatedRoute,
|
||||
) {
|
||||
this.validateForm1 = fb.group({
|
||||
loadTime: [null, []],
|
||||
@ -495,7 +496,7 @@ loadTime: any; // 货源单设置回显
|
||||
this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => {
|
||||
if(res) {
|
||||
this.service.msgSrv.success('修改成功!');
|
||||
this.router.navigate(['/order-management/bulk']);
|
||||
this.router.navigate(['/order-management/bulk/bulk-detail/', this.id]);
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
}
|
||||
@ -623,7 +624,7 @@ loadTime: any; // 货源单设置回显
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
spanLabelFixed: 110,
|
||||
grid: { span: 12 }
|
||||
}
|
||||
};
|
||||
@ -767,7 +768,7 @@ initSF4() {
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
spanLabelFixed: 110,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weight: {
|
||||
|
||||
@ -456,15 +456,21 @@ export class OrderManagementBulkComponent implements OnInit {
|
||||
},
|
||||
{
|
||||
title: '接单数量',
|
||||
className: 'text-right',
|
||||
index: 'goodsNumber',
|
||||
width: '180px'
|
||||
render: 'receveOrderCountInfo',
|
||||
width: '170px',
|
||||
className: 'text-left',
|
||||
format: (item: any) =>
|
||||
`${item.acceptWeight || '--'}吨/
|
||||
${item.acceptVolume || '--'}方`
|
||||
},
|
||||
{
|
||||
title: '结算重量',
|
||||
className: 'text-right',
|
||||
index: 'settlementWeight',
|
||||
width: '150px'
|
||||
title: '结算数量',
|
||||
index: '结算数量',
|
||||
width: '170px',
|
||||
className: 'text-left',
|
||||
format: (item: any) =>
|
||||
`${item.settlementWeight || '--'}吨/
|
||||
${item.settlementVolume || '--'}方`
|
||||
},
|
||||
{
|
||||
title: '承运司机',
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-23 13:39:58
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -169,8 +169,6 @@
|
||||
</form>
|
||||
</nz-card>
|
||||
<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 #sf4 [schema]="schema4" [formData]="sf4data" [button]="'none'" [ui]="ui4">
|
||||
<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>
|
||||
</ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card nzTitle="运费信息" #distannce3>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-23 13:39:58
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -98,6 +98,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
private modalService: NzModalService,
|
||||
private amapService: AmapService,
|
||||
public shipperservice: ShipperBaseService,
|
||||
private ar: ActivatedRoute,
|
||||
fb: FormBuilder,
|
||||
private envSrv: EAEnvironmentService
|
||||
) {
|
||||
@ -545,7 +546,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
this.service.msgSrv.success('修改成功!');
|
||||
this.router.navigate(['/order-management/vehicle']);
|
||||
this.router.navigate(['/order-management/vehicle/vehicle-detail/', this.id], { relativeTo: this.ar });
|
||||
} else {
|
||||
this.service.msgSrv.error(res?.msg);
|
||||
}
|
||||
@ -678,12 +679,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
spanLabelFixed: 110,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$goodsName: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$qita: {
|
||||
grid: { span: 12 }
|
||||
}
|
||||
};
|
||||
}
|
||||
changeGoodsType(value: string, data: any) {
|
||||
@ -785,7 +780,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
spanLabelFixed: 110,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weight: {
|
||||
|
||||
@ -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 }} {{ item.captainPhone }}</span>
|
||||
<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>
|
||||
@ -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();
|
||||
});
|
||||
});
|
||||
@ -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();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -57,7 +57,9 @@ export class SupplyManagementVehicleAssignedCarComponent implements OnInit {
|
||||
return {
|
||||
...this.sf?.value,
|
||||
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 {
|
||||
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) => {
|
||||
i.carId = '';
|
||||
i.disabled = (i?.certificationStatus === 1 && i.driverStatus === 1);
|
||||
|
||||
@ -158,6 +158,9 @@
|
||||
<sv label="回单类型">
|
||||
{{ i?.supplementaryInformationVO?.receiptTypeLabel }}
|
||||
</sv>
|
||||
<sv label="联系人">
|
||||
{{ i?.supplementaryInformationVO?.receiptUserName ? i?.supplementaryInformationVO?.receiptUserName + '/' : '' }} {{ i?.supplementaryInformationVO?.phon }}
|
||||
</sv>
|
||||
<sv label="所在地区">
|
||||
{{ i?.supplementaryInformationVO?.area }}
|
||||
</sv>
|
||||
|
||||
@ -176,50 +176,31 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '手机号',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
hidden: true,
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchName: {
|
||||
type: 'string',
|
||||
title: '名字',
|
||||
title: '调度员姓名',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
hidden: true,
|
||||
optionalHelp: '选若未填写,司机直接联系您',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchId: {
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '调度员',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
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
|
||||
}
|
||||
title: '调度员手机号',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoId', 'deadlineTime']
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName', 'deadlineTime']
|
||||
};
|
||||
this.ui1 = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 8 }
|
||||
}
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
};
|
||||
}
|
||||
initSF3() {
|
||||
@ -281,6 +262,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
goodsName1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
maxLength: 20,
|
||||
ui: {
|
||||
errors: { required: '请填写货物名称' },
|
||||
visibleIf: {
|
||||
@ -289,7 +271,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1']
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
@ -717,7 +699,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
...this.sf1.value,
|
||||
...this.sf7.value,
|
||||
unLoadingPlaceDTOList: LoadingList,
|
||||
goodsInfoDTOList: goodsInfoDTOList
|
||||
goodsInfoDTOList: goodsInfoDTOList,
|
||||
estimatedKilometers: this.totalDistance,
|
||||
estimatedTravelTime: this.totalTime,
|
||||
};
|
||||
params.freightPrice = this.totalFees;
|
||||
const modalRef = this.modalService.create({
|
||||
@ -904,6 +888,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
if (res?.enterpriseProjectId) {
|
||||
this.enterpriseProjectIds = res.enterpriseProjectId;
|
||||
}
|
||||
this.totalDistance = res?.estimatedKilometers;
|
||||
this.totalTime = res?.estimatedTravelTime;
|
||||
this.sf1data = {
|
||||
dispatchPhone: res?.dispatchPhone,
|
||||
dispatchName: res?.dispatchName,
|
||||
@ -911,7 +897,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
enterpriseProjectId: res?.enterpriseProjectId || '',
|
||||
enterpriseInfoName: res?.enterpriseInfoName || '',
|
||||
externalResourceCode: res?.externalResourceCode || '',
|
||||
dispatchId: res?.dispatchId || '',
|
||||
deadlineTime: res?.deadlineTime || ''
|
||||
};
|
||||
if (this.PageStatus === '大宗修改') {
|
||||
@ -1022,9 +1007,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
|
||||
this.sf7data = {
|
||||
stateReceipt: res?.stateReceipt,
|
||||
receiptType: res?.receiptType || '',
|
||||
receiptUserName: res?.receiptUserName || '',
|
||||
receiptAddressArea: res?.receiptAddressArea || '',
|
||||
receiptUserPhone: res?.receiptUserPhone || '',
|
||||
receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '',
|
||||
receiptAddressArea: res?.supplementaryInformationVO?.area || '',
|
||||
receiptUserPhone: res?.supplementaryInformationVO?.phon || '',
|
||||
receiptAddress: res?.receiptAddress || '',
|
||||
paymentDays: res?.paymentDays || '',
|
||||
remarks: res?.remarks || ''
|
||||
|
||||
@ -7,13 +7,9 @@
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<div class="card-title">货源单设置</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data">
|
||||
<ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
|
||||
@ -199,42 +199,23 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
},
|
||||
}
|
||||
},
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '手机号',
|
||||
maxLength: 11,
|
||||
ui: {
|
||||
hidden: true,
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchName: {
|
||||
type: 'string',
|
||||
title: '名字',
|
||||
title: '调度员姓名',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
hidden: true,
|
||||
optionalHelp: '选若未填写,司机直接联系您',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchId: {
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '调度员',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
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
|
||||
}
|
||||
title: '调度员手机号',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId','enterpriseInfoName','enterpriseInfoId', 'deadlineTime',]
|
||||
};
|
||||
@ -307,6 +288,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
goodsName1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
maxLength: 20,
|
||||
ui: {
|
||||
errors: { required: '请填写货物名称' },
|
||||
visibleIf: {
|
||||
@ -315,7 +297,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1']
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
@ -638,7 +620,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||
...this.sf1.value,
|
||||
unLoadingPlaceDTOList: LoadingList,
|
||||
goodsInfoDTOList: goodsInfoList,
|
||||
...this.sf6.value
|
||||
...this.sf6.value,
|
||||
estimatedKilometers: this.totalDistance,
|
||||
estimatedTravelTime: this.totalTime,
|
||||
};
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
|
||||
@ -2,14 +2,12 @@ import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st';
|
||||
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 { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
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 { SupplyManagementUpdatePriceComponent } from '../update-price/update-price.component';
|
||||
|
||||
|
||||
@ -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 { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||
import { STColumn, STComponent, STData } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||
import { ModalHelper } from '@delon/theme';
|
||||
import { EAEnvironmentService, processSingleSort } from '@shared';
|
||||
import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer';
|
||||
import { EAEnvironmentService } from '@shared';
|
||||
import { NzDrawerService } from 'ng-zorro-antd/drawer';
|
||||
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SupplyManagementAddDriversComponent } from 'src/app/routes/supply-management/components/add-drivers/add-drivers.component';
|
||||
|
||||
import { SupplyManagementService } from '../../services/supply-management.service';
|
||||
import { CarAddmodalComponent } from '../addmodal/addmodal.component';
|
||||
import { PublishchooseFamifiarAddComponent } from './add/add.component';
|
||||
import { PublishchooseFamifiarSetCaptainComponent } from './set-captain/set-captain.component';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-publish-goods-choose-famifiar',
|
||||
@ -37,7 +35,7 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
submitUrl = '';
|
||||
|
||||
@Input()
|
||||
submitParams:any;
|
||||
submitParams: any;
|
||||
|
||||
constructor(
|
||||
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) => {
|
||||
const defaultCart = i.userCarLicenseDesensitizationVOList.find((cart: any) => cart.isDefault);
|
||||
return { ...i, default: defaultCart || '' };
|
||||
@ -271,52 +279,52 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit {
|
||||
}
|
||||
|
||||
carChange(event: any, item: STData) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证车辆的状态
|
||||
*/
|
||||
verifyVechicleStatus(_record: STData) {
|
||||
const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = _record;
|
||||
const carInfo: any = { carId, driverId, carCaptainId };
|
||||
const goodsInfoList = this.submitParams?.goodsInfoList;
|
||||
this.service.request(this.service.$api_verify_vehicle_status, { ...carInfo, goodsInfoList }).subscribe((res: any) => {
|
||||
if (res) {
|
||||
const { title, alert, subContent, content } = res;
|
||||
switch (alert) {
|
||||
case 'Error':
|
||||
this.error(title, content, subContent);
|
||||
break;
|
||||
case 'Warn':
|
||||
this.showConfirm(_record, title, content, subContent);
|
||||
break;
|
||||
case 'Success':
|
||||
this.choose(_record);
|
||||
break;
|
||||
}
|
||||
/**
|
||||
* 验证车辆的状态
|
||||
*/
|
||||
verifyVechicleStatus(_record: STData) {
|
||||
const { carId, appUserId: driverId, captainAppUserId: carCaptainId } = _record;
|
||||
const carInfo: any = { carId, driverId, carCaptainId };
|
||||
const goodsInfoList = this.submitParams?.goodsInfoList;
|
||||
this.service.request(this.service.$api_verify_vehicle_status, { ...carInfo, goodsInfoList }).subscribe((res: any) => {
|
||||
if (res) {
|
||||
const { title, alert, subContent, content } = res;
|
||||
switch (alert) {
|
||||
case 'Error':
|
||||
this.error(title, content, subContent);
|
||||
break;
|
||||
case 'Warn':
|
||||
this.showConfirm(_record, title, content, subContent);
|
||||
break;
|
||||
case 'Success':
|
||||
this.choose(_record);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
error(title: string, content: string, subContent: string): void {
|
||||
this.modalService.error({
|
||||
nzTitle: title,
|
||||
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({
|
||||
nzTitle: title,
|
||||
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
|
||||
nzOkText: '继续',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.choose(_record);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
error(title: string, content: string, subContent: string): void {
|
||||
this.modalService.error({
|
||||
nzTitle: title,
|
||||
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({
|
||||
nzTitle: title,
|
||||
nzContent: `<span class="text-error-dark">${content ? content : ''}</span><span class="text-grey-dark">${subContent ? subContent : ''}</span>`,
|
||||
nzOkText: '继续',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.choose(_record);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,6 +177,7 @@
|
||||
<ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template>
|
||||
</form>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title">货物信息</div>
|
||||
<div nz-row>
|
||||
@ -187,47 +188,32 @@
|
||||
<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"
|
||||
/>
|
||||
<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"
|
||||
/>
|
||||
<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"
|
||||
/>
|
||||
<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>
|
||||
<div class="card-title">服务信息</div>
|
||||
<div nz-row>
|
||||
@ -239,34 +225,8 @@
|
||||
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
|
||||
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
|
||||
</ng-template>
|
||||
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></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>
|
||||
<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>
|
||||
<ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见<a target="_blank" [queryParams]="{ type: 10 }"
|
||||
[routerLink]="['/agreement']">《投保告知》</a></ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -50,3 +50,7 @@ input[type='number']::-webkit-outer-spin-button {
|
||||
margin: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
.hides {
|
||||
margin-left: 10px;
|
||||
color: aqua;
|
||||
}
|
||||
|
||||
@ -188,6 +188,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
widget: 'text'
|
||||
}
|
||||
},
|
||||
|
||||
externalResourceCode: {
|
||||
type: 'string',
|
||||
title: '外部货源号',
|
||||
@ -196,50 +197,58 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '手机号',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
hidden: true,
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchName: {
|
||||
type: 'string',
|
||||
title: '名字',
|
||||
title: '调度员姓名',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
hidden: true,
|
||||
optionalHelp: '选若未填写,司机直接联系您',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchId: {
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '调度员',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
|
||||
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
|
||||
}
|
||||
title: '调度员手机号',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
// dispatchId: {
|
||||
// type: 'string',
|
||||
// title: '调度员',
|
||||
// ui: {
|
||||
// widget: 'select',
|
||||
// placeholder: '请选择',
|
||||
// allowClear: true,
|
||||
// optionalHelp: '选择调度员,司机直接联系调度员 ; 不选择,司机直接联系您',
|
||||
// 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']
|
||||
};
|
||||
this.ui1 = {
|
||||
'*': {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 8 }
|
||||
}
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$enterpriseInfoName: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$shipperAppUserId: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$enterpriseProjectId: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
};
|
||||
}
|
||||
initSF3() {
|
||||
@ -301,6 +310,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
goodsName1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
maxLength: 20,
|
||||
ui: {
|
||||
errors: { required: '请填写货物名称' },
|
||||
visibleIf: {
|
||||
@ -309,7 +319,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1']
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
@ -327,7 +337,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
errors: { required: '必填项' },
|
||||
validator: val => this.customValidator(val)
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
@ -335,7 +346,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
placeholder: '请输入',
|
||||
}
|
||||
},
|
||||
number: {
|
||||
@ -343,7 +354,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
placeholder: '请输入',
|
||||
}
|
||||
},
|
||||
carModel: {
|
||||
@ -375,37 +386,60 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change: (tag: any, org: any) => {
|
||||
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']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
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: {
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 8 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initSF5() {
|
||||
this.schema5 = {
|
||||
properties: {
|
||||
@ -435,73 +469,30 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
type1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['资源曝光率 +10', '车源匹配率 +10'],
|
||||
enum: ['货源曝光率 +10', '车源匹配率 +10'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['资源曝光率 +10', '车源匹配率 +10']
|
||||
default: ['货源曝光率 +10', '车源匹配率 +10']
|
||||
},
|
||||
type2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['资源曝光率 +20', '车源匹配率 +20'],
|
||||
enum: ['货源曝光率 +20', '车源匹配率 +20'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
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' }
|
||||
}
|
||||
default: ['货源曝光率 +20', '车源匹配率 +20']
|
||||
},
|
||||
insurancePremium: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
title: '服务包费用',
|
||||
readOnly:true,
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
validator: val => this.customValidator(val),
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
}
|
||||
},
|
||||
@ -511,9 +502,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
ui: {
|
||||
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 = {
|
||||
'*': {
|
||||
@ -534,6 +543,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 自定义校验数据
|
||||
* @param val
|
||||
@ -648,19 +658,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
prePay: {
|
||||
type: 'number',
|
||||
title: '预付',
|
||||
default: 0,
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
toPay: {
|
||||
type: 'number',
|
||||
title: '到付',
|
||||
default: 0,
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
receiptPay: {
|
||||
type: 'number',
|
||||
title: '回单付',
|
||||
default: 0,
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
|
||||
@ -992,7 +999,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
...this.sf5.value,
|
||||
...this.sf6.value,
|
||||
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({
|
||||
nzTitle: '运输协议',
|
||||
@ -1117,13 +1128,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
if (res?.enterpriseProjectId) {
|
||||
this.enterpriseProjectIds = res.enterpriseProjectId;
|
||||
}
|
||||
this.totalDistance = res?.estimatedKilometers;
|
||||
this.totalTime = res?.estimatedTravelTime;
|
||||
this.sf1data = {
|
||||
enterpriseInfoName: res?.enterpriseInfoName,
|
||||
enterpriseInfoId: res?.enterpriseInfoId,
|
||||
dispatchPhone: res?.dispatchPhone,
|
||||
dispatchName: res?.dispatchName,
|
||||
externalResourceCode: res?.externalResourceCode,
|
||||
dispatchId: res?.dispatchId
|
||||
};
|
||||
if (this.PageStatus === '整车修改') {
|
||||
this.sf1data.id = res?.id;
|
||||
@ -1233,7 +1245,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
volume: res?.goodsInfoVOList[0]?.volume || '',
|
||||
number: res?.goodsInfoVOList[0]?.number || '',
|
||||
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 === '整车修改') {
|
||||
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
|
||||
@ -1241,18 +1255,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.totalFees = res?.shippingInformationVO?.totalFee || '0';
|
||||
this.sf5data = {
|
||||
insuranceType: res?.insuranceType || '',
|
||||
goodsValue: res?.goodsValue || '',
|
||||
insurancePremium: res?.insurancePremium || '',
|
||||
insuranceRate: res?.insuranceRate || '',
|
||||
insurancePackagedGoods: res?.insurancePackagedGoods || ''
|
||||
};
|
||||
this.sf6data = {
|
||||
stateReceipt: res?.stateReceipt,
|
||||
receiptType: res?.receiptType || '',
|
||||
receiptUserName: res?.receiptUserName || '',
|
||||
receiptAddressArea: res?.receiptAddressArea || '',
|
||||
receiptUserPhone: res?.receiptUserPhone || '',
|
||||
receiptAddress: res?.receiptAddress || '',
|
||||
receiptUserName: res?.supplementaryInformationVO?.receiptUserName || '',
|
||||
receiptAddressArea: res?.supplementaryInformationVO?.area || '',
|
||||
receiptUserPhone: res?.supplementaryInformationVO?.phon || '',
|
||||
receiptAddress: res?.supplementaryInformationVO.address || '',
|
||||
remarks: res?.supplementaryInformationVO?.remarks || ''
|
||||
};
|
||||
this.sf7data = {
|
||||
@ -1371,17 +1383,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
}
|
||||
// 计算保价费金额
|
||||
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 = {
|
||||
insuranceType,
|
||||
goodsValue: this.sf5.value.goodsValue,
|
||||
goodsValue: this.sf4.value.goodsValue,
|
||||
km: this.totalDistance
|
||||
};
|
||||
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.sf5.setValue('/insurancePremium', res.insurancePremium);
|
||||
this.sf5.setValue('/insuranceRate', res.insuranceRate);
|
||||
} else {
|
||||
}else{
|
||||
this.sf5.setValue('/insurancePremium', null);
|
||||
this.sf5.setValue('/insuranceRate', null);
|
||||
}
|
||||
|
||||
@ -7,13 +7,9 @@
|
||||
</page-header-wrapper>
|
||||
<nz-card>
|
||||
<div class="card-title">货源单设置</div>
|
||||
<div nz-row>
|
||||
<div nz-col nzSpan="12">
|
||||
<sf #sf1 [schema]="schema1" [button]="'none'" [ui]="ui1" [formData]="sf1data">
|
||||
<ng-template sf-template="enterpriseInfoName" let-i let-ui="ui"> {{ i.value }} </ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
@ -184,55 +180,43 @@
|
||||
</form>
|
||||
</nz-card>
|
||||
|
||||
|
||||
<nz-card>
|
||||
<div class="card-title">货物信息</div>
|
||||
<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 #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>
|
||||
<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>
|
||||
<div class="card-title">服务信息</div>
|
||||
<div nz-row>
|
||||
@ -244,34 +228,8 @@
|
||||
<ng-template sf-template="freeInsurance2" let-i let-ui="ui">
|
||||
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
|
||||
</ng-template>
|
||||
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></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>
|
||||
<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>
|
||||
<ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保,单次运输保额仅限200万元以内,详见<a target="_blank" [queryParams]="{ type: 10 }"
|
||||
[routerLink]="['/agreement']">《投保告知》</a></ng-template>
|
||||
</sf>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -176,14 +176,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
allowClear: true
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
// enterpriseInfoName: {
|
||||
// type: 'string',
|
||||
// title: '网络货运人',
|
||||
// ui: {
|
||||
// widget: 'custom'
|
||||
// },
|
||||
// default: '天津市怡亚通XXXX有限公司'
|
||||
// },
|
||||
enterpriseInfoName: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
@ -203,52 +195,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '手机号',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
hidden: true,
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchName: {
|
||||
type: 'string',
|
||||
title: '名字',
|
||||
title: '调度员姓名',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
hidden: true,
|
||||
optionalHelp: '选若未填写,司机直接联系您',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
dispatchId: {
|
||||
dispatchPhone: {
|
||||
type: 'string',
|
||||
title: '调度员',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
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
|
||||
}
|
||||
title: '调度员手机号',
|
||||
maxLength: 30,
|
||||
ui: {
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName']
|
||||
};
|
||||
this.ui1 = {
|
||||
'*': {
|
||||
spanLabelFixed: 110,
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$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: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
maxLength: 20,
|
||||
ui: {
|
||||
errors: { required: '请填写货物名称' },
|
||||
visibleIf: {
|
||||
@ -346,7 +329,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
placeholder: '请输入',
|
||||
}
|
||||
},
|
||||
number: {
|
||||
@ -354,7 +337,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
placeholder: '请输入',
|
||||
}
|
||||
},
|
||||
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']
|
||||
};
|
||||
@ -398,10 +419,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
'*': {
|
||||
spanLabelFixed: 115,
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carModel: {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 8 }
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -435,73 +452,30 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
type1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['资源曝光率 +10', '车源匹配率 +10'],
|
||||
enum: ['货源曝光率 +10', '车源匹配率 +10'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '0' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
default: ['资源曝光率 +10', '车源匹配率 +10']
|
||||
default: ['货源曝光率 +10', '车源匹配率 +10']
|
||||
},
|
||||
type2: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
enum: ['资源曝光率 +20', '车源匹配率 +20'],
|
||||
enum: ['货源曝光率 +20', '车源匹配率 +20'],
|
||||
readOnly: true,
|
||||
ui: {
|
||||
widget: 'checkbox',
|
||||
visibleIf: { insuranceType: (value: string) => value === '1' }
|
||||
} as SFCheckboxWidgetSchema,
|
||||
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' }
|
||||
}
|
||||
default: ['货源曝光率 +20', '车源匹配率 +20']
|
||||
},
|
||||
insurancePremium: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
title: '服务包费用',
|
||||
readOnly:true,
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
validator: val => this.customValidator(val),
|
||||
visibleIf: { insuranceType: (value: string) => value !== '3' }
|
||||
}
|
||||
},
|
||||
@ -511,9 +485,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
ui: {
|
||||
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 = {
|
||||
'*': {
|
||||
@ -535,6 +527,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
initSF6() {
|
||||
this.schema6 = {
|
||||
properties: {
|
||||
@ -632,19 +625,16 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
prePay: {
|
||||
type: 'number',
|
||||
title: '预付',
|
||||
default: 0,
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
toPay: {
|
||||
type: 'number',
|
||||
title: '到付',
|
||||
default: 0,
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
receiptPay: {
|
||||
type: 'number',
|
||||
title: '回单付',
|
||||
default: 0,
|
||||
ui: { widget: 'custom' }
|
||||
},
|
||||
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: '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 = {
|
||||
id: '',
|
||||
...this.sf1.value,
|
||||
@ -966,7 +942,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
...this.sf5.value,
|
||||
...this.sf6.value,
|
||||
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);
|
||||
const modalRef = this.modalService.create({
|
||||
@ -1182,17 +1162,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
// 计算保价费金额
|
||||
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 = {
|
||||
insuranceType,
|
||||
goodsValue: this.sf5.value.goodsValue,
|
||||
goodsValue: this.sf4.value.goodsValue,
|
||||
km: this.totalDistance
|
||||
};
|
||||
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
|
||||
if (res) {
|
||||
this.sf5.setValue('/insurancePremium', res.insurancePremium);
|
||||
this.sf5.setValue('/insuranceRate', res.insuranceRate);
|
||||
} else {
|
||||
}else{
|
||||
this.sf5.setValue('/insurancePremium', null);
|
||||
this.sf5.setValue('/insuranceRate', null);
|
||||
}
|
||||
|
||||
@ -163,7 +163,32 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
});
|
||||
modalRef.afterClose.subscribe(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);
|
||||
}
|
||||
},
|
||||
]
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-01 15:13:03
|
||||
* @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
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -32,6 +32,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
|
||||
files2: any;
|
||||
schema: SFSchema = {};
|
||||
ui: SFUISchema = {};
|
||||
networkTransporter: any; // 网络货运人id
|
||||
uploadUrl = apiConf.file_upload_url;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
constructor(
|
||||
@ -78,7 +79,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
netTranName: {
|
||||
enterpriseInfoId: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
@ -109,7 +110,7 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId','netTranName','fileName'],
|
||||
required: ['shipperAppUserId', 'enterpriseProjectId','enterpriseInfoId','fileName'],
|
||||
};
|
||||
this.ui = {
|
||||
'*': {
|
||||
@ -146,23 +147,22 @@ export class SupplyManagementImportSupplyComponent implements OnInit {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_getNetworkTransporter, { id: regionCode }).subscribe((res: any) => {
|
||||
console.log(res?.netTranName)
|
||||
console.log(res?.networkTransporter)
|
||||
this.sf.getProperty('/netTranName')!.widget.reset(res?.netTranName);
|
||||
this.sf.setValue('/netTranName', res?.netTranName)
|
||||
console.log(res)
|
||||
this.networkTransporter = res.networkTransporter
|
||||
this.sf.getProperty('/enterpriseInfoId')!.widget.reset(res?.netTranName);
|
||||
this.sf.setValue('/enterpriseInfoId', res?.netTranName)
|
||||
});
|
||||
}
|
||||
save(): void {
|
||||
console.log(this.files)
|
||||
console.log(this.sf.value)
|
||||
const formData = new FormData();
|
||||
const formData : any= new FormData();
|
||||
this.files.forEach((file: any) => {
|
||||
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)
|
||||
let params = { file: formData ,...this.sf.value}
|
||||
console.log(params)
|
||||
this.service.request(this.service.$api_goodsResourceOperateImport, params).subscribe(res => {
|
||||
this.service.request(this.service.$api_goodsResourceOperateImport, formData).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('导入成功');
|
||||
this.modal.destroy({ ...res });
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 11:10:14
|
||||
* @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
|
||||
* 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_goodsResourceOperateImport = '/api/sdc/uploadGoodsResource/goodsResourceOperateImport';
|
||||
// 下载失败数据-运营后台
|
||||
public $api_getFailUploadGoodsOperateResource = '/api/sdc/uploadGoodsResource/getFailUploadGoodsOperateResource';
|
||||
// 根据货主ID查询网络货运人信息
|
||||
public $api_getNetworkTransporter = '/api/mdc/cuc/enterpriseInfo/operate/getNetworkTransporter';
|
||||
$api_verify_vehicle_status = `/api/sdc/goodsResourceShipper/saveVerify`; // 发布货源校验司机/车队长的状态
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-20 10:13:02
|
||||
* @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
|
||||
* 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 { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.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 { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component';
|
||||
import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component';
|
||||
@ -62,7 +61,6 @@ const COMPONENTS: Type<void>[] = [
|
||||
SupplyManagementReleasePublishComponent,
|
||||
SupplyManagementBulkReleasePublishComponent,
|
||||
TranAgreementComponent,
|
||||
SupplyManagementBulkAssignedCarComponent,
|
||||
SupplyManagementImportSupplyComponent
|
||||
];
|
||||
|
||||
|
||||
@ -496,7 +496,7 @@ export class NetworkFreightComponent implements OnInit {
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.st.load(1);
|
||||
this.service.msgSrv.success('开户成功');
|
||||
this.service.msgSrv.success(bankType === '1' ? res?.paMsg : res?.pfMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ export class SettingRoleEditComponent implements OnInit {
|
||||
roleDescription: {
|
||||
title: '角色描述',
|
||||
type: 'string',
|
||||
maxLength: 100,
|
||||
maxLength: 50,
|
||||
default: this.roleInfoData.roleDescription,
|
||||
ui: {
|
||||
autosize: { minRows: 3 },
|
||||
|
||||
@ -20,6 +20,6 @@
|
||||
<button nz-button nzType="primary" (click)="roleAction()" acl [acl-ability]="['SYSTEM-ROLE-add']">新建角色</button>
|
||||
</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>
|
||||
</nz-card>
|
||||
@ -34,6 +34,7 @@ export class RoleManagementComponent implements OnInit {
|
||||
{ title: '创建人手机号', className: 'text-center', index: 'telephone' },
|
||||
{
|
||||
title: '创建时间',
|
||||
width: 170,
|
||||
index: 'createTime',
|
||||
type: 'date',
|
||||
className: 'text-center'
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
</nz-alert>
|
||||
</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"
|
||||
[scroll]="{ y: '370px' }" (change)="stChange($event)"></st>
|
||||
</nz-card>
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||
import { SFComponent, SFSchema } from '@delon/form';
|
||||
import { SettingsService } from '@delon/theme';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { SystemService } from '../../services/system.service';
|
||||
import { SystemStaffStaffModalComponent } from './staff-modal/staff-modal.component';
|
||||
@ -35,8 +36,13 @@ export class StaffManagementComponent implements OnInit {
|
||||
{
|
||||
title: '最后登录时间',
|
||||
index: 'lastLoginDate',
|
||||
<<<<<<< HEAD
|
||||
className: 'text-center',
|
||||
type: 'date'
|
||||
=======
|
||||
type: 'date',
|
||||
format: item => `${item.lastLoginDate || '-'}`
|
||||
>>>>>>> 9894aafcc1c3326f1d6dcb9a0c3eb42079a623a9
|
||||
},
|
||||
{
|
||||
title: '成员状态',
|
||||
@ -55,31 +61,31 @@ export class StaffManagementComponent implements OnInit {
|
||||
{
|
||||
text: '编辑',
|
||||
click: item => this.staffAction(item),
|
||||
acl: { ability: ['SYSTEM-STAFF-edit'] },
|
||||
acl: { ability: ['SYSTEM-STAFF-edit'] }
|
||||
},
|
||||
{
|
||||
text: '恢复',
|
||||
iif: item => item.stateLocked === 1,
|
||||
iif: item => item.stateLocked === 1 && item.telephone !== this.user.phone,
|
||||
click: item => this.action(item, 2),
|
||||
acl: { ability: ['SYSTEM-STAFF-lock'] },
|
||||
acl: { ability: ['SYSTEM-STAFF-lock'] }
|
||||
},
|
||||
{
|
||||
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),
|
||||
acl: { ability: ['SYSTEM-STAFF-lock'] },
|
||||
acl: { ability: ['SYSTEM-STAFF-lock'] }
|
||||
},
|
||||
{
|
||||
text: '超管转授',
|
||||
iif: item => item.stateLocked === 0 && item.roleCode.split(',').indexOf('Administrator') === -1,
|
||||
click: item => this.transpowerAction(item),
|
||||
acl: { ability: ['SYSTEM-STAFF-shiftAdmin'] },
|
||||
acl: { ability: ['SYSTEM-STAFF-shiftAdmin'] }
|
||||
},
|
||||
{
|
||||
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),
|
||||
acl: { ability: ['SYSTEM-STAFF-delete'] },
|
||||
acl: { ability: ['SYSTEM-STAFF-delete'] }
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -92,7 +98,9 @@ export class StaffManagementComponent implements OnInit {
|
||||
2: { title: '确认恢复?', text: '恢复后用户在本系统的权限将一并重新开启。' },
|
||||
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 {}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ export class SystemStaffStaffModalComponent implements OnInit {
|
||||
staffName: {
|
||||
title: '员工姓名',
|
||||
type: 'string',
|
||||
maxLength: 11,
|
||||
maxLength: 10,
|
||||
ui: { widget: staff?.appUserId ? 'text' : 'string', placeholder: '请输入员工姓名' },
|
||||
default: staff.name
|
||||
},
|
||||
|
||||
@ -19,6 +19,11 @@
|
||||
<div class="mt-md mb-sm">
|
||||
<button nz-button nzType="primary" (click)="printOrder()">打印面单</button>
|
||||
</div>
|
||||
<<<<<<< HEAD
|
||||
<st #st [data]="url" [columns]="columns" [req]="{ process:beforeReq }" [loading]="service.http.loading" [page]="{}"
|
||||
(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>
|
||||
@ -279,14 +279,14 @@
|
||||
<sv label="自有载具">
|
||||
{{ carDatail?.isSelf?'否':'是' }}
|
||||
</sv>
|
||||
<sv label="行驶证照片" col="3">
|
||||
<sv label="行驶证照片" col="1">
|
||||
<app-imagelist [imgList]="[carDatail?.certificatePhotoFrontWatermark,carDatail?.certificatePhotoBackWatermark]">
|
||||
</app-imagelist>
|
||||
</sv>
|
||||
<sv label="道路运输证照片" col="3">
|
||||
<app-imagelist [imgList]="[carDatail?.roadTransportPhotoWatermark]"></app-imagelist>
|
||||
</sv>
|
||||
<sv label="车头照" col="3">
|
||||
<sv label="车头照" col="2">
|
||||
<app-imagelist [imgList]="[carDatail?.carFrontPhotoWatermark]"></app-imagelist>
|
||||
</sv>
|
||||
<nz-divider></nz-divider>
|
||||
|
||||
@ -377,12 +377,12 @@ export class FreightComponentsListComponent implements OnInit {
|
||||
{
|
||||
title: '操作',
|
||||
width: '110px',
|
||||
fixed: 'right',
|
||||
className: 'text-center',
|
||||
fixed: 'right',
|
||||
buttons: [
|
||||
{ type: 'divider' },
|
||||
{
|
||||
text: '查看<br>',
|
||||
text: '查看 <br>',
|
||||
acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] },
|
||||
click: item => {
|
||||
this.router.navigate(['./detail', item.id], { relativeTo: this.ar });
|
||||
|
||||
@ -273,16 +273,21 @@ tabs = {
|
||||
},
|
||||
{
|
||||
title: '接单数量',
|
||||
render: 'receveOrderCountInfo',
|
||||
width: '170px',
|
||||
className: 'text-left',
|
||||
width: '200px',
|
||||
index: 'orderReceivingQuantity'
|
||||
|
||||
format: (item: any) =>
|
||||
`${item.acceptWeight || '--'}吨/
|
||||
${item.acceptVolume || '--'}方`
|
||||
},
|
||||
{
|
||||
title: '结算重量',
|
||||
title: '结算数量',
|
||||
index: '结算数量',
|
||||
width: '170px',
|
||||
className: 'text-left',
|
||||
width: '200px',
|
||||
index: 'settlementWeight'
|
||||
format: (item: any) =>
|
||||
`${item.settlementWeight || '--'}吨/
|
||||
${item.settlementVolume || '--'}方`
|
||||
},
|
||||
{
|
||||
title: '承运司机',
|
||||
|
||||
@ -29,7 +29,7 @@ export class AccountDetailComponent implements OnInit {
|
||||
}
|
||||
const params = {
|
||||
ltdId: item.ltdId || this.params.ltdId,
|
||||
roleId: item.roleId|| this.params.roleId,
|
||||
roleId: item.roleId || this.params.roleId,
|
||||
projectId: item.projectId || this.params.projectId,
|
||||
enterpriseId: item.enterpriseId || this.params.roleId,
|
||||
ctfId: this.params.ctfId,
|
||||
@ -46,7 +46,7 @@ export class AccountDetailComponent implements OnInit {
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success(res?.pfMsg);
|
||||
this.service.msgSrv.success(type === '1' ? res?.paMsg : res?.pfMsg);
|
||||
this.modalHelp.destroy();
|
||||
}
|
||||
});
|
||||
@ -60,7 +60,7 @@ export class AccountDetailComponent implements OnInit {
|
||||
})
|
||||
.subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success(res?.paMsg);
|
||||
this.service.msgSrv.success(type === '1' ? res?.paMsg : res?.pfMsg);
|
||||
this.modalHelp.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
@ -45,13 +45,11 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges {
|
||||
];
|
||||
this.setData(this.pathList);
|
||||
this.setPathIndex(this.selectedIndex);
|
||||
console.log(this.MapList);
|
||||
}
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.mapInit();
|
||||
console.log(this.MapList);
|
||||
|
||||
// this.DataInit();
|
||||
}
|
||||
ngOnDestroy(): void {
|
||||
if (this.aMap) {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<input id="pickerInput" [(ngModel)]="addressInput" placeholder="请输入地址" />
|
||||
</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>
|
||||
<button nz-button nzType="default" (click)="cancel()">取消</button>
|
||||
<button nz-button nzType="primary" (click)="sure()">确定</button>
|
||||
|
||||
@ -3,6 +3,7 @@ import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular
|
||||
import { amapConf } from '@conf/amap.config';
|
||||
import { NzModalRef } from 'ng-zorro-antd/modal';
|
||||
import { throwError } from 'rxjs';
|
||||
import { Script } from 'vm';
|
||||
import { AmapService } from '../amap.service';
|
||||
declare var AMap: 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,
|
||||
zoom: 16
|
||||
});
|
||||
|
||||
@ -1,3 +1,10 @@
|
||||
<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>
|
||||
@ -1,9 +1,11 @@
|
||||
.imgBox {
|
||||
width: 100%;
|
||||
width : 100%;
|
||||
overflow: hidden;
|
||||
display : flex;
|
||||
|
||||
img {
|
||||
width: 100px;
|
||||
margin: 0 10px;
|
||||
width : 100px;
|
||||
margin : 0 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user