Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop
This commit is contained in:
@ -20,7 +20,7 @@ module.exports = {
|
||||
// }
|
||||
'//api': {
|
||||
target: {
|
||||
host: 'tms-api-test.eascs.com',
|
||||
host: 'tms-api-dev.eascs.com',
|
||||
protocol: 'https:',
|
||||
port: 443
|
||||
},
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
<page-header-wrapper [title]="'货主配置'"></page-header-wrapper>
|
||||
<nz-card class="search-box">
|
||||
<!-- 搜索表单 -->
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col [nzXl]=" 16" [nzLg]="24" [nzSm]="24" [nzXs]="24">
|
||||
<sf #sf [schema]="schema" [ui]="{ '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 } } }"
|
||||
[compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzXl]=" 8" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-LIST-list']">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading" (click)="exportList()" acl
|
||||
[acl-ability]="['USERCENTER-FREIGHT-LIST-export']">导出</button>
|
||||
<button nz-button (click)="resetSF()" [disabled]="service.http.loading">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<!-- 数据列表 -->
|
||||
<st #st [columns]="columns" [data]='service.$api_freight_config_page' [req]="{ process: beforeReq }"
|
||||
[loading]="service.http.loading">
|
||||
</st>
|
||||
</nz-card>
|
||||
@ -0,0 +1,141 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { STColumn, STComponent, STRequestOptions, STData } from '@delon/abc/st';
|
||||
import { SFUISchema, SFSchema, SFComponent } from '@delon/form';
|
||||
import { ShipperBaseService, DynamicSettingModalComponent } from '@shared';
|
||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
||||
import { UsermanageService } from '../../../services/usercenter.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-freight-config',
|
||||
templateUrl: './freight-config.component.html',
|
||||
styleUrls: ['../../../../commom/less/box.less']
|
||||
})
|
||||
export class FreightConfigComponent implements OnInit {
|
||||
schema: SFSchema = this.initSF();
|
||||
columns: STColumn[] = this.initST();
|
||||
@ViewChild('st', { static: false }) st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
|
||||
constructor(public service: UsermanageService, private modal: NzModalService, public shipperservice: ShipperBaseService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.initST();
|
||||
}
|
||||
|
||||
beforeReq = (requestOptions: STRequestOptions) => {
|
||||
Object.assign(requestOptions.body, { listSource: 1 });
|
||||
if (this.sf) {
|
||||
Object.assign(requestOptions.body, {
|
||||
...this.sf.value
|
||||
});
|
||||
}
|
||||
return requestOptions;
|
||||
};
|
||||
|
||||
settingAction(item?: any) {
|
||||
this.modal.create({
|
||||
nzTitle: '配置',
|
||||
nzContent: DynamicSettingModalComponent,
|
||||
nzWidth: 900,
|
||||
nzComponentParams: {
|
||||
extendType: '2',
|
||||
businessId: item.id
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
}
|
||||
|
||||
exportList() {
|
||||
const params = {};
|
||||
if (this.sf) {
|
||||
Object.assign(params, {
|
||||
...this.sf.value
|
||||
});
|
||||
}
|
||||
this.service.downloadFile(this.service.$api_export_enterprise, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
resetSF() {
|
||||
this.sf.reset();
|
||||
this.st.reload();
|
||||
}
|
||||
|
||||
private initSF(): SFSchema {
|
||||
return {
|
||||
properties: {
|
||||
enterpriseName: {
|
||||
title: '企业名称',
|
||||
type: 'string',
|
||||
ui: {
|
||||
placeholder: '请输入',
|
||||
showRequired: false
|
||||
}
|
||||
},
|
||||
networkTransporter: {
|
||||
type: 'string',
|
||||
title: '网络货运人',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperservice.getNetworkFreightForwarder()
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
initST(): STColumn[] {
|
||||
return [
|
||||
// { title: '', type: 'checkbox', className: 'text-center' },
|
||||
{ title: '企业名称', className: 'text-center', index: 'enterpriseName', width: 160 },
|
||||
{ title: '网络货运人', className: 'text-center', index: 'netTranName', width: 160 },
|
||||
{
|
||||
title: '合同单费率',
|
||||
className: 'text-right',
|
||||
index: 'contractSurchargeRatio',
|
||||
width: 140,
|
||||
format: item => `${item.contractSurchargeRatio}%`
|
||||
},
|
||||
{
|
||||
title: '货源单费率',
|
||||
className: 'text-right',
|
||||
index: 'goodsSurchargeRatio',
|
||||
width: 140,
|
||||
format: item => `${item.goodsSurchargeRatio}%`
|
||||
},
|
||||
{
|
||||
title: '合同单业务量(元)',
|
||||
index: 'contractQuota',
|
||||
width: 100,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.contractQuota }) }
|
||||
},
|
||||
{
|
||||
title: '货源单业务量(元)',
|
||||
index: 'goodsQuota',
|
||||
width: 100,
|
||||
type: 'widget',
|
||||
className: 'text-right',
|
||||
widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.goodsQuota }) }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '110px',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '配置',
|
||||
click: item => this.settingAction(item)
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -52,7 +52,7 @@
|
||||
</ng-template>
|
||||
|
||||
<ng-template sf-template="tipsD" let-me let-ui="ui" let-schema="schema">
|
||||
<div class="pr" style="z-index: 999;">
|
||||
<div class="pr" style="z-index: 999;">
|
||||
<div>请上传该企业授权您成为本系统企业管理员的文件的高清照片,需加盖公司印章</div>
|
||||
<div>上传后系统会自动识别并填写</div>
|
||||
<div></div>
|
||||
@ -88,7 +88,8 @@
|
||||
</sf>
|
||||
|
||||
<div style="padding-left: 379px">
|
||||
<button nz-button type="button" nzType="primary" (click)="submitForm()">确认新增</button>
|
||||
<button nz-button type="button" nzType="primary" (click)="submitForm()"
|
||||
[nzLoading]="service.http.loading">确认新增</button>
|
||||
<button nz-button (click)="goBack()">返回</button>
|
||||
</div>
|
||||
</nz-card>
|
||||
@ -33,6 +33,9 @@ export class UsermanageService extends ShipperBaseService {
|
||||
// 企业审核
|
||||
$api_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/audit';
|
||||
|
||||
// 查询货主配置列表
|
||||
$api_freight_config_page = '/api/mdc/cuc/enterpriseInfo/operate/list/configPage';
|
||||
|
||||
// 货主员工列表(运营后台)
|
||||
$api_get_user_list = '/api/mdc/cuc/userApp/getShipperUserList';
|
||||
// 冻结或恢复员工
|
||||
|
||||
@ -15,6 +15,7 @@ import { UserCenterComponentsDriverConfigComponent } from './components/driver/d
|
||||
import { UserCenterComponentsDriverComponent } from './components/driver/driver.component';
|
||||
import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component';
|
||||
import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component';
|
||||
import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component';
|
||||
import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component';
|
||||
|
||||
import { FreightComponentsListComponent } from './components/freight/list/list.component';
|
||||
@ -42,6 +43,10 @@ const routes: Routes = [
|
||||
component: FreightComponentsEnterpriseAuditComponent,
|
||||
data: { guard: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-list', 'USERCENTER-FREIGHT-ENTERPRISE-adminList'] } }
|
||||
},
|
||||
{
|
||||
path: 'freight/config',
|
||||
component: FreightConfigComponent,
|
||||
},
|
||||
{ path: 'freight/user', component: FreightComponentsUserComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-USER-list'] } } },
|
||||
{
|
||||
path: 'freight/user/view/:id',
|
||||
|
||||
@ -24,6 +24,7 @@ import { AuditAdminComponent } from './components/freight/enterprise-audit/audit
|
||||
import { CaptainDetailComponent } from './components/driver/captain/captain-detail/captain-detail.component';
|
||||
import { CarSettleAddDriverComponent } from './components/driver/add-driver/add-driver.component';
|
||||
import { CtcCaptatinAddComponent } from './components/driver/captain/add/add.component';
|
||||
import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component';
|
||||
import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component';
|
||||
|
||||
const COMPONENTS = [
|
||||
@ -42,6 +43,7 @@ const COMPONENTS = [
|
||||
AuditAdminComponent,
|
||||
CarSettleAddDriverComponent,
|
||||
CtcCaptatinAddComponent,
|
||||
FreightConfigComponent,
|
||||
UserCenterComponentsDriverConfigComponent
|
||||
];
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<h2 style="font-weight: 800;">{{selectedTab?.name}}</h2>
|
||||
<div nz-row nzGutter="8">
|
||||
<div nz-col nzSpan="24" se-container [labelWidth]="labelWidth">
|
||||
<se [label]="item.name" *ngFor="let item of configList" col="1">
|
||||
<se [label]="item.name" *ngFor="let item of configList" col="1" [required]="item.requiredField" >
|
||||
<ng-container [ngSwitch]="item.itemType">
|
||||
<ng-container *ngSwitchCase="1">
|
||||
<nz-input-group [nzAddOnAfter]="item.remark?.afterLable" style="width: 155px;"
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
*/
|
||||
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
|
||||
|
||||
const JSONTYPE = new Set([5, 6, 9]);
|
||||
@Component({
|
||||
@ -41,13 +40,10 @@ export class DynamicSettingH5Component implements OnInit {
|
||||
constructor(public service: BaseService) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.tabs);
|
||||
}
|
||||
|
||||
changeType(type: any): void {
|
||||
this.selectedTab = type;
|
||||
console.log(type);
|
||||
|
||||
this.selectedEvent.emit(this.selectedTab);
|
||||
}
|
||||
|
||||
@ -55,10 +51,8 @@ export class DynamicSettingH5Component implements OnInit {
|
||||
if (this.configList?.length < 0) {
|
||||
return;
|
||||
}
|
||||
console.log(this.configList);
|
||||
let params = [...this.configList];
|
||||
params = params.map((item: any) => {
|
||||
console.log(item);
|
||||
if (item.itemType == 9) {
|
||||
const files = item.itemValue?.map(({ response, name }: any) => ({ url:response?.data?.fullFilePath, name }));
|
||||
return {
|
||||
@ -77,7 +71,6 @@ export class DynamicSettingH5Component implements OnInit {
|
||||
itemData: item.itemData ? JSON.stringify(item.itemData) : null
|
||||
};
|
||||
});
|
||||
console.log(params);
|
||||
this.saveEvent.emit(params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user