From 777e5dd101321d16eebeba0b7c39ec16ffddf740 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Mon, 27 Dec 2021 21:08: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 --- .../components/center/center.component.ts | 7 +- .../edit-name/edit-name.component.html | 38 +++- .../edit-name/edit-name.component.less | 11 +- .../edit-name/edit-name.component.ts | 211 +++++++++++------- .../account/services/account.service.ts | 10 +- .../bulk-detail/bulk-detail.component.html | 18 +- .../vehicle-detail.component.html | 18 +- .../vehicle-detail.component.less | 4 +- .../vehicle-detail.component.ts | 20 +- .../bulk-detail/bulk-detail.component.html | 181 +++++++++++++++ .../bulk-detail/bulk-detail.component.less | 84 +++++++ .../bulk-detail/bulk-detail.component.spec.ts | 24 ++ .../bulk-detail/bulk-detail.component.ts | 201 +++++++++++++++++ .../vehicle-detail.component.html | 2 +- .../components/vehicle/vehicle.component.ts | 10 +- .../supply-management-routing.module.ts | 5 +- .../supply-management.module.ts | 4 +- .../vehicle-detail.component.ts | 12 +- src/style-icons.ts | 22 +- 19 files changed, 746 insertions(+), 136 deletions(-) create mode 100644 src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html create mode 100644 src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.less create mode 100644 src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.spec.ts create mode 100644 src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts diff --git a/src/app/routes/account/components/center/center.component.ts b/src/app/routes/account/components/center/center.component.ts index f9b56984..e7040b25 100644 --- a/src/app/routes/account/components/center/center.component.ts +++ b/src/app/routes/account/components/center/center.component.ts @@ -154,9 +154,12 @@ export class AccountComponentsCenterComponent implements OnInit { edit(tpye: string) { if (tpye === 'phone') { const modalRef = this.modalService.create({ - nzTitle: '修改用户名', + nzTitle: '验证手机号码', nzContent: AccountComponentsEditNameComponent, - nzComponentParams: { }, + nzComponentParams: { + i: this.infoData + }, + nzFooter: null }); modalRef.afterClose.subscribe((result: any) => { if (result === true) { diff --git a/src/app/routes/account/components/edit-name/edit-name.component.html b/src/app/routes/account/components/edit-name/edit-name.component.html index ce2ccf04..2a32e1fb 100644 --- a/src/app/routes/account/components/edit-name/edit-name.component.html +++ b/src/app/routes/account/components/edit-name/edit-name.component.html @@ -1,7 +1,7 @@ - + + + + + + + +
+ + +
+
+
+
+ + + + +
diff --git a/src/app/routes/account/components/edit-name/edit-name.component.less b/src/app/routes/account/components/edit-name/edit-name.component.less index 4d054d96..2c58b9fb 100644 --- a/src/app/routes/account/components/edit-name/edit-name.component.less +++ b/src/app/routes/account/components/edit-name/edit-name.component.less @@ -4,8 +4,17 @@ } .btn-code { position: absolute; - right: 0; top: 0; + right: 0; + z-index: 9; + } + .valid-code2 { + position: relative; + } + .btn-code2 { + position: absolute; + top: 0; + right: 0; z-index: 9; } } diff --git a/src/app/routes/account/components/edit-name/edit-name.component.ts b/src/app/routes/account/components/edit-name/edit-name.component.ts index 86c8bb08..16868cc4 100644 --- a/src/app/routes/account/components/edit-name/edit-name.component.ts +++ b/src/app/routes/account/components/edit-name/edit-name.component.ts @@ -14,17 +14,21 @@ import { AccountService } from '../../services/account.service'; }) export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit { // @ViewChild('dun', { static: false }) - url = `/rule?_allow_anonymous=true`; // private dun!: CaptchaComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; + @ViewChild('sfView', { static: false }) sfView!: SFComponent; record: any = {}; i: any; schema!: SFSchema; + schemaView!: SFSchema; ui!: SFUISchema; - + uiView: SFUISchema = {}; + isVisibleView = false; formData: any = {}; count = 0; + count2 = 0; oldName: any; + voucher: any; codeTips: any; interval$: any; @@ -34,47 +38,37 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit } ngOnInit() { - this.codeTips = '为了账户安全,需您的手机验证(' + this.i.phone + ')'; - this.formData.oldName = this.i.name; + console.log(this.i) + this.codeTips = '为了账户安全,需您的手机验证(' + this.i?.phone + ')'; + this.formData.oldName = this.i?.phone; this.initSF(); + this.initSFNew(); // this.getInfo(); } initSF() { this.schema = { properties: { oldName: { - title: '用户名(旧)', + title: '手机号', type: 'string', - default: this.formData.oldName, + default: this.formData?.oldName, ui: { widget: 'text', }, }, - userName: { - title: '用户名(新)', - type: 'string', - minLength: 3, - maxLength: 30, - description: '3-30个字符,支持中英文、数字、符号“_”和“-”,只能修改一次', - ui: { - placeholder: '请输入新用户名', - errors: { - required: '请输入新用户名', - }, - // validator: (val) => this.validatecomponent(val), - // blur: () => this.checkUserName(), - // validator: (val) => { - // const name = this.sf?.getValue('/oldName'); - // if (name === val) { - // return [{ keyword: 'validateName', message: '新用户名不能与旧用户名一样' }]; - // } - // // console.log(this.isCheck,'this.isCheck'); - // // if (!this.isCheck) { - // // return [{ keyword: 'validateName', message: '用户名已存在,请修改' }]; - // // } - // }, - } as SFStringWidgetSchema, - }, + // userName: { + // title: '用户名(新)', + // type: 'string', + // minLength: 3, + // maxLength: 30, + // description: '3-30个字符,支持中英文、数字、符号“_”和“-”,只能修改一次', + // ui: { + // placeholder: '请输入新用户名', + // errors: { + // required: '请输入新用户名', + // }, + // } as SFStringWidgetSchema, + // }, smsVerifyCode: { title: '验证码', type: 'string', @@ -100,6 +94,46 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit }, }; } + initSFNew() { + this.schemaView = { + properties: { + phone: { + title: '新手机号', + type: 'string', + minLength: 3, + maxLength: 30, + ui: { + placeholder: '请输入新手机号', + errors: { + required: '请输入新手机号', + }, + } as SFStringWidgetSchema, + }, + smsVerifyCode: { + title: '验证码', + type: 'string', + maxLength: 6, + minLength: 6, + description: this.codeTips, + ui: { + widget: 'custom', + placeholder: '请输入验证码', + errors: { + required: '请输入6位验证码', + minLength: '请输入6位验证码', + }, + }, + }, + }, + required: ['phone', 'smsVerifyCode'], + }; + this.uiView = { + '*': { + spanLabelFixed: 100, + grid: { span: 24 }, + }, + }; + } getCaptcha() { const params = { @@ -119,6 +153,24 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit }); } + getCaptcha2() { + const params = { + phoneNumber: this.sfView.value.phone + }; + this.service.request(this.service.$api_get_getSMVerificationCode, params, 'POST', true, 'FORM').subscribe((res) => { + console.log(res); + // code==503046 弹出网易盾 + if (res && res.code === '1') { + this.service.msgSrv.success('发送成功'); + this.codeCountDown2(); + } else if (res.code === '503046') { + // this.dun.popUp(); + } else { + this.service.msgSrv.success(res.msg); + } + }); + } + /* code倒计时 */ codeCountDown() { this.count = 59; @@ -129,6 +181,15 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit } }, 1000); } + codeCountDown2() { + this.count2 = 59; + this.interval$ = setInterval(() => { + this.count2 -= 1; + if (this.count <= 0) { + clearInterval(this.interval$); + } + }, 1000); + } /* 网易盾验证通过 */ captchaDone(validate: any) { this.codeCountDown(); @@ -144,71 +205,53 @@ export class AccountComponentsEditNameComponent implements OnInit, AfterViewInit // } }); } - /** - * 验证组件名称 - * 规则:以小写字母开头,长度1-20, 仅限小写字母、数字和横线 - */ - // validatecomponent(value: string): Observable { - // return new Observable((observer: Observer) => { - // if (!value || value.trim().length === 0) { - // observer.next([{ keyword: 'required', message: '用户名不能为空!' }]); - // return; - // } - // let isCheck: any; - // this.service.request(this.service.$api_checkUserName, { userName: value }, 'POST', true, 'FORM').subscribe((res) => { - // // 检查用户名 - // isCheck = res; - // }); - - // setTimeout(() => { - // // 以小写字母开头,长度1-20, 仅限小写字母、数字和横线 - // // const partern = /^[a-z][a-zA-Z0-9-]{0,30}$/; - - // // 3-30个字符,支持中英文、数字、符号“_”和“-” - // const partern = /^[a-zA-Z0-9_\-\u4e00-\u9fa5]{3,30}$/; - // const reg = new RegExp(partern); - // const result = reg.test(value); - // const name = this.sf?.getValue('/oldName'); - // if (name === value) { - // observer.next([{ keyword: 'validateName', message: '新用户名不能与旧用户名一样' }]); - // return; - // } - // console.log(value, 'value', isCheck); - // if (!isCheck) { - // observer.next([{ keyword: 'validateName', message: '用户名已存在,请修改' }]); - // return; - // } - // if (!result) { - // observer.next([{ keyword: 'validateName', message: '请输入3-30个字符,且不能含有特殊符号!' }]); - // } else { - // observer.next([]); - // } - // observer.complete(); - // }, 500); - // }); - // } - // this.usernameValidator = (control: FormControl) => { - // if (control.value === this.i.name) { - // return of(null); - // } - // return control.valueChanges.pipe( - - // ); - // }; close() { this.modal.destroy(); } submitForm() { console.log(this.sf.value, 'this.sf.value'); const params = { - ...this.sf.value, + smsVerifyCode: this.sf.value.smsVerifyCode, }; - this.service.http.post(this.service.$api_get_current_user_info, params).subscribe((res) => { + // this.modal.close(); + this.isVisibleView = true + + this.service.http.post(this.service.$api_get_verifyPhone, params).subscribe((res) => { console.log(res, 'submitForm'); if (res.success) { this.service.msgSrv.success(res.msg); + // this.modal.close(true); + this.voucher = res.data.voucher + this.isVisibleView = true + + } else { + this.service.msgSrv.warning(res.msg); + } + }); + } + handleCancel(type: string) { + if(type === '1') { + console.log(type) + this.isVisibleView = false + } else if(type === '2') { + console.log(type) + } + } + handleOK() { + + } + handleNew() { + console.log(this.voucher) + const params = { + voucher: this.voucher, + ...this.sfView.value, + } + this.service.http.post(this.service.$api_get_verifyPhone, params).subscribe((res) => { + console.log(res); + if (res.success) { this.modal.close(true); + this.service.msgSrv.success(res.msg); } else { this.service.msgSrv.warning(res.msg); } diff --git a/src/app/routes/account/services/account.service.ts b/src/app/routes/account/services/account.service.ts index 5196e0b6..a5180ef4 100644 --- a/src/app/routes/account/services/account.service.ts +++ b/src/app/routes/account/services/account.service.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-02 11:12:21 - * @LastEditTime: 2021-12-13 17:43:32 + * @LastEditTime: 2021-12-27 17:10:47 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: \scm-ows-ui\src\app\routes\account\services\account.service.ts @@ -23,6 +23,14 @@ export class AccountService extends BaseService { // 根据当前登录用户绑定的手机号码获取短信验证码 $api_get_current_user_smVerification = `/api/mdc/pbc/smsSend/getSmVerificationCodeByToken`; + // 获取短信验证码 + $api_get_getSMVerificationCode = `/api/mdc/pbc/smsSend/getSMVerificationCode`; + + // 验证手机号 + $api_get_verifyPhone = `/api/mdc/cuc/userBasicInfo/forgetPassword/verifyPhone`; + + // 凭证修改手机号 + $api_set_voucherUpdatePhone = `/api/mdc/cuc/userBasicInfo/forgetPassword/voucherUpdatePhone`; constructor(public injector: Injector) { super(injector); } diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index a2cffcab..166effcf 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -1,7 +1,7 @@ +   +   +   +   diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 1089c237..55f6cf25 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -1,7 +1,7 @@ +   +   +   +   diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.less b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.less index 287ea1bb..dccff86f 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.less +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.less @@ -57,5 +57,7 @@ .leftPadding { padding-right: 100px; } - + .hide{ + display: none; + } } \ No newline at end of file diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index 4d427695..9f228631 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -2,7 +2,7 @@ import { ViewChild } from '@angular/core'; /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime: 2021-12-27 13:54:45 + * @LastEditTime: 2021-12-27 21:05:48 * @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 @@ -29,6 +29,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { goodsResource: [] }; imges: any; + approvalLsit: any; isVisible = false; logColumns: STColumn[] = [ { title: '款项', index: 'costName' }, @@ -72,19 +73,18 @@ export class OrderManagementVehicleDetailComponent implements OnInit { console.log(res) if (res) { this.i =res; - console.log(this.i?.unLoadingPlaceList) + this.approvalLsit = res.scheduleVOList + this.approvalLsit.map((item: any, key: any) => { + console.log(item) + if(item.displayStatus === 'HIDE') { + delete(this.approvalLsit[key]) + } + }) + console.log(this.approvalLsit) } }) } - hand() { - this.modalService.create({ - nzTitle: '', - // nzContent: OrderManagementGaodeMapComponent, - nzWidth: 1200 - }); - } - goBack() { window.history.go(-1); } diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html new file mode 100644 index 00000000..1a3c6aa9 --- /dev/null +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html @@ -0,0 +1,181 @@ +
+ + + + + +
+ +

货源编码 : {{ i?.resourceCode }}

+
+
+
网络货运人:{{i?.enterpriseInfoName}}
+
+ + + + +
+
+
+
+ 总费用:{{i?.freightPrice | currency}} +
+
+ +
+ {{i?.enterpriseProjectId}} + {{i?.deadlineTime}} + {{i?.createUserId}} + {{i?.dispatchName}} 18100000000 + {{i?.serviceTypeLabel}} +
+
+
+ +
+
+ + + + + + +
+
+
+ + + + 货物信息 + + + {{item.goodsName}} + + + {{item.weight}}顿 | {{item.volume}}方 + + + {{10}}顿 | {{10}}方 + + + {{item.maxWeight}} | {{item.maxCube}}米 + + + {{i?.carrierInformationVO?.driverName}} / {{i?.carrierInformationVO?.driverTelephone}} / + {{i?.carrierInformationVO?.driverLicensePlate}} + + + + +
+

装货卸货信息 + ( + + + ) + +

+
+
+
+
+
+
+
+

装货地:{{item?.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}

+

联系人:{{item.appUserName}}/{{item.contractTelephone}}

+
+
+
+ +
+
+
+
+
+
+
+
+

卸货地:{{item?.province}}{{item.city}}{{item.area}}{{item.detailedAddress}}

+

联系人:{{item.appUserName}}/{{item.contractTelephone}}

+
+
+
+ +
+
+
+
+
+ + +
+
+
+
+

到货后15天内支付运费

+

+ {{settlementBasis[item?.settlementBasis]}},{{rule[item?.rule]}}

+
+ +
+ + {{item?.freightPrice | currency}} + {{freightType[item?.freightType]}} +
+
+
+
+
+ + + + ({{ item?.count }}) + + + + + + + + {{i?.supplementaryInformationVO?.stateReceipt?'是':'否'}} + + + {{i?.supplementaryInformationVO?.receiptTypeLabel}} + + + {{i?.supplementaryInformationVO?.area}} + + + {{i?.supplementaryInformationVO?.address}} + + + {{i?.supplementaryInformationVO?.remarks}} + + + + + + + +
diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.less b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.less new file mode 100644 index 00000000..957a1f03 --- /dev/null +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.less @@ -0,0 +1,84 @@ +:host { + .source-info { + min-height: 210px; + + p { + margin-bottom: .5em; + } + } + + .btn-size { + font-size: 14px; + } + + .bdr { + border-right: 1px solid #ccc; + } + + .bdl { + border-left: 1px solid #ccc; + } + + .title { + font-weight: bold; + font-size: 26; + } + + .freight-info-box { + width: 95%; + + p { + margin-bottom: 5px; + } + } + + .freigth-label { + display: inline-block; + width: 50px; + text-align: right; + } + + ::ng-deep { + .approval-status { + .ant-steps { + width: 70%; + margin: 0 auto; + } + } + } + + .handling-info { + min-height: 100px; + border: 1px solid #ccc; + + .loading-row { + display: flex; + } + + .handling-info-icon { + width: 32px; + height: 32px; + margin-right: 24px; + color: #fff; + line-height: 32px; + text-align: center; + border-radius: 50%; + + &.loading-bg { + background-color: #50D4AB; + } + + &.unloaing-bg { + background: #F66F6A; + } + } + + .info { + flex: 1; + } + + .time-info { + margin-left: 56px; + } + } +} diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.spec.ts b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.spec.ts new file mode 100644 index 00000000..a1781458 --- /dev/null +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.spec.ts @@ -0,0 +1,24 @@ +import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { SupplyManagementBulkDetailComponent } from './bulk-detail.component'; + +describe('SupplyManagementBulkDetailComponent', () => { + let component: SupplyManagementBulkDetailComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [SupplyManagementBulkDetailComponent] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(SupplyManagementBulkDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 00000000..cc2cd38b --- /dev/null +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.ts @@ -0,0 +1,201 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { STColumn } from '@delon/abc/st'; +import { NzMessageService } from 'ng-zorro-antd/message'; +import { NzModalService } from 'ng-zorro-antd/modal'; +// import { PublishGoodsChooseFamifiarComponent } from 'src/app/routes/publish-goods/components/choose-famifiar-bulk/choose-famifiar.component'; +import { SupplyManagementService } from '../../services/supply-management.service'; +// import { SupplyManagementCurrentAssignmentComponent } from '../current-assignment/current-assignment.component'; +import { SupplyManagementUpdatePriceComponent } from '../update-price/update-price.component'; + +@Component({ + selector: 'app-supply-management-bulk-detail', + templateUrl: './bulk-detail.component.html', + styleUrls: ['./bulk-detail.component.less'] +}) +export class SupplyManagementBulkDetailComponent implements OnInit { + + id = this.route.snapshot.params.id; + i: any; + logColumns: STColumn[] = [ + { title: '内容', index: 'theme' }, + { title: '操作人', index: 'operationUserPhone' }, + { title: '操作时间', index: ' createTime' }, + ]; + driverColums: STColumn[] = [ + { title: '司机姓名', index: 'theme' }, + { title: '手机号', index: 'operationUserPhone' }, + { title: '车牌号', index: ' createTime' }, + { title: '承运次数', index: 'operationUserPhone' }, + { title: '承运数量', index: ' createTime' }, + { + title: '操作', + fixed: 'right', + width: '200px', + className: 'text-center', + buttons: [ + { + text: '移除', + click: (_record) => this.delDiver(_record), + }, + ], + }, + ]; + status: any = { 1: '待接单', 2: '已接单', 3: '已取消' }; + serviceType: any = { + 1: '抢单', + 2: '指派' + } + freightType: any = { + 1: '元/吨', + 2: '元/方', + 3: '元/车' + } // 运单类型 + + settlementBasis: any = { + 1: '以收获为准', + 2: '以发货为准' + } // 结算依据 + + rule: any = { + 1: '保留小数', + 2: '抹除小数', + 3: '抹除个数' + } // 取整规则 + + currentStatus = 0; + + constructor( + private route: ActivatedRoute, + private msgSrv: NzMessageService, + private service: SupplyManagementService, + private modal: NzModalService, + private router: Router + ) { + + } + + ngOnInit(): void { + this.getGoodsSourceDetail(); + } + + /** + * 移除司机 + */ + delDiver(item: any) { + const { id } = item; + // this.modal.confirm({ + // nzTitle: '删除确认', + // nzContent: `请仔细核对,避免误操作!
是否删除?
`, + // nzOnOk: () => { + // this.service.http.post(this.service.$api_del_driver, { id }).subscribe((res) => { + // if (res) { + // this.service.msgSrv.success('数据删除成功!'); + // // this.st1.reload(); + // } else { + // this.service.msgSrv.error('删除失败!'); + // } + // }); + // }, + // }); + } + + /** + * 指派熟车 + */ + assignedCar(item: any) { + // const modalRef = this.modal.create({ + // nzTitle: '指派熟车', + // nzWidth: '90%', + // nzContent: PublishGoodsChooseFamifiarComponent, + // nzComponentParams: { + // i: this.i, + // }, + // nzFooter: null, + // }); + } + + /** + * 查看当前指派 + */ + viewCurrentAssign(item: any) { + // const modalRef = this.modal.create({ + // nzTitle: '当前指派', + // nzWidth: '600px', + // nzContent: SupplyManagementCurrentAssignmentComponent, + // nzComponentParams: { + // i: item, + // }, + // nzFooter: null, + // }); + } + /** + *再下一单 + * @param record + */ + placeOrder(record: any) { + this.router.navigate(['./pbg/onecar-publish'], { + queryParams: { + id: record?.id + } + }) + } + /** + * 修改货源 + */ + updateGoodsSource(record: any) { + this.router.navigate(['./pbg/onecar-publish'], { + queryParams: { + id: record?.id + } + }) + } + + /** + * 更新单价 + */ + updatePrice(item: any) { + const modalRef = this.modal.create({ + nzTitle: '修改单价', + nzWidth: '600px', + nzContent: SupplyManagementUpdatePriceComponent, + nzComponentParams: { + record: item, + }, + nzFooter: null, + }); + modalRef.afterClose.subscribe(res => { + if (res) { + this.getGoodsSourceDetail(); + } + }) + } + + /** + * 取消货源 + */ + cancleGoodsSource() { + this.modal.confirm({ + nzTitle: '确定取消货源吗?', + nzContent: `取消后不可恢复,谨慎操作`, + nzOnOk: () => + this.service.request(this.service.$api_cancle_goods_source, { id: this.i.id }).subscribe((res) => { + if (res === true) { + this.service.msgSrv.success('操作成功!'); + this.getGoodsSourceDetail(); + } + }), + }) + } + + getGoodsSourceDetail() { + this.service.request(this.service.$api_get_getBulkDetail, { id: this.id }).subscribe(res => { + this.i = res; + this.currentStatus = +this.i?.resourceStatus - 1; + }) + } + + goBack() { + window.history.go(-1); + } +} diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index 6a13a421..fcf5f65f 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -49,7 +49,7 @@ - +
diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index d1a4f853..10842415 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -324,7 +324,7 @@ export class SupplyManagementVehicleComponent implements OnInit { { title: '', type: 'checkbox', width: '50px', className: 'text-center' }, { title: '货源编号', - width: '100px', + width: '180px', className: 'text-center', render: 'resourceCode' }, @@ -345,21 +345,21 @@ export class SupplyManagementVehicleComponent implements OnInit { { title: '装货地', index: 'loadingAddressArr', - width: '120px' + width: '200px' }, { title: '卸货地', index: 'unloadingAddressArr', - width: '120px' + width: '200px' }, { title: '货物名称', index: 'goodsName', - width: '120px' + width: '150px' }, { title: '货物数量', - width: '120px', + width: '130px', index: 'goodsNumber', format: item => item.goodsNumber.join('/') }, diff --git a/src/app/routes/supply-management/supply-management-routing.module.ts b/src/app/routes/supply-management/supply-management-routing.module.ts index ba93122e..79aab0ad 100644 --- a/src/app/routes/supply-management/supply-management-routing.module.ts +++ b/src/app/routes/supply-management/supply-management-routing.module.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 11:10:14 - * @LastEditTime: 2021-12-20 13:38:33 + * @LastEditTime: 2021-12-27 15:25:01 * @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\supply-management\supply-management-routing.module.ts @@ -15,10 +15,11 @@ import { SupplyManagementVehicleDetailComponent } from './components/vehicle-det import { SupplyManagementAddDriversComponent } from './components/add-drivers/add-drivers.component'; import { SupplyManagementOnecarPublishComponent } from './components/onecar-publish/onecar-publish.component'; import { SupplyManagementBulkPublishComponent } from './components/bulk-publish/bulk-publish.component'; +import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component'; const routes: Routes = [ { path: 'index', component: SupplyManagementIndexComponent }, - // { path: 'bulk-detail/:id', component: SupplyManagementBulkDetailComponent }, + { path: 'bulk-detail/:id', component: SupplyManagementBulkDetailComponent }, { path: 'vehicle-detail/:id', component: SupplyManagementVehicleDetailComponent }, { path: 'add-drivers', component: SupplyManagementAddDriversComponent }, { path: 'vehicle-amend/:id', component: SupplyManagementOnecarPublishComponent }, diff --git a/src/app/routes/supply-management/supply-management.module.ts b/src/app/routes/supply-management/supply-management.module.ts index 100b2898..44ceb3d7 100644 --- a/src/app/routes/supply-management/supply-management.module.ts +++ b/src/app/routes/supply-management/supply-management.module.ts @@ -28,6 +28,7 @@ import { PublishAddressListComponent } from './components/onecar-publish/address import { PublishSuccessComponent } from './components/onecar-publish/publish-success/publish-success.component'; import { CarAddDriverComponent } from './components/add-driver/add-driver.component'; import { CarAddmodalComponent } from './components/addmodal/addmodal.component'; +import { SupplyManagementBulkDetailComponent } from './components/bulk-detail/bulk-detail.component'; const COMPONENTS: Type[] = [ @@ -49,7 +50,8 @@ const COMPONENTS: Type[] = [ PublishAddressListComponent, PublishSuccessComponent, CarAddDriverComponent, - CarAddmodalComponent + CarAddmodalComponent, + SupplyManagementBulkDetailComponent ]; @NgModule({ diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts index 4be84cd0..feb59366 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime: 2021-12-20 13:55:09 + * @LastEditTime: 2021-12-27 15:38:04 * @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 @@ -48,10 +48,12 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { } this.service.request(this.service.$api_get_getWholeDetail, params).subscribe((res) => { console.log(res) - this.unLoadingPlaceVOList.push(...res.loadingPlace) - this.unLoadingPlaceVOList.push(...res.dischargePlace) - console.log(this.unLoadingPlaceVOList) - this.i = res; + if(res) { + this.unLoadingPlaceVOList.push(...res.loadingPlace) + this.unLoadingPlaceVOList.push(...res?.dischargePlace) + console.log(this.unLoadingPlaceVOList) + this.i = res; + } }) } diff --git a/src/style-icons.ts b/src/style-icons.ts index 7b61ee19..b3a858ff 100644 --- a/src/style-icons.ts +++ b/src/style-icons.ts @@ -1,3 +1,11 @@ +/* + * @Author: your name + * @Date: 2021-11-29 20:03:55 + * @LastEditTime: 2021-12-27 16:36:11 + * @LastEditors: Please set LastEditors + * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE + * @FilePath: \tms-obc-web\src\style-icons.ts + */ // Custom icon static resources import { @@ -8,7 +16,12 @@ import { InfoOutline, LinkOutline, ProfileOutline, - MobileOutline + MobileOutline, + UserAddOutline, + SolutionOutline, + QuestionCircleOutline, + CheckCircleOutline, + QuestionCircleFill } from '@ant-design/icons-angular/icons'; export const ICONS = [ @@ -19,5 +32,10 @@ export const ICONS = [ LinkOutline, FolderOutline, FileZipOutline, - MobileOutline + MobileOutline, + UserAddOutline, + SolutionOutline, + QuestionCircleOutline, + CheckCircleOutline, + QuestionCircleFill ];