fix bug
This commit is contained in:
@ -149,6 +149,13 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
|||||||
placeholder: '最多100个单号,空号隔开'
|
placeholder: '最多100个单号,空号隔开'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
wayBillCode: {
|
||||||
|
type: 'string',
|
||||||
|
title: '运单号',
|
||||||
|
ui: {
|
||||||
|
placeholder: '最多100个运单,空号隔开'
|
||||||
|
}
|
||||||
|
},
|
||||||
resourceCode: {
|
resourceCode: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '货源编号'
|
title: '货源编号'
|
||||||
@ -162,6 +169,9 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
|||||||
searchDebounceTime: 300,
|
searchDebounceTime: 300,
|
||||||
searchLoadingText: '搜索中...',
|
searchLoadingText: '搜索中...',
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
},
|
||||||
onSearch: (q: any) => {
|
onSearch: (q: any) => {
|
||||||
let str =q.replace(/^\s+|\s+$/g,"");
|
let str =q.replace(/^\s+|\s+$/g,"");
|
||||||
if (str) {
|
if (str) {
|
||||||
@ -272,13 +282,28 @@ export class OrderManagementReceiptsAuditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
|
billStatus: {
|
||||||
|
title: '运输状态',
|
||||||
|
type: 'string',
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'dict-select',
|
||||||
|
params: { dictKey: 'bill:status' },
|
||||||
|
containsAllLabel: true,
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
} as SFSelectWidgetSchema
|
||||||
|
},
|
||||||
loadingDocuments: {
|
loadingDocuments: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '装卸货凭证',
|
title: '装卸货凭证',
|
||||||
enum:[
|
enum:[
|
||||||
{label: '全部',value: ''},
|
{label: '全部',value: ''},
|
||||||
{label: '有',value: '1'},
|
{label: '无装卸货凭证',value: '1'},
|
||||||
{label: '无',value: '0'},
|
{label: '装卸货凭证齐全',value: '2'},
|
||||||
|
{label: '只有装货凭证',value: '3'},
|
||||||
|
{label: '只有卸货凭证',value: '4'},
|
||||||
],
|
],
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-24 15:54:08
|
* @Date : 2021-12-24 15:54:08
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-17 19:58:06
|
* @LastEditTime : 2022-03-24 11:10:44
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\network-freight\\network-freight.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\network-freight\\network-freight.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
@ -96,7 +96,7 @@
|
|||||||
</st>
|
</st>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="财务设置" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
<!-- <nz-modal [(nzVisible)]="isVisible" [nzFooter]="nzModalFooter" nzTitle="财务设置" (nzOnOk)="handleOK()" (nzOnCancel)="handleCancel()">
|
||||||
<ng-container *nzModalContent>
|
<ng-container *nzModalContent>
|
||||||
<sf #sfFre [schema]="addSchema" [ui]="ui2" [formData]="formData" [compact]="false" [button]="'none'"> </sf>
|
<sf #sfFre [schema]="addSchema" [ui]="ui2" [formData]="formData" [compact]="false" [button]="'none'"> </sf>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
@ -104,7 +104,7 @@
|
|||||||
<button nz-button nzType="primary" (click)="handleCancel()" [disabled]="">取消</button>
|
<button nz-button nzType="primary" (click)="handleCancel()" [disabled]="">取消</button>
|
||||||
<button nz-button nzType="default" (click)="handleOK()">确 定</button>
|
<button nz-button nzType="default" (click)="handleOK()">确 定</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</nz-modal>
|
</nz-modal> -->
|
||||||
|
|
||||||
<nz-modal [(nzVisible)]="isVisibleTicket" [nzFooter]="nzModalFooterTiket" nzTitle="财务设置" (nzOnCancel)="handleCancelTicket()">
|
<nz-modal [(nzVisible)]="isVisibleTicket" [nzFooter]="nzModalFooterTiket" nzTitle="财务设置" (nzOnCancel)="handleCancelTicket()">
|
||||||
<ng-container *nzModalContent>
|
<ng-container *nzModalContent>
|
||||||
@ -117,9 +117,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="18" style="overflow: scroll">
|
<div nz-col [nzSpan]="18" style="overflow: scroll">
|
||||||
<sf #sfTicket [schema]="ticketSchema" [ui]="ui3" *ngIf="!taxStatus" [formData]="formDataTicket" [compact]="false" [button]="'none'">
|
<sf #sfTicket [schema]="ticketSchema" [ui]="ui3" *ngIf="TicketStatus" [formData]="formDataTicket" [compact]="false" [button]="'none'">
|
||||||
</sf>
|
</sf>
|
||||||
<sf #sfTax [schema]="TaxSchema" [ui]="ui4" *ngIf="taxStatus" [formData]="formDataTax" [compact]="false" [button]="'none'"> </sf>
|
<sf #sfTax [schema]="TaxSchema" [ui]="ui4" *ngIf="taxStatus" [formData]="formDataTax" [compact]="false" [button]="'none'"> </sf>
|
||||||
|
|
||||||
|
<sf #sfNC [schema]="NCSchema" [ui]="ui5" *ngIf="NCStatus" [formData]="formDataNC" [compact]="false" [button]="'none'"> </sf>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
import { STComponent, STColumn, STChange } from '@delon/abc/st';
|
||||||
import { SFCascaderWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
import { SFCascaderWidgetSchema, SFComponent, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
|
||||||
import { DynamicSettingModalComponent, SinglepageSettingModalComponent } from '@shared';
|
import { DynamicSettingModalComponent, SinglepageSettingModalComponent } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { takeLast } from 'rxjs/operators';
|
import { of } from 'rxjs';
|
||||||
|
import { map, takeLast } from 'rxjs/operators';
|
||||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
||||||
import { SystemService } from '../../services/system.service';
|
import { SystemService } from '../../services/system.service';
|
||||||
|
|
||||||
@ -20,26 +21,33 @@ export class NetworkFreightComponent implements OnInit {
|
|||||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||||
@ViewChild('sfTicket', { static: false }) sfTicket!: SFComponent;
|
@ViewChild('sfTicket', { static: false }) sfTicket!: SFComponent;
|
||||||
@ViewChild('sfTax', { static: false }) sfTax!: SFComponent;
|
@ViewChild('sfTax', { static: false }) sfTax!: SFComponent;
|
||||||
|
@ViewChild('sfNC', { static: false }) sfNC!: SFComponent;
|
||||||
ui: SFUISchema = {};
|
ui: SFUISchema = {};
|
||||||
ui2: SFUISchema = {};
|
ui2: SFUISchema = {};
|
||||||
ui3: SFUISchema = {};
|
ui3: SFUISchema = {};
|
||||||
ui4: SFUISchema = {};
|
ui4: SFUISchema = {};
|
||||||
|
ui5: SFUISchema = {};
|
||||||
schema: SFSchema = {};
|
schema: SFSchema = {};
|
||||||
addSchema: SFSchema = {};
|
addSchema: SFSchema = {};
|
||||||
ticketSchema: SFSchema = {};
|
ticketSchema: SFSchema = {};
|
||||||
TaxSchema: SFSchema = {};
|
TaxSchema: SFSchema = {};
|
||||||
_$expand = false;
|
NCSchema: SFSchema = {};
|
||||||
taxStatus = false;
|
_$expand :boolean= false;
|
||||||
|
taxStatus :boolean= false;
|
||||||
|
TicketStatus :boolean= true;
|
||||||
|
NCStatus :boolean = false;
|
||||||
formData: any;
|
formData: any;
|
||||||
ticketId: any;
|
ticketId: any;
|
||||||
ticketItem: any;
|
ticketItem: any;
|
||||||
formDataTicket: any;
|
formDataTicket: any;
|
||||||
|
formDataNC: any;
|
||||||
formDataTax: any;
|
formDataTax: any;
|
||||||
|
NCID: string = '';
|
||||||
isVisible = false;
|
isVisible = false;
|
||||||
isVisibleTicket = false;
|
isVisibleTicket = false;
|
||||||
edit = false;
|
edit = false;
|
||||||
editId = false;
|
editId = false;
|
||||||
tabs: any[] = [{ name: '开票设置' }, { name: '税务设置' }];
|
tabs: any[] = [{ name: '开票设置' }, { name: '税务设置' }, { name: 'NC设置' }];
|
||||||
|
|
||||||
columns: STColumn[] = [
|
columns: STColumn[] = [
|
||||||
{
|
{
|
||||||
@ -350,6 +358,42 @@ export class NetworkFreightComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
this.ui4 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
this.ui4 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||||
}
|
}
|
||||||
|
initSFNC() {
|
||||||
|
this.NCSchema = {
|
||||||
|
properties: {
|
||||||
|
crmCustomerId: {
|
||||||
|
type: 'string',
|
||||||
|
title: 'CRM客户编码',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
serverSearch: true,
|
||||||
|
searchDebounceTime: 300,
|
||||||
|
searchLoadingText: '搜索中...',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value
|
||||||
|
},
|
||||||
|
allowClear: true,
|
||||||
|
onSearch: (q: any) => {
|
||||||
|
let str = q.replace(/^\s+|\s+$/g, '');
|
||||||
|
if (str) {
|
||||||
|
console.log(str);
|
||||||
|
|
||||||
|
return this.service
|
||||||
|
.request(this.service.$api_get_crmCustomer_page, { customerName: str })
|
||||||
|
.pipe(map((res: any) => (res.records as any[]).map(i => ({ label: i.customerName, value: i.id } as SFSchemaEnum))))
|
||||||
|
.toPromise();
|
||||||
|
} else {
|
||||||
|
return of([]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} as SFSelectWidgetSchema
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: ['crmCustomerId']
|
||||||
|
};
|
||||||
|
this.ui5 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||||
|
|
||||||
|
}
|
||||||
initSFFre() {
|
initSFFre() {
|
||||||
this.addSchema = {
|
this.addSchema = {
|
||||||
properties: {
|
properties: {
|
||||||
@ -397,36 +441,44 @@ export class NetworkFreightComponent implements OnInit {
|
|||||||
// 财务设置
|
// 财务设置
|
||||||
ticket(value: any) {
|
ticket(value: any) {
|
||||||
this.formDataTicket = [];
|
this.formDataTicket = [];
|
||||||
|
this.formDataNC = [];
|
||||||
this.formDataTax = [];
|
this.formDataTax = [];
|
||||||
this.ticketItem = value;
|
this.ticketItem = value;
|
||||||
|
this.taxStatus = false
|
||||||
|
this.TicketStatus = true
|
||||||
|
this.NCStatus = false
|
||||||
this.initSFTax();
|
this.initSFTax();
|
||||||
|
this.initSFNC();
|
||||||
this.initSFTicket();
|
this.initSFTicket();
|
||||||
this.service.request(this.service.$api_getTicketByNetworkTransporterId, { id: value.id }).subscribe((res: any) => {
|
this.NCID = value.id;
|
||||||
console.log(res);
|
if(this.TicketStatus) {
|
||||||
if (res) {
|
console.log('9999999');
|
||||||
let List = {
|
|
||||||
...res
|
this.service.request(this.service.$api_getTicketByNetworkTransporterId, { id: value.id }).subscribe((res: any) => {
|
||||||
};
|
console.log(res);
|
||||||
delete List.senderRegionCode;
|
if (res) {
|
||||||
(List.senderRegionCode = this.getProvinceData(res?.senderRegionCode)), (this.formDataTicket = List);
|
let List = {
|
||||||
this.ticketId = res.id;
|
...res
|
||||||
}
|
};
|
||||||
});
|
delete List.senderRegionCode;
|
||||||
|
(List.senderRegionCode = this.getProvinceData(res?.senderRegionCode)), (this.formDataTicket = List);
|
||||||
|
this.ticketId = res.id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
this.isVisibleTicket = true;
|
this.isVisibleTicket = true;
|
||||||
}
|
}
|
||||||
getProvinceData(value: any) {
|
getProvinceData(value: any) {
|
||||||
this.service.http.post(this.service.$api_getRegionDetailByCode, { regionCode: value }).subscribe(res => {
|
this.service.http.post(this.service.$api_getRegionDetailByCode, { regionCode: value }).subscribe(res => {
|
||||||
console.log(res.data);
|
|
||||||
console.log(this.formDataTicket);
|
|
||||||
let enterpriseAddressCode: any = [];
|
let enterpriseAddressCode: any = [];
|
||||||
let regioin = res?.data?.regionFullCodes.split(',');
|
let regioin = res?.data?.regionFullCodes.split(',');
|
||||||
console.log(regioin);
|
|
||||||
regioin?.forEach((element: any) => {
|
regioin?.forEach((element: any) => {
|
||||||
enterpriseAddressCode.push(Number(element));
|
enterpriseAddressCode.push(Number(element));
|
||||||
});
|
});
|
||||||
console.log(enterpriseAddressCode);
|
if(this.TicketStatus) {
|
||||||
this.sfTicket.setValue('/senderRegionCode', enterpriseAddressCode);
|
this.sfTicket.setValue('/senderRegionCode', enterpriseAddressCode);
|
||||||
return enterpriseAddressCode;
|
return enterpriseAddressCode;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
deleteAction(item?: any) {
|
deleteAction(item?: any) {
|
||||||
@ -517,27 +569,56 @@ export class NetworkFreightComponent implements OnInit {
|
|||||||
this.isVisibleTicket = false;
|
this.isVisibleTicket = false;
|
||||||
}
|
}
|
||||||
handleOKTicket() {
|
handleOKTicket() {
|
||||||
console.log(this.sfTicket.valid);
|
console.log( this.taxStatus, this.TicketStatus,this.NCStatus);
|
||||||
console.log(this.sfTicket.value);
|
if(this.TicketStatus) {
|
||||||
if (!this.sfTicket.valid) {
|
console.log(this.sfTicket);
|
||||||
this.service.msgSrv.warning('请正确填写完整!');
|
console.log(this.sfTicket.value);
|
||||||
return;
|
|
||||||
}
|
if (!this.sfTicket.valid) {
|
||||||
const params = {
|
this.service.msgSrv.warning('请正确填写完整!');
|
||||||
...this.sfTicket.value
|
return;
|
||||||
};
|
|
||||||
if (this.ticketId) {
|
|
||||||
params.id = this.ticketId;
|
|
||||||
}
|
|
||||||
params.senderRegionCode = this.sfTicket.value.senderRegionCode[2];
|
|
||||||
console.log(params);
|
|
||||||
this.service.request(this.service.$api_networkTransporterTicket_save, params).subscribe((res: any) => {
|
|
||||||
if (res) {
|
|
||||||
this.service.msgSrv.success('保存成功!');
|
|
||||||
this.isVisibleTicket = false;
|
|
||||||
this.st.reload(1);
|
|
||||||
}
|
}
|
||||||
});
|
const params = {
|
||||||
|
...this.sfTicket.value
|
||||||
|
};
|
||||||
|
if (this.ticketId) {
|
||||||
|
params.id = this.ticketId;
|
||||||
|
}
|
||||||
|
params.senderRegionCode = this.sfTicket.value.senderRegionCode[2];
|
||||||
|
console.log(params);
|
||||||
|
this.service.request(this.service.$api_networkTransporterTicket_save, params).subscribe((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('保存成功!');
|
||||||
|
this.isVisibleTicket = false;
|
||||||
|
this.st.reload(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if(this.NCStatus){
|
||||||
|
console.log(this.sfNC);
|
||||||
|
console.log(this.formDataNC);
|
||||||
|
console.log(this.sfNC?.value);
|
||||||
|
|
||||||
|
if (!this.sfNC.valid) {
|
||||||
|
this.service.msgSrv.warning('请正确填写完整!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
...this.sfNC.value
|
||||||
|
};
|
||||||
|
if (this.NCID) {
|
||||||
|
params.id = this.NCID;
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
this.service.request(this.service.$api_setCrmCustomer, params).subscribe((res: any) => {
|
||||||
|
if (res) {
|
||||||
|
this.service.msgSrv.success('保存成功!');
|
||||||
|
this.isVisibleTicket = false;
|
||||||
|
this.st.reload(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// api_setCrmCustomer
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOK() {
|
handleOK() {
|
||||||
@ -571,11 +652,19 @@ export class NetworkFreightComponent implements OnInit {
|
|||||||
return this.service.request(this.service.$api_get_region_by_code, { regionCode });
|
return this.service.request(this.service.$api_get_region_by_code, { regionCode });
|
||||||
}
|
}
|
||||||
changeType(value: any) {
|
changeType(value: any) {
|
||||||
console.log(value);
|
|
||||||
if (value.name === '税务设置') {
|
if (value.name === '税务设置') {
|
||||||
this.taxStatus = true;
|
this.taxStatus = true;
|
||||||
} else {
|
this.TicketStatus = false;
|
||||||
|
this.NCStatus = false;
|
||||||
|
} else if (value.name === '开票设置'){
|
||||||
|
this.TicketStatus = true;
|
||||||
|
this.NCStatus = false;
|
||||||
this.taxStatus = false;
|
this.taxStatus = false;
|
||||||
|
} else if (value.name === 'NC设置'){
|
||||||
|
this.NCStatus = true;
|
||||||
|
this.TicketStatus = false;
|
||||||
|
this.taxStatus = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
|
|||||||
@ -173,6 +173,8 @@ export class SystemService extends BaseService {
|
|||||||
$api_ocr_recognize_id_card = '/api/mdc/pbc/hwc/ocr/recognizeIdCard';
|
$api_ocr_recognize_id_card = '/api/mdc/pbc/hwc/ocr/recognizeIdCard';
|
||||||
// 获取字典
|
// 获取字典
|
||||||
$api_getDictValue = '/api/mdc/pbc/dictItems/getDictValue';
|
$api_getDictValue = '/api/mdc/pbc/dictItems/getDictValue';
|
||||||
|
// 设置crm客户
|
||||||
|
$api_setCrmCustomer = '/api/mdc/cuc/networkTransporter/setCrmCustomer';
|
||||||
// 获取一、二、三级地区详情
|
// 获取一、二、三级地区详情
|
||||||
$api_getRegionToThree = '/api/mdc/pbc/region/getRegionToThree';
|
$api_getRegionToThree = '/api/mdc/pbc/region/getRegionToThree';
|
||||||
$api_getRoleTemplateInfo: string = '';
|
$api_getRoleTemplateInfo: string = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user