From 0936b30387eb08a83ecb3d4053200227b7292cd3 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 10 May 2022 10:41:01 +0800 Subject: [PATCH] fix bug --- proxy.conf.js | 2 +- .../components/bulk/bulk.component.html | 123 ++++++++++++------ .../components/bulk/bulk.component.ts | 1 + .../index/partner-list.component.html | 25 +++- .../index/partner-list.component.ts | 8 +- .../partner-audit-modal.component.ts | 79 ++++++----- .../individual-declare.component.ts | 2 +- .../etc-invoiced-logs.component.html | 46 +++++-- .../etc-invoiced-logs.component.ts | 49 ++++++- .../services/ticket.service.ts | 4 +- .../list/editSale/editSale.component.ts | 45 ++++++- 11 files changed, 284 insertions(+), 100 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index ec1c855d..03344473 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-09 16:37:26 + * @LastEditTime : 2022-05-10 10:16:50 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ diff --git a/src/app/routes/order-management/components/bulk/bulk.component.html b/src/app/routes/order-management/components/bulk/bulk.component.html index 47b1cd8f..2dc708f0 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.html +++ b/src/app/routes/order-management/components/bulk/bulk.component.html @@ -31,7 +31,8 @@
+ 大宗订单 @@ -44,10 +45,17 @@
- + {{ item.freightPrice | currency }} @@ -56,19 +64,19 @@
卸 | {{ item?.unloadTime }}
-
{{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + - item?.carNo : ''}}
+
{{ item?.driverName }}{{ item?.driverPhone ? '/' + item?.driverPhone : '' }}{{ item?.carNo ? '/' + item?.carNo : '' }}
-
{{ item.settlementWeight ? item.settlementWeight + '吨/ ': ''}} {{ item.settlementVolume ? - item.settlementVolume + '方 ': ''}}
+
+ {{ item.settlementWeight ? item.settlementWeight + '吨/ ' : '' }} + {{ item.settlementVolume ? item.settlementVolume + '方 ' : '' }}
-
{{ item?.payeeName }}{{ item?.payeePhone ? "/" + - item?.payeePhone : '' }}
+
{{ item?.payeeName }}{{ item?.payeePhone ? '/' + item?.payeePhone : '' }}
-
{{ item?.createUserName }}{{ item?.createUserPhone ? "/" + item?.createUserPhone : '' }}
+
{{ item?.createUserName }}{{ item?.createUserPhone ? '/' + item?.createUserPhone : '' }}
{{ item.billCode }} @@ -91,8 +99,7 @@

{{ data.expenseName }}:{{ data.price | currency }} - {{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' - }} + {{ data.expenseName }}:{{ (data.price * 100).toFixed(2) + '%' }} {{ data.paymentStatusLabel }}

@@ -101,13 +108,25 @@
- + - + {{ index + 1 }} @@ -127,8 +146,14 @@ - + @@ -138,21 +163,30 @@ - + [res]="{ reName: { list: 'data.list', total: 'data.total' } }" + > {{ item.amountBeforeChange | currency }} - ¥{{ item.amountchangeValue | number: '0.2-2' - }} + ¥{{ item.amountchangeValue | number: '0.2-2' }} {{ item.amountAfterChange | currency }} -
变更原因:{{ ViewCause?.changeCause }}
-
拒绝原因:{{ ViewCause?.refuseCause }}
+
变更原因:{{ ViewCause?.changeCause }}
+
拒绝原因:{{ ViewCause?.refuseCause }}
注:附加费依据调整后的运输费用重新计算
@@ -161,8 +195,13 @@
- + @@ -191,21 +230,29 @@
-
已选择{{ - selectedRows?.length || 0 }}条订单,确认批量签收吗? +
已选择{{ selectedRows?.length || 0 }}条订单,确认批量签收吗?
签收后不可再修改运费,请确保运费等信息准确无误后,再进行签收。
- + -
-
\ No newline at end of file + diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 1bcfb1c8..5720c774 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -824,4 +824,5 @@ export class OrderManagementBulkComponent extends BasicTableComponent implements exprot() { this.service.exportStart({ ...this.reqParams, pageSize: -1 }, this.service.$api_get_asyncExportBulkList); } + } 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 fd1002df..1e9e4a90 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-09 14:40:09 + * @LastEditTime : 2022-05-10 10:29:12 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-list\\components\\index\\partner-list.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -91,10 +91,27 @@
{{ selectItem?.enterpriseName || selectItem?.contactName }} {{ selectItem?.channelIdLabel }} - - + + + + + + + + + Loading Data... + + 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 65d2cac3..3bbf706d 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 @@ -24,7 +24,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; @@ -509,4 +509,10 @@ export class PartnerListComponent { } ]; } + onSearch(value: string): void { + this.isLoading = true; + console.log(value); + + // this.searchChange$.next(value); + } } 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..5e6d311f 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,37 @@ 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.channelId } as SFSchemaEnum)))) + .toPromise(); + } else { + return of([]); + } }, - errors: { - required: ' ' - } - }, - default: user.channelId + default: user.channelId + } as SFSelectWidgetSchema }, approvalOpinion: { title: '备注', @@ -124,10 +141,8 @@ export class PartnerAuditModalComponent implements OnInit { } } }, - required: ['channelId', 'approvalOpinion'] + required: [ 'approvalOpinion','channelId'] }; - console.log('666'); - } sure() { 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/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..82898869 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..f426e01e 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-CANCELLATION-view'] }, + 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/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/freight/list/editSale/editSale.component.ts b/src/app/routes/usercenter/components/freight/list/editSale/editSale.component.ts index 0ce1ec43..4350bd2b 100644 --- a/src/app/routes/usercenter/components/freight/list/editSale/editSale.component.ts +++ b/src/app/routes/usercenter/components/freight/list/editSale/editSale.component.ts @@ -1,9 +1,11 @@ import { Component, OnInit, ViewChild } from '@angular/core'; -import { SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form'; +import { SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ShipperBaseService } from '@shared'; import { NzMessageService } from 'ng-zorro-antd/message'; import { UsermanageService } from 'src/app/routes/usercenter/services/usercenter.service'; import { NzModalRef } from 'ng-zorro-antd/modal'; +import { map } from 'rxjs/operators'; +import { of } from 'rxjs'; @Component({ selector: 'app-ad-components-Sale', @@ -48,18 +50,49 @@ export class EditSaleComponentsAddComponent implements OnInit { initSF() { this.schema = { properties: { + // channelId: { + // type: 'string', + // title: '渠道销售修改为', + // ui: { + // widget: 'select', + // placeholder: '请选择', + // allowClear: true, + // visibleIf: { + // _$expand: (value: boolean) => value + // }, + // asyncData: () => this.shipperservice.getChanners() + // } + // }, channelId: { type: 'string', title: '渠道销售修改为', ui: { widget: 'select', - placeholder: '请选择', + serverSearch: true, + searchDebounceTime: 300, + searchLoadingText: '搜索中...', allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value + 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.channelId } as SFSchemaEnum)))) + .toPromise(); + } else { + return of([]); + } }, - asyncData: () => this.shipperservice.getChanners() - } + } as SFSelectWidgetSchema }, remark: { type: 'string',