From 78f4659a7361003f030b603f30183db45fb13de7 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 24 Dec 2021 15:36:49 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/risk/risk.component.html | 4 +- .../components/risk/risk.component.ts | 10 +++-- .../vehicle-detail-change.component.ts | 41 ++++++++----------- 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/src/app/routes/order-management/components/risk/risk.component.html b/src/app/routes/order-management/components/risk/risk.component.html index 908128a6..11c73e86 100644 --- a/src/app/routes/order-management/components/risk/risk.component.html +++ b/src/app/routes/order-management/components/risk/risk.component.html @@ -1,7 +1,7 @@ -

计划装货时间:{{i?.goodsResource?.[0]?.loadingTime}}

+

计划装货时间:{{i?.goodsResource?.[0]?.loadTime}}

+ diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.html b/src/app/routes/sys-setting/components/network-freight/network-freight.component.html new file mode 100644 index 00000000..f262ec00 --- /dev/null +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.html @@ -0,0 +1,37 @@ + + + + + +
+
+ +
+
+ + +
+
+
+ + + +
+
+ +
+
+ +
\ No newline at end of file diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.less b/src/app/routes/sys-setting/components/network-freight/network-freight.component.less new file mode 100644 index 00000000..04fd4ba3 --- /dev/null +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.less @@ -0,0 +1,13 @@ +:host::ng-deep{ + .search-box{ + .ant-card-body{ + padding-bottom: 18px; + } + } + + .content-box{ + .ant-card-body{ + padding-top: 14px; + } + } +} \ No newline at end of file diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts new file mode 100644 index 00000000..ff673d4e --- /dev/null +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts @@ -0,0 +1,100 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STComponent, STColumn, STChange } from '@delon/abc/st'; +import { SFComponent, SFSchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { SystemService } from '../../services/system.service'; + +@Component({ + selector: 'app-network-freight-component', + templateUrl: './network-freight.component.html', + styleUrls: ['./network-freight.component.less'] +}) +export class NetworkFreightComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + + url = `/rule?_allow_anonymous=true`; + + searchSchema: SFSchema = { + properties: { + receiveName: { + type: 'string', + title: '角色名称', + ui: { placeholder: '请输入' } + } + } + }; + + columns: STColumn[] = [ + { title: '角色名称', index: 'no' }, + { title: '角色描述', index: 'description' }, + { title: '创建人手机号', index: 'description' }, + { + title: '创建时间', + index: 'updatedAt', + type: 'date' + }, + { + title: '操作', + buttons: [ + { + text: '编辑', + click: item => this.roleAction(item) + }, + { + text: '删除', + click: item => this.deleteAction(item) + } + ] + } + ]; + + selectedRows: any[] = []; + + reqParams = { pageIndex: 1, pageSize: 10 }; + + constructor(public service: SystemService, private nzModalService: NzModalService) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + break; + case 'filter': + this.st.load(); + break; + } + } + + roleAction(item?: any) { + const modal = this.nzModalService.create({ + // nzContent: SettingRoleEditComponent, + nzWidth: 900, + nzComponentParams: item ? { i: { ...item } } : { i: { id: 0 } }, + nzFooter: null + }); + modal.afterClose.subscribe(res => { + this.st.load(); + }); + } + + deleteAction(item?: any) { + this.nzModalService.error({ + nzTitle: '确认删除?', + nzClosable: false, + nzCancelText: '取消', + nzOnOk: () => {} + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + } +} diff --git a/src/app/routes/sys-setting/sys-setting-routing.module.ts b/src/app/routes/sys-setting/sys-setting-routing.module.ts index c511d5f7..79edd1a9 100644 --- a/src/app/routes/sys-setting/sys-setting-routing.module.ts +++ b/src/app/routes/sys-setting/sys-setting-routing.module.ts @@ -1,3 +1,11 @@ +/* + * @Author: your name + * @Date: 2021-12-03 15:23:05 + * @LastEditTime: 2021-12-24 15:57:37 + * @LastEditors: your name + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\app\routes\sys-setting\sys-setting-routing.module.ts + */ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { AgreementConfigComponentsBaseComponent } from './components/agreement-config/agreement-config.component'; @@ -7,6 +15,7 @@ import { BasicSettingComponent } from './components/basic-setting/basic-setting. import { CartConfigComponent } from './components/cart-config/cart-config.component'; import { CrmManagementComponent } from './components/crm-management/crm-management.component'; import { GoodsNameConfigComponent } from './components/goods-name-config/goods-name-config.component'; +import { NetworkFreightComponent } from './components/network-freight/network-freight.component'; import { RoleManagementComponent } from './components/role-management/role-management.component'; import { StaffManagementComponent } from './components/staff-management/staff-management.component'; import { SystemConfigComponent } from './components/system-config/system-config.component'; @@ -28,6 +37,7 @@ const routes: Routes = [ { path: 'system-config', component: SystemConfigComponent }, { path: 'goods-name-config', component: GoodsNameConfigComponent }, { path: 'crm-management', component: CrmManagementComponent }, + { path: 'network-freight', component: NetworkFreightComponent }, ]; @NgModule({ diff --git a/src/app/routes/sys-setting/sys-setting.module.ts b/src/app/routes/sys-setting/sys-setting.module.ts index db87db6a..df0ce016 100644 --- a/src/app/routes/sys-setting/sys-setting.module.ts +++ b/src/app/routes/sys-setting/sys-setting.module.ts @@ -22,6 +22,7 @@ import { SettingRoleEditComponent } from './components/role-management/edit/edit import { SettingMenuComponent } from './components/role-management/menu/menu.component'; import { GoodsNameConfigComponent } from './components/goods-name-config/goods-name-config.component'; import { CrmManagementComponent } from './components/crm-management/crm-management.component'; +import { NetworkFreightComponent } from './components/network-freight/network-freight.component'; const COMPONENTS = [ StaffManagementComponent, @@ -36,7 +37,8 @@ const COMPONENTS = [ BasicSettingComponent, SystemConfigComponent, GoodsNameConfigComponent, - CrmManagementComponent + CrmManagementComponent, + NetworkFreightComponent ]; const NOTROUTECOMPONENTS = [ BuyerTranspowerComponent, diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 04d3bd4e..a28df412 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -384,6 +384,10 @@ "text": "CRM客户管理", "link": "/system/crm-management" }, + { + "text": "网络货运人", + "link": "/system/network-freight" + }, { "text": "角色管理", "link": "/system/role-management" From 3fa2476b529e486510bc87628a43ad29b9ef35f8 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 24 Dec 2021 16:52:41 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vehicle-detail-change.component.html | 36 ++------- .../vehicle-detail-change.component.less | 4 +- .../vehicle-detail-change.component.ts | 77 +++---------------- 3 files changed, 19 insertions(+), 98 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html index a7c6a286..7cd3f7fc 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html @@ -1,7 +1,7 @@
@@ -133,10 +130,6 @@ -
@@ -159,9 +152,6 @@ /> -
@@ -175,30 +165,14 @@
-
- -

计划装货时间:{{i?.goodsResource?.[0]?.loadTime}}

+

计划装货时间:{{i?.loadPlanTime}}

- -

计划卸货时间:{{i?.goodsResource?.[0]?.unloadingTime}}

+

计划卸货时间:{{i?.unloadPlanTime}}

@@ -301,10 +275,10 @@ - + - +
总计:{{i?.total | currency: '¥'}}(运费¥3500.00,附加运费¥191.98,附加费率3.5%)
diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.less b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.less index 1e8af457..0eb3feb0 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.less +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.less @@ -80,5 +80,7 @@ width : 300px; height: 180px; } - + .ant-col-10 { + flex: none; + } } \ No newline at end of file diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts index ec32b265..e1e85e8f 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts @@ -2,14 +2,14 @@ import { ViewChild } from '@angular/core'; /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime: 2021-12-24 16:27:03 + * @LastEditTime: 2021-12-24 16:50:42 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\order-management\components\vehicle-detail\vehicle-detail.component.ts */ import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; @@ -68,6 +68,7 @@ loadTime: any; // 货源单设置回显 ui: SFUISchema = {}; constructor( private route: ActivatedRoute, + private router: Router, private msgSrv: NzMessageService, public service: OrderManagementService, private modalService: NzModalService, @@ -424,7 +425,7 @@ loadTime: any; // 货源单设置回显 } console.log('dirvingMessage=>>>>>>'+ this.dirvingMessage) console.log( this.dirvingMessage) - console.log( this.st) + console.log( this.st._data) const params = { id: this.id, unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo,], @@ -435,7 +436,7 @@ loadTime: any; // 货源单设置回显 ...this.sf4.value }], // 运费信息 - billExpenseDetailDTOList: this.dirvingMessage, + billExpenseDetailDTOList: this.st._data, // 收款人 payeeId: this.dirverPhone, dirverBankCard: this.dirverBankCard, // 银行卡 @@ -454,6 +455,12 @@ loadTime: any; // 货源单设置回显 console.log(params) this.service.request(this.service.$api_set_modifyWholeOrder, params).subscribe((res: any) => { console.log(res) + if(res) { + this.service.msgSrv.success('修改成功!'); + this.router.navigate(['/order-management/vehicle']); + } else { + this.service.msgSrv.error(res?.msg); + } }) } addPreZero(num: any){ @@ -464,68 +471,6 @@ loadTime: any; // 货源单设置回显 } } // -------------------装卸货信息处理 - addStartInfo(event: any) { - if (this.startInfo.length < 5) { - const controlId = this.startInfo.length; - this.startInfo.push({ - detailedAddress: '', - appUserName: '', - contractTelephone: '', - latitude: '', - longitude: '', - province: '', - city: '', - area: '', - type: 1 - }); - this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); - } - } - subStartInfo(event: any, index: number, id?:any) { - console.log(event, index, id) - if(id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => { - console.log(res) - }) - } - this.startInfo.splice(index, 1); - this.validateForm1.removeControl(`loadAddress${index}`); - this.validateForm1.removeControl(`loadName${index}`); - this.validateForm1.removeControl(`loadPhone${index}`); - } - subEndInfo(event: any, index: number, id?:any) { - if(id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe((res) => { - console.log(res) - }) - } - console.log(event, index, id) - this.endInfo.splice(index, 1); - this.validateForm1.removeControl(`unloadAddress${index}`); - this.validateForm1.removeControl(`unloadName${index}`); - this.validateForm1.removeControl(`unloadPhone${index}`); - } - addEndInfo(event: any) { - if (this.addEndInfo.length < 5) { - const controlId = this.endInfo.length; - this.endInfo.push({ - detailedAddress: '', - appUserName: '', - contractTelephone: '', - latitude: '', - longitude: '', - province: '', - city: '', - area: '', - type: 2 - }); - this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); - } - } // 打开地图 openMap(type: string, index: number) { const modalRef = this.modalService.create({