From d7ee2f56cf45877d5a038f727f036246de215991 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 5 Jan 2022 21:02:22 +0800 Subject: [PATCH] =?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 --- .../bulk-detail/bulk-detail.component.ts | 7 +- .../vehicle-detail.component.ts | 19 ++- .../abnormal-appear.component.html | 59 +++++++ .../abnormal-appear.component.less | 13 ++ .../abnormal-appear.component.ts | 155 ++++++++++++++++++ .../services/waybill-management.service.ts | 6 +- .../waybill-management-routing.module.ts | 2 + .../waybill-management.module.ts | 4 +- src/assets/mocks/menu-data.json | 36 +--- 9 files changed, 256 insertions(+), 45 deletions(-) create mode 100644 src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html create mode 100644 src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.less create mode 100644 src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts index cc2cd38b..27ba1d8a 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts @@ -134,10 +134,11 @@ export class SupplyManagementBulkDetailComponent implements OnInit { * @param record */ placeOrder(record: any) { - this.router.navigate(['./pbg/onecar-publish'], { + console.log(record) + this.router.navigate(['/supply-management/bulk-amend', record.id], { queryParams: { - id: record?.id - } + sta: 4 + }, }) } /** diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts index 92cced62..7ca0b8d7 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts @@ -82,12 +82,11 @@ export class SupplyManagementVehicleDetailComponent implements OnInit { * 修改货源 */ updateGoodsSource(record: any) { - this.router.navigate(['./pbg/onecar-publish'], { + this.router.navigate(['/supply-management/vehicle-amend', record.id], { queryParams: { - id: record?.id, - type: 'edit' + sta: 1 } - }) + }); } /** @@ -140,23 +139,25 @@ export class SupplyManagementVehicleDetailComponent implements OnInit { * 重新指派 */ assignedCar(item: any) { + const { resourceId } = item; const modalRef = this.modal.create({ nzTitle: '指派熟车', nzWidth: '1200px', - nzContent: SupplyManagementVehicleAssignedCarComponent, + nzContent: SupplyManagementVehicleAssignedCarComponent, nzComponentParams: { i: item, + status: 'anew', + url: this.service.$api_save_assign_vehicle, + params: { resourceId } }, - nzFooter: null, - + nzFooter: null }); - modalRef.afterClose.subscribe((result) => { + modalRef.afterClose.subscribe(result => { if (result) { this.getGoodsSourceDetail(); } }); } - goBack() { window.history.go(-1); } diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html new file mode 100644 index 00000000..f2586444 --- /dev/null +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html @@ -0,0 +1,59 @@ + + + + + +
+ +
+ +
+ + + +
+ +
+
+ + + + +
+
+
+
+ + + +
+
+ +
+
+ + +
+ 客户 + 供应商 +
+
+
+
diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.less b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.less new file mode 100644 index 00000000..04fd4ba3 --- /dev/null +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.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/waybill-management/components/abnormal-appear/abnormal-appear.component.ts b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts new file mode 100644 index 00000000..f24a39e0 --- /dev/null +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts @@ -0,0 +1,155 @@ +import { Component, OnInit, ViewChild, Type } from '@angular/core'; +import { STComponent, STColumn, STChange } from '@delon/abc/st'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { WaybillManagementServe } from '../../services/waybill-management.service'; + +@Component({ + selector: 'app-abnormal-appear', + templateUrl: './abnormal-appear.component.html', + styleUrls: ['./abnormal-appear.component.less'] +}) +export class WaybillManagementAbnormalAppearComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; + ui: SFUISchema = {}; + ui2: SFUISchema = {}; + schema: SFSchema = {}; + addSchema: SFSchema = {}; + _$expand = false; + editText = ''; + formData :any; + isVisible = false; + edit = false; + editId = false; + + columns: STColumn[] = [ + { title: '客户名称', index: 'customerName' }, + { title: '客户简称', index: 'customerShortName' }, + { title: '客户编码', index: 'customerCode' }, + { + title: '操作', + buttons: [ + { + text: '编辑', + click: item => this.roleAction(item, 2) + }, + ] + } + ]; + + selectedRows: any[] = []; + + get reqParams (){ + return { + ...this.sf?.value, + }}; + + constructor(public service: WaybillManagementServe, private nzModalService: NzModalService) {} + + ngOnInit(): void { + this.initSF() + this.initSFFre() + } + + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + break; + case 'filter': + this.st.load(); + break; + } + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + /** + * 查询字段个数 + */ + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + initSF(){ + this.schema = { + properties: { + _$expand: { type: 'boolean', ui: { hidden: true } }, + customerName: { + type: 'string', + title: '客户名称', + ui: { placeholder: '请输入' } + }, + customerShortName: { + type: 'string', + title: '客户简称', + ui: { placeholder: '请输入' } + }, + customerCode: { + type: 'string', + title: '客户编码', + ui: { placeholder: '请输入', + visibleIf: { + _$expand: (value: boolean) => value + } } + }, + } + + }; + this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; + } + initSFFre() { + this.addSchema = { + properties: { + customerName: { + type: 'string', + title: '客户名称', + ui: { placeholder: '请输入' } + }, + customerShortName: { + type: 'string', + title: '客户简称', + ui: { placeholder: '请输入' } + }, + customerCode: { + type: 'string', + title: '客户编码', + ui: { placeholder: '请输入' } + }, + }, + required: ['customerName', 'customerShortName', 'customerCode'] + }; +this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } }; +} + roleAction(value: any,item?: any) { + + // this.service.request(this.service.$api_get_crmCustomer, {id: value.id}).subscribe((res: any) => { + // console.log(res) + // if(res) { + // this.formData = res; + // } + // }) + } + + deleteAction(item?: any) { + this.nzModalService.error({ + nzTitle: '确认删除?', + nzClosable: false, + nzCancelText: '取消', + nzOnOk: () => {} + }); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + } +} diff --git a/src/app/routes/waybill-management/services/waybill-management.service.ts b/src/app/routes/waybill-management/services/waybill-management.service.ts index f2886c03..33dd7c80 100644 --- a/src/app/routes/waybill-management/services/waybill-management.service.ts +++ b/src/app/routes/waybill-management/services/waybill-management.service.ts @@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon /* * @Author: your name * @Date: 2021-12-07 14:52:29 - * @LastEditTime: 2021-12-20 19:17:22 + * @LastEditTime: 2022-01-05 20:36:38 * @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\waybill-management\services\waybill-management.service.ts @@ -47,6 +47,10 @@ export class WaybillManagementServe extends BaseService { $api_get_insertBulkUnloadCarInfo = `/api/sdc/wayBillOperate/insertBulkUnloadCarInfo`; // 确认到车界面信息(两个只能看的图片) $api_get_getUnloadCarInfo = `/api/sdc/wayBillOperate/getUnloadCarInfo`; + + + // 查询CRM客户信息表 + $api_get_crmCustomer_page = '/api/mdc/cuc/crmCustomer/list/page'; constructor(public injector: Injector) { super(injector) } diff --git a/src/app/routes/waybill-management/waybill-management-routing.module.ts b/src/app/routes/waybill-management/waybill-management-routing.module.ts index 5f1c9a6e..b514e454 100644 --- a/src/app/routes/waybill-management/waybill-management-routing.module.ts +++ b/src/app/routes/waybill-management/waybill-management-routing.module.ts @@ -8,6 +8,7 @@ */ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; +import { WaybillManagementAbnormalAppearComponent } from './components/abnormal-appear/abnormal-appear.component'; import { WaybillManagementBulkeDetailComponent } from './components/bulk-detail/bulk-detail.component'; import { WaybillManagementBulkComponent } from './components/bulk/bulk.component'; import { WaybillManagementVehicleDetailComponent } from './components/vehicle-detail/vehicle-detail.component'; @@ -18,6 +19,7 @@ const routes: Routes = [ { path: 'vehicle-detail/:id', component: WaybillManagementVehicleDetailComponent }, { path: 'bulk', component: WaybillManagementBulkComponent }, { path: 'bulk-detail/:id', component: WaybillManagementBulkeDetailComponent }, + { path: 'abnormal-appear', component: WaybillManagementAbnormalAppearComponent }, ] @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/src/app/routes/waybill-management/waybill-management.module.ts b/src/app/routes/waybill-management/waybill-management.module.ts index 2e96cef6..38974b09 100644 --- a/src/app/routes/waybill-management/waybill-management.module.ts +++ b/src/app/routes/waybill-management/waybill-management.module.ts @@ -8,6 +8,7 @@ */ import { NgModule, Type } from '@angular/core'; import { SharedModule } from '@shared'; +import { WaybillManagementAbnormalAppearComponent } from './components/abnormal-appear/abnormal-appear.component'; import { WaybillManagementBulkeDetailComponent } from './components/bulk-detail/bulk-detail.component'; import { WaybillManagementBulkComponent } from './components/bulk/bulk.component'; @@ -19,7 +20,8 @@ const COMPONENTS: Type[] = [ WaybillManagementVehicleComponent, WaybillManagementVehicleDetailComponent, WaybillManagementBulkComponent, - WaybillManagementBulkeDetailComponent + WaybillManagementBulkeDetailComponent, + WaybillManagementAbnormalAppearComponent ]; @NgModule({ diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index c14fe9ef..deaa56ad 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -160,37 +160,7 @@ "icon": "anticon anticon-dashboard", "link": "/order-management/bulk" }, - { - "text": "结算单", - "children": [ - { - "text": "司机管理", - "icon": "anticon anticon-dashboard", - "link": "/order-management/driver-manage" - }, - { - "text": "车辆管理", - "icon": "anticon anticon-dashboard", - "link": "/order-management/car-manage" - } - ] - }, - { - "text": "补录单", - "children": [ - { - "text": "补录运单", - "icon": "anticon anticon-dashboard", - "link": "/order-management/additionalc" - }, - { - "text": "补录运单详情", - "icon": "anticon anticon-dashboard", - "link": "/order-management/additionalc-detail/:id", - "hide": true - } - ] - }, + { "text": "风险单管理", "icon": "anticon anticon-dashboard", @@ -243,6 +213,10 @@ "hide": true, "text": "大宗运单详情", "link": "/waybill-management/bulk-detail/:id" + }, + { + "text": "异常上报", + "link": "/waybill-management/abnormal-appear" } ] },