edit
This commit is contained in:
@ -20,7 +20,7 @@ module.exports = {
|
|||||||
// }
|
// }
|
||||||
'//api': {
|
'//api': {
|
||||||
target: {
|
target: {
|
||||||
host: 'tms-api-test.eascs.com',
|
host: 'tms-api-dev.eascs.com',
|
||||||
protocol: 'https:',
|
protocol: 'https:',
|
||||||
port: 443
|
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,129 @@
|
|||||||
|
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' },
|
||||||
|
{ title: '网络货运人', className: 'text-center', index: 'netTranName' },
|
||||||
|
{ title: '合同单费率', className: 'text-center', index: 'contractSurchargeRatio' },
|
||||||
|
{ title: '货源单费率', className: 'text-center', index: '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>
|
||||||
|
|
||||||
<ng-template sf-template="tipsD" let-me let-ui="ui" let-schema="schema">
|
<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>
|
<div>上传后系统会自动识别并填写</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
@ -88,7 +88,8 @@
|
|||||||
</sf>
|
</sf>
|
||||||
|
|
||||||
<div style="padding-left: 379px">
|
<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>
|
<button nz-button (click)="goBack()">返回</button>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
@ -33,6 +33,9 @@ export class UsermanageService extends ShipperBaseService {
|
|||||||
// 企业审核
|
// 企业审核
|
||||||
$api_audit_freight = '/api/mdc/cuc/enterpriseInfo/operate/audit';
|
$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';
|
$api_get_user_list = '/api/mdc/cuc/userApp/getShipperUserList';
|
||||||
// 冻结或恢复员工
|
// 冻结或恢复员工
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import { UserCenterComponentsDriverDetailComponent } from './components/driver/d
|
|||||||
import { UserCenterComponentsDriverComponent } from './components/driver/driver.component';
|
import { UserCenterComponentsDriverComponent } from './components/driver/driver.component';
|
||||||
import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component';
|
import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component';
|
||||||
import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.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 { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component';
|
||||||
|
|
||||||
import { FreightComponentsListComponent } from './components/freight/list/list.component';
|
import { FreightComponentsListComponent } from './components/freight/list/list.component';
|
||||||
@ -41,6 +42,10 @@ const routes: Routes = [
|
|||||||
component: FreightComponentsEnterpriseAuditComponent,
|
component: FreightComponentsEnterpriseAuditComponent,
|
||||||
data: { guard: { ability: ['USERCENTER-FREIGHT-ENTERPRISE-list', 'USERCENTER-FREIGHT-ENTERPRISE-adminList'] } }
|
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', component: FreightComponentsUserComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-USER-list'] } } },
|
||||||
{
|
{
|
||||||
path: 'freight/user/view/:id',
|
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 { CaptainDetailComponent } from './components/driver/captain/captain-detail/captain-detail.component';
|
||||||
import { CarSettleAddDriverComponent } from './components/driver/add-driver/add-driver.component';
|
import { CarSettleAddDriverComponent } from './components/driver/add-driver/add-driver.component';
|
||||||
import { CtcCaptatinAddComponent } from './components/driver/captain/add/add.component';
|
import { CtcCaptatinAddComponent } from './components/driver/captain/add/add.component';
|
||||||
|
import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component';
|
||||||
|
|
||||||
const COMPONENTS = [
|
const COMPONENTS = [
|
||||||
FreightComponentsListComponent,
|
FreightComponentsListComponent,
|
||||||
@ -40,7 +41,8 @@ const COMPONENTS = [
|
|||||||
CaptainDetailComponent,
|
CaptainDetailComponent,
|
||||||
AuditAdminComponent,
|
AuditAdminComponent,
|
||||||
CarSettleAddDriverComponent,
|
CarSettleAddDriverComponent,
|
||||||
CtcCaptatinAddComponent
|
CtcCaptatinAddComponent,
|
||||||
|
FreightConfigComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@ -10,7 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { BaseService } from '@shared';
|
import { BaseService } from '@shared';
|
||||||
import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
|
|
||||||
|
|
||||||
const JSONTYPE = new Set([5, 6, 9]);
|
const JSONTYPE = new Set([5, 6, 9]);
|
||||||
@Component({
|
@Component({
|
||||||
@ -41,13 +40,10 @@ export class DynamicSettingH5Component implements OnInit {
|
|||||||
constructor(public service: BaseService) {}
|
constructor(public service: BaseService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log(this.tabs);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
changeType(type: any): void {
|
changeType(type: any): void {
|
||||||
this.selectedTab = type;
|
this.selectedTab = type;
|
||||||
console.log(type);
|
|
||||||
|
|
||||||
this.selectedEvent.emit(this.selectedTab);
|
this.selectedEvent.emit(this.selectedTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,10 +51,8 @@ export class DynamicSettingH5Component implements OnInit {
|
|||||||
if (this.configList?.length < 0) {
|
if (this.configList?.length < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(this.configList);
|
|
||||||
let params = [...this.configList];
|
let params = [...this.configList];
|
||||||
params = params.map((item: any) => {
|
params = params.map((item: any) => {
|
||||||
console.log(item);
|
|
||||||
if (item.itemType == 9) {
|
if (item.itemType == 9) {
|
||||||
const files = item.itemValue?.map(({ response, name }: any) => ({ url:response?.data?.fullFilePath, name }));
|
const files = item.itemValue?.map(({ response, name }: any) => ({ url:response?.data?.fullFilePath, name }));
|
||||||
return {
|
return {
|
||||||
@ -77,7 +71,6 @@ export class DynamicSettingH5Component implements OnInit {
|
|||||||
itemData: item.itemData ? JSON.stringify(item.itemData) : null
|
itemData: item.itemData ? JSON.stringify(item.itemData) : null
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
console.log(params);
|
|
||||||
this.saveEvent.emit(params);
|
this.saveEvent.emit(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user