diff --git a/proxy.conf.js b/proxy.conf.js index 2fe9e131..ed5e9851 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-05-07 14:49:15 + * @LastEditTime : 2022-05-10 13:41:21 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ diff --git a/src/app/routes/account/components/edit-password/edit-password.component.ts b/src/app/routes/account/components/edit-password/edit-password.component.ts index 3f4cd9b7..4410cfa0 100644 --- a/src/app/routes/account/components/edit-password/edit-password.component.ts +++ b/src/app/routes/account/components/edit-password/edit-password.component.ts @@ -1,5 +1,5 @@ /* - * @Description : + * @Description : * @Version : 1.0 * @Author : Shiming * @Date : 2021-12-27 10:30:56 @@ -9,14 +9,11 @@ * Copyright (C) 2022 huzhenhong. All rights reserved. */ -import { Component, Inject, OnInit, ViewChild } from '@angular/core'; -import { FormBuilder, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { Component, Inject, OnInit } from '@angular/core'; +import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import { Router } from '@angular/router'; import { DA_SERVICE_TOKEN, ITokenService } from '@delon/auth'; -import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { NzDrawerRef, NzDrawerService } from 'ng-zorro-antd/drawer'; import { NzFormTooltipIcon } from 'ng-zorro-antd/form'; import { NzModalRef } from 'ng-zorro-antd/modal'; import { AccountService } from '../../services/account.service'; @@ -30,14 +27,13 @@ export class AccountComponentsCenterEditComponent implements OnInit { record: any; count = 0; type = 'create'; - isVisibleView = false + isVisibleView = false; passwordVisible = false; passwordVisible2 = false; password: any; password2: any; interval$: any; - confirmationValidator = - (control: FormControl): { [s: string]: boolean } => { + confirmationValidator = (control: FormControl): { [s: string]: boolean } => { if (!control.value) { return { required: true }; } else if (control?.value !== this.validateForm?.value?.passWord) { @@ -51,7 +47,6 @@ export class AccountComponentsCenterEditComponent implements OnInit { }; constructor( public router: Router, - public ar: ActivatedRoute, private modalRef: NzModalRef, private fb: FormBuilder, public service: AccountService, @@ -61,19 +56,21 @@ export class AccountComponentsCenterEditComponent implements OnInit { ngOnInit() { this.initForm(); } - initForm () { - this.validateForm = this.fb.group({ - passWord: [null, - [ - Validators.required, - Validators.maxLength(16), - Validators.minLength(8), - Validators.pattern('^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z-_]{8,16}$') - ]], - passWordTo: [null, [ Validators.required, Validators.maxLength(16), Validators.minLength(8), this.confirmationValidator,]], - smsVerifyCode: [null, [Validators.required]], - }); -} + initForm() { + this.validateForm = this.fb.group({ + passWord: [ + null, + [ + Validators.required, + Validators.maxLength(16), + Validators.minLength(8), + Validators.pattern('^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z-_]{8,16}$') + ] + ], + passWordTo: [null, [Validators.required, Validators.maxLength(16), Validators.minLength(8), this.confirmationValidator]], + smsVerifyCode: [null, [Validators.required]] + }); + } destroyModal(): void { this.modalRef.destroy(); } @@ -84,28 +81,28 @@ export class AccountComponentsCenterEditComponent implements OnInit { this.service.msgSrv.success('发送成功'); e.preventDefault(); this.codeCountDown(); - }else { + } else { this.service.msgSrv.success(res.msg); } }); } save() { - if(!this.validateForm.valid) { - this.service.msgSrv.warning('必填项为空或格式错误,请检查!') + if (!this.validateForm.valid) { + this.service.msgSrv.warning('必填项为空或格式错误,请检查!'); return; } - const params = { + const params = { ...this.validateForm.value }; - this.service.request(this.service.$api_set_phoneUpdatePassword, params).subscribe((res) => { + this.service.request(this.service.$api_set_phoneUpdatePassword, params).subscribe(res => { if (res) { this.service.msgSrv.success('修改密码成功!'); this.isVisibleView = true; setTimeout(() => { this.tokenService.clear(); - this.router.navigate(['/passport/login']) - this.modalRef.close() - }, 3000) + this.router.navigate(['/passport/login']); + this.modalRef.close(); + }, 3000); } }); } @@ -120,11 +117,11 @@ export class AccountComponentsCenterEditComponent implements OnInit { }, 1000); } handleCancel() { - this.isVisibleView = false - } - handleOK() { - this.modalRef.close() - this.tokenService.clear(); - this.router.navigate(['/passport/login']) - } + this.isVisibleView = false; + } + handleOK() { + this.modalRef.close(); + this.tokenService.clear(); + this.router.navigate(['/passport/login']); + } } diff --git a/src/app/routes/commom/less/commom-table.less b/src/app/routes/commom/less/commom-table.less index 43fa7d95..ec058484 100644 --- a/src/app/routes/commom/less/commom-table.less +++ b/src/app/routes/commom/less/commom-table.less @@ -113,9 +113,10 @@ line-height: 21px; } - // .text-truncate { - // white-space: normal; - // } + .text-truncate { + white-space: normal; + } + // 强制头部居中 .ant-table-container table>thead>tr>.options { text-align: center !important; diff --git a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html index 37e24dfb..276a8231 100644 --- a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html +++ b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.html @@ -80,7 +80,8 @@ (change)="stChange($event)" > - {{ item?.contractCode }} + {{ item?.contractCode }} + {{ item?.contractCode }} diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.html b/src/app/routes/contract-management/components/contract-list/contract-list.component.html index 0876e5cf..709cfb87 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.html +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-07 15:57:49 * @LastEditors : Shiming - * @LastEditTime : 2022-02-23 20:11:50 + * @LastEditTime : 2022-05-07 17:52:57 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-list\\contract-list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -51,8 +51,8 @@ - {{ item?.contractCode }} - + {{ item?.contractCode }} + {{ item?.contractCode }} diff --git a/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html b/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html index 4b5e20cd..d61d5e4d 100644 --- a/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html +++ b/src/app/routes/contract-management/components/contract-partner/contract-partner.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-07 13:29:57 * @LastEditors : Shiming - * @LastEditTime : 2022-02-24 10:08:28 + * @LastEditTime : 2022-05-07 17:56:08 * @FilePath : \\tms-obc-web\\src\\app\\routes\\contract-management\\components\\contract-partner\\contract-partner.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -80,7 +80,8 @@ (change)="stChange($event)" > - {{ item?.contractCode }} + {{ item?.contractCode }} + {{ item?.contractCode }} diff --git a/src/app/routes/datatable/components/datascreen/datascreen.component.html b/src/app/routes/datatable/components/datascreen/datascreen.component.html index 8142b1e1..c5b491b4 100644 --- a/src/app/routes/datatable/components/datascreen/datascreen.component.html +++ b/src/app/routes/datatable/components/datascreen/datascreen.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-04-06 10:57:56 * @LastEditors : Shiming - * @LastEditTime : 2022-05-07 09:43:16 + * @LastEditTime : 2022-05-09 13:59:19 * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\datascreen\\datascreen.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -48,31 +48,6 @@ - - - - {{ index + 1 }} - - - {{ item.weight ? item.weight + '吨' : '' }} - {{ item.volume ? item.volume + '方' : '' }} - - - {{ item.weight ? item.weight + '吨' : '' }} - {{ item.volume ? item.volume + '方' : '' }} - - -
@@ -91,11 +66,6 @@
- - - - -
@@ -156,11 +126,48 @@ +
+ +
+
+ + + + + {{ index + 1 }} + + + {{ item.weight ? item.weight + '吨' : '' }} + {{ item.volume ? item.volume + '方' : '' }} + + + {{ item.weight ? item.weight + '吨' : '' }} + {{ item.volume ? item.volume + '方' : '' }} + + + +
+
+ + + +
+
tr > th, .ant-table-tbody > tr > td, .ant-table tfoot > tr > th, .ant-table tfoot > tr > td { - padding: 0; + padding: 5px; font-size: 12px; } } diff --git a/src/app/routes/datatable/components/operationtable/operationtable.component.ts b/src/app/routes/datatable/components/operationtable/operationtable.component.ts index aa8b8e33..d315545d 100644 --- a/src/app/routes/datatable/components/operationtable/operationtable.component.ts +++ b/src/app/routes/datatable/components/operationtable/operationtable.component.ts @@ -86,6 +86,8 @@ export class DatatableOperationtableComponent implements OnInit { this.service.request(this.service.$api_operationalReportHistogram, params).subscribe(res => { if (res) { this.chartData = res + this.pillar.reRender() + this.curve.reRender() if(flag) { // 除第一次加载外 this.pillar.reRender() this.curve.reRender() diff --git a/src/app/routes/download/components/list/list.component.ts b/src/app/routes/download/components/list/list.component.ts index 05f38c4c..efdbd8d2 100644 --- a/src/app/routes/download/components/list/list.component.ts +++ b/src/app/routes/download/components/list/list.component.ts @@ -1,8 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; +import { STColumn, STComponent, STData } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; import { NzModalService } from 'ng-zorro-antd/modal'; import { DownloadService } from '../../services/download.service'; @@ -16,7 +14,7 @@ export class DownloadComponentsListComponent implements OnInit { columns: STColumn[] = []; @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - constructor(public service: DownloadService, private modal: NzModalService, private router: Router, private ar: ActivatedRoute) {} + constructor(public service: DownloadService, private modal: NzModalService) {} /** * 查询参数 diff --git a/src/app/routes/financial-management/components/cost-management/cost-management.component.html b/src/app/routes/financial-management/components/cost-management/cost-management.component.html index f9b6560d..36360f29 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management.component.html +++ b/src/app/routes/financial-management/components/cost-management/cost-management.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-30 19:36:30 * @LastEditors : Shiming - * @LastEditTime : 2022-02-23 16:35:15 + * @LastEditTime : 2022-05-07 17:33:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\components\\cost-management\\cost-management.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -50,11 +50,11 @@
--> - + - {{ item.hrmoney | currency }} + {{ item.armoeny ? (item.armoeny| currency ): '--' }} / {{ item.hrmoney? (item.hrmoney | currency) : '--'}} {{ item.cnoCode }}/{{ item.cnoName }} diff --git a/src/app/routes/financial-management/components/cost-management/cost-management.component.ts b/src/app/routes/financial-management/components/cost-management/cost-management.component.ts index 7c913644..63f46085 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management.component.ts +++ b/src/app/routes/financial-management/components/cost-management/cost-management.component.ts @@ -84,7 +84,7 @@ export class CostManagementComponent extends BasicTableComponent implements OnIn exportList() { - this.service.exportStart({ ...this.sf?.value, pageSize: -1 }, this.service.$api_get_exportPlatformAccountBalanceByOperator); + this.service.exportStart({ ...this.sf?.value, pageSize: -1 }, this.service.$api_get_cost_page_export); } routeTo(url: string, params?: any, status?: any) { @@ -252,8 +252,8 @@ export class CostManagementComponent extends BasicTableComponent implements OnIn { title: '结算客户', render: 'artocode', width: 200, className: 'text-left' }, { title: '应收对象', index: 'artoname', width: 200, className: 'text-left' }, { title: '应付对象', index: 'hrtoname', width: 200, className: 'text-left' }, - { title: '应收金额', render: 'armoeny', width: 150, className: 'text-right' }, - { title: '应付金额', render: 'hrmoney', width: 150, className: 'text-right' }, + { title: '应收/应付金额', render: 'hrmoney', width: 150, className: 'text-right' }, + // { title: '应付金额', render: 'hrmoney', width: 150, className: 'text-right' }, { title: '收/付款金额', render: 'hrpaymoney', width: 150, className: 'text-right' }, { title: '开/收票金额', render: 'hrvatmoney', width: 150, className: 'text-right' }, { title: '创建时间', index: 'createTime', type: 'date', width: 200, className: 'text-center' }, diff --git a/src/app/routes/financial-management/components/payable-order/payable-order.component.html b/src/app/routes/financial-management/components/payable-order/payable-order.component.html index be7fcedf..6d4445be 100644 --- a/src/app/routes/financial-management/components/payable-order/payable-order.component.html +++ b/src/app/routes/financial-management/components/payable-order/payable-order.component.html @@ -48,6 +48,9 @@
+
this.service.getCloseAccount(), + asyncData: () => this.service.getCloseAccount() } }, driver2IdName: { @@ -136,7 +135,7 @@ export class PayableOrderComponent extends BasicTableComponent implements OnInit title: '收款人', ui: { widget: 'select', - placeholder: '请选择', + placeholder: '请选择' } }, sts: { @@ -148,7 +147,7 @@ export class PayableOrderComponent extends BasicTableComponent implements OnInit ], ui: { widget: 'select', - placeholder: '请选择', + placeholder: '请选择' } }, phxdate: { @@ -156,7 +155,7 @@ export class PayableOrderComponent extends BasicTableComponent implements OnInit type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, createTime: { @@ -164,21 +163,21 @@ export class PayableOrderComponent extends BasicTableComponent implements OnInit type: 'string', ui: { widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, billHCode: { type: 'string', title: '订单号', ui: { - placeholder: '请输入', + placeholder: '请输入' } }, feeHCode: { type: 'string', title: '费用号', ui: { - placeholder: '请输入', + placeholder: '请输入' } }, remarks: { @@ -186,7 +185,7 @@ export class PayableOrderComponent extends BasicTableComponent implements OnInit title: '核销备注', ui: { autocomplete: 'off', - placeholder: '请选择', + placeholder: '请选择' } } } diff --git a/src/app/routes/financial-management/components/payment-order/payment-order.component.html b/src/app/routes/financial-management/components/payment-order/payment-order.component.html index f9ee3d69..4342a407 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order.component.html +++ b/src/app/routes/financial-management/components/payment-order/payment-order.component.html @@ -34,6 +34,9 @@
+
diff --git a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts index 23a987d2..2df7b2b4 100644 --- a/src/app/routes/financial-management/components/payment-order/payment-order.component.ts +++ b/src/app/routes/financial-management/components/payment-order/payment-order.component.ts @@ -77,6 +77,10 @@ export class PaymentOrderComponent extends BasicTableComponent implements OnInit }); } + exportList() { + this.service.exportStart({ ...this.sf?.value, pageSize: -1 }, this.service.$api_get_payment_page_export); + } + private initSF(): SFSchema { return { properties: { @@ -213,7 +217,7 @@ export class PaymentOrderComponent extends BasicTableComponent implements OnInit { title: '收款人', index: 'hrToLabel', width: 150 }, { title: '应付已核销', index: 'ishrhxLabel', width: 150 }, { title: '确认日期', index: 'payDate2', type: 'date', className: 'text-center', width: 150 }, - { title: '创建时间', index: 'payDate', type: 'date', className: 'text-center', width: 150 }, + { title: '创建时间', index: 'createTime', type: 'date', className: 'text-center', width: 150 }, { title: '创建人', index: 'createUserIdLabel', width: 160 }, { title: '付款备注', index: 'payRemarks', width: 200 }, { diff --git a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html index 47ffbda4..88915587 100644 --- a/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html +++ b/src/app/routes/financial-management/components/receipt-order/receipt-order.component.html @@ -21,17 +21,20 @@
-
- - -
-
- -
+
+ + +
+
+ + +
@@ -39,10 +39,17 @@
- + {{ item.freightPrice | currency }} @@ -62,8 +69,7 @@
- - +
@@ -72,26 +78,21 @@
卸 | {{ item?.unloadingTime }}
-
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : ''}}{{ item?.carNo ? "/" + - item?.carNo : '' }}
-
- -
{{ item?.payeeName }}{{item?.payeePhone ? "/" + item?.payeePhone : '' }}
+
{{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + + item?.carNo : '' }}

+
车队长: {{ item?.payeeName ? item?.payeeName + '/' : ''}}{{ + item?.payeePhone }}
- {{ - item.billCode }} - {{ - item.billCode }} - {{ - item.billCode }} + {{ item.billCode }} + {{ item.billCode }} + {{ item.billCode }}
- {{item?.billStatusLabel}} + {{ item?.billStatusLabel }}
- {{item?.resourceTypeLabel}}{{item?.serviceTypeLabel === item?.resourceTypeLabel ? - '':item?.serviceTypeLabel}} + {{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel === item?.resourceTypeLabel ? '' : item?.serviceTypeLabel }}
@@ -116,20 +117,18 @@
- + + 更多
    -
  • - 批量通过 -
  • -
  • - 批量生成电子单据 -
  • +
  • 批量通过
  • +
  • 批量生成电子单据
-
\ No newline at end of file +
diff --git a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts index 57c825d0..a12d6497 100644 --- a/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts +++ b/src/app/routes/order-management/components/receipts-audit/receipts-audit.component.ts @@ -127,7 +127,6 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i this.initST(); setTimeout(() => { this.st.load(); - this.getGoodsSourceStatistical(); }, 500); } ngOnInit(): void { @@ -337,13 +336,6 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i index: 'driverName', render: 'driverName' }, - { - title: '车队长', - className: 'text-left', - width: '180px', - index: 'payeeName', - render: 'payeeName' - }, { title: '装卸货时间', width: '200px', 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 ee919886..0a6ecd72 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 @@ -101,7 +101,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { private modalService: NzModalService, private amapService: AmapService, public shipperservice: ShipperBaseService, - private ar: ActivatedRoute, fb: FormBuilder, private envSrv: EAEnvironmentService ) { @@ -566,7 +565,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { this.service.request(this.service.$api_set_modifyWholeOrder, params).subscribe((res: any) => { if (res) { this.service.msgSrv.success('修改成功!'); - this.router.navigate(['/order-management/vehicle/vehicle-detail/', this.id], { relativeTo: this.ar }); + this.router.navigate(['/order-management/vehicle/vehicle-detail/', this.id], { relativeTo: this.route }); } else { this.service.msgSrv.error(res?.msg); } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 72ca5609..65438393 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -72,7 +72,6 @@ export class OrderManagementVehicleComponent extends BasicTableComponent impleme private modal: NzModalService, public shipperservice: ShipperBaseService, public router: Router, - public ar: ActivatedRoute, public searchDrawerService: SearchDrawerService ) { super(searchDrawerService); diff --git a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts index 4b48ec35..f7320059 100644 --- a/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts +++ b/src/app/routes/partner/account-management/components/withdrawals-record/withdrawals-record.component.ts @@ -47,7 +47,9 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni }; afterRes = (data: any[], rawData?: any) => { - data = data.map(node => ({ ...node, disabled: node.refundStatus !== '1' })); + data = data.map(node => ({ ...node, + disabled: node.refundStatus !== '1' + })); return data; }; @@ -74,16 +76,19 @@ export class PartnerAccountManagementWithdrawalsRecordComponent implements OnIni const stList = this.st.list; stList.forEach(item => { if (!item.checked) { + const index = this.selectedRows.findIndex(_item => item.id === _item.id); if (index !== -1) this.selectedRows.splice(index, 1); } }) } let totalCallNo = 0; + this.totalCallNo = 0; this.selectedRows.forEach((item => { totalCallNo = new Big(this.totalCallNo).plus(item?.amount).parse(); - })); this.totalCallNo = totalCallNo; + })); + } else if (e.type === 'loaded') { // 页面加载时勾选 (e?.loaded || []).forEach((r) => { diff --git a/src/app/routes/partner/advice-feedback/components/list/list.component.ts b/src/app/routes/partner/advice-feedback/components/list/list.component.ts index 80260b01..206f978e 100644 --- a/src/app/routes/partner/advice-feedback/components/list/list.component.ts +++ b/src/app/routes/partner/advice-feedback/components/list/list.component.ts @@ -1,9 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { Router } from '@angular/router'; import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort } from '@shared'; -import { NzModalService } from 'ng-zorro-antd/modal'; import { AdviceFeedbackService } from '../../services/advice-feedback.service'; @Component({ @@ -20,15 +18,10 @@ export class ParterAdviceFeedbackListComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; _$expand = false; - selectedIndex = 0; + selectedIndex = 0; - data=[{name1:1111}] - constructor( - public router: Router, - public ar: ActivatedRoute, - public service: AdviceFeedbackService, - private modalService: NzModalService - ) {} + data = [{ name1: 1111 }]; + constructor(public router: Router, public service: AdviceFeedbackService) {} /** * 查询参数 @@ -36,19 +29,19 @@ export class ParterAdviceFeedbackListComponent implements OnInit { get reqParams() { return { ...this.sf?.value }; } - /** + /** * 查询字段个数 */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } ngOnInit() { this.initSF(); @@ -89,7 +82,7 @@ export class ParterAdviceFeedbackListComponent implements OnInit { _$expand: (value: boolean) => value } } - }, + } } }; this.ui = { @@ -139,12 +132,12 @@ export class ParterAdviceFeedbackListComponent implements OnInit { buttons: [ { text: '详情', - click: (_record, _modal, _instance) => this.partnerView(_record), + click: (_record, _modal, _instance) => this.partnerView(_record) }, { text: '处理', - click: (_record, _modal, _instance) => this.partnerView(_record), - }, + click: (_record, _modal, _instance) => this.partnerView(_record) + } ] } ]; @@ -182,13 +175,12 @@ export class ParterAdviceFeedbackListComponent implements OnInit { buttons: [ { text: '详情', - click: (_record, _modal, _instance) => this.channelView(_record), + click: (_record, _modal, _instance) => this.channelView(_record) }, { text: '审核', - click: (_record, _modal, _instance) => this.channelView(_record), - }, - + click: (_record, _modal, _instance) => this.channelView(_record) + } ] } ]; @@ -197,7 +189,7 @@ export class ParterAdviceFeedbackListComponent implements OnInit { partnerView(record: STData) { this.router.navigate(['/partner/advice-feedback/detail'], { queryParams: {} }); } - + channelView(record: STData) { this.router.navigate(['/partner/advice-feedback/detail'], { queryParams: {} }); } @@ -211,8 +203,8 @@ export class ParterAdviceFeedbackListComponent implements OnInit { // this.st1?.load(1); } - tabChange(index:any){ - console.log(index) + tabChange(index: any) { + console.log(index); switch (index) { case 0: this.initST1(); @@ -224,5 +216,4 @@ export class ParterAdviceFeedbackListComponent implements OnInit { break; } } - } diff --git a/src/app/routes/partner/article-management/components/edit/edit.component.ts b/src/app/routes/partner/article-management/components/edit/edit.component.ts index 8389e378..c81fcff1 100644 --- a/src/app/routes/partner/article-management/components/edit/edit.component.ts +++ b/src/app/routes/partner/article-management/components/edit/edit.component.ts @@ -1,11 +1,15 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { Component, OnInit, ViewChild } from '@angular/core'; import { apiConf } from '@conf/api.conf'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema, SFUploadWidgetSchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; +import { + SFComponent, + SFRadioWidgetSchema, + SFSchema, + SFSelectWidgetSchema, + SFTextareaWidgetSchema, + SFUISchema, + SFUploadWidgetSchema +} from '@delon/form'; import { Observable, Observer } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; import { ChannelSalesService } from '../../services/channel-sales.service'; @Component({ @@ -19,12 +23,7 @@ export class ParterArticleManagementEditComponent implements OnInit { i: any; type: any; - constructor( - public http: _HttpClient, - private cdr: ChangeDetectorRef, - private route: ActivatedRoute, - public service: ChannelSalesService, - ) {} + constructor(public service: ChannelSalesService) {} ngOnInit(): void { this.initSF(); @@ -44,8 +43,8 @@ export class ParterArticleManagementEditComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请输入50字符' - } as SFTextareaWidgetSchema, + placeholder: '请输入50字符' + } as SFTextareaWidgetSchema }, name2: { type: 'string', @@ -54,8 +53,8 @@ export class ParterArticleManagementEditComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请输入50字符' - } as SFTextareaWidgetSchema, + placeholder: '请输入50字符' + } as SFTextareaWidgetSchema }, name3: { type: 'string', @@ -89,12 +88,10 @@ export class ParterArticleManagementEditComponent implements OnInit { name: { title: '分类', type: 'string', - enum: [ - { label: '管理员', value: '1'}, - ], + enum: [{ label: '管理员', value: '1' }], ui: { - widget: 'select', - } as SFSelectWidgetSchema, + widget: 'select' + } as SFSelectWidgetSchema }, name4: { type: 'number', @@ -102,21 +99,21 @@ export class ParterArticleManagementEditComponent implements OnInit { minimum: 0, maximum: 99, ui: { - widgetWidth: 300 , - placeholder:'请输入0~99,数字越大,排序越靠前' + widgetWidth: 300, + placeholder: '请输入0~99,数字越大,排序越靠前' } }, name5: { type: 'string', title: '跳转路径', enum: [ - { label: '图文', value: '1'}, - { label: '视频', value: '2'}, + { label: '图文', value: '1' }, + { label: '视频', value: '2' } ], ui: { - widget: 'radio', + widget: 'radio' } as SFRadioWidgetSchema, - default: '1', + default: '1' }, content: { type: 'string', @@ -128,7 +125,7 @@ export class ParterArticleManagementEditComponent implements OnInit { height: 450 }, visibleIf: { name5: (value: string) => value === '1' } - }, + } }, name6: { type: 'string', @@ -159,7 +156,7 @@ export class ParterArticleManagementEditComponent implements OnInit { }, visibleIf: { name5: (value: string) => value === '2' } } as SFUploadWidgetSchema - }, + } }, required: ['name1', 'name2'] }; @@ -167,17 +164,14 @@ export class ParterArticleManagementEditComponent implements OnInit { '*': { spanLabelFixed: 150, grid: { span: 20 } - }, - + } }; } - close() { - - } + close() {} save() { this.sf.validator({ emitError: true }); - if(!this.sf.valid) return; + if (!this.sf.valid) return; // this.service.request('', { ...this.sf?.value }).subscribe(res => { // if (res) { // this.modalRef.destroy(true); diff --git a/src/app/routes/partner/article-management/components/list/list.component.ts b/src/app/routes/partner/article-management/components/list/list.component.ts index 89835f98..fdaff281 100644 --- a/src/app/routes/partner/article-management/components/list/list.component.ts +++ b/src/app/routes/partner/article-management/components/list/list.component.ts @@ -1,11 +1,9 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { Router } from '@angular/router'; import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { ChannelSalesService } from '../../services/channel-sales.service'; -import { ParterArticleManagementEditComponent } from '../edit/edit.component'; @Component({ selector: 'app-parter-article-management-list', @@ -22,13 +20,8 @@ export class ParterArticleManagementListComponent implements OnInit { spuStatus = '1'; _$expand = false; - data=[{name1:1111}] - constructor( - public router: Router, - public ar: ActivatedRoute, - public service: ChannelSalesService, - private modalService: NzModalService - ) {} + data = [{ name1: 1111 }]; + constructor(public router: Router, public service: ChannelSalesService, private modalService: NzModalService) {} /** * 查询参数 @@ -40,7 +33,7 @@ export class ParterArticleManagementListComponent implements OnInit { /** * 重置表单 */ - resetSF() { + resetSF() { this.sf.reset(); this.st.load(1); } @@ -49,19 +42,19 @@ export class ParterArticleManagementListComponent implements OnInit { // this.st1?.load(1); } - /** + /** * 查询字段个数 */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } ngOnInit() { this.initSF(); this.initST(); @@ -91,8 +84,7 @@ export class ParterArticleManagementListComponent implements OnInit { _$expand: (value: boolean) => value } } - }, - + } } }; this.ui = { @@ -138,19 +130,19 @@ export class ParterArticleManagementListComponent implements OnInit { buttons: [ { text: '修改', - click: (_record, _modal, _instance) => this.edit(_record), + click: (_record, _modal, _instance) => this.edit(_record) }, { text: '禁用', - click: (_record, _modal, _instance) => this.stop(_record), + click: (_record, _modal, _instance) => this.stop(_record) }, { text: '启用', - click: (_record, _modal, _instance) => this.start(_record.id), + click: (_record, _modal, _instance) => this.start(_record.id) }, { text: '推荐到首页', - click: (_record, _modal, _instance) => this.recommend(_record.id), + click: (_record, _modal, _instance) => this.recommend(_record.id) } ] } @@ -166,11 +158,10 @@ export class ParterArticleManagementListComponent implements OnInit { this.router.navigate(['/partner/knowledge/article-management-edit'], { queryParams: {} }); } - stop(record: STData) { this.modalService.confirm({ nzTitle: '禁用确认', - nzContent: `确定禁用此文章吗?
`, + nzContent: `确定禁用此文章吗?
` // nzOnOk: () => // this.service.request('', '').subscribe(res => { // if (res) { @@ -183,7 +174,7 @@ export class ParterArticleManagementListComponent implements OnInit { start(record: STData) { this.modalService.confirm({ nzTitle: '启用确认', - nzContent: `确定启用此文章吗?
`, + nzContent: `确定启用此文章吗?
` // nzOnOk: () => // this.service.request('', '').subscribe(res => { // if (res) { @@ -193,8 +184,5 @@ export class ParterArticleManagementListComponent implements OnInit { // }) }); } - recommend(record: STData) { - - } - + recommend(record: STData) {} } diff --git a/src/app/routes/partner/channel-sales/components/list/list.component.ts b/src/app/routes/partner/channel-sales/components/list/list.component.ts index 8c971305..9e3ddcb0 100644 --- a/src/app/routes/partner/channel-sales/components/list/list.component.ts +++ b/src/app/routes/partner/channel-sales/components/list/list.component.ts @@ -1,8 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { Router } from '@angular/router'; +import { STColumn, STComponent, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { ChannelSalesService } from '../../services/channel-sales.service'; import { ParterChannelSalesEditComponent } from '../edit/edit.component'; @@ -24,7 +23,6 @@ export class ParterChannelSalesListComponent implements OnInit { data = [{ name1: 1111 }] constructor( public router: Router, - public ar: ActivatedRoute, public service: ChannelSalesService, private modalService: NzModalService ) { } @@ -135,7 +133,13 @@ export class ParterChannelSalesListComponent implements OnInit { acl: { ability: ['channelSales-frozen'] }, iif: (item) => {return item.stateLocked == false}, click: (_record, _modal, _instance) => this.stop(_record), - } + }, + { + text: '启用', + acl: { ability: ['channelSales-open'] }, + iif: (item) => {return item.stateLocked == true}, + click: (_record, _modal, _instance) => this.open(_record), + }, ] } ]; @@ -187,6 +191,24 @@ export class ParterChannelSalesListComponent implements OnInit { }); } } + open(record: STData) { + if (record.stateLocked) { + const params = { + id: record.id + } + this.modalService.confirm({ + nzTitle: '启用确认', + nzContent: `确定启用该账号吗?
`, + nzOnOk: () => + this.service.request(this.service.$api_activeChannelSales, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('启用成功!'); + this.st.reload(); + } + }) + }); + } + } /** * 重置表单 diff --git a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts index 6c17a145..7d3a7ca5 100644 --- a/src/app/routes/partner/channel-sales/services/channel-sales.service.ts +++ b/src/app/routes/partner/channel-sales/services/channel-sales.service.ts @@ -21,6 +21,8 @@ export class ChannelSalesService extends BaseService { $api_getChannelSalesInfo = '/api/mdc/channelSalesManagement/getChannelSalesInfo'; // 冻结渠道销售 $api_frozenChannelSales = '/api/mdc/channelSalesManagement/frozenChannelSales'; + // 激活渠道销售 + $api_activeChannelSales = '/api/mdc/channelSalesManagement/activeChannelSales'; constructor(public injector: Injector) { diff --git a/src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts b/src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts index 276c2a43..46fced85 100644 --- a/src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts +++ b/src/app/routes/partner/claim-audit/components/channel-approve/channel-approve.component.ts @@ -1,13 +1,8 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; -import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; -import { map } from 'rxjs/operators'; -import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { ClaimAuditService } from '../../services/claim-audit.service'; - @Component({ selector: 'app-parter-claim-audit-channel-approve', templateUrl: './channel-approve.component.html' @@ -19,14 +14,7 @@ export class ParterClaimAuditListChannelApproveComponent implements OnInit { i: any; type: any; - constructor( - public http: _HttpClient, - private cdr: ChangeDetectorRef, - private route: ActivatedRoute, - private modalService: NzModalService, - public service: ClaimAuditService, - private modalRef: NzModalRef - ) {} + constructor(public service: ClaimAuditService, private modalRef: NzModalRef) {} ngOnInit(): void { this.initSF(); @@ -43,20 +31,20 @@ export class ParterClaimAuditListChannelApproveComponent implements OnInit { title: '合伙人(认领人)', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, name2: { title: '认领客户名称', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, data: { title: '结算起算日期', type: 'string', - format: 'date', + format: 'date' }, name3: { type: 'string', @@ -65,9 +53,9 @@ export class ParterClaimAuditListChannelApproveComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请不要超过50个字' - } as SFTextareaWidgetSchema, - }, + placeholder: '请不要超过50个字' + } as SFTextareaWidgetSchema + } }, required: ['name3'] }; @@ -75,7 +63,7 @@ export class ParterClaimAuditListChannelApproveComponent implements OnInit { '*': { spanLabelFixed: 120, grid: { span: 24 } - }, + } }; } @@ -84,7 +72,7 @@ export class ParterClaimAuditListChannelApproveComponent implements OnInit { } save() { this.sf.validator({ emitError: true }); - if(!this.sf.valid) return; + if (!this.sf.valid) return; // this.service.request('', { ...this.sf?.value }).subscribe(res => { // if (res) { // this.modalRef.destroy(true); @@ -93,6 +81,4 @@ export class ParterClaimAuditListChannelApproveComponent implements OnInit { // } // }); } - - } diff --git a/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts index c3eca870..f44b9cee 100644 --- a/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts +++ b/src/app/routes/partner/claim-audit/components/channel-detail/channel-detail.component.ts @@ -2,11 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STColumn } from '@delon/abc/st'; -import { _HttpClient } from '@delon/theme'; -import { NzCardComponent } from 'ng-zorro-antd/card'; -import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; -import format from 'date-fns/format'; import { ClaimAuditService } from '../../services/claim-audit.service'; import { ParterClaimAuditListChannelApproveComponent } from '../channel-approve/channel-approve.component'; @@ -34,10 +30,8 @@ export class ParterClaimAuditListChannelDetailComponent implements OnInit { constructor( private route: ActivatedRoute, - private msgSrv: NzMessageService, private service: ClaimAuditService, private modalService: NzModalService, - private router: Router ) {} ngOnInit(): void { diff --git a/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts b/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts index 0f419064..47623783 100644 --- a/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts +++ b/src/app/routes/partner/claim-audit/components/channel-reject/channel-reject.component.ts @@ -1,13 +1,8 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; -import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; -import { map } from 'rxjs/operators'; -import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { ClaimAuditService } from '../../services/claim-audit.service'; - @Component({ selector: 'app-parter-claim-audit-channel-reject', templateUrl: './channel-reject.component.html' @@ -19,14 +14,7 @@ export class ParterClaimAuditListChannelRejectComponent implements OnInit { i: any; type: any; - constructor( - public http: _HttpClient, - private cdr: ChangeDetectorRef, - private route: ActivatedRoute, - private modalService: NzModalService, - public service: ClaimAuditService, - private modalRef: NzModalRef - ) {} + constructor(public service: ClaimAuditService, private modalRef: NzModalRef) {} ngOnInit(): void { this.initSF(); @@ -43,20 +31,20 @@ export class ParterClaimAuditListChannelRejectComponent implements OnInit { title: '合伙人(认领人)', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, name2: { title: '认领客户名称', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, data: { title: '结算起算日期', type: 'string', - format: 'date', + format: 'date' }, name3: { type: 'string', @@ -65,9 +53,9 @@ export class ParterClaimAuditListChannelRejectComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请不要超过50个字' - } as SFTextareaWidgetSchema, - }, + placeholder: '请不要超过50个字' + } as SFTextareaWidgetSchema + } }, required: ['name3'] }; @@ -75,7 +63,7 @@ export class ParterClaimAuditListChannelRejectComponent implements OnInit { '*': { spanLabelFixed: 120, grid: { span: 24 } - }, + } }; } @@ -84,7 +72,7 @@ export class ParterClaimAuditListChannelRejectComponent implements OnInit { } save() { this.sf.validator({ emitError: true }); - if(!this.sf.valid) return; + if (!this.sf.valid) return; // this.service.request('', { ...this.sf?.value }).subscribe(res => { // if (res) { // this.modalRef.destroy(true); @@ -93,6 +81,4 @@ export class ParterClaimAuditListChannelRejectComponent implements OnInit { // } // }); } - - } diff --git a/src/app/routes/partner/claim-audit/components/list/list.component.ts b/src/app/routes/partner/claim-audit/components/list/list.component.ts index cf817568..2008b77a 100644 --- a/src/app/routes/partner/claim-audit/components/list/list.component.ts +++ b/src/app/routes/partner/claim-audit/components/list/list.component.ts @@ -1,9 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { Router } from '@angular/router'; +import { STColumn, STComponent, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort } from '@shared'; -import { NzModalService } from 'ng-zorro-antd/modal'; import { ClaimAuditService } from '../../services/claim-audit.service'; @Component({ @@ -22,15 +20,10 @@ export class ParterClaimAuditListComponent implements OnInit { @ViewChild('sf', { static: false }) sf!: SFComponent; _$expand = false; - selectedIndex = 0; + selectedIndex = 0; - data=[{name1:1111}] - constructor( - public router: Router, - public ar: ActivatedRoute, - public service: ClaimAuditService, - private modalService: NzModalService - ) {} + data = [{ name1: 1111 }]; + constructor(public router: Router, public service: ClaimAuditService) {} /** * 查询参数 @@ -38,19 +31,19 @@ export class ParterClaimAuditListComponent implements OnInit { get reqParams() { return { ...this.sf?.value }; } - /** + /** * 查询字段个数 */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } + get queryFieldCount(): number { + return Object.keys(this.schema?.properties || {}).length; + } + /** + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } ngOnInit() { this.initSF(); @@ -91,7 +84,7 @@ export class ParterClaimAuditListComponent implements OnInit { _$expand: (value: boolean) => value } } - }, + } } }; this.ui = { @@ -141,12 +134,12 @@ export class ParterClaimAuditListComponent implements OnInit { buttons: [ { text: '详情', - click: (_record, _modal, _instance) => this.partnerView(_record), + click: (_record, _modal, _instance) => this.partnerView(_record) }, { text: '审核', - click: (_record, _modal, _instance) => this.partnerView(_record), - }, + click: (_record, _modal, _instance) => this.partnerView(_record) + } ] } ]; @@ -184,13 +177,12 @@ export class ParterClaimAuditListComponent implements OnInit { buttons: [ { text: '详情', - click: (_record, _modal, _instance) => this.channelView(_record), + click: (_record, _modal, _instance) => this.channelView(_record) }, { text: '审核', - click: (_record, _modal, _instance) => this.channelView(_record), - }, - + click: (_record, _modal, _instance) => this.channelView(_record) + } ] } ]; @@ -199,7 +191,7 @@ export class ParterClaimAuditListComponent implements OnInit { partnerView(record: STData) { this.router.navigate(['/partner/claim-audit/partner-detail'], { queryParams: {} }); } - + channelView(record: STData) { this.router.navigate(['/partner/claim-audit/channel-detail'], { queryParams: {} }); } @@ -213,8 +205,8 @@ export class ParterClaimAuditListComponent implements OnInit { // this.st1?.load(1); } - tabChange(index:any){ - console.log(index) + tabChange(index: any) { + console.log(index); switch (index) { case 0: this.initST1(); @@ -226,5 +218,4 @@ export class ParterClaimAuditListComponent implements OnInit { break; } } - } diff --git a/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts b/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts index 0bab6b02..48e90820 100644 --- a/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts +++ b/src/app/routes/partner/claim-audit/components/partner-approve/partner-approve.component.ts @@ -1,13 +1,9 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; -import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; -import { map } from 'rxjs/operators'; -import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { ClaimAuditService } from '../../services/claim-audit.service'; - @Component({ selector: 'app-parter-claim-audit-partner-approve', templateUrl: './partner-approve.component.html' @@ -19,14 +15,7 @@ export class ParterClaimAuditListPartnerApproveComponent implements OnInit { i: any; type: any; - constructor( - public http: _HttpClient, - private cdr: ChangeDetectorRef, - private route: ActivatedRoute, - private modalService: NzModalService, - public service: ClaimAuditService, - private modalRef: NzModalRef - ) {} + constructor(public service: ClaimAuditService, private modalRef: NzModalRef) {} ngOnInit(): void { this.initSF(); @@ -43,20 +32,20 @@ export class ParterClaimAuditListPartnerApproveComponent implements OnInit { title: '合伙人(认领人)', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, name2: { title: '认领客户名称', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, data: { title: '结算起算日期', type: 'string', - format: 'date', + format: 'date' }, name3: { type: 'string', @@ -65,9 +54,9 @@ export class ParterClaimAuditListPartnerApproveComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请不要超过50个字' - } as SFTextareaWidgetSchema, - }, + placeholder: '请不要超过50个字' + } as SFTextareaWidgetSchema + } }, required: ['name3'] }; @@ -75,7 +64,7 @@ export class ParterClaimAuditListPartnerApproveComponent implements OnInit { '*': { spanLabelFixed: 120, grid: { span: 24 } - }, + } }; } @@ -84,7 +73,7 @@ export class ParterClaimAuditListPartnerApproveComponent implements OnInit { } save() { this.sf.validator({ emitError: true }); - if(!this.sf.valid) return; + if (!this.sf.valid) return; // this.service.request('', { ...this.sf?.value }).subscribe(res => { // if (res) { // this.modalRef.destroy(true); @@ -93,6 +82,4 @@ export class ParterClaimAuditListPartnerApproveComponent implements OnInit { // } // }); } - - } diff --git a/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts index 41f5558f..45b1d112 100644 --- a/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts +++ b/src/app/routes/partner/claim-audit/components/partner-detail/partner-detail.component.ts @@ -1,15 +1,9 @@ - import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute } from '@angular/router'; import { STColumn } from '@delon/abc/st'; -import { _HttpClient } from '@delon/theme'; -import { NzCardComponent } from 'ng-zorro-antd/card'; -import { NzMessageService } from 'ng-zorro-antd/message'; import { NzModalService } from 'ng-zorro-antd/modal'; -import format from 'date-fns/format'; -import { ClaimAuditService } from '../../services/claim-audit.service'; import { ParterClaimAuditListPartnerRejectComponent } from '../partner-reject/partner-reject.component'; -import { ParterClaimAuditListPartnerApproveComponent } from '../partner-approve/partner-approve.component'; +import { ParterClaimAuditListPartnerApproveComponent } from '../partner-approve/partner-approve.component'; @Component({ selector: 'app-parter-claim-audit-partner-detail', @@ -23,21 +17,15 @@ export class ParterClaimAuditListPartnerDetailComponent implements OnInit { isVisible = false; columns: STColumn[] = [ { title: '操作时间', index: 'id', width: 120 }, - { title: '操作人', type: 'img', width: 120, }, + { title: '操作人', type: 'img', width: 120 }, { title: '操作人手机号', index: 'email', width: 120 }, { title: '操作页面', index: 'phone' }, { title: '操作内容', index: 'registered' } ]; - data=[{id:11111}] + data = [{ id: 11111 }]; - constructor( - private route: ActivatedRoute, - private msgSrv: NzMessageService, - private service: ClaimAuditService, - private modalService: NzModalService, - private router: Router - ) {} + constructor(private route: ActivatedRoute, private modalService: NzModalService) {} ngOnInit(): void { this.initData(); @@ -47,7 +35,7 @@ export class ParterClaimAuditListPartnerDetailComponent implements OnInit { // this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => { // if (res) { // this.i = res; - // + // // } // }); } @@ -77,6 +65,4 @@ export class ParterClaimAuditListPartnerDetailComponent implements OnInit { goBack() { window.history.go(-1); } - - } diff --git a/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts b/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts index 0b1419bf..8c12a4e8 100644 --- a/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts +++ b/src/app/routes/partner/claim-audit/components/partner-reject/partner-reject.component.ts @@ -1,13 +1,8 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; -import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; -import { map } from 'rxjs/operators'; -import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { ClaimAuditService } from '../../services/claim-audit.service'; - @Component({ selector: 'app-parter-claim-audit-partner-reject', templateUrl: './partner-reject.component.html' @@ -19,14 +14,7 @@ export class ParterClaimAuditListPartnerRejectComponent implements OnInit { i: any; type: any; - constructor( - public http: _HttpClient, - private cdr: ChangeDetectorRef, - private route: ActivatedRoute, - private modalService: NzModalService, - public service: ClaimAuditService, - private modalRef: NzModalRef - ) {} + constructor(public service: ClaimAuditService, private modalRef: NzModalRef) {} ngOnInit(): void { this.initSF(); @@ -43,20 +31,20 @@ export class ParterClaimAuditListPartnerRejectComponent implements OnInit { title: '合伙人(认领人)', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, name2: { title: '认领客户名称', type: 'string', ui: { - widget: 'text', - } , + widget: 'text' + } }, data: { title: '结算起算日期', type: 'string', - format: 'date', + format: 'date' }, name3: { type: 'string', @@ -65,9 +53,9 @@ export class ParterClaimAuditListPartnerRejectComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请不要超过50个字' - } as SFTextareaWidgetSchema, - }, + placeholder: '请不要超过50个字' + } as SFTextareaWidgetSchema + } }, required: ['name3'] }; @@ -75,7 +63,7 @@ export class ParterClaimAuditListPartnerRejectComponent implements OnInit { '*': { spanLabelFixed: 120, grid: { span: 24 } - }, + } }; } @@ -84,7 +72,7 @@ export class ParterClaimAuditListPartnerRejectComponent implements OnInit { } save() { this.sf.validator({ emitError: true }); - if(!this.sf.valid) return; + if (!this.sf.valid) return; // this.service.request('', { ...this.sf?.value }).subscribe(res => { // if (res) { // this.modalRef.destroy(true); @@ -93,6 +81,4 @@ export class ParterClaimAuditListPartnerRejectComponent implements OnInit { // } // }); } - - } diff --git a/src/app/routes/partner/knowledge/banner/components/list/list.component.ts b/src/app/routes/partner/knowledge/banner/components/list/list.component.ts index 8728b5a8..ac80a8bc 100644 --- a/src/app/routes/partner/knowledge/banner/components/list/list.component.ts +++ b/src/app/routes/partner/knowledge/banner/components/list/list.component.ts @@ -12,7 +12,6 @@ import { BannerService } from '../../services/banner.service'; templateUrl: './list.component.html', styleUrls: ['./list.component.less'] }) - export class BannerComponentsListComponent implements OnInit { schema: SFSchema = {}; columns: STColumn[] = []; @@ -27,7 +26,14 @@ export class BannerComponentsListComponent implements OnInit { @ViewChild('st', { static: false }) st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; - constructor(public service: BannerService, private modal: ModalHelper, private msg: NzMessageService, private router: Router, private modalSrv: NzModalService, private ar: ActivatedRoute) { } + constructor( + public service: BannerService, + private modal: ModalHelper, + private msg: NzMessageService, + private router: Router, + private modalSrv: NzModalService, + private ar: ActivatedRoute + ) {} /** * 查询字段个数 @@ -51,14 +57,14 @@ export class BannerComponentsListComponent implements OnInit { if (params.navigationId === '') { delete params.navigationId; } - return { ...params}; + return { ...params }; } /** * 选中行 */ get selectedRows() { - return this.st?.list.filter((item) => item.checked) || []; + return this.st?.list.filter(item => item.checked) || []; } ngOnInit() { this.initSF(); @@ -80,8 +86,8 @@ export class BannerComponentsListComponent implements OnInit { _$expand: { type: 'boolean', ui: { - hidden: true, - }, + hidden: true + } }, name: { type: 'string', @@ -89,7 +95,7 @@ export class BannerComponentsListComponent implements OnInit { maxLength: 10, ui: { widget: '', - placeholder: '请输入', + placeholder: '请输入' } }, status: { @@ -98,21 +104,21 @@ export class BannerComponentsListComponent implements OnInit { ui: { widget: 'select', placeholder: '请选择', - allowClear: true, + allowClear: true } as SFSelectWidgetSchema, enum: [ { label: '全部', value: 1 }, { label: '正常', value: 2 }, { label: '禁用', value: 3 } ] - }, - }, + } + } }; this.ui = { '*': { spanLabelFixed: 110, - grid: { span: 8 }, - }, + grid: { span: 8 } + } }; } @@ -138,9 +144,9 @@ export class BannerComponentsListComponent implements OnInit { index: 'style', className: 'text-center', type: 'enum', - enum: { + enum: { 1: '正常', - 2: '禁用', + 2: '禁用' } }, { @@ -157,7 +163,7 @@ export class BannerComponentsListComponent implements OnInit { { text: '修改', acl: { ability: ['banner-change'] }, - click: (item) => { + click: item => { this.router.navigate(['../detail'], { queryParams: { id: item.id, type: 'edit' }, relativeTo: this.ar }); } }, @@ -167,12 +173,12 @@ export class BannerComponentsListComponent implements OnInit { pop: { title: `确定禁用此banner图吗??`, okType: 'danger', - icon: 'alert', + icon: 'alert' }, - click: (item) => { + click: item => { this.changeStatus(item.id); }, - iif: (item) => item.status === 1 + iif: item => item.status === 1 }, { text: '启用', @@ -180,15 +186,15 @@ export class BannerComponentsListComponent implements OnInit { pop: { title: `确定启用此banner图吗?`, okType: 'danger', - icon: 'success', + icon: 'success' }, - click: (item) => { + click: item => { this.changeStatus(item); }, - iif: (item) => item.status === 2 - }, - ], - }, + iif: item => item.status === 2 + } + ] + } ]; } changeStatus(item: any) { @@ -216,7 +222,7 @@ export class BannerComponentsListComponent implements OnInit { resetSF() { this.sf.reset(); this._$expand = false; - this.isLoading = true + this.isLoading = true; } /** diff --git a/src/app/routes/partner/level-config/components/edit/edit.component.ts b/src/app/routes/partner/level-config/components/edit/edit.component.ts index 0eeda78c..8d76477a 100644 --- a/src/app/routes/partner/level-config/components/edit/edit.component.ts +++ b/src/app/routes/partner/level-config/components/edit/edit.component.ts @@ -1,10 +1,17 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnumType, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-04-28 20:27:22 + * @LastEditors : Shiming + * @LastEditTime : 2022-05-07 18:04:15 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\level-config\\components\\edit\\edit.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; import { _HttpClient } from '@delon/theme'; -import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; -import { map } from 'rxjs/operators'; -import { AmapPoiPickerComponent } from 'src/app/shared/components/amap'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { ChannelSalesService } from '../../services/level-config.service'; @Component({ @@ -19,10 +26,6 @@ export class ParterLevelConfigEditComponent implements OnInit { type: any; constructor( - public http: _HttpClient, - private cdr: ChangeDetectorRef, - private route: ActivatedRoute, - private modalService: NzModalService, public service: ChannelSalesService, private modalRef: NzModalRef ) {} @@ -41,10 +44,17 @@ export class ParterLevelConfigEditComponent implements OnInit { gradeName: { title: '等级名称', type: 'string', + maxLength: 12 }, sortId: { title: '排序', - type: 'string', + minimum: 0, + type:"number", + ui: { + change: (item: any) => { + this.sf.setValue('/sortId', item?.toFixed(0)) + } + } }, remark: { type: 'string', diff --git a/src/app/routes/partner/level-config/components/list/list.component.ts b/src/app/routes/partner/level-config/components/list/list.component.ts index 12b39be1..e1ac2ab0 100644 --- a/src/app/routes/partner/level-config/components/list/list.component.ts +++ b/src/app/routes/partner/level-config/components/list/list.component.ts @@ -1,8 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { ChannelSalesService } from '../../services/level-config.service'; import { ParterLevelConfigEditComponent } from '../edit/edit.component'; @@ -23,8 +21,6 @@ export class ParterLevelConfigListComponent implements OnInit { data = [{ name1: 1111 }]; constructor( - public router: Router, - public ar: ActivatedRoute, public service: ChannelSalesService, private modalService: NzModalService ) {} diff --git a/src/app/routes/partner/partner-list/components/channel-log-modal/channel-log-modal.component.ts b/src/app/routes/partner/partner-list/components/channel-log-modal/channel-log-modal.component.ts index 6fc1e963..3f838c47 100644 --- a/src/app/routes/partner/partner-list/components/channel-log-modal/channel-log-modal.component.ts +++ b/src/app/routes/partner/partner-list/components/channel-log-modal/channel-log-modal.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; import { STColumn } from '@delon/abc/st'; import { PartnerListService } from '../../services/partner-list.service'; @@ -10,7 +9,7 @@ import { PartnerListService } from '../../services/partner-list.service'; export class ChannelLogModalComponent implements OnInit { columns: { changeColumn: STColumn[]; beChangeColumn: STColumn[] } = this.initST(); id = ''; - constructor(public service: PartnerListService, public route: ActivatedRoute) {} + constructor(public service: PartnerListService) {} ngOnInit(): void {} diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.html b/src/app/routes/partner/partner-list/components/index/partner-list.component.html index cba079c7..ab28c37c 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.html +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-04-29 17:28:23 * @LastEditors : Shiming - * @LastEditTime : 2022-05-06 14:20:04 + * @LastEditTime : 2022-05-10 11:39:19 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-list\\components\\index\\partner-list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -13,11 +13,15 @@
- +
-
+
- + +
- + + +
+ {{item.partnerType ? item.enterpriseName || item.contactName : ''}} +
+
+ 管理员: {{item.contactName }} +
+
- {{selectItem?.enterpriseName || selectItem?.contactName}} + {{ selectItem?.enterpriseName || selectItem?.contactName }} @@ -57,32 +89,52 @@
- {{selectItem?.enterpriseName || selectItem?.contactName}} - {{selectItem?.channelIdLabel}} + {{ selectItem?.enterpriseName || selectItem?.contactName }} + {{ selectItem?.channelIdLabel }} - - - + + + + + -

已选({{selectedRows?.length}})

- +

已选({{ selectedRows?.length }})

+
- +
-

客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客

-
\ No newline at end of file +

客户转移:客户跟着上级合伙人转移一并到新渠道销售下,会同步发起CRM《客户转移》流程;不转移的,客户会与上级合伙人解绑,成为渠道销售的直客

+ diff --git a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts index 427c6c58..235b4170 100644 --- a/src/app/routes/partner/partner-list/components/index/partner-list.component.ts +++ b/src/app/routes/partner/partner-list/components/index/partner-list.component.ts @@ -4,13 +4,12 @@ import { Router } from '@angular/router'; import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema, SFAutoCompleteWidgetSchema, SFSelectWidgetSchema } from '@delon/form'; import { NzModalService } from 'ng-zorro-antd/modal'; -import { of } from 'rxjs'; +import { BehaviorSubject, Observable, of } from 'rxjs'; import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component'; import { PartnerListService } from '../../services/partner-list.service'; import { PartnerAuditModalComponent } from '../partner-audit-modal/partner-audit-modal.component'; -import { map } from 'rxjs/operators'; - +import { catchError, debounceTime, map, switchMap } from 'rxjs/operators'; @Component({ selector: 'app-partner-list', templateUrl: './partner-list.component.html', @@ -24,7 +23,7 @@ export class PartnerListComponent { columns: STColumn[] = this.initST(); searchSchema: SFSchema = this.initSF(); _$expand = false; - + isLoading: boolean = false; @ViewChild('editTemplate', { static: true }) editTemplate: any; templateId: any; @@ -36,13 +35,14 @@ export class PartnerListComponent { cannels: any[] = []; selectedRows: any[] = []; cannelItem: any = { channelId: null, effectiveNode: 1, enterpriseIdList: [], remark: '' }; - + searchChange$ = new BehaviorSubject(''); selectItem: any = {}; constructor(public service: PartnerListService, private nzModalService: NzModalService, private router: Router) { this.loadSelectOptions(); } - + ngOnInit(): void { + } beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { let params = { ...this.sf?.value }; @@ -55,18 +55,13 @@ export class PartnerListComponent { }; loadSelectOptions() { - this.service.getRebateConfig({stateLocked: 1}).subscribe(res => { + this.service.getRebateConfig({ stateLocked: 1 }).subscribe(res => { if (res) { console.log(res); - + this.customers = res; } }); - this.service.getChannel().subscribe(res => { - if (res) { - this.cannels = res; - } - }); } auditPartner(item: any) { @@ -162,7 +157,7 @@ export class PartnerListComponent { const modal = this.nzModalService.confirm({ nzTitle: '确定提交吗?', nzOnOk: () => { - this.cannelItem.enterpriseIdList = this.selectedRows.map(row => row.id); + this.cannelItem.enterpriseIdList = this.selectedRows.map(row => row.enterpriseId); this.service .request(this.service.$api_update_partner_channel_by_id, { ...this.cannelItem, @@ -236,10 +231,6 @@ export class PartnerListComponent { type: 'string', title: '合伙人名称' }, - contactName: { - type: 'string', - title: '企业管理员' - }, contactMobile: { type: 'string', title: '手机号' @@ -252,9 +243,6 @@ export class PartnerListComponent { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - expand: (value: boolean) => value - }, onSearch: (q: any) => { let str = q.replace(/^\s+|\s+$/g, ''); if (str) { @@ -326,7 +314,7 @@ export class PartnerListComponent { { value: '', label: '全部' }, { value: '0', label: '未同步' }, { value: 10, label: '同步失败' }, - { value: 20, label: '同步成功' }, + { value: 20, label: '同步成功' } ], ui: { widget: 'select', @@ -360,21 +348,21 @@ export class PartnerListComponent { widget: 'select', placeholder: '请选择', asyncData: () => - this.service.request(this.service.$api_get_rebate_config, {}, 'POST').pipe( - map(data => { - if(data) { - return data.map((m: any) => { - return { label: m.configName, value: m.id }; - }); - } else { - return []; - - } - }) - ), + this.service.request(this.service.$api_get_rebate_config, {}, 'POST').pipe( + map(data => { + if (data) { + return data.map((m: any) => { + return { label: m.configName, value: m.id }; + }); + } else { + return []; + } + }) + ), visibleIf: { expand: (value: boolean) => value - } } as SFDateWidgetSchema + } + } as SFDateWidgetSchema }, lockedStatus: { type: 'string', @@ -412,13 +400,11 @@ export class PartnerListComponent { return [ { title: '合伙人名称', - index: 'enterpriseName', - width: 180, - format: item => (item.partnerType ? `${item.enterpriseName || item.contactName}` : '') + render: 'enterpriseName', + width: 180 }, { title: '付款编码', index: 'payCode', width: 160 }, { title: '邀请码', index: 'invitationCode', className: 'text-center', width: 130 }, - { title: '企业管理员', index: 'contactName', width: 150, format: item => (item.partnerType ? `${item.contactName}` : '') }, { title: '手机号', index: 'contactMobile', className: 'text-center', width: 150 }, { title: '类型', index: 'partnerType', className: 'text-center', width: 130, type: 'enum', enum: { 1: '企业', 2: '个人' } }, { title: '注册渠道', index: 'source', type: 'enum', enum: { 1: '合伙人注册', 2: '平台添加' }, width: 130 }, @@ -518,4 +504,34 @@ export class PartnerListComponent { } ]; } + onSearch(value: string): void { + this.isLoading = true; + let params: any = {}; + if (value) { + console.log(+value); + // 数字 + if (+value) { + params.phoneNumber = value; + } else { + // 中文 + params.name = value; + } + this.service.request(this.service.$api_get_channel, params).subscribe(res => { + let NewList: { label: string; value: any; }[] = []; + let List = res.filter((i: any) => { + NewList.push({ label: `${i.name}/${i.telephone}`, value: i.id }) ; + }); + this.cannels = NewList + }); + this.searchChange$.next(value); + } else if(value === '') { + this.service.request(this.service.$api_get_channel, {name: '清空数X'}).subscribe(res => { + let NewList: { label: string; value: any; }[] = []; + let List = res.filter((i: any) => { + NewList.push({ label: `${i.name}/${i.telephone}`, value: i.id }) ; + }); + this.cannels = NewList + }); + } + } } diff --git a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts index d9b46fc3..6e169027 100644 --- a/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts +++ b/src/app/routes/partner/partner-list/components/partner-audit-modal/partner-audit-modal.component.ts @@ -1,7 +1,8 @@ import { Component, Input, OnInit, ViewChild } from '@angular/core'; -import { SFComponent, SFSchema, SFValue } from '@delon/form'; +import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFValue } from '@delon/form'; import { ModalHelper } from '@delon/theme'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; +import { of } from 'rxjs'; import { map } from 'rxjs/operators'; import { PartnerListService } from '../../services/partner-list.service'; @@ -24,7 +25,6 @@ export class PartnerAuditModalComponent implements OnInit { console.log(this.info); this.initSF(this.info); // asyncData: () => this.service.getChannel(), - if(this.info.channelId) { const value = [{ label: this.info.channelIdLabel, @@ -38,25 +38,26 @@ export class PartnerAuditModalComponent implements OnInit { } }) - } else { - console.log() - this.service.getChannel().pipe(map(data => { - console.log(data); + } + // else { + // console.log() + // this.service.getChannel().pipe(map(data => { + // console.log(data); - })) - this.service.getChannel().subscribe((res) => { - console.log(res); - const value :any= res; - setTimeout(() => { - if(this.sf) { - this.sf.getProperty('/channelId')!.schema.enum = value; - this.sf.getProperty('/channelId')!.widget.reset(value); - this.sf.setValue('/channelId', value); - } - }) - }) + // })) + // this.service.getChannel().subscribe((res) => { + // console.log(res); + // const value :any= res; + // setTimeout(() => { + // if(this.sf) { + // this.sf.getProperty('/channelId2')!.schema.enum = value; + // this.sf.getProperty('/channelId2')!.widget.reset(value); + // this.sf.setValue('/channelId2', value); + // } + // }) + // }) - } + // } } initSF(user: any) { @@ -90,21 +91,36 @@ export class PartnerAuditModalComponent implements OnInit { default: this.info.isPass !== undefined ? this.info.isPass : true }, channelId: { - title: '渠道销售', type: 'string', + title: '渠道销售', ui: { widget: 'select', - placeholder: '请选择', - allowClear: true, hidden: this.info.isPass === false, - visibleIf: { - status: value => value + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', + allowClear: true, + onSearch: (q: any) => { + let str = q.replace(/^\s+|\s+$/g, ''); + let params :any= {} + if (str) { + console.log(+str); + if(+str) { + console.log('数字'); + params.phoneNumber = str + } else { + console.log('中文'); + params.name = str + } + return this.service + .request(this.service.$api_get_channel, params) + .pipe(map((res: any) => (res as any[]).map(i => ({ label: `${i.name}/${i.telephone}`, value: i.id } as SFSchemaEnum)))) + .toPromise(); + } else { + return of([]); + } }, - errors: { - required: ' ' - } - }, - default: user.channelId + } as SFSelectWidgetSchema }, approvalOpinion: { title: '备注', @@ -124,10 +140,8 @@ export class PartnerAuditModalComponent implements OnInit { } } }, - required: ['channelId', 'approvalOpinion'] + required: [ 'approvalOpinion','channelId'] }; - console.log('666'); - } sure() { diff --git a/src/app/routes/partner/rebate-management/components/particulars/particulars.component.ts b/src/app/routes/partner/rebate-management/components/particulars/particulars.component.ts index 28bc88df..19925ba7 100644 --- a/src/app/routes/partner/rebate-management/components/particulars/particulars.component.ts +++ b/src/app/routes/partner/rebate-management/components/particulars/particulars.component.ts @@ -1,9 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; +import { STColumn, STComponent } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort, ShipperBaseService } from '@shared'; -import { NzModalService } from 'ng-zorro-antd/modal'; +import { ShipperBaseService } from '@shared'; import { RebateManagementService } from '../../services/rebate-management.service'; @Component({ @@ -27,10 +25,7 @@ export class ParterRebateManageMentParticularsComponent implements OnInit { resourceStatus: any; data = this.service.$api_get_searchPageList; constructor( - public router: Router, - public ar: ActivatedRoute, public service: RebateManagementService, - private modalService: NzModalService, public shipperservice: ShipperBaseService ) {} /** diff --git a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts index 7426e912..74ab1f6f 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-record/rebate-record.component.ts @@ -1,6 +1,4 @@ -import { ModalHelper } from '@delon/theme'; import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; import { processSingleSort, ShipperBaseService } from '@shared'; @@ -25,8 +23,6 @@ export class ParterRebateManageMentRecordComponent implements OnInit { _$expand = false; data = [{ name1: 1111 }]; constructor( - public router: Router, - public ar: ActivatedRoute, public service: RebateManagementService, private modal: NzModalService, public shipperservice: ShipperBaseService, diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.ts index 4acbe111..c8f5b08e 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component.ts @@ -54,12 +54,24 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit { buttons: [ { text: '添加', + iifBehavior: 'disabled', + iif: (item:any) => { + return this.filterArr(item) + }, click: _record => this.add(_record), } ] } ]; - + filterArr (item: { id: any; }) { + let real = true + this.i.forEach((element:any) => { + if(element.id == item.id) { + real = false + } + }); + return real + } get reqParams() { // signStatus固定传20 代表签约完成 signStatus: 20 let params: any = { ...this.sf?.value, }; @@ -78,6 +90,8 @@ export class ParterRebateManageMentAddPartnerListComponent implements OnInit { ) {} ngOnInit(): void { + console.log(this.i); + this.initSF(); } initSF() { diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html index bff494dd..8abf1189 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/add/add.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:09:49 * @LastEditors : Shiming - * @LastEditTime : 2022-05-05 17:04:31 + * @LastEditTime : 2022-05-07 15:42:10 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -58,7 +58,7 @@
- 添加 + 添加 { this.partnerId.push(ele?.id); }); } else { this.partnerPeopleList = this.partnerPeopleList.concat(res); + this.partnerPeopleList = [...this.setArr(this.partnerPeopleList, 'id')]; this.partnerId.push(res?.id); } } }); } + // 数组去重 + setArr(arr: any[], id: string) { + let obj: any = {}; + const arrays = arr.reduce((setArr, item) => { + obj[item[id]] ? '' : (obj[item[id]] = true && setArr.push(item)); + return setArr; + }, []); + return arrays; + } delete(item: any) { this.partnerPeopleList = this.partnerPeopleList.filter((d: any, i: any) => { return item.id != d.id; }); } save() { - if(!this.configName) { + if (!this.configName) { this.service.msgSrv.warning('请输入配置名称!'); - return + return; } - if(!this.accountingRate) { + if (!this.accountingRate) { this.service.msgSrv.warning('请输入固定结算费率!'); - return + return; } - if(!this.partnerType) { + if (!this.partnerType) { this.service.msgSrv.warning('请选择合伙人范围!'); - return + return; } - if(!this.priority) { + if (!this.priority) { this.service.msgSrv.warning('请选择优先级!'); - return + return; } - if(!this.sf?.value.ruleDescription) { + if (!this.sf?.value.ruleDescription) { this.service.msgSrv.warning('请输入规则说明!'); - return + return; } - if(!this.remark) { + if (!this.remark) { this.service.msgSrv.warning('请输入备注!'); - return + return; } - if(this.partnerType == '3' && this.partnerPeopleList?.length == 0) { + if (this.partnerType == '3' && this.partnerPeopleList?.length == 0) { this.service.msgSrv.warning('请选择合伙人!'); - return + return; } let real = false; - if(this.configType == '2') { - this.table.data.forEach((element: any) => { - if (element.startAmount > element.endAmount) { - real = true; - return; - } - }); - } + if (this.configType == '2') { + this.table.data.forEach((element: any) => { + if (element.startAmount > element.endAmount) { + real = true; + return; + } + }); + } if (real) { this.service.msgSrv.warning('初始业务量不能超过到达业务量!'); return; @@ -197,7 +208,7 @@ export class ParterRebateManageMentAddComponent implements OnInit { partnerType: this.partnerType }; console.log(params); - + this.service.request(this.service.$api_save_rebateConfig, params).subscribe((res: any) => { if (res) { this.service.msgSrv.success('新增成功!'); diff --git a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts index e769e5da..36035584 100644 --- a/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts +++ b/src/app/routes/partner/rebate-management/components/rebate-setting/rebate-setting.component.ts @@ -1,12 +1,10 @@ -import { ModalHelper } from '@delon/theme'; import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; -import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; -import { processSingleSort, ShipperBaseService } from '@shared'; +import { Router } from '@angular/router'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { RebateManagementService } from '../../services/rebate-management.service'; -import { ParterRebateManageMenRecordDetailComponent } from '../../model/record-detail/record-detail.component'; import { ParterRebateManageMenAbnormalFeedbackComponent } from '../../model/abnormal-feedback/abnormal-feedback.component'; @Component({ @@ -25,19 +23,18 @@ export class ParterRebateManageMentSettingComponent implements OnInit { _$expand = false; constructor( public router: Router, - public ar: ActivatedRoute, public service: RebateManagementService, private modal: NzModalService, - public shipperservice: ShipperBaseService, + public shipperservice: ShipperBaseService ) {} /** - * 查询参数 - */ - get reqParams() { + * 查询参数 + */ + get reqParams() { const params: any = Object.assign({}, this.sf?.value || {}); - return { - ...params, - }; + return { + ...params + }; } ngOnInit() { this.initSF(); @@ -49,21 +46,20 @@ export class ParterRebateManageMentSettingComponent implements OnInit { properties: { configName: { type: 'string', - title: '模板名称', + title: '模板名称' }, stateLocked: { type: 'string', title: '状态', enum: [ - {label: '全部', value: ''}, - {label: '生效中', value: 1}, - {label: '失效', value: 0}, + { label: '全部', value: '' }, + { label: '生效中', value: 1 }, + { label: '失效', value: 0 } ], ui: { - widget: 'select', - }, - - }, + widget: 'select' + } + } } }; this.ui = { @@ -79,43 +75,42 @@ export class ParterRebateManageMentSettingComponent implements OnInit { { title: '模板名称', index: 'configName', - width: '200px', + width: '200px' }, { title: '等级类型', render: 'configType', - width: '200px', - + width: '200px' }, { title: '备注', index: 'remark', - width: '250px', + width: '250px' }, { title: '合伙人范围', render: 'partnerType', - width: '200px', + width: '200px' }, { title: '创建时间', index: 'enableTime', - width: '200px', + width: '200px' }, { title: '生效时间', index: 'enableTime', - width: '200px', + width: '200px' }, { title: '优先级', index: 'priority', - width: '100px', + width: '100px' }, { title: '状态', render: 'stateLocked', - width: '100px', + width: '100px' }, { title: '操作', @@ -126,20 +121,24 @@ export class ParterRebateManageMentSettingComponent implements OnInit { { text: '查看', acl: { ability: ['REBATE-SETTING-detail'] }, - click: _record => this.configAction(_record), + click: _record => this.configAction(_record) }, { text: '禁用', acl: { ability: ['REBATE-SETTING-forbidden'] }, - iif: (_record) =>{ return _record.stateLocked == true && (_record.partnerType == 3 || _record.partnerType == 2)}, - click: _record => this.viewEvaluate(_record), + iif: _record => { + return _record.stateLocked == true && (_record.partnerType == 3 || _record.partnerType == 2); + }, + click: _record => this.viewEvaluate(_record) }, { text: '启用', acl: { ability: ['REBATE-SETTING-startUseing'] }, - iif: (_record) =>{ return _record.stateLocked == false}, - click: _record => this.viewEvaluate(_record), - }, + iif: _record => { + return _record.stateLocked == false; + }, + click: _record => this.viewEvaluate(_record) + } ] } ]; @@ -147,52 +146,52 @@ export class ParterRebateManageMentSettingComponent implements OnInit { /** *禁用 */ - viewEvaluate(item: any) { - console.log(item.stateLocked); - let title = '' - let stateLocked: boolean; - if(item.stateLocked) { - title = '是否禁用该配置?' - stateLocked = false - } else { - title = '是否启用该配置?' - stateLocked = true - } + viewEvaluate(item: any) { + console.log(item.stateLocked); + let title = ''; + let stateLocked: boolean; + if (item.stateLocked) { + title = '是否禁用该配置?'; + stateLocked = false; + } else { + title = '是否启用该配置?'; + stateLocked = true; + } this.modal.confirm({ nzTitle: title, nzOnOk: () => { const params = { id: item?.id, - stateLocked: stateLocked, - } - this.service.request(this.service.$api_set_updateRebateConfig,params).subscribe((res: any) => { - if(res) { - this.service.msgSrv.success('设置成功!') - this.st.reload(); - } - }) + stateLocked: stateLocked + }; + this.service.request(this.service.$api_set_updateRebateConfig, params).subscribe((res: any) => { + if (res) { + this.service.msgSrv.success('设置成功!'); + this.st.reload(); + } + }); } }); } /** *查看 */ - feedback(item?: any) { - const modal = this.modal.create({ - nzTitle: '查看', - nzWidth: 580, - nzContent: ParterRebateManageMenAbnormalFeedbackComponent, - nzComponentParams: { i: item }, - nzFooter: null - }); - modal.afterClose.subscribe((res: any) => { - if (res) { - } - }); + feedback(item?: any) { + const modal = this.modal.create({ + nzTitle: '查看', + nzWidth: 580, + nzContent: ParterRebateManageMenAbnormalFeedbackComponent, + nzComponentParams: { i: item }, + nzFooter: null + }); + modal.afterClose.subscribe((res: any) => { + if (res) { + } + }); } configAction(value?: any) { - this.router.navigate(['/partner/rebate/setting/add/', '0'], {queryParams: value}) - } + this.router.navigate(['/partner/rebate/setting/add/', '0'], { queryParams: value }); + } /** * 重置表单 */ diff --git a/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts index 3d8c1fd4..4c4f36d9 100644 --- a/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts +++ b/src/app/routes/partner/rebate-management/model/abnormal-feedback/abnormal-feedback.component.ts @@ -1,5 +1,5 @@ /* - * @Description : + * @Description : * @Version : 1.0 * @Author : Shiming * @Date : 2022-03-10 14:50:45 @@ -8,15 +8,11 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\model\\abnormal-feedback\\abnormal-feedback.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ -import { ModalHelper } from '@delon/theme'; import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; -import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { processSingleSort, ShipperBaseService } from '@shared'; -import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal'; +import { SFComponent, SFSchema, SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { RebateManagementService } from '../../services/rebate-management.service'; -import { NzButtonSize } from 'ng-zorro-antd/button'; @Component({ selector: 'app-parter-channel-rebate-management-abnormal-feedback', @@ -29,15 +25,7 @@ export class ParterRebateManageMenAbnormalFeedbackComponent implements OnInit { sf!: SFComponent; i!: any; data = [{ name1: 1111 }]; - constructor( - public router: Router, - public ar: ActivatedRoute, - public service: RebateManagementService, - private modalService: NzModalService, - public shipperservice: ShipperBaseService, - public modalRef: NzModalRef, - ) {} - + constructor(public service: RebateManagementService, public shipperservice: ShipperBaseService, public modalRef: NzModalRef) {} ngOnInit() { this.initSF(); @@ -53,20 +41,19 @@ export class ParterRebateManageMenAbnormalFeedbackComponent implements OnInit { ui: { widget: 'textarea', autosize: { minRows: 3, maxRows: 6 }, - placeholder:'请不要超过50个字' - } as SFTextareaWidgetSchema, - }, + placeholder: '请不要超过50个字' + } as SFTextareaWidgetSchema + } } }; this.ui = { '*': { spanLabelFixed: 60, - grid: { span: 16 }, + grid: { span: 16 } } }; } close() { - this.modalRef.destroy() + this.modalRef.destroy(); } } - diff --git a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts index 1efde6a2..2af7dbcf 100644 --- a/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts +++ b/src/app/routes/partner/rebate-management/model/record-detail/record-detail.component.ts @@ -1,10 +1,8 @@ -import { ModalHelper } from '@delon/theme'; import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; -import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { processSingleSort, ShipperBaseService } from '@shared'; -import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal'; +import { STColumn, STComponent } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { ShipperBaseService } from '@shared'; +import { NzModalRef } from 'ng-zorro-antd/modal'; import { RebateManagementService } from '../../services/rebate-management.service'; import { NzButtonSize } from 'ng-zorro-antd/button'; @@ -24,36 +22,29 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { size: NzButtonSize = 'large'; _$expand = false; data = [{ name1: 1111 }]; - constructor( - public router: Router, - public ar: ActivatedRoute, - public service: RebateManagementService, - private modalService: NzModalService, - public shipperservice: ShipperBaseService, - public modalRef: NzModalRef, - ) {} + constructor(public service: RebateManagementService, public shipperservice: ShipperBaseService, public modalRef: NzModalRef) {} /** * 查询字段个数 */ get queryFieldCount(): number { return Object.keys(this.schema?.properties || {}).length; } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } /** - * 查询参数 - */ - get reqParams() { + * 伸缩查询条件 + */ + expandToggle(): void { + this._$expand = !this._$expand; + this.sf?.setValue('/_$expand', this._$expand); + } + /** + * 查询参数 + */ + get reqParams() { const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; - return { - ...params, - }; + return { + ...params + }; } ngOnInit() { this.initSF(); @@ -72,8 +63,8 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { allowClear: true, asyncData: () => this.shipperservice.getNetworkFreightForwarder(), change: (value: any) => { - console.log(value) - this.st.reload() + console.log(value); + this.st.reload(); } } }, @@ -85,11 +76,11 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { params: { dictKey: 'overall:payment:status' }, containsAllLabel: true, change: (value: any) => { - console.log(value) - this.st.reload() + console.log(value); + this.st.reload(); } } as SFSelectWidgetSchema - }, + } } }; this.ui = { @@ -165,7 +156,6 @@ export class ParterRebateManageMenRecordDetailComponent implements OnInit { this.st.load(1); } close() { - this.modalRef.destroy() + this.modalRef.destroy(); } } - diff --git a/src/app/routes/partner/recorded/components/detail/detail.component.ts b/src/app/routes/partner/recorded/components/detail/detail.component.ts index bbfad88e..08d5e9bc 100644 --- a/src/app/routes/partner/recorded/components/detail/detail.component.ts +++ b/src/app/routes/partner/recorded/components/detail/detail.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { NzModalService } from 'ng-zorro-antd/modal'; -import { FreightAccountService } from 'src/app/routes/financial-management/services/freight-account.service'; import { RecordedService } from '../../services/recorded.service'; diff --git a/src/app/routes/supply-management/components/addmodal/addmodal.component.ts b/src/app/routes/supply-management/components/addmodal/addmodal.component.ts index 7497b56a..e157fc0a 100644 --- a/src/app/routes/supply-management/components/addmodal/addmodal.component.ts +++ b/src/app/routes/supply-management/components/addmodal/addmodal.component.ts @@ -1,5 +1,4 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { Router, ActivatedRoute } from '@angular/router'; import { cacheConf } from '@conf/cache.conf'; import { STColumn, STComponent, STChange, STData } from '@delon/abc/st'; import { SFUISchema, SFSchema, SFComponent } from '@delon/form'; @@ -28,7 +27,7 @@ export class CarAddmodalComponent implements OnInit { constructor( private modal: NzModalRef, private eaCacheSrv: EACacheService, - public service: SupplyManagementService, private router: Router, private ar: ActivatedRoute, + public service: SupplyManagementService, private modalHelper: ModalHelper ) { } diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html index 7bd237d5..17924f87 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.html @@ -39,7 +39,7 @@ name="loadName{{ idx }}" maxlength="30" placeholder="请输入联系人姓名" /> -
@@ -74,7 +74,7 @@ name="unloadAddress{{ idx }}" placeholder="请输入联系人姓名" /> - diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 1229c193..763173d1 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -10,7 +10,6 @@ import { SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-famifiar.component'; @@ -20,7 +19,6 @@ import { of } from 'rxjs'; import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component'; import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component'; import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component'; -import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component'; @Component({ selector: 'app-publish-goods-bulk-publish', @@ -56,8 +54,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit { maxTrainNumber: 99999, maxFreight: 9999999 }; + patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`; constructor( - private http: _HttpClient, fb: FormBuilder, private router: Router, private route: ActivatedRoute, @@ -69,10 +67,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit { this.validateForm1 = fb.group({ loadAddress0: [null, [Validators.required]], loadName0: [null, [Validators.required]], - loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], + loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]], unloadAddress0: [null, [Validators.required]], unloadName0: [null, [Validators.required]], - unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]] + unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]] }); } @ViewChild('sf1', { static: false }) sf1!: SFComponent; @@ -221,13 +219,23 @@ export class SupplyManagementBulkPublishComponent implements OnInit { // } } }, + goodsName: { + type: 'string', + title: '货物名称', + ui: { + // hidden: true, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + } + }, goodsTypeId: { type: 'string', - title: '货物类型', + title: '', ui: { widget: 'select', placeholder: '请选择', - errors: { required: '请选择货物类型' }, + errors: { required: '请选择货物名称' }, asyncData: () => this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { @@ -249,47 +257,38 @@ export class SupplyManagementBulkPublishComponent implements OnInit { hidden: true } }, - goodsNameId: { - type: 'string', - title: '', - ui: { - widget: 'select', - placeholder: '请选择', - errors: { required: '请填写货物类型' }, - change: (value: any, data: any) => { - this.sf3.setValue('/goodsName', data.label); - }, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName: { - type: 'string', - title: '', - ui: { - hidden: true, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName1: { - type: 'string', - title: '', - maxLength: 20, - ui: { - errors: { required: '请填写货物类型' }, - visibleIf: { - goodsTypeName: (value: any) => value && value === '其它' - }, - blur: (value: any) => { - this.checkGoodsName(); - } - } - } + + // goodsName1: { + // type: 'string', + // title: '', + // maxLength: 20, + // ui: { + // errors: { required: '请填写货物名称' }, + // visibleIf: { + // goodsTypeName: (value: any) => value && value === '其它' + // }, + // blur: (value: any) => { + // this.checkGoodsName(); + // } + // } + // }, + // goodsNameId: { + // type: 'string', + // title: '', + // ui: { + // widget: 'select', + // placeholder: '请选择', + // errors: { required: '请填写货物名称' }, + // change: (value: any, data: any) => { + // // this.sf3.setValue('/goodsName', data.label); + // }, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + // } + // }, }, - required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1'] + required: ['goodsTypeId', 'goodsName', ] }; this.ui3 = { '*': { @@ -710,10 +709,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit { const LoadingList = this.startInfo.concat(this.endInfo); // 货物信息 const sf3Values = { ...this.sf3.value }; - if (sf3Values.goodsTypeName === '其它') { - sf3Values.goodsName = sf3Values.goodsName1; - delete sf3Values.goodsName1; - } if (this.sf4.value.carModel.includes('999')) { this.sf4.value.carModel = ['999']; } @@ -1170,4 +1165,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } }); } + onChangePhone(value: string): void { + console.log(value); + + this.updateValue(value); + } + updateValue(value: string): void { + const reg = /^-?(0|[1-9][0-9]*)(\.[0-9]*)?$/; + // if ((!isNaN(+value) && reg.test(value)) || value === '' || value === '-') { + // this.value = value; + // } + // this.inputElement!.nativeElement.value = this.value; + // this.updateTitle(); + } } diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html index a9b8a94f..cc8a2fc7 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.html @@ -17,7 +17,7 @@
装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
-
+
diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 655daf5a..95133f57 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { NgForm } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; +import { FormBuilder, FormGroup, Validators, FormControl, NgForm } from '@angular/forms'; +import { Router } from '@angular/router'; import { SFComponent, SFSchema, @@ -9,7 +9,6 @@ import { SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { SettingsService, _HttpClient } from '@delon/theme'; import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; @@ -20,7 +19,6 @@ import { PublishGoodsChooseFamifiarComponent } from '../choose-famifiar/choose-f import { PublishAddressListComponent } from '../onecar-publish/address-list/address-list.component'; import { PublishSuccessComponent } from '../onecar-publish/publish-success/publish-success.component'; import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component'; -import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page.component'; @Component({ selector: 'app-publish-goods-bulk-publish', @@ -28,7 +26,7 @@ import { SupplyManagementQrcodePageComponent } from '../qrcode-page/qrcode-page. styleUrls: ['./bulk-release-publish.component.less'] }) export class SupplyManagementBulkReleasePublishComponent implements OnInit { - @ViewChild('ngForm') + validateForm1: FormGroup; ngForm!: NgForm; sf1data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显 @@ -50,6 +48,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { maxFreight: 9999999 } shipperName = ''; + patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`; // // 单位 startInfo: any[] = []; endInfo: any[] = []; @@ -57,16 +56,21 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { totalTime = 0.0; //路程总时间 freightTypeOptions: any; constructor( - private http: _HttpClient, + fb: FormBuilder, private modalService: NzModalService, - private settingSrv: SettingsService, private service: SupplyManagementService, private router: Router, - private route: ActivatedRoute, private amapService: AmapService, public shipperSrv: ShipperBaseService ) { - + this.validateForm1 = fb.group({ + loadAddress0: [null, [Validators.required]], + loadName0: [null, [Validators.required]], + loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]], + unloadAddress0: [null, [Validators.required]], + unloadName0: [null, [Validators.required]], + unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]] + }); } @ViewChild('sf1', { static: false }) sf1!: SFComponent; schema1: SFSchema = {}; @@ -231,13 +235,34 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { initSF3() { this.schema3 = { properties: { - goodsTypeId: { + goodsTips: { + type: 'string', + title: '', + ui: { + widget: 'custom', + class: 'goods_Tips_item', + // visibleIf: { + // goodsTypeName: (value: any) => value && value === '其它' + // } + } + }, + goodsName: { type: 'string', title: '货物名称', + ui: { + // hidden: true, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + } + }, + goodsTypeId: { + type: 'string', + title: '', ui: { widget: 'select', placeholder: '请选择', - errors: { required: '请选择货物类型' }, + errors: { required: '请选择货物名称' }, asyncData: () => this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { @@ -259,44 +284,8 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { hidden: true } }, - goodsNameId: { - type: 'string', - title: '', - ui: { - widget: 'select', - placeholder: '请选择', - errors: { required: '请填写货物名称' }, - change: (value: any, data: any) => { - this.sf3.setValue('/goodsName', data.label); - }, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName: { - type: 'string', - title: '', - ui: { - hidden: true, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName1: { - type: 'string', - title: '', - maxLength: 20, - ui: { - errors: { required: '请填写货物名称' }, - visibleIf: { - goodsTypeName: (value: any) => value && value === '其它' - } - } - } }, - required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1'] + required: ['goodsTypeId', 'goodsName', ] }; this.ui3 = { '*': { @@ -620,10 +609,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { // 货物信息 const sf3Values = { ...this.sf3.value }; - if (sf3Values.goodsTypeName === '其它') { - sf3Values.goodsName = sf3Values.goodsName1; - delete sf3Values.goodsName1; - } if (this.sf4.value.carModel.includes('999')) { this.sf4.value.carModel = ['999'] } diff --git a/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts b/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts index 383d919d..ed4315a7 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts +++ b/src/app/routes/supply-management/components/choose-famifiar/add/add.component.ts @@ -1,9 +1,5 @@ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFSchema, SFSchemaEnumType, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; -import { NzModalRef } from 'ng-zorro-antd/modal'; -import { map } from 'rxjs/operators'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; @Component({ selector: 'app-choose-famifiar-add', @@ -16,7 +12,7 @@ export class PublishchooseFamifiarAddComponent implements OnInit { i: any; - constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute) {} + constructor() {} ngOnInit(): void { this.initSF(); diff --git a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts index 3b5ada90..4486fca5 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts +++ b/src/app/routes/supply-management/components/choose-famifiar/choose-famifiar.component.ts @@ -1,10 +1,8 @@ import { Component, Input, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STComponent, STData } from '@delon/abc/st'; import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { ModalHelper } from '@delon/theme'; import { EAEnvironmentService } from '@shared'; -import { NzDrawerService } from 'ng-zorro-antd/drawer'; import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal'; import { SupplyManagementAddDriversComponent } from 'src/app/routes/supply-management/components/add-drivers/add-drivers.component'; import { SupplyManagementService } from '../../services/supply-management.service'; @@ -39,9 +37,6 @@ export class PublishGoodsChooseFamifiarComponent implements OnInit { constructor( private modal: NzModalRef, - public router: Router, - public ar: ActivatedRoute, - private drawerService: NzDrawerService, public service: SupplyManagementService, private modalService: NzModalService, private modalHelper: ModalHelper, diff --git a/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts b/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts index 67562dea..e618d25a 100644 --- a/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts +++ b/src/app/routes/supply-management/components/choose-famifiar/set-captain/set-captain.component.ts @@ -8,12 +8,9 @@ * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\choose-famifiar\\set-captain\\set-captain.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ -import { AfterViewInit, ChangeDetectorRef, Component, OnChanges, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { SFComponent, SFSchema, SFSchemaEnumType, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; import { NzModalRef } from 'ng-zorro-antd/modal'; -import { map } from 'rxjs/operators'; @Component({ selector: 'app-choose-famifiar-set-captain', @@ -26,7 +23,7 @@ export class PublishchooseFamifiarSetCaptainComponent implements OnInit { i: any; - constructor(public http: _HttpClient, private cdr: ChangeDetectorRef, private route: ActivatedRoute, private modal: NzModalRef,) {} + constructor( private modal: NzModalRef,) {} ngOnInit(): void { this.initSF(); diff --git a/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts b/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts index 9dcc4ec0..c8def574 100644 --- a/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/address-list/address-list.component.ts @@ -10,11 +10,8 @@ */ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; import { STChange, STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { processSingleSort } from '@shared'; -import { NzDrawerService } from 'ng-zorro-antd/drawer'; -import { NzModalService } from 'ng-zorro-antd/modal'; import { SupplyManagementService } from '../../../services/supply-management.service'; @Component({ selector: 'app-publish-address-list', @@ -30,11 +27,7 @@ export class PublishAddressListComponent implements OnInit { spuStatus = '1'; // '1'客户地址,'2'收回单地址 constructor( - public router: Router, - public ar: ActivatedRoute, - private drawerService: NzDrawerService, public service: SupplyManagementService, - private modalService: NzModalService ) {} /** diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 9efffd38..3e81a823 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -3,9 +3,8 @@ import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms' import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import format from 'date-fns/format'; import { Subject } from 'rxjs'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute } from '@angular/router'; import { - SFCheckboxWidgetSchema, SFComponent, SFNumberWidgetSchema, SFSchema, @@ -14,7 +13,6 @@ import { SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { _HttpClient } from '@delon/theme'; import { AmapPoiPickerComponent, AmapService, EACacheService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; @@ -43,6 +41,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { intervalDays: 999, maxTimes: 5 }; + patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`; sf1data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显 sf4data: any; // 货源单设置回显 @@ -66,9 +65,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { envCache: any; enterpriseProjectIds: any; constructor( - private http: _HttpClient, fb: FormBuilder, - private router: Router, private route: ActivatedRoute, private modalService: NzModalService, public service: SupplyManagementService, @@ -78,7 +75,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ) { this.validateForm1 = fb.group({ loadingTime: [null, [Validators.required]], - unloadingTime: [null, [Validators.required]] + unloadingTime: [null, [Validators.required]], }); this.envCache = this.eaCacheSrv.get(cacheConf.env); } @@ -267,13 +264,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { // } } }, + goodsName: { + type: 'string', + title: '货物名称', + ui: { + // hidden: true, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + } + }, goodsTypeId: { type: 'string', - title: '货物类型', + title: '', ui: { widget: 'select', placeholder: '请选择', - errors: { required: '请选择货物类型' }, + errors: { required: '请选择货物名称' }, asyncData: () => this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { @@ -295,47 +302,38 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { hidden: true } }, - goodsNameId: { - type: 'string', - title: '', - ui: { - widget: 'select', - placeholder: '请选择', - errors: { required: '请填写货物类型' }, - change: (_value: any, data: any) => { - this.sf3.setValue('/goodsName', data.label); - }, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName: { - type: 'string', - title: '', - ui: { - hidden: true, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName1: { - type: 'string', - title: '', - maxLength: 20, - ui: { - errors: { required: '请填写货物类型' }, - visibleIf: { - goodsTypeName: (value: any) => value && value === '其它' - }, - blur: (value: any) => { - this.checkGoodsName(); - } - } - } + + // goodsName1: { + // type: 'string', + // title: '', + // maxLength: 20, + // ui: { + // errors: { required: '请填写货物名称' }, + // visibleIf: { + // goodsTypeName: (value: any) => value && value === '其它' + // }, + // blur: (value: any) => { + // this.checkGoodsName(); + // } + // } + // }, + // goodsNameId: { + // type: 'string', + // title: '', + // ui: { + // widget: 'select', + // placeholder: '请选择', + // errors: { required: '请填写货物名称' }, + // change: (value: any, data: any) => { + // // this.sf3.setValue('/goodsName', data.label); + // }, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + // } + // }, }, - required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1'] + required: ['goodsTypeId', 'goodsName', ] }; this.ui3 = { '*': { @@ -806,7 +804,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }); 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, Validators.pattern('^[0-9]*$')])); + this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)])); } } @@ -862,7 +860,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl( `unloadPhone${controlId}`, - new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]) + new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)]) ); } } @@ -1016,10 +1014,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { // 货物信息 const sf3Values = { ...this.sf3.value }; - if (sf3Values.goodsTypeName === '其它') { - sf3Values.goodsName = sf3Values.goodsName1; - delete sf3Values.goodsName1; - } + console.log(sf3Values); + if (this.sf4.value.carModel.includes('999')) { this.sf4.value.carModel = ['999']; } @@ -1370,6 +1366,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.sf7.setValue('/toPay', this.sf7data.toPay); this.sf7.setValue('/receiptPay', this.sf7data.receiptPay); this.payChange(); + // console.log('88888'); + + // this.validateForm1.reset(); + // for (const key in this.validateForm1.controls) { + // if (this.validateForm1.controls.hasOwnProperty(key)) { + // this.validateForm1.controls[key].markAsPristine(); + // this.validateForm1.controls[key].updateValueAndValidity(); + // } + // } } // 选择地址 diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index a457bfcd..e2bc4dd8 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -1,10 +1,8 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; -import { ActivatedRoute, Router } from '@angular/router'; import { cacheConf } from '@conf/cache.conf'; import differenceInCalendarDays from 'date-fns/differenceInCalendarDays'; import { - SFCheckboxWidgetSchema, SFComponent, SFNumberWidgetSchema, SFSchema, @@ -13,7 +11,6 @@ import { SFTextareaWidgetSchema, SFUISchema } from '@delon/form'; -import { SettingsService, _HttpClient } from '@delon/theme'; import { EACacheService, ShipperBaseService } from '@shared'; import format from 'date-fns/format'; import { NzModalService } from 'ng-zorro-antd/modal'; @@ -52,14 +49,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { totalTime = 0.0; //路程总时间 currentRate = 0; //实时计算的费率 shipperName = ''; + patternStr = `^((13[0-9])|(14[0-1,4-9])|(15([0-3,5-9]))|(17[0-8])|(18[0-9])|(19[0-3,5-9])|(16[2,5,6,7]))\\d{8}$`; constructor( - private http: _HttpClient, fb: FormBuilder, private modalService: NzModalService, - private settingSrv: SettingsService, public service: SupplyManagementService, - private router: Router, - private route: ActivatedRoute, private eaCacheSrv: EACacheService, private amapService: AmapService, public shipperSrv: ShipperBaseService @@ -67,10 +61,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.validateForm1 = fb.group({ loadAddress0: [null, [Validators.required]], loadName0: [null, [Validators.required]], - loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], + loadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]], unloadAddress0: [null, [Validators.required]], unloadName0: [null, [Validators.required]], - unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]], + unloadPhone0: [null, [Validators.required, Validators.pattern(this.patternStr)]], loadingTime: [null, [Validators.required]], unloadingTime: [null, [Validators.required]] }); @@ -257,13 +251,23 @@ export class SupplyManagementReleasePublishComponent implements OnInit { // } } }, + goodsName: { + type: 'string', + title: '货物名称', + ui: { + // hidden: true, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + } + }, goodsTypeId: { type: 'string', - title: '货物类型', + title: '', ui: { widget: 'select', placeholder: '请选择', - errors: { required: '请选择货物类型' }, + errors: { required: '请选择货物名称' }, asyncData: () => this.shipperSrv.loadConfigByKey('goods.name.config.type').pipe( map((data: any) => { @@ -285,47 +289,38 @@ export class SupplyManagementReleasePublishComponent implements OnInit { hidden: true } }, - goodsNameId: { - type: 'string', - title: '', - ui: { - widget: 'select', - placeholder: '请选择', - errors: { required: '请填写货物类型' }, - change: (value: any, data: any) => { - this.sf3.setValue('/goodsName', data.label); - }, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName: { - type: 'string', - title: '', - ui: { - hidden: true, - visibleIf: { - goodsTypeName: (value: any) => value && value !== '其它' - } - } - }, - goodsName1: { - type: 'string', - title: '', - maxLength: 20, - ui: { - errors: { required: '请填写货物类型' }, - visibleIf: { - goodsTypeName: (value: any) => value && value === '其它' - }, - blur: (value: any) => { - this.checkGoodsName(); - } - } - } + + // goodsName1: { + // type: 'string', + // title: '', + // maxLength: 20, + // ui: { + // errors: { required: '请填写货物名称' }, + // visibleIf: { + // goodsTypeName: (value: any) => value && value === '其它' + // }, + // blur: (value: any) => { + // this.checkGoodsName(); + // } + // } + // }, + // goodsNameId: { + // type: 'string', + // title: '', + // ui: { + // widget: 'select', + // placeholder: '请选择', + // errors: { required: '请填写货物名称' }, + // change: (value: any, data: any) => { + // // this.sf3.setValue('/goodsName', data.label); + // }, + // visibleIf: { + // goodsTypeName: (value: any) => value && value !== '其它' + // } + // } + // }, }, - required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1'] + required: ['goodsTypeId', 'goodsName', ] }; this.ui3 = { '*': { @@ -609,7 +604,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { receiptUserPhone: { type: 'string', title: '联系电话', - format: 'mobile', maxLength: 11, ui: { errors: { @@ -836,7 +830,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }); 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, Validators.pattern('^[0-9]*$')])); + this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)])); } } // 添加 删除发货卸货地址 @@ -865,7 +859,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl( `unloadPhone${controlId}`, - new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]) + new FormControl(null, [Validators.required, Validators.pattern(this.patternStr)]) ); } } @@ -985,10 +979,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { // 货物信息 const sf3Values = { ...this.sf3.value }; - if (sf3Values.goodsTypeName === '其它') { - sf3Values.goodsName = sf3Values.goodsName1; - delete sf3Values.goodsName1; - } if (this.sf4.value.carModel.includes('999')) { this.sf4.value.carModel = ['999']; } @@ -1027,19 +1017,18 @@ export class SupplyManagementReleasePublishComponent implements OnInit { insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, goodsValue: this.sf4.value.goodsValue }; - console.log(params); - // const modalRef = this.modalService.create({ - // nzTitle: '运输协议', - // nzContent: TranAgreementComponent, - // nzWidth: 900, - // nzFooter: null, - // nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } - // }); - // modalRef.afterClose.subscribe(result => { - // if (result) { - // this.submit(submitType, params); - // } - // }); + const modalRef = this.modalService.create({ + nzTitle: '运输协议', + nzContent: TranAgreementComponent, + nzWidth: 900, + nzFooter: null, + nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } + }); + modalRef.afterClose.subscribe(result => { + if (result) { + this.submit(submitType, params); + } + }); } // 提交 submit(submitType?: string, params?: any): void { @@ -1294,7 +1283,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.service.request(this.service.$api_checkGoodsName, name).subscribe(res => { if (res === false) { const modalRef = this.modalService.error({ - nzTitle: '货物类型含有违禁词,请重新输入!', + nzTitle: '货物名称含有违禁词,请重新输入!', }); modalRef.afterClose.subscribe(result => { // this.sf3.setValue('/goodsName1', null); 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 9935181c..cfb99849 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -2,12 +2,10 @@ import { ActivatedRoute, Router } from '@angular/router'; import { Component, OnInit, ViewChild, OnChanges } from '@angular/core'; import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { ModalHelper, _HttpClient } from '@delon/theme'; import { NzModalService } from 'ng-zorro-antd/modal'; import { map } from 'rxjs/operators'; import { SupplyManagementService } from '../../services/supply-management.service'; import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component'; -import { SupplyManagementUpdateExternalSnComponent } from '../update-external-sn/update-external-sn.component'; import { of } from 'rxjs'; import { SearchDrawerService, ShipperBaseService } from '@shared'; import { SupplyManagementImportSupplyComponent } from '../../model/import-supply/import-supply.component'; @@ -44,7 +42,6 @@ export class SupplyManagementVehicleComponent extends BasicTableComponent implem public service: SupplyManagementService, private modal: NzModalService, private router: Router, - private ar: ActivatedRoute, public shipperSrv: ShipperBaseService, public searchDrawerService: SearchDrawerService ) { diff --git a/src/app/routes/sys-setting/components/note-management/note-management.component.ts b/src/app/routes/sys-setting/components/note-management/note-management.component.ts index 2bc9b0c5..937eec29 100644 --- a/src/app/routes/sys-setting/components/note-management/note-management.component.ts +++ b/src/app/routes/sys-setting/components/note-management/note-management.component.ts @@ -9,10 +9,8 @@ * Copyright (C) 2022 huzhenhong. All rights reserved. */ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema } from '@delon/form'; -import { NzModalService } from 'ng-zorro-antd/modal'; import { SystemService } from '../../services/system.service'; @Component({ @@ -20,7 +18,7 @@ import { SystemService } from '../../services/system.service'; templateUrl: './note-management.component.html', styleUrls: ['../../../commom/less/box.less'] }) -export class NoTeManagementComponent implements OnInit { +export class NoTeManagementComponent { @ViewChild('st', { static: true }) st!: STComponent; @ViewChild('sf', { static: false }) @@ -52,11 +50,9 @@ export class NoTeManagementComponent implements OnInit { }, ]; - constructor(public service: SystemService, private nzModalService: NzModalService, private route: ActivatedRoute) { + constructor(public service: SystemService) { } - ngOnInit(): void {} - beforeReq = (requestOptions: STRequestOptions) => { if (this.sf) { Object.assign(requestOptions.body, { ...this.sf?.value }); diff --git a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html index 976a3f03..3b79e2e3 100644 --- a/src/app/routes/sys-setting/components/role-management/edit/edit.component.html +++ b/src/app/routes/sys-setting/components/role-management/edit/edit.component.html @@ -19,10 +19,10 @@
- - + +
diff --git a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts index 75be4b4c..7cc254f2 100644 --- a/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts +++ b/src/app/routes/tax-management/components/individual-declare/individual-declare.component.ts @@ -202,7 +202,7 @@ export class TaxManagementIndividualDeclareComponent extends BasicTableComponent { title: '证件类型', index: 'sfzjlx', className: 'text-center', width: '200px' }, { title: '证件号码', index: 'sfzjhm', className: 'text-center', width: '200px' }, { title: '联系电话', index: 'lxdh', className: 'text-center', width: '200px' }, - { title: '国家(地区)', index: ' gjdq', className: 'text-center', width: '200px' }, + { title: '国家(地区)', index: 'gjdq', className: 'text-center', width: '200px' }, { title: '所属行业', index: 'hy', className: 'text-center', width: '200px' }, { title: '征收项目', index: 'zsxm', className: 'text-center', width: '200px' }, { title: '征收品目', index: 'zsmp', className: 'text-center', width: '200px' }, diff --git a/src/app/routes/ticket-management/components/billing-order/billing-order.component.html b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html index f23247bb..c4db52cd 100644 --- a/src/app/routes/ticket-management/components/billing-order/billing-order.component.html +++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.html @@ -31,7 +31,7 @@
+ [loading]="false" [scroll]="{ x:'1200px', y: scrollY }"> {{item.billTypeLabel + item.serviceTypeLabel}} diff --git a/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts b/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts index f3c05aef..beaf5437 100644 --- a/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts +++ b/src/app/routes/ticket-management/components/billing-order/billing-order.component.ts @@ -1,9 +1,8 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { Router } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema } from '@delon/form'; import { SearchDrawerService } from '@shared'; -import { NzModalService } from 'ng-zorro-antd/modal'; import { BasicTableComponent } from 'src/app/routes/commom'; import { TicketService } from '../../services/ticket.service'; @@ -214,7 +213,7 @@ export class BillingOrderComponent extends BasicTableComponent { className: 'text-center', index: 'paymentMethodRate', width: 130, - format: record => `${record.paymentMethodRate*100}%` + format: record => `${(record.paymentMethodRate*100).toFixed(2)}%` }, { title: '货主名称', index: 'shipperAppUserName', width: '180px', className: 'text-center' }, { title: '所属项目', index: 'enterpriseProjectName', width: '180px', className: 'text-center' }, diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html index e2611f6f..ce4bc04f 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.html @@ -19,91 +19,99 @@ --> -
- - - - - - - -
+
+ + + + + + + +
- -
-
- 已选择 - {{ selectedRows.length }} 张发票   发票金额总计 - {{totalCallNo }} - 清空 -
- - - + -
+
+ + + + + {{ item.vatinvcode }}
+
- - - - - {{ item.vatinvcode }}
- -
-
+
-
-
- - {{openInfo?.artoname}} - - - {{openInfo?.artotaxno}} - - - {{openInfo?.artoadd}} - - - {{openInfo?.artotel}} - - - {{openInfo?.artobank}} - - - {{openInfo?.artoacc}} - - - {{openInfo?.vatnameLabel}} - - - {{openInfo?.vatremarks}} - - - {{openInfo?.otherremarks}} - - - {{openInfo?.isdetail?'需要':'不需要'}} - - - {{openInfo?.vatmoney | currency}} - - - - - - - - - - - -
+
+
+ + {{ openInfo?.artoname }} + + + {{ openInfo?.artotaxno }} + + + {{ openInfo?.artoadd }} + + + {{ openInfo?.artotel }} + + + {{ openInfo?.artobank }} + + + {{ openInfo?.artoacc }} + + + {{ openInfo?.vatnameLabel }} + + + {{ openInfo?.vatremarks }} + + + {{ openInfo?.otherremarks }} + + + {{ openInfo?.isdetail ? '需要' : '不需要' }} + + + {{ openInfo?.vatmoney | currency }} + + + + + + + + + +
- \ No newline at end of file +
+ diff --git a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts index 46ebd34b..57e6c57b 100644 --- a/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts +++ b/src/app/routes/ticket-management/components/cancellation-invoice/cancellation-invoice.component.ts @@ -279,16 +279,16 @@ export class CancellationInvoiceComponent extends BasicTableComponent { asyncData: () => this.service.getNetworkFreightForwarder() } }, - sts: { - title: '发票状态', - type: 'string', - ui: { - widget: 'dict-select', - containsAllLabel: true, - params: { dictKey: 'vatinv:status' }, - containAllLable: true - } as SFSelectWidgetSchema - }, + // sts: { + // title: '发票状态', + // type: 'string', + // ui: { + // widget: 'dict-select', + // containsAllLabel: true, + // params: { dictKey: 'vatinv:status' }, + // containAllLable: true + // } as SFSelectWidgetSchema + // }, // or2derSn: { // type: 'string', // title: '订单号', diff --git a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.html b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.html index 693100db..28581ae2 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.html +++ b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.html @@ -1,3 +1,13 @@ + -
- -
- - -
+
+ +
+ + +
- - - {{item.driverName}}
{{item.driverCellphone}} -
-
- \ No newline at end of file +
+ + + {{ item.driverName }}
{{ item.driverCellphone }} +
+
+ diff --git a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts index 4182c025..f55583af 100644 --- a/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts +++ b/src/app/routes/ticket-management/components/etc-invoiced-logs/etc-invoiced-logs.component.ts @@ -41,7 +41,12 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent { } return requestOptions; }; - + afterRes = (data: any[], rawData?: any) => { + return data.map(item => ({ + ...item, + disabled: item.isCreationInpinv == '1' + })); + }; routeTo(item: any) { return; this.router.navigate(['/ticket/invoice-requested-detail/1']); @@ -135,6 +140,7 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent { private initST(): STColumn[] { return [ + { title: '', type: 'checkbox', fixed: 'left', width: '50px', className: 'text-center' }, { title: '发票号码', index: 'invoiceNum', width: 100, type: 'link', click: item => this.routeTo(item) }, { title: '发票代码', index: 'invoiceCode', width: 130 }, { title: '订单号', index: 'billCode', width: 180 }, @@ -183,7 +189,46 @@ export class ETCInvoicedLogsComponent extends BasicTableComponent { { title: '交易时间', index: 'exTime', type: 'date', width: 150 }, { title: '开票日期', index: 'invoiceMakeTime', type: 'date', width: 150 }, { title: '销售方', index: 'sellerName', width: 150 }, - { title: '网络货运人', index: 'enterpriseInfoName', width: 220 } + { title: '网络货运人', index: 'enterpriseInfoName', width: 220 }, + { + title: '操作', + width: '120px', + fixed: 'right', + className: 'text-center', + buttons: [ + { + text: '收票', + acl: { ability: ['TICKET-ETC-INVOICE-LOGS-createFicoInpinv'] }, + click: item => { + this.batchInvoice(item) + } + } + ] + } ]; } + get selectedRows() { + return this.st?.list.filter(item => item.checked) || []; + } + batchInvoice(item?: { id: any; }) { + let params: any[] = []; + if(item) { + params.push(item.id); + } else { + if (this.selectedRows.length <= 0) { + this.service.msgSrv.error('请选择订单!'); + return; + } + this.selectedRows.forEach(item => { + params.push(item.id); + }); + } + + this.service.request(this.service.$api_createFicoInpinv, params).subscribe(res => { + if (res) { + this.service.msgSrv.success('收票成功!') + this.st.load(1); + } + }); + } } diff --git a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts index 6deff18a..eb9923a0 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/requested-invoice-modal/requested-invoice-modal.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-23 16:50:17 - * @LastEditTime : 2022-04-28 13:54:14 + * @LastEditTime : 2022-05-10 10:58:56 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\components\\invoice-requested\\requested-invoice-modal\\requested-invoice-modal.component.ts diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index 504c8d84..4e09936a 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-29 13:12:35 - * @LastEditTime : 2022-04-11 16:41:43 + * @LastEditTime : 2022-05-10 09:51:30 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\ticket-management\\services\\ticket.service.ts @@ -150,6 +150,8 @@ export class TicketService extends ShipperBaseService { $api_invoicedBillInfo_page = '/api/fcc/invoicedBillInfo/getInvoicedBillInfoPage'; // 可开票订单导出 $api_export_InvoicedBillInfoPage = '/api/fcc/invoicedBillInfo/exportInvoicedBillInfoPage' + // 批量生成进项发票 + $api_createFicoInpinv = '/api/fcc/ficoEtcInvoiceL/createFicoInpinv' constructor(public injector: Injector) { super(injector); diff --git a/src/app/routes/usercenter/components/driver/captain/captain.component.ts b/src/app/routes/usercenter/components/driver/captain/captain.component.ts index 247bdc96..a60aadf6 100644 --- a/src/app/routes/usercenter/components/driver/captain/captain.component.ts +++ b/src/app/routes/usercenter/components/driver/captain/captain.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { STColumn, STColumnBadge, STComponent, STData } from '@delon/abc/st'; -import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; +import { Router } from '@angular/router'; +import { STColumn, STComponent, STData } from '@delon/abc/st'; +import { SFSchema } from '@delon/form'; import { ModalHelper } from '@delon/theme'; import { DynamicSettingModalComponent, SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; @@ -26,7 +26,6 @@ export class UserCenterComponentsDriverCaptainComponent extends BasicTableCompon public service: UsermanageService, private modal: NzModalService, private router: Router, - private ar: ActivatedRoute, private modalHelper: ModalHelper, public searchDrawerService: SearchDrawerService ) { @@ -57,8 +56,7 @@ export class UserCenterComponentsDriverCaptainComponent extends BasicTableCompon return this.st?.list.filter(item => item.checked) || []; } - ngOnInit() { - } + ngOnInit() {} dataProcess(data: STData[]): STData[] { return data.map((i, index) => { i.showSortFlag = false; diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.html b/src/app/routes/usercenter/components/driver/detail/detail.component.html index 9add6b62..db5c7e52 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.html +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.html @@ -42,15 +42,25 @@
-
+
- 个人信息 - -