diff --git a/src/app/routes/insurance-management/components/list/list.component.html b/src/app/routes/insurance-management/components/list/list.component.html index 6392b20b..de9e9c2f 100644 --- a/src/app/routes/insurance-management/components/list/list.component.html +++ b/src/app/routes/insurance-management/components/list/list.component.html @@ -9,25 +9,9 @@ * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + -
- -
- - -
@@ -40,94 +24,90 @@ -
- + --> - - - - - - - - -
- - - {{ item.resourceCode | currency }} - - - {{ item.practicalPremium | currency }} - - - {{ item.insureAmount | currency }} - - - {{ item.premium | currency }} - - - {{ item.processResult == '2' ? item.processMessage : '' }} - - -
{{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.carNo }}
-
- -
- {{ item?.distance ? ((item?.distance)/1000).toFixed(4) + '公里' : '' }} -
-
- -
- {{ item?.billCode }} -
-
- -
- {{ item?.resourceCode }} -
-
- {{ item?.resourceStatusLabel }} -
-
- -
{{ item.insureCode }}
-
- {{ item?.insureStatusLabel }} -
-
- -
{{ item?.goodsInfoName }}
-
- {{ item?.weight ? item?.weight + '吨/' : '' }} - {{ item?.volume ? item?.volume + '方' : '' }} - {{ item?.number ? item?.number + '件' : '' }} -
-
- -
-

- {{ data.expenseName }}:{{ data.price | currency }} - {{ data.paymentStatusLabel }} -

-
-
-
+ +
+ + + + + + + +
+ + + + {{ item.resourceCode | currency }} + + + {{ item.practicalPremium | currency }} + + + {{ item.insureAmount | currency }} + + + {{ item.premium | currency }} + + + {{ item.processResult == '2' ? item.processMessage : '' }} + + +
{{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.carNo }}
+
+ +
+ {{ item?.distance ? ((item?.distance)/1000).toFixed(4) + '公里' : '' }} +
+
+ +
+ {{ item?.billCode }} +
+
+ +
+ {{ item?.resourceCode }} +
+
+ {{ item?.resourceStatusLabel }} +
+
+ +
{{ item.insureCode }}
+
+ {{ item?.insureStatusLabel }} +
+
+ +
{{ item?.goodsInfoName }}
+
+ {{ item?.weight ? item?.weight + '吨/' : '' }} + {{ item?.volume ? item?.volume + '方' : '' }} + {{ item?.number ? item?.number + '件' : '' }} +
+
+ +
+

+ {{ data.expenseName }}:{{ data.price | currency }} + {{ data.paymentStatusLabel }} +

+
+
+
-
- +
+ + +
- + \ No newline at end of file diff --git a/src/app/routes/insurance-management/components/list/list.component.less b/src/app/routes/insurance-management/components/list/list.component.less deleted file mode 100644 index 149a0bc9..00000000 --- a/src/app/routes/insurance-management/components/list/list.component.less +++ /dev/null @@ -1,13 +0,0 @@ - - :host { - p{ - margin-bottom: 0 - } - .left_btn { - width: 50px; - height: 32px; - padding-left: 8px; - line-height:32px; - background-color: #d7d7d7; - } - } \ No newline at end of file diff --git a/src/app/routes/insurance-management/components/list/list.component.spec.ts b/src/app/routes/insurance-management/components/list/list.component.spec.ts deleted file mode 100644 index 1cb2cef1..00000000 --- a/src/app/routes/insurance-management/components/list/list.component.spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * @Description : - * @Version : 1.0 - * @Author : Shiming - * @Date : 2021-12-06 20:03:28 - * @LastEditors : Shiming - * @LastEditTime : 2022-01-25 17:22:11 - * @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\components\\list\\list.component.spec.ts - * Copyright (C) 2022 huzhenhong. All rights reserved. - */ - -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; -import { insuranceManagementListComponent } from './list.component'; - -describe('insuranceManagementListComponent', () => { - let component: insuranceManagementListComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ insuranceManagementListComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(insuranceManagementListComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index cd287883..611f0236 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -5,31 +5,26 @@ import { ModalHelper, _HttpClient } from '@delon/theme'; import { NzModalService } from 'ng-zorro-antd/modal'; import { map } from 'rxjs/operators'; import { of } from 'rxjs'; -import { ShipperBaseService } from '@shared'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { Router } from '@angular/router'; import { InsuranceManagementService } from '../../services/insurance-management.service'; -import { VehicleImgViewComponent } from 'src/app/routes/vehicle/components/list/img-view/img-view.component'; -import { ImageViewComponent } from 'src/app/shared/components/imagelist'; +import { BasicTableComponent } from 'src/app/routes/commom'; @Component({ selector: 'app-insurance-management-list', templateUrl: './list.component.html', - styleUrls: ['./list.component.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class insuranceManagementListComponent implements OnInit { - ui: SFUISchema = {}; +export class insuranceManagementListComponent extends BasicTableComponent implements OnInit { uiView: SFUISchema = {}; - schema: SFSchema = {}; schemaView: SFSchema = {}; auditMany = false; isVisibleView = false; isVisibleEvaluate = false; isVisible = false; - _$expand = false; @ViewChild('st') private readonly st!: STComponent; @ViewChild('stFloat') private readonly stFloat!: STComponent; @ViewChild('stFloatView') private readonly stFloatView!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfFre', { static: false }) sfFre!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent; columns: STColumn[] = []; @@ -63,8 +58,10 @@ export class insuranceManagementListComponent implements OnInit { private modal: NzModalService, public shipperservice: ShipperBaseService, private router: Router, - private modale: ModalHelper, - ) { } + public searchDrawerService: SearchDrawerService + ) { + super(searchDrawerService); + } /** * 查询参数 @@ -90,7 +87,7 @@ export class insuranceManagementListComponent implements OnInit { insureTime: { start: this.sf?.value?.insureTime?.[0] || '', end: this.sf?.value?.insureTime?.[1] || '' - }, + } }; } get selectedRows() { @@ -164,11 +161,7 @@ export class insuranceManagementListComponent implements OnInit { policyNo: { type: 'string', title: '保单号', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - }, - } + ui: {} }, insureType: { title: '类型', @@ -176,29 +169,18 @@ export class insuranceManagementListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'insure:type' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true } as SFSelectWidgetSchema }, startAddress: { type: 'string', title: '始发地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, endAddress: { type: 'string', title: '目的地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, shipperAppUserId: { type: 'string', @@ -209,11 +191,8 @@ export class insuranceManagementListComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, onSearch: (q: any) => { - let str =q.replace(/^\s+|\s+$/g,""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -233,30 +212,19 @@ export class insuranceManagementListComponent implements OnInit { title: '所属项目', ui: { widget: 'select', - placeholder: '请先选择货主', - visibleIf: { - _$expand: (value: boolean) => value - }, + placeholder: '请先选择货主' } as SFSelectWidgetSchema }, driverName: { title: '承运司机', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, carNo: { title: '车牌号', type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } + ui: {} }, insureStatus: { title: '投保状态', @@ -264,10 +232,7 @@ export class insuranceManagementListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'insure:status' }, - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true } as SFSelectWidgetSchema }, insureRefundStatus: { @@ -276,10 +241,7 @@ export class insuranceManagementListComponent implements OnInit { ui: { widget: 'dict-select', params: { dictKey: 'insure:refund:status' }, - containsAllLable: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLable: true } as SFSelectWidgetSchema }, enterpriseInfoId: { @@ -289,9 +251,6 @@ export class insuranceManagementListComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, asyncData: () => this.shipperservice.getNetworkFreightForwarder() } }, @@ -302,10 +261,7 @@ export class insuranceManagementListComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } as SFDateWidgetSchema }, createTime: { @@ -315,10 +271,7 @@ export class insuranceManagementListComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } as SFDateWidgetSchema }, recordTime: { @@ -328,17 +281,12 @@ export class insuranceManagementListComponent implements OnInit { widget: 'date', mode: 'range', format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } + allowClear: true } as SFDateWidgetSchema - }, - + } }, type: 'object' }; - this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } // 获取城市列表 getRegionCode(regionCode: any) { @@ -462,14 +410,14 @@ export class insuranceManagementListComponent implements OnInit { title: '失败原因', width: '180px', className: 'text-left', - render: 'processMessage', + render: 'processMessage' // processResult=2 }, { title: '退款状态', width: '180px', className: 'text-left', - index: 'insureRefundStatusLabel', + index: 'insureRefundStatusLabel' // processResult=2 }, { @@ -481,7 +429,7 @@ export class insuranceManagementListComponent implements OnInit { { text: '查看保单', click: _record => this.showImg(_record), - iif: item => item.insureStatus == '2' + iif: item => item.insureStatus == '2' // acl: { ability: ['VEHICLE-LIST-view'] }, // iif: item => // item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1' @@ -489,7 +437,7 @@ export class insuranceManagementListComponent implements OnInit { { text: '退保费', click: _record => this.retreatPrice(_record), - iif: item => item.insureStatus == '2' + iif: item => item.insureStatus == '2' // acl: { ability: ['VEHICLE-LIST-view'] }, } ] @@ -499,39 +447,18 @@ export class insuranceManagementListComponent implements OnInit { showImg(_record: any) { // var newUrl=_record.policyUrl.replace('http','https') // console.log(newUrl); - + // window.open(newUrl,'_self'); window.open(`${_record.newPolicyUrl}`); // this.service.downloadFile(`${_record.newPolicyUrl}`) - // const params = { // imgList: [_record.policyUrl], // index: 0 // }; // this.modal.create({ nzContent: ImageViewComponent, nzComponentParams: { params } }); } - /** - * 查询字段个数 - */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; - } - /** - * 伸缩查询条件 - */ - expandToggle(): void { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - tabChange(item: any) { } - /** - * 重置表单 - */ - resetSF(): void { - this.sf.reset(); - this._$expand = false; - } + tabChange(item: any) {} // 退保费 retreatPrice(value: any) { @@ -541,7 +468,7 @@ export class insuranceManagementListComponent implements OnInit { nzContent: '退还后不可撤销,请谨慎操作!', nzCancelText: '取消', nzOnOk: () => { - this.service.request(this.service.$api_get_addINPBillRefundApplication, {id: value.id}).subscribe(res => { + this.service.request(this.service.$api_get_addINPBillRefundApplication, { id: value.id }).subscribe(res => { if (res) { this.service.msgSrv.success('删除菜单成功'); } diff --git a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.html b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.html index 149c130e..5ba2e9bf 100644 --- a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.html +++ b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.html @@ -1,17 +1,5 @@ - - - +
- - - - - + --> + + +
+ + + + +
+ -
@@ -44,8 +37,23 @@ 已选择 {{ selectedRows.length }} 条数据
- - - + + + + +
    +
  • + 申报 +
  • +
  • + 更正 +
  • +
  • + 更新数据 +
  • +
+
\ No newline at end of file diff --git a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts index 2503b9fe..c36afa1a 100644 --- a/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts +++ b/src/app/routes/tax-management/components/individual-collect/individual-collect.component.ts @@ -2,20 +2,19 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { TaxManagementService } from '../../services/tax-management.service'; @Component({ selector: 'app-tax-management-individual-collect', templateUrl: './individual-collect.component.html', - styleUrls: ['../../../commom/less/box.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class TaxManagementIndividualCollectComponent implements OnInit { - _$expand = false; - schema!: SFSchema; +export class TaxManagementIndividualCollectComponent extends BasicTableComponent implements OnInit { columns!: STColumn[]; @ViewChild('st', { static: false }) st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; tabs: any[] = [ { name: '待申报', value: '0' }, { name: '待审核', value: '1' }, @@ -26,7 +25,9 @@ export class TaxManagementIndividualCollectComponent implements OnInit { selectedIndex = '0'; selectedRows: any[] = []; - constructor(public service: TaxManagementService, private router: Router, private ar: ActivatedRoute, private modal: NzModalService) {} + constructor(public service: TaxManagementService, public searchDrawerService: SearchDrawerService) { + super(searchDrawerService); + } /** * 查询参数 @@ -39,14 +40,6 @@ export class TaxManagementIndividualCollectComponent implements OnInit { return { ...params }; } - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - stChange(e: STChange): void { switch (e.type) { case 'checkbox': @@ -55,13 +48,6 @@ export class TaxManagementIndividualCollectComponent implements OnInit { } } - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - } /** * 程序初始化入口 */ @@ -76,7 +62,6 @@ export class TaxManagementIndividualCollectComponent implements OnInit { initSF() { this.schema = { properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, overdueStatus: { title: '是否逾期', type: 'string', @@ -98,7 +83,7 @@ export class TaxManagementIndividualCollectComponent implements OnInit { ui: { widget: 'sl-from-to', type: 'date', - format: 'yyyy-MM-dd', + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, sbrq: { @@ -108,9 +93,6 @@ export class TaxManagementIndividualCollectComponent implements OnInit { widget: 'sl-from-to', type: 'date', format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - } } as SFDateWidgetSchema }, nsrmc: { @@ -120,9 +102,6 @@ export class TaxManagementIndividualCollectComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, asyncData: () => this.service.getNetworkEnterpriseName() } } @@ -273,7 +252,7 @@ export class TaxManagementIndividualCollectComponent implements OnInit { this.service.msgSrv.success('更新成功'); this.search(); } - }) + }); } search() { diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.html b/src/app/routes/tax-management/components/individual-income/individual-income.component.html index bf8b851d..021f0ec1 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.html +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.html @@ -1,17 +1,5 @@ - - - +
-
+ --> + + +
+ + + + +
- - - - - @@ -45,10 +37,29 @@ 已选择 {{ selectedRows.length }} 条数据 - - - - + + + + + + + + diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index 3fc0ea7d..82cb4beb 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -1,22 +1,18 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; -import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { ShipperBaseService } from '@shared'; -import { NzModalService } from 'ng-zorro-antd/modal'; +import { SFDateWidgetSchema } from '@delon/form'; +import { SearchDrawerService } from '@shared'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { TaxManagementService } from '../../services/tax-management.service'; @Component({ selector: 'app-tax-management-individual-income', templateUrl: './individual-income.component.html', - styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class TaxManagementIndividualIncomeComponent implements OnInit { - _$expand = false; - schema!: SFSchema; +export class TaxManagementIndividualIncomeComponent extends BasicTableComponent implements OnInit { columns!: STColumn[]; @ViewChild('st', { static: false }) st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; isLoading: boolean = false; tabs: any[] = [ { name: '待申报', value: '0' }, @@ -30,7 +26,9 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { selectedRows: any[] = []; - constructor(public service: TaxManagementService) {} + constructor(public service: TaxManagementService, public searchDrawerService: SearchDrawerService) { + super(searchDrawerService); + } beforeReq = (requestOptions: STRequestOptions) => { Object.assign(requestOptions.body, { declareStatus: this.selectedIndex }); @@ -50,22 +48,6 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { } } - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - this.isLoading = true; - } /** * 程序初始化入口 */ @@ -80,7 +62,6 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { initSF() { this.schema = { properties: { - _$expand: { type: 'boolean', ui: { hidden: true } }, driverName: { title: '司机姓名', type: 'string', ui: { placeholder: '请输入' } }, telephone: { type: 'string', @@ -140,10 +121,7 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { ui: { placeholder: '请选择', widget: 'select', - containsAllLabel: true, - visibleIf: { - _$expand: (value: boolean) => value - } + containsAllLabel: true }, default: '' }, @@ -153,10 +131,7 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { ui: { widget: 'sl-from-to', type: 'date', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, declareDate: { @@ -165,10 +140,7 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { ui: { widget: 'sl-from-to', type: 'date', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value - } + format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, ltdId: { @@ -178,9 +150,6 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, asyncData: () => this.service.getNetworkFreightForwarder() } } diff --git a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.html b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.html index 8657dfe0..73ab8a36 100644 --- a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.html +++ b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.html @@ -1,17 +1,5 @@ - - - +
@@ -27,18 +15,20 @@
-
- - + --> + + +
+ + + + + +
- - - - + 待上传 @@ -101,11 +91,26 @@ 已选择 {{ selectedRows.length }} 条数据 - - - - + + + + +
    +
  • + 上传 +
  • +
  • + 撤回 +
  • +
  • + 更新数据 +
  • +
  • + 税务设置 +
  • +
+
-
+ \ No newline at end of file diff --git a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.less b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.less deleted file mode 100644 index 94ec07e0..00000000 --- a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.less +++ /dev/null @@ -1,22 +0,0 @@ -:host { - .text-black { - color: #000; - } - .icon { - display: inline-block; - width: 1em; - height: 1em; - stroke-width: 0; - stroke: currentColor; - /* stylelint-disable-next-line order/properties-order */ - fill: currentColor; - } - ::ng-deep { - .imgBox { - display: flex; - img { - width: 60px !important; - } - } - } -} diff --git a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.spec.ts b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.spec.ts deleted file mode 100644 index 2c07610f..00000000 --- a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; -import { DatatableOrderReportingComponent } from './order-reporting.component'; - -describe('DatatableOrderReportingComponent', () => { - let component: DatatableOrderReportingComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ DatatableOrderReportingComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(DatatableOrderReportingComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts index 53e0f9f0..1343b38f 100644 --- a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts +++ b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts @@ -1,29 +1,24 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { STColumn, STComponent, STData } from '@delon/abc/st'; -import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; -import { ShipperBaseService } from '@shared'; +import { SFDateWidgetSchema, SFSchemaEnum, SFSelectWidgetSchema } from '@delon/form'; +import { SearchDrawerService, ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; import { of } from 'rxjs'; import { map } from 'rxjs/operators'; +import { BasicTableComponent } from 'src/app/routes/commom'; import { TaxManagementService } from '../../services/tax-management.service'; import { TaxManagementUploadSettingComponent } from './upload-setting/upload-setting.component'; import { TaxManagementOrderVerifyResultComponent } from './verify-result/verify-result.component'; -// import { DatatableReportingUploadSettingComponent } from '../upload-setting/upload-setting.component'; -// import { DatatableReportingVerifyResultComponent } from '../verify-result/verify-result.component'; @Component({ selector: 'app-tax-management-order-reporting', templateUrl: './order-reporting.component.html', - styleUrls: ['./order-reporting.component.less'] + styleUrls: ['../../../commom/less/commom-table.less'] }) -export class TaxManagementOrderReportingComponent implements OnInit { - _$expand = false; - ui!: SFUISchema; - schema!: SFSchema; +export class TaxManagementOrderReportingComponent extends BasicTableComponent implements OnInit { columns!: STColumn[]; @ViewChild('st', { static: false }) st!: STComponent; - @ViewChild('sf', { static: false }) sf!: SFComponent; tabType!: string; isLoading: boolean = false; tabs: any[] = [ @@ -41,15 +36,9 @@ export class TaxManagementOrderReportingComponent implements OnInit { private ar: ActivatedRoute, public shipperservice: ShipperBaseService, private modal: NzModalService, - public shipperSrv: ShipperBaseService + public searchDrawerService: SearchDrawerService ) { - } - - /** - * 查询字段个数 - */ - get queryFieldCount(): number { - return Object.keys(this.schema?.properties || {}).length; + super(searchDrawerService); } /** @@ -57,7 +46,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { */ get reqParams() { const params = Object.assign({}, this.sf?.value || {}, { - putStatus: this.selectedIndex, + putStatus: this.selectedIndex }); delete params._$expand; return { ...params }; @@ -70,22 +59,6 @@ export class TaxManagementOrderReportingComponent implements OnInit { return this.st?.list.filter((item: any) => item.checked) || []; } - /** - * 伸缩查询条件 - */ - expandToggle() { - this._$expand = !this._$expand; - this.sf?.setValue('/_$expand', this._$expand); - } - - /** - * 重置表单 - */ - resetSF() { - this.sf.reset(); - this._$expand = false; - this.isLoading = true - } /** * 程序初始化入口 */ @@ -106,8 +79,8 @@ export class TaxManagementOrderReportingComponent implements OnInit { type: 'string', title: '运单号', ui: { - placeholder: '请输入', - }, + placeholder: '请输入' + } }, shipperId: { type: 'string', @@ -119,7 +92,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - let str = q.replace(/^\s+|\s+$/g, ""); + let str = q.replace(/^\s+|\s+$/g, ''); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -128,17 +101,14 @@ export class TaxManagementOrderReportingComponent implements OnInit { } else { return of([]); } - }, - + } } as SFSelectWidgetSchema }, driverName: { title: '承运司机', type: 'string', ui: { - placeholder: '请输入司机姓名/手机号', visibleIf: { - _$expand: (value: boolean) => value, - }, + placeholder: '请输入司机姓名/手机号' } }, carNo: { @@ -146,10 +116,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { type: 'string', maxLength: 9, ui: { - placeholder: '请输入', - visibleIf: { - _$expand: (value: boolean) => value, - }, + placeholder: '请输入' } }, collectionUserName: { @@ -157,10 +124,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { type: 'string', maxLength: 9, ui: { - placeholder: '请输入', - visibleIf: { - _$expand: (value: boolean) => value, - }, + placeholder: '请输入' } }, // putStatus: { @@ -183,16 +147,13 @@ export class TaxManagementOrderReportingComponent implements OnInit { title: '本地校验', type: 'string', enum: [ - {label: '校验中',value: 0}, - {label: '通过',value: 1}, - {label: '不通过',value: 2}, + { label: '校验中', value: 0 }, + { label: '通过', value: 1 }, + { label: '不通过', value: 2 } ], ui: { - widget:'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value, - }, + widget: 'select', + placeholder: '请选择' } }, networkTransporter: { @@ -202,9 +163,6 @@ export class TaxManagementOrderReportingComponent implements OnInit { widget: 'select', placeholder: '请选择', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - }, asyncData: () => this.shipperservice.getNetworkFreightForwarder() } }, @@ -214,11 +172,8 @@ export class TaxManagementOrderReportingComponent implements OnInit { ui: { widget: 'sl-from-to', type: 'date', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFDateWidgetSchema, + format: 'yyyy-MM-dd' + } as SFDateWidgetSchema }, orderPayTime: { title: '结束时间', @@ -226,17 +181,10 @@ export class TaxManagementOrderReportingComponent implements OnInit { ui: { widget: 'sl-from-to', type: 'date', - format: 'yyyy-MM-dd', - visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFDateWidgetSchema, - }, - }, - }; - this.ui = { - '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 }, enter: () => this.search() }, - $time: { grid: { span: 24 } }, + format: 'yyyy-MM-dd' + } as SFDateWidgetSchema + } + } }; } @@ -245,33 +193,33 @@ export class TaxManagementOrderReportingComponent implements OnInit { */ initST() { this.columns = [ - { title: '', type: 'checkbox', className: 'text-center', width: '60px', }, - { title: '上传状态', render: 'putStatus', className: 'text-center', width: '120px', }, - { title: '本地校验', render: 'checkStatus', className: 'text-center', width: '120px', }, + { title: '', type: 'checkbox', className: 'text-center', width: '60px' }, + { title: '上传状态', render: 'putStatus', className: 'text-center', width: '120px' }, + { title: '本地校验', render: 'checkStatus', className: 'text-center', width: '120px' }, { title: '订单号', index: 'billCode', className: 'text-center', - width: '150px', + width: '150px' }, - { title: '运单号', index: 'wayBillCode', className: 'text-center', width: '150px', }, + { title: '运单号', index: 'wayBillCode', className: 'text-center', width: '150px' }, { title: '网络货运人', index: 'networkTransporterName', className: 'text-center', - width: '180px', + width: '180px' }, { title: '档案编号', index: 'archivesNo', className: 'text-center', - width: '180px', + width: '180px' }, { title: '品牌型号', index: 'carBrand', className: 'text-center', - width: '180px', + width: '180px' }, { title: '装货地', index: 'loadingAddress', render: 'loadingPlace', className: 'text-center', width: '200px' }, { title: '装货地详细地址', index: 'loadingDetailedAddress', render: 'loadingPlace', className: 'text-center', width: '200px' }, @@ -301,12 +249,10 @@ export class TaxManagementOrderReportingComponent implements OnInit { { title: '提货单', render: 'loadingLadingBill', className: 'text-center', width: '100px' }, { title: '签收单', render: 'signatureForm', className: 'text-center', width: '100px' }, { title: '上传次数', index: 'putNumber', className: 'text-center', width: '100px' }, - { title: '最近上传时间', index: 'recentlyPutTime', className: 'text-center', width: '180px' }, + { title: '最近上传时间', index: 'recentlyPutTime', className: 'text-center', width: '180px' } ]; } - - /** *撤回 * @param record 记录实例 @@ -331,10 +277,9 @@ export class TaxManagementOrderReportingComponent implements OnInit { this.service.msgSrv.success('撤销成功'); this.search(); } - }) + }); } }); - } /** *撤销 @@ -354,7 +299,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { this.service.msgSrv.success('更新成功'); this.st.load(1); } - }) + }); } /** *撤销 @@ -381,10 +326,9 @@ export class TaxManagementOrderReportingComponent implements OnInit { this.service.msgSrv.success('撤销成功'); this.search(); } - }) + }); } }); - } selectChange(item: any) { @@ -393,7 +337,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { this.selectedIndex = item?.value || ''; setTimeout(() => { this.st.load(); - }) + }); } /** @@ -403,7 +347,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { // this.router.navigate(['../view', record.uuid], { relativeTo: this.ar }); this.router.navigate(['../detail'], { queryParams: { - id: record.id, + id: record.id }, relativeTo: this.ar }); @@ -431,21 +375,21 @@ export class TaxManagementOrderReportingComponent implements OnInit { * 上传 */ upload() { - let status = false + let status = false; if (this.selectedRows.length === 0) { this.openWainingModal('请选择需要上传的数据'); return; } this.selectedRows.forEach(item => { if (item?.putStatus != '0') { - status = true + status = true; } }); - if(status) { + if (status) { this.service.msgSrv.warning('选择了已上传,请重新勾选!'); return; } - + // if(this.selectedRows.find(item => item.checkStatus !== 1)) { // this.service.msgSrv.warning('选择了未通过校验的订单,请重新勾选!'); // return; @@ -459,10 +403,9 @@ export class TaxManagementOrderReportingComponent implements OnInit { this.service.msgSrv.success('上传成功'); this.st.load(); } - }) + }); } - /** * * @param params 上传设置 @@ -479,7 +422,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { if (res) { this.st.load(); } - }) + }); } /** @@ -499,7 +442,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { if (res) { this.st.load(); } - }) + }); } /** @@ -509,17 +452,16 @@ export class TaxManagementOrderReportingComponent implements OnInit { if (record?.billStatus !== '2') { return; } - this.openWainingModal('监管审核结果', record?.result) + this.openWainingModal('监管审核结果', record?.result); } - search() { this.st.load(1); } /** - * 异步导出 - */ + * 异步导出 + */ export() { this.service.exportStart(this.sf?.value, this.service.$api_async_export_order_reporting_list); } @@ -528,8 +470,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { this.modal.warning({ nzMask: false, nzTitle: title, - nzContent: content, - }) + nzContent: content + }); } - }