Merge branch 'feature/partner' of https://gitlab.eascs.com/tms-ui/tms-obc-web into feature/partner
This commit is contained in:
41
package-lock.json
generated
41
package-lock.json
generated
@ -2879,6 +2879,35 @@
|
|||||||
"integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=",
|
"integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@types/quill": {
|
||||||
|
"version": "2.0.9",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@types/quill/-/quill-2.0.9.tgz",
|
||||||
|
"integrity": "sha512-/n40Ypp+jF3GDLqB/5z1P+Odq1K98txXbBgRDkG6Z90LGC1AwQPtZWNeOdDg0yUlgBSUASmpeDn3eBPUuPXtuw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"parchment": "^1.1.2",
|
||||||
|
"quill-delta": "^4.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fast-diff": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"quill-delta": {
|
||||||
|
"version": "4.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-4.2.2.tgz",
|
||||||
|
"integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"fast-diff": "1.2.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"lodash.isequal": "^4.5.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/selenium-webdriver": {
|
"@types/selenium-webdriver": {
|
||||||
"version": "3.0.19",
|
"version": "3.0.19",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/selenium-webdriver/download/@types/selenium-webdriver-3.0.19.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/selenium-webdriver/download/@types/selenium-webdriver-3.0.19.tgz",
|
||||||
@ -10136,12 +10165,24 @@
|
|||||||
"resolved": "https://registry.nlark.com/lodash/download/lodash-4.17.21.tgz",
|
"resolved": "https://registry.nlark.com/lodash/download/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw="
|
"integrity": "sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw="
|
||||||
},
|
},
|
||||||
|
"lodash.clonedeep": {
|
||||||
|
"version": "4.5.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
||||||
|
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"lodash.debounce": {
|
"lodash.debounce": {
|
||||||
"version": "4.0.8",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz",
|
"resolved": "https://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz",
|
||||||
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
|
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"lodash.isequal": {
|
||||||
|
"version": "4.5.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
|
||||||
|
"integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"lodash.memoize": {
|
"lodash.memoize": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.nlark.com/lodash.memoize/download/lodash.memoize-4.1.2.tgz",
|
"resolved": "https://registry.nlark.com/lodash.memoize/download/lodash.memoize-4.1.2.tgz",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<page-header-wrapper [title]="'新增企业合伙人'"></page-header-wrapper>
|
<page-header-wrapper [title]="'新增企业合伙人'"></page-header-wrapper>
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<sf #sf1 [ui]="ui" [schema]="schema1" [button]="'none'">
|
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'">
|
||||||
|
<!-- 企业基本信 -->
|
||||||
<ng-template sf-template="_basicInfoTitle" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="_basicInfoTitle" let-me let-ui="ui" let-schema="schema">
|
||||||
<div class="form-title">企业基本信息</div>
|
<div class="form-title">企业基本信息</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -14,6 +15,7 @@
|
|||||||
<div class="pr">万元</div>
|
<div class="pr">万元</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<!-- 企业法人信息 -->
|
||||||
<ng-template sf-template="legalPersonIdentityDTO/_legalPersontitle" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="legalPersonIdentityDTO/_legalPersontitle" let-me let-ui="ui" let-schema="schema">
|
||||||
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">营业执照法人信息</div>
|
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">营业执照法人信息</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -41,33 +43,12 @@
|
|||||||
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-back.png" /></div>
|
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-back.png" /></div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</sf>
|
|
||||||
|
|
||||||
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'">
|
<!-- 企业管理员信息 -->
|
||||||
<ng-template sf-template="title1" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="adminUserInfo/_adminTitle" let-me let-ui="ui" let-schema="schema">
|
||||||
<div class="form-title">企业开票信息</div>
|
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">企业管理员信息</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="title99" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsA" let-me let-ui="ui" let-schema="schema">
|
||||||
<div class="form-title">企业管理员信息</div>
|
|
||||||
</ng-template>
|
|
||||||
|
|
||||||
<ng-template sf-template="tipsD" let-me let-ui="ui" let-schema="schema">
|
|
||||||
<div class="pr" style="z-index: 999;">
|
|
||||||
<div>请上传该企业授权您成为本系统企业管理员的文件的高清照片,需加盖公司印章</div>
|
|
||||||
<div>上传后系统会自动识别并填写</div>
|
|
||||||
<div></div>
|
|
||||||
<div class="pa"><img height="112px" style="margin-top: 12px;z-index: 9999;"
|
|
||||||
(click)="service.showImg('./assets/images/usercenter/agree.png')"
|
|
||||||
src="./assets/images/usercenter/agree.png" /></div>
|
|
||||||
</div>
|
|
||||||
</ng-template>
|
|
||||||
<ng-template sf-template="tips" let-me let-ui="ui" let-schema="schema">
|
|
||||||
<div class="pr">
|
|
||||||
<div>请上传身份证原件的高清照片,若上传复印件,则需申请人签字;</div>
|
|
||||||
<div>上传后系统会自动识别并填写</div>
|
|
||||||
</div>
|
|
||||||
</ng-template>
|
|
||||||
<ng-template sf-template="tipsA" let-me let-ui="ui" let-schema="schema">
|
|
||||||
<div class="pr">
|
<div class="pr">
|
||||||
<dl class="tips">
|
<dl class="tips">
|
||||||
<dt>正面照(人像面)</dt>
|
<dt>正面照(人像面)</dt>
|
||||||
@ -76,7 +57,7 @@
|
|||||||
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div>
|
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="tipsB" let-me let-ui="ui" let-schema="schema">
|
<ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsB" let-me let-ui="ui" let-schema="schema">
|
||||||
<div class="pr">
|
<div class="pr">
|
||||||
<dl class="tips">
|
<dl class="tips">
|
||||||
<dt>背面照(国徽面)</dt>
|
<dt>背面照(国徽面)</dt>
|
||||||
@ -85,9 +66,20 @@
|
|||||||
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-back.png" /></div>
|
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-back.png" /></div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<!-- 所属城市 -->
|
||||||
|
<ng-template sf-template="_addressTitle" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">所属城市</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<!-- 渠道销售 -->
|
||||||
|
<ng-template sf-template="_channelTitle" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">渠道销售</div>
|
||||||
|
</ng-template>
|
||||||
</sf>
|
</sf>
|
||||||
|
|
||||||
<div style="padding-left: 379px">
|
|
||||||
|
<div style="display: flex;justify-content: center;">
|
||||||
<button nz-button type="button" nzType="primary" (click)="submitForm()"
|
<button nz-button type="button" nzType="primary" (click)="submitForm()"
|
||||||
[nzLoading]="service.http.loading">确认新增</button>
|
[nzLoading]="service.http.loading">确认新增</button>
|
||||||
<button nz-button (click)="goBack()">返回</button>
|
<button nz-button (click)="goBack()">返回</button>
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import {
|
|||||||
SFCascaderWidgetSchema,
|
SFCascaderWidgetSchema,
|
||||||
SFTextareaWidgetSchema,
|
SFTextareaWidgetSchema,
|
||||||
SFDateWidgetSchema,
|
SFDateWidgetSchema,
|
||||||
SFCheckboxWidgetSchema
|
SFCheckboxWidgetSchema,
|
||||||
|
SFTreeSelectWidgetSchema
|
||||||
} from '@delon/form';
|
} from '@delon/form';
|
||||||
import { NzUploadFile } from 'ng-zorro-antd/upload';
|
import { NzUploadFile } from 'ng-zorro-antd/upload';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
@ -45,10 +46,7 @@ const DATECONFIG = {
|
|||||||
export class AddEtpPartnerComponent implements OnInit {
|
export class AddEtpPartnerComponent implements OnInit {
|
||||||
@ViewChild('sf', { static: false })
|
@ViewChild('sf', { static: false })
|
||||||
sf!: SFComponent;
|
sf!: SFComponent;
|
||||||
@ViewChild('sf1', { static: false })
|
schema: SFSchema = this.initBasicInfoSF();
|
||||||
sf1!: SFComponent;
|
|
||||||
schema: SFSchema = this.initOthersSF();
|
|
||||||
schema1: SFSchema = this.initBasicInfoSF();
|
|
||||||
ui: SFUISchema = {
|
ui: SFUISchema = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 180,
|
spanLabelFixed: 180,
|
||||||
@ -57,19 +55,9 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
$_basicInfoTitle: {
|
$_basicInfoTitle: {
|
||||||
spanLabelFixed: 0
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$title99: {
|
|
||||||
spanLabelFixed: 0
|
|
||||||
},
|
|
||||||
$_legalPersontitle: {
|
$_legalPersontitle: {
|
||||||
spanLabelFixed: 0
|
spanLabelFixed: 0
|
||||||
},
|
},
|
||||||
$registrationCapital: {
|
|
||||||
spanLabelFixed: 180,
|
|
||||||
grid: { xxl: 13, xl: 18, lg: 22, md: 22 }
|
|
||||||
},
|
|
||||||
$unit: {
|
|
||||||
grid: { xxl: 6, xl: 6, lg: 2, md: 2 }
|
|
||||||
},
|
|
||||||
$_isLoingDate: {
|
$_isLoingDate: {
|
||||||
spanLabelFixed: 100,
|
spanLabelFixed: 100,
|
||||||
grid: { xxl: 6, xl: 6, lg: 4, md: 6 }
|
grid: { xxl: 6, xl: 6, lg: 4, md: 6 }
|
||||||
@ -77,32 +65,30 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
};
|
};
|
||||||
|
|
||||||
constructor(private router: Router, public service: PartnerListService) {}
|
constructor(private router: Router, public service: PartnerListService) {}
|
||||||
ngOnInit() {
|
ngOnInit() {}
|
||||||
}
|
|
||||||
|
|
||||||
submitForm() {
|
submitForm() {
|
||||||
if (!this.sf1.valid || !this.sf.valid) {
|
if (!this.sf.valid ) {
|
||||||
this.sf.validator({ emitError: true });
|
this.sf.validator({ emitError: true });
|
||||||
this.sf1.validator({ emitError: true });
|
|
||||||
this.service.msgSrv.warning('请修改填写错误信息');
|
this.service.msgSrv.warning('请修改填写错误信息');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const enterpriseRegistrationTime = new Date(this.sf1.value.enterpriseRegistrationTime);
|
const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime);
|
||||||
const operatingStartTime = new Date(this.sf1.value.operatingStartTime);
|
const operatingStartTime = new Date(this.sf.value.operatingStartTime);
|
||||||
if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) {
|
if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) {
|
||||||
this.service.msgSrv.warning('营业期限不能小于成立日期');
|
this.service.msgSrv.warning('营业期限不能小于成立日期');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.sf1.value.operatingEndTime) {
|
if (this.sf.value.operatingEndTime) {
|
||||||
const operatingEndTime = new Date(this.sf1.value.operatingEndTime);
|
const operatingEndTime = new Date(this.sf.value.operatingEndTime);
|
||||||
if (operatingStartTime.getTime() > operatingEndTime.getTime()) {
|
if (operatingStartTime.getTime() > operatingEndTime.getTime()) {
|
||||||
this.service.msgSrv.warning('营业期限不能小于期限开始日期');
|
this.service.msgSrv.warning('营业期限不能小于期限开始日期');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const validStartTime = new Date(this.sf1.value.legalPersonIdentityDTO.validStartTime);
|
const validStartTime = new Date(this.sf.value.legalPersonIdentityDTO.validStartTime);
|
||||||
if (this.sf1.value.legalPersonIdentityDTO.validEndTime) {
|
if (this.sf.value.legalPersonIdentityDTO.validEndTime) {
|
||||||
const validEndTime = new Date(this.sf1.value.legalPersonIdentityDTO.validEndTime);
|
const validEndTime = new Date(this.sf.value.legalPersonIdentityDTO.validEndTime);
|
||||||
if (validStartTime.getTime() > validEndTime.getTime()) {
|
if (validStartTime.getTime() > validEndTime.getTime()) {
|
||||||
this.service.msgSrv.warning('法人证件有效截止日期小于开始日期');
|
this.service.msgSrv.warning('法人证件有效截止日期小于开始日期');
|
||||||
return;
|
return;
|
||||||
@ -112,10 +98,9 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
const params = {};
|
const params = {};
|
||||||
Object.assign(
|
Object.assign(
|
||||||
params,
|
params,
|
||||||
{ ...this.sf1.value },
|
|
||||||
{ ...this.sf.value },
|
{ ...this.sf.value },
|
||||||
{
|
{
|
||||||
enterpriseAddressCode: this.sf1.value.enterpriseAddressCode[2],
|
enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2],
|
||||||
oftenUsedServices: sfVlaue.oftenUsedServices,
|
oftenUsedServices: sfVlaue.oftenUsedServices,
|
||||||
registerAddress: sfVlaue.registerAddress,
|
registerAddress: sfVlaue.registerAddress,
|
||||||
registerPhone: sfVlaue.registerPhone,
|
registerPhone: sfVlaue.registerPhone,
|
||||||
@ -161,23 +146,23 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
if (isFront === 'front') {
|
if (isFront === 'front') {
|
||||||
// 正面
|
// 正面
|
||||||
if (res.name) {
|
if (res.name) {
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/name', res.name);
|
this.sf.setValue('/legalPersonIdentityDTO/name', res.name);
|
||||||
}
|
}
|
||||||
if (res.number) {
|
if (res.number) {
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/certificateType', 0);
|
this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0);
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/certificateNumber', res.number);
|
this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isFront === 'back') {
|
if (isFront === 'back') {
|
||||||
// 背面
|
// 背面
|
||||||
if (res.validFrom) {
|
if (res.validFrom) {
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom);
|
this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom);
|
||||||
}
|
}
|
||||||
if (res.validTo) {
|
if (res.validTo) {
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo);
|
this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo);
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
|
this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
|
||||||
} else {
|
} else {
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/_isLoingDate', true);
|
this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -202,36 +187,33 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
|
this.service.request(this.service.$api_ocr_recognize_business_license, { businessLicenseUrl: imgurl }).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
if (res.registrationNumber) {
|
if (res.registrationNumber) {
|
||||||
this.sf1.setValue('/unifiedSocialCreditCode', res.registrationNumber);
|
this.sf.setValue('/unifiedSocialCreditCode', res.registrationNumber);
|
||||||
}
|
}
|
||||||
if (res.name) {
|
if (res.name) {
|
||||||
this.sf1.setValue('/enterpriseName', res.name);
|
this.sf.setValue('/enterpriseName', res.name);
|
||||||
}
|
}
|
||||||
if (res.type) {
|
if (res.type) {
|
||||||
this.sf1.setValue('/enterpriseType', res.type);
|
this.sf.setValue('/enterpriseType', res.type);
|
||||||
}
|
}
|
||||||
if (res.addressRegionCodes) {
|
if (res.addressRegionCodes) {
|
||||||
this.sf1.setValue('/enterpriseAddressCode', res.addressRegionCodes);
|
this.sf.setValue('/enterpriseAddressCode', res.addressRegionCodes);
|
||||||
}
|
}
|
||||||
if (res.address) {
|
if (res.address) {
|
||||||
this.sf1.setValue('/enterpriseAddress', res.address);
|
this.sf.setValue('/enterpriseAddress', res.address);
|
||||||
}
|
|
||||||
if (res.registeredCapital) {
|
|
||||||
this.sf1.setValue('/registrationCapital', res.registeredCapital);
|
|
||||||
}
|
}
|
||||||
if (res.foundDate) {
|
if (res.foundDate) {
|
||||||
this.sf1.setValue('/enterpriseRegistrationTime', res.foundDate);
|
this.sf.setValue('/enterpriseRegistrationTime', res.foundDate);
|
||||||
}
|
}
|
||||||
if (res.businessTermStartDate) {
|
if (res.businessTermStartDate) {
|
||||||
this.sf1.setValue('/operatingStartTime', res.businessTermStartDate);
|
this.sf.setValue('/operatingStartTime', res.businessTermStartDate);
|
||||||
}
|
}
|
||||||
if (res.businessTermEndDate) {
|
if (res.businessTermEndDate) {
|
||||||
this.sf1.setValue('/operatingEndTime', res.businessTermEndDate);
|
this.sf.setValue('/operatingEndTime', res.businessTermEndDate);
|
||||||
} else {
|
} else {
|
||||||
this.sf1.setValue('/_isLoingDate', true);
|
this.sf.setValue('/_isLoingDate', true);
|
||||||
}
|
}
|
||||||
if (res.businessScope) {
|
if (res.businessScope) {
|
||||||
this.sf1.setValue('/businessScope', res.businessScope);
|
this.sf.setValue('/businessScope', res.businessScope);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -244,8 +226,9 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
private initBasicInfoSF(): SFSchema {
|
private initBasicInfoSF(): SFSchema {
|
||||||
return {
|
return {
|
||||||
properties: {
|
properties: {
|
||||||
|
// 企业基本信息
|
||||||
_basicInfoTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
_basicInfoTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
_licenseTips: { title: '营业执照', type: 'string', ui: { widget: 'custom' } },
|
_licenseTips: { title: '营业执照', type: 'string', ui: { widget: 'custom' }, default: true },
|
||||||
licensePhoto: { title: '', type: 'string', ui: { hidden: true } },
|
licensePhoto: { title: '', type: 'string', ui: { hidden: true } },
|
||||||
licensePhotoWatermark: {
|
licensePhotoWatermark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -255,7 +238,7 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||||
change: args => {
|
change: args => {
|
||||||
if (args.type === 'success') {
|
if (args.type === 'success') {
|
||||||
this.sf1.setValue('/licensePhoto', args.fileList[0].response.data.fullFilePath);
|
this.sf.setValue('/licensePhoto', args.fileList[0].response.data.fullFilePath);
|
||||||
this.checkBusinessLicense(args.fileList[0].response.data.fullFilePath);
|
this.checkBusinessLicense(args.fileList[0].response.data.fullFilePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -310,7 +293,7 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
required: '请选择截止日期'
|
required: '请选择截止日期'
|
||||||
},
|
},
|
||||||
change: i => {
|
change: i => {
|
||||||
this.sf1?.setValue('/_isLoingDate', false);
|
this.sf?.setValue('/_isLoingDate', false);
|
||||||
}
|
}
|
||||||
} as SFDateWidgetSchema
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
@ -320,15 +303,16 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
class: 'input-back',
|
class: 'input-back',
|
||||||
widget: 'checkbox',
|
widget: 'checkbox',
|
||||||
change: i => this.sf1?.setValue('/operatingEndTime', null)
|
change: i => this.sf?.setValue('/operatingEndTime', null)
|
||||||
} as SFCheckboxWidgetSchema
|
} as SFCheckboxWidgetSchema
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 法人信息
|
||||||
legalPersonIdentityDTO: {
|
legalPersonIdentityDTO: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
_legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
_legalPersontitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
_certificatePhototips: { title: '法定代表人证件照', type: 'string', ui: { widget: 'custom' } },
|
_certificatePhototips: { title: '法定代表人证件照', type: 'string', ui: { widget: 'custom' }, default: true },
|
||||||
_certificatePhotoExmplateA: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } },
|
_certificatePhotoExmplateA: { title: '', type: 'string', ui: { widget: 'custom', offsetControl: 6 } },
|
||||||
certificatePhotoFrontWatermark: {
|
certificatePhotoFrontWatermark: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -338,7 +322,7 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||||
change: args => {
|
change: args => {
|
||||||
if (args.type === 'success') {
|
if (args.type === 'success') {
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
|
this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
|
||||||
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1);
|
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -355,7 +339,7 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||||
change: args => {
|
change: args => {
|
||||||
if (args.type === 'success') {
|
if (args.type === 'success') {
|
||||||
this.sf1.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
|
this.sf.setValue('/legalPersonIdentityDTO/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
|
||||||
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1);
|
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'back', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -420,7 +404,7 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
required: '请选择截止日期'
|
required: '请选择截止日期'
|
||||||
},
|
},
|
||||||
change: i => {
|
change: i => {
|
||||||
this.sf1?.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
|
this.sf?.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
|
||||||
}
|
}
|
||||||
} as SFDateWidgetSchema
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
@ -432,32 +416,25 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
grid: { span: 6 },
|
grid: { span: 6 },
|
||||||
class: 'input-back',
|
class: 'input-back',
|
||||||
widget: 'checkbox',
|
widget: 'checkbox',
|
||||||
change: i => this.sf1?.setValue('/legalPersonIdentityDTO/validEndTime', null)
|
change: i => this.sf?.setValue('/legalPersonIdentityDTO/validEndTime', null)
|
||||||
} as SFCheckboxWidgetSchema
|
} as SFCheckboxWidgetSchema
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: ['certificatePhotoFront', 'certificatePhotoBack', 'name', 'certificateType', 'certificateNumber', 'validStartTime']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
required: [
|
required: [
|
||||||
'licensePhotoWatermark',
|
'_certificatePhototips',
|
||||||
'unifiedSocialCreditCode',
|
'certificatePhotoFront',
|
||||||
'enterpriseName',
|
'certificatePhotoBack',
|
||||||
'enterpriseType',
|
'name',
|
||||||
'enterpriseAddressCode',
|
'certificateType',
|
||||||
'enterpriseAddress',
|
'certificateNumber',
|
||||||
'registrationCapital',
|
'validStartTime'
|
||||||
'enterpriseRegistrationTime',
|
|
||||||
'operatingStartTime',
|
|
||||||
'businessScope'
|
|
||||||
]
|
]
|
||||||
};
|
},
|
||||||
}
|
// 企业管理员信息
|
||||||
|
adminUserInfo: {
|
||||||
private initOthersSF(): SFSchema {
|
type: 'object',
|
||||||
return {
|
|
||||||
properties: {
|
properties: {
|
||||||
title99: { title: '', type: 'string', ui: { widget: 'custom' } },
|
_adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
adminMobile: {
|
adminMobile: {
|
||||||
title: ' 企业管理员手机号',
|
title: ' 企业管理员手机号',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@ -470,12 +447,13 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }
|
errors: { required: '请输入企业管理员手机号', format: '手机号格式错误' }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tipsA: {
|
_adminCertificatePhotoTipsA: {
|
||||||
title: '企业管理员证件照',
|
title: '企业管理员证件照',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom'
|
widget: 'custom'
|
||||||
}
|
},
|
||||||
|
default: true
|
||||||
},
|
},
|
||||||
certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } },
|
certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } },
|
||||||
certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } },
|
certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } },
|
||||||
@ -493,7 +471,7 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
} as SFUploadWidgetSchema
|
} as SFUploadWidgetSchema
|
||||||
},
|
},
|
||||||
tipsB: {
|
_adminCertificatePhotoTipsB: {
|
||||||
title: '',
|
title: '',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: {
|
ui: {
|
||||||
@ -534,22 +512,81 @@ export class AddEtpPartnerComponent implements OnInit {
|
|||||||
placeholder: '请输入企业管理员身份证号'
|
placeholder: '请输入企业管理员身份证号'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
operatingStartTime: {
|
||||||
title1: { title: '', type: 'string', ui: { widget: 'custom' } },
|
title: '身份证有效开始日期',
|
||||||
createBank: {
|
|
||||||
title: '所属城市',
|
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' }
|
ui: {
|
||||||
|
...DATECONFIG,
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
errors: {
|
||||||
|
required: '请选择开始日期'
|
||||||
|
}
|
||||||
|
} as SFDateWidgetSchema
|
||||||
},
|
},
|
||||||
|
operatingEndTime: {
|
||||||
title3: { title: '', type: 'string', ui: { widget: 'custom' } },
|
title: '身份证有效截止日期',
|
||||||
bankAccount: {
|
|
||||||
title: '渠道销售邀请码',
|
|
||||||
type: 'string',
|
type: 'string',
|
||||||
ui: { grid: { xxl: 13, xl: 18, lg: 24, md: 24 }, placeholder: '请输入银行账号' }
|
ui: {
|
||||||
|
...DATECONFIG,
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 20, md: 18 },
|
||||||
|
errors: {
|
||||||
|
required: '请选择截止日期'
|
||||||
|
},
|
||||||
|
change: i => {
|
||||||
|
this.sf?.setValue('/adminUserInfo/_isLoingDate', false);
|
||||||
|
}
|
||||||
|
} as SFDateWidgetSchema
|
||||||
|
},
|
||||||
|
_isLoingDate: {
|
||||||
|
title: '长期',
|
||||||
|
type: 'boolean',
|
||||||
|
ui: {
|
||||||
|
spanLabelFixed: 100,
|
||||||
|
grid: { span: 6 },
|
||||||
|
class: 'input-back',
|
||||||
|
widget: 'checkbox',
|
||||||
|
change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null)
|
||||||
|
} as SFCheckboxWidgetSchema
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
required: ['createBank', 'bankAccount', 'adminMobile', 'name', 'certificateNumber', 'tipsD', 'creditPhoto']
|
required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber','operatingStartTime']
|
||||||
|
},
|
||||||
|
// 所属城市
|
||||||
|
_addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
|
status3: {
|
||||||
|
type: 'string',
|
||||||
|
title: '所属城市',
|
||||||
|
default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'],
|
||||||
|
ui: {
|
||||||
|
widget: 'tree-select',
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
placeholder: '请选择城市(最多3个)',
|
||||||
|
checkable: true,
|
||||||
|
asyncData: () =>
|
||||||
|
of([
|
||||||
|
{ title: '待支付', key: 'WAIT_BUYER_PAY' },
|
||||||
|
{ title: '已支付', key: 'TRADE_SUCCESS' },
|
||||||
|
{ title: '交易完成', key: 'TRADE_FINISHED' }
|
||||||
|
])
|
||||||
|
} as SFTreeSelectWidgetSchema,
|
||||||
|
},
|
||||||
|
// 渠道销售
|
||||||
|
_channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
|
channel: {
|
||||||
|
title: '渠道销售邀请码',
|
||||||
|
type: 'string',
|
||||||
|
minLength: 1,
|
||||||
|
maxLength: 100,
|
||||||
|
ui: {
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
placeholder: '请输入渠道销售邀请码',
|
||||||
|
errors: {
|
||||||
|
required: '请输入渠道销售邀请码'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: ['_licenseTips', 'licensePhotoWatermark', 'unifiedSocialCreditCode', 'enterpriseName', 'operatingStartTime', 'status3','channel']
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1,44 @@
|
|||||||
<p>add-personal-partner works!</p>
|
<page-header-wrapper [title]="'新增个人合伙人'"></page-header-wrapper>
|
||||||
|
<nz-card>
|
||||||
|
<sf #sf [ui]="ui" [schema]="schema" [button]="'none'">
|
||||||
|
<!-- 合伙人信息 -->
|
||||||
|
<ng-template sf-template="adminUserInfo/_adminTitle" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">合伙人信息</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsA" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div class="pr">
|
||||||
|
<dl class="tips">
|
||||||
|
<dt>正面照(人像面)</dt>
|
||||||
|
<dd>示例</dd>
|
||||||
|
</dl>
|
||||||
|
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-front.png" /></div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
<ng-template sf-template="adminUserInfo/_adminCertificatePhotoTipsB" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div class="pr">
|
||||||
|
<dl class="tips">
|
||||||
|
<dt>背面照(国徽面)</dt>
|
||||||
|
<dd>示例</dd>
|
||||||
|
</dl>
|
||||||
|
<div class="pa"><img width="190" src="./assets/images/usercenter/certificate-demo-back.png" /></div>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<!-- 所属城市 -->
|
||||||
|
<ng-template sf-template="_addressTitle" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">所属城市</div>
|
||||||
|
</ng-template>
|
||||||
|
|
||||||
|
<!-- 渠道销售 -->
|
||||||
|
<ng-template sf-template="_channelTitle" let-me let-ui="ui" let-schema="schema">
|
||||||
|
<div class="form-title" style="margin-top: 40px;margin-left: -180px;">渠道销售</div>
|
||||||
|
</ng-template>
|
||||||
|
</sf>
|
||||||
|
|
||||||
|
|
||||||
|
<div style="display: flex;justify-content: center;">
|
||||||
|
<button nz-button type="button" nzType="primary" (click)="submitForm()"
|
||||||
|
[nzLoading]="service.http.loading">确认新增</button>
|
||||||
|
<button nz-button (click)="goBack()">返回</button>
|
||||||
|
</div>
|
||||||
|
</nz-card>
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
:host {
|
||||||
|
::ng-deep {
|
||||||
|
nz-card {
|
||||||
|
|
||||||
|
.pr {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pa {
|
||||||
|
position: absolute;
|
||||||
|
top : 50px;
|
||||||
|
left : 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
display : flex;
|
||||||
|
margin-bottom: 0;
|
||||||
|
color : #333;
|
||||||
|
|
||||||
|
dt {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
width : 190px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
text-align : center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-title {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding-left : 8px;
|
||||||
|
color : #333;
|
||||||
|
font-weight : 700;
|
||||||
|
font-size : 18px;
|
||||||
|
line-height : 20px;
|
||||||
|
border-left : solid 3px #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-form-item {
|
||||||
|
margin-left: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nz-date-picker,
|
||||||
|
nz-input-number {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-back {
|
||||||
|
nz-form-item {
|
||||||
|
margin-left: 0px;
|
||||||
|
|
||||||
|
.ant-form-item-label {
|
||||||
|
flex: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-form-item-control {
|
||||||
|
max-width : 100% !important;
|
||||||
|
margin-left: 20px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,32 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { apiConf } from '@conf/api.conf';
|
||||||
|
import { SFUploadWidgetSchema, SFComponent, SFSchema, SFUISchema, SFDateWidgetSchema, SFCheckboxWidgetSchema, SFTreeSelectWidgetSchema } from '@delon/form';
|
||||||
|
import { NzUploadFile } from 'ng-zorro-antd/upload';
|
||||||
|
import { of } from 'rxjs';
|
||||||
|
import { PartnerListService } from '../../services/partner-list.service';
|
||||||
|
|
||||||
|
const IMAGECONFIG = {
|
||||||
|
previewFile: (file: NzUploadFile) => of(file.url),
|
||||||
|
action: apiConf.waterFileUpload,
|
||||||
|
fileType: 'image/png,image/jpeg,image/jpg,image/gif',
|
||||||
|
fileSize: 5120,
|
||||||
|
limit: 1,
|
||||||
|
limitFileCount: 1,
|
||||||
|
resReName: 'data.fullFileWatermarkPath',
|
||||||
|
urlReName: 'data.fullFileWatermarkPath',
|
||||||
|
widget: 'upload',
|
||||||
|
name: 'multipartFile',
|
||||||
|
multiple: false,
|
||||||
|
listType: 'picture-card'
|
||||||
|
} as SFUploadWidgetSchema;
|
||||||
|
|
||||||
|
const DATECONFIG = {
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
widget: 'date',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
placeholder: '请选择'
|
||||||
|
};
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-add-personal-partner',
|
selector: 'app-add-personal-partner',
|
||||||
@ -6,10 +34,311 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
styleUrls: ['./add-personal-partner.component.less']
|
styleUrls: ['./add-personal-partner.component.less']
|
||||||
})
|
})
|
||||||
export class AddPersonalPartnerComponent implements OnInit {
|
export class AddPersonalPartnerComponent implements OnInit {
|
||||||
|
@ViewChild('sf', { static: false })
|
||||||
|
sf!: SFComponent;
|
||||||
|
schema: SFSchema = this.initBasicInfoSF();
|
||||||
|
ui: SFUISchema = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 180,
|
||||||
|
grid: { span: 24 }
|
||||||
|
},
|
||||||
|
$_basicInfoTitle: {
|
||||||
|
spanLabelFixed: 0
|
||||||
|
},
|
||||||
|
$_legalPersontitle: {
|
||||||
|
spanLabelFixed: 0
|
||||||
|
},
|
||||||
|
$_isLoingDate: {
|
||||||
|
spanLabelFixed: 100,
|
||||||
|
grid: { xxl: 6, xl: 6, lg: 4, md: 6 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
constructor() { }
|
constructor(private router: Router, public service: PartnerListService) {}
|
||||||
|
ngOnInit() {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
submitForm() {
|
||||||
|
if (!this.sf.valid) {
|
||||||
|
this.sf.validator({ emitError: true });
|
||||||
|
this.service.msgSrv.warning('请修改填写错误信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const enterpriseRegistrationTime = new Date(this.sf.value.enterpriseRegistrationTime);
|
||||||
|
const operatingStartTime = new Date(this.sf.value.operatingStartTime);
|
||||||
|
if (enterpriseRegistrationTime.getTime() > operatingStartTime.getTime()) {
|
||||||
|
this.service.msgSrv.warning('营业期限不能小于成立日期');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.sf.value.operatingEndTime) {
|
||||||
|
const operatingEndTime = new Date(this.sf.value.operatingEndTime);
|
||||||
|
if (operatingStartTime.getTime() > operatingEndTime.getTime()) {
|
||||||
|
this.service.msgSrv.warning('营业期限不能小于期限开始日期');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const validStartTime = new Date(this.sf.value.legalPersonIdentityDTO.validStartTime);
|
||||||
|
if (this.sf.value.legalPersonIdentityDTO.validEndTime) {
|
||||||
|
const validEndTime = new Date(this.sf.value.legalPersonIdentityDTO.validEndTime);
|
||||||
|
if (validStartTime.getTime() > validEndTime.getTime()) {
|
||||||
|
this.service.msgSrv.warning('法人证件有效截止日期小于开始日期');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const sfVlaue = this.sf.value;
|
||||||
|
const params = {};
|
||||||
|
Object.assign(
|
||||||
|
params,
|
||||||
|
{ ...this.sf.value },
|
||||||
|
{
|
||||||
|
enterpriseAddressCode: this.sf.value.enterpriseAddressCode[2],
|
||||||
|
oftenUsedServices: sfVlaue.oftenUsedServices,
|
||||||
|
registerAddress: sfVlaue.registerAddress,
|
||||||
|
registerPhone: sfVlaue.registerPhone,
|
||||||
|
creditPhoto: sfVlaue.creditPhoto,
|
||||||
|
creditPhotoWatermark: sfVlaue.creditPhotoWatermark,
|
||||||
|
promotersTelephone: sfVlaue.promotersTelephone,
|
||||||
|
networkTransporter: sfVlaue.networkTransporter,
|
||||||
|
adminUserInfo: {
|
||||||
|
certificateNumber: sfVlaue.certificateNumber,
|
||||||
|
certificatePhotoBack: sfVlaue.certificatePhotoBack,
|
||||||
|
certificatePhotoBackWatermark: sfVlaue.certificatePhotoBackWatermark,
|
||||||
|
certificatePhotoFront: sfVlaue.certificatePhotoFront,
|
||||||
|
certificatePhotoFrontWatermark: sfVlaue.certificatePhotoFrontWatermark,
|
||||||
|
name: sfVlaue.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// this.service.request(this.service.$api_save_enterprise_admin, params).subscribe(res => {
|
||||||
|
// if (res) {
|
||||||
|
// this.service.msgSrv.success('企业新增成功');
|
||||||
|
// this.goBack();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 根据地区code查询地区列表
|
||||||
|
*/
|
||||||
|
getRegionDetailByCode(regionCode: any) {
|
||||||
|
return this.service.request(this.service.$api_get_region_by_code, { regionCode });
|
||||||
|
}
|
||||||
|
|
||||||
|
// 识别身份证 参数isFront:front-正面、back-背面;type:0-申请人身份证,1-法定代表人身份证
|
||||||
|
checkIdCard(imgurl: any, isFront: string, type: number) {
|
||||||
|
const params = {
|
||||||
|
idCardUrl: imgurl,
|
||||||
|
side: isFront
|
||||||
|
};
|
||||||
|
this.service.request(this.service.$api_ocr_recognize_id_card, params).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
if (type === 1) {
|
||||||
|
// 法定代表人证件照
|
||||||
|
if (isFront === 'front') {
|
||||||
|
// 正面
|
||||||
|
if (res.name) {
|
||||||
|
this.sf.setValue('/legalPersonIdentityDTO/name', res.name);
|
||||||
|
}
|
||||||
|
if (res.number) {
|
||||||
|
this.sf.setValue('/legalPersonIdentityDTO/certificateType', 0);
|
||||||
|
this.sf.setValue('/legalPersonIdentityDTO/certificateNumber', res.number);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isFront === 'back') {
|
||||||
|
// 背面
|
||||||
|
if (res.validFrom) {
|
||||||
|
this.sf.setValue('/legalPersonIdentityDTO/validStartTime', res.validFrom);
|
||||||
|
}
|
||||||
|
if (res.validTo) {
|
||||||
|
this.sf.setValue('/legalPersonIdentityDTO/validEndTime', res.validTo);
|
||||||
|
this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', false);
|
||||||
|
} else {
|
||||||
|
this.sf.setValue('/legalPersonIdentityDTO/_isLoingDate', true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 企业管理员证件照
|
||||||
|
if (type === 0) {
|
||||||
|
if (isFront === 'front') {
|
||||||
|
// 正面
|
||||||
|
if (res.name) {
|
||||||
|
this.sf.setValue('/name', res.name);
|
||||||
|
}
|
||||||
|
if (res.number) {
|
||||||
|
this.sf.setValue('/certificateNumber', res.number);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
goBack() {
|
||||||
|
window.history.go(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private initBasicInfoSF(): SFSchema {
|
||||||
|
return {
|
||||||
|
properties: {
|
||||||
|
// 合伙人信息
|
||||||
|
adminUserInfo: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
_adminTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
|
adminMobile: {
|
||||||
|
title: ' 手机号',
|
||||||
|
type: 'string',
|
||||||
|
minLength: 1,
|
||||||
|
format: 'mobile',
|
||||||
|
maxLength: 11,
|
||||||
|
ui: {
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
placeholder: '请输入手机号',
|
||||||
|
errors: { required: '请输入手机号', format: '手机号格式错误' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
_adminCertificatePhotoTipsA: {
|
||||||
|
title: '证件照',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom'
|
||||||
|
},
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
certificatePhotoFront: { title: '', type: 'string', ui: { hidden: true } },
|
||||||
|
certificatePhotoBack: { title: '', type: 'string', ui: { hidden: true } },
|
||||||
|
certificatePhotoFrontWatermark: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
...IMAGECONFIG,
|
||||||
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||||
|
change: args => {
|
||||||
|
if (args.type === 'success') {
|
||||||
|
this.sf.setValue('/certificatePhotoFront', args.fileList[0].response.data.fullFilePath);
|
||||||
|
this.checkIdCard(args.fileList[0].response.data.fullFilePath, 'front', 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} as SFUploadWidgetSchema
|
||||||
|
},
|
||||||
|
_adminCertificatePhotoTipsB: {
|
||||||
|
title: '',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
offsetControl: 6
|
||||||
|
}
|
||||||
|
},
|
||||||
|
certificatePhotoBackWatermark: {
|
||||||
|
type: 'string',
|
||||||
|
title: '',
|
||||||
|
ui: {
|
||||||
|
...IMAGECONFIG,
|
||||||
|
descriptionI18n: '图片支持jpg、jpeg、png、gif格式,大小不超过5M',
|
||||||
|
change: args => {
|
||||||
|
if (args.type === 'success') {
|
||||||
|
this.sf.setValue('/certificatePhotoBack', args.fileList[0].response.data.fullFilePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} as SFUploadWidgetSchema
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
title: '姓名',
|
||||||
|
type: 'string',
|
||||||
|
maxLength: 8,
|
||||||
|
ui: {
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
placeholder: '请输入姓名'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
certificateNumber: {
|
||||||
|
title: '身份证号',
|
||||||
|
type: 'string',
|
||||||
|
format: 'id-card',
|
||||||
|
minLength: 1,
|
||||||
|
maxLength: 18,
|
||||||
|
ui: {
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
placeholder: '请输入身份证号'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
operatingStartTime: {
|
||||||
|
title: '身份证有效开始日期',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
...DATECONFIG,
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
errors: {
|
||||||
|
required: '请选择开始日期'
|
||||||
|
}
|
||||||
|
} as SFDateWidgetSchema
|
||||||
|
},
|
||||||
|
operatingEndTime: {
|
||||||
|
title: '身份证有效截止日期',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
...DATECONFIG,
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 20, md: 18 },
|
||||||
|
errors: {
|
||||||
|
required: '请选择截止日期'
|
||||||
|
},
|
||||||
|
change: i => {
|
||||||
|
this.sf?.setValue('/adminUserInfo/_isLoingDate', false);
|
||||||
|
}
|
||||||
|
} as SFDateWidgetSchema
|
||||||
|
},
|
||||||
|
_isLoingDate: {
|
||||||
|
title: '长期',
|
||||||
|
type: 'boolean',
|
||||||
|
ui: {
|
||||||
|
spanLabelFixed: 100,
|
||||||
|
grid: { span: 6 },
|
||||||
|
class: 'input-back',
|
||||||
|
widget: 'checkbox',
|
||||||
|
change: i => this.sf?.setValue('/adminUserInfo/operatingEndTime', null)
|
||||||
|
} as SFCheckboxWidgetSchema
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: ['_adminCertificatePhotoTipsA', 'adminMobile', 'name', 'certificateNumber', 'operatingStartTime']
|
||||||
|
},
|
||||||
|
// 所属城市
|
||||||
|
_addressTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
|
status3: {
|
||||||
|
type: 'string',
|
||||||
|
title: '所属城市',
|
||||||
|
default: ['WAIT_BUYER_PAY', 'TRADE_FINISHED'],
|
||||||
|
ui: {
|
||||||
|
widget: 'tree-select',
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
placeholder: '请选择城市(最多3个)',
|
||||||
|
checkable: true,
|
||||||
|
asyncData: () =>
|
||||||
|
of([
|
||||||
|
{ title: '待支付', key: 'WAIT_BUYER_PAY' },
|
||||||
|
{ title: '已支付', key: 'TRADE_SUCCESS' },
|
||||||
|
{ title: '交易完成', key: 'TRADE_FINISHED' }
|
||||||
|
])
|
||||||
|
} as SFTreeSelectWidgetSchema
|
||||||
|
},
|
||||||
|
// 渠道销售
|
||||||
|
_channelTitle: { title: '', type: 'string', ui: { widget: 'custom' } },
|
||||||
|
channel: {
|
||||||
|
title: '渠道销售邀请码',
|
||||||
|
type: 'string',
|
||||||
|
minLength: 1,
|
||||||
|
maxLength: 100,
|
||||||
|
ui: {
|
||||||
|
grid: { xxl: 13, xl: 18, lg: 24, md: 24 },
|
||||||
|
placeholder: '请输入渠道销售邀请码',
|
||||||
|
errors: {
|
||||||
|
required: '请输入渠道销售邀请码'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
required: [
|
||||||
|
'status3',
|
||||||
|
'channel'
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-02-24 15:07:57
|
* @Date : 2022-02-24 15:07:57
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-02-24 15:23:48
|
* @LastEditTime : 2022-03-11 15:22:36
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-routing.module.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-routing.module.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -37,6 +37,7 @@ import { AddEtpPartnerComponent } from './partner-list/components/add-etp-partne
|
|||||||
import { AddPersonalPartnerComponent } from './partner-list/components/add-personal-partner/add-personal-partner.component';
|
import { AddPersonalPartnerComponent } from './partner-list/components/add-personal-partner/add-personal-partner.component';
|
||||||
import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component';
|
import { PartnerDetailComponent } from './partner-list/components/partner-detail/partner-detail.component';
|
||||||
import { PartnerListComponent } from './partner-list/components/index/partner-list.component';
|
import { PartnerListComponent } from './partner-list/components/index/partner-list.component';
|
||||||
|
import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
@ -72,7 +73,8 @@ const routes: Routes = [
|
|||||||
children: [
|
children: [
|
||||||
{ path: 'particulars', component: ParterRebateManageMentParticularsComponent },
|
{ path: 'particulars', component: ParterRebateManageMentParticularsComponent },
|
||||||
{ path: 'record', component: ParterRebateManageMentRecordComponent },
|
{ path: 'record', component: ParterRebateManageMentRecordComponent },
|
||||||
{ path: 'setting', component: ParterRebateManageMentSettingComponent }
|
{ path: 'setting', component: ParterRebateManageMentSettingComponent },
|
||||||
|
{ path: 'setting/add/:id', component: ParterRebateManageMentAddComponent },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,13 +4,13 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-03-09 14:34:55
|
* @Date : 2022-03-09 14:34:55
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-09 14:56:46
|
* @LastEditTime : 2022-03-11 15:28:01
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner.module.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner.module.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { SharedModule } from '@shared';
|
import { rebateTableModule, SharedModule } from '@shared';
|
||||||
import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
|
import { PartnerAccountManagementAccountDetailComponent } from './account-management/components/account-detail/account-detail.component';
|
||||||
import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component';
|
import { PartnerAccountManagementListComponent } from './account-management/components/list/list.component';
|
||||||
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
|
import { PartnerAccountManagementRecordedDetailComponent } from './account-management/components/recorded-detail/recorded-detail.component';
|
||||||
@ -49,6 +49,7 @@ import { AddPersonalPartnerComponent } from './partner-list/components/add-perso
|
|||||||
import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-management/model/abnormal-feedback/abnormal-feedback.component';
|
import { ParterRebateManageMenAbnormalFeedbackComponent } from './rebate-management/model/abnormal-feedback/abnormal-feedback.component';
|
||||||
import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component';
|
import { PartnerRecordedDetailComponent } from './recorded/components/detail/detail.component';
|
||||||
import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component';
|
import { PartnerRecordedRecordComponent } from './recorded/components/record/record.component';
|
||||||
|
import { ParterRebateManageMentAddComponent } from './rebate-management/components/rebate-setting/add/add.component';
|
||||||
|
|
||||||
const COMPONENTS: any[] = [
|
const COMPONENTS: any[] = [
|
||||||
PartnerBusinessStatisticsIndexComponent,
|
PartnerBusinessStatisticsIndexComponent,
|
||||||
@ -86,13 +87,15 @@ const COMPONENTS: any[] = [
|
|||||||
ParterRebateManageMenAbnormalFeedbackComponent,
|
ParterRebateManageMenAbnormalFeedbackComponent,
|
||||||
ParterRebateManageMentSettingComponent,
|
ParterRebateManageMentSettingComponent,
|
||||||
PartnerAuditModalComponent,
|
PartnerAuditModalComponent,
|
||||||
|
ParterRebateManageMentAddComponent,
|
||||||
AddEtpPartnerComponent,
|
AddEtpPartnerComponent,
|
||||||
AddPersonalPartnerComponent
|
AddPersonalPartnerComponent,
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [...COMPONENTS],
|
declarations: [...COMPONENTS],
|
||||||
imports: [CommonModule, PartnerRoutingModule, SharedModule],
|
imports: [CommonModule, PartnerRoutingModule, SharedModule,rebateTableModule],
|
||||||
providers: [PartnerListService]
|
providers: [PartnerListService]
|
||||||
})
|
})
|
||||||
export class PartnerModule { }
|
export class PartnerModule { }
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
<!--
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-02-24 20:09:49
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-03-11 15:25:00
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\add\\add.component.html
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
-->
|
||||||
|
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||||
|
<nz-card>
|
||||||
|
<!-- 数据列表 -->
|
||||||
|
12121212
|
||||||
|
<app-rebate-table></app-rebate-table>
|
||||||
|
</nz-card>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
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 { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { RebateManagementService } from '../../../services/rebate-management.service';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-parter-channel-rebate-management-add',
|
||||||
|
templateUrl: './add.component.html'
|
||||||
|
})
|
||||||
|
export class ParterRebateManageMentAddComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
public router: Router,
|
||||||
|
public ar: ActivatedRoute,
|
||||||
|
public service: RebateManagementService,
|
||||||
|
private modal: NzModalService,
|
||||||
|
public shipperservice: ShipperBaseService,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,8 +4,8 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2022-02-24 20:09:49
|
* @Date : 2022-02-24 20:09:49
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @LastEditTime : 2022-03-10 15:12:03
|
* @LastEditTime : 2022-03-11 14:45:48
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-record\\rebate-record.component.html
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\rebate-management\\components\\rebate-setting\\rebate-setting.component.html
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
-->
|
-->
|
||||||
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||||
@ -31,6 +31,12 @@
|
|||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<!-- 数据列表 -->
|
<!-- 数据列表 -->
|
||||||
|
<!-- +新增 -->
|
||||||
|
<div class="d-flex justify-content-end mb-sm">
|
||||||
|
<div>
|
||||||
|
<button nz-button nzType="primary" (click)="configAction()">新增</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<st
|
<st
|
||||||
#st
|
#st
|
||||||
[data]="data"
|
[data]="data"
|
||||||
|
|||||||
@ -90,31 +90,35 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
|||||||
this.columns = [
|
this.columns = [
|
||||||
{
|
{
|
||||||
title: '月份',
|
title: '月份',
|
||||||
|
index: '配置名称'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '配置类型',
|
||||||
index: 'name1'
|
index: 'name1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '返佣金额(元)',
|
title: '备注',
|
||||||
index: 'name1'
|
index: 'name1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '合伙人名称',
|
title: '关联合伙人范围',
|
||||||
index: 'name1'
|
index: 'name1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实际等级',
|
title: '创建时间',
|
||||||
index: 'name1'
|
index: 'name1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '管理费比例',
|
title: '启用时间',
|
||||||
index: 'name1'
|
index: 'name1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '返佣时间',
|
title: '优先级',
|
||||||
index: 'name1'
|
index: 'name44'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '异常反馈',
|
title: '状态',
|
||||||
render: 'name44'
|
index: 'name44'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
@ -123,35 +127,34 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
|||||||
className: 'text-left',
|
className: 'text-left',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: '明细',
|
text: '查看',
|
||||||
click: _record => this.viewEvaluate(_record),
|
click: _record => this.viewEvaluate(_record),
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
text: '禁用',
|
||||||
|
click: _record => this.viewEvaluate(_record),
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*查看明细
|
*禁用
|
||||||
*/
|
*/
|
||||||
viewEvaluate(item: any) {
|
viewEvaluate(item: any) {
|
||||||
const modal = this.modal.create({
|
this.modal.confirm({
|
||||||
nzTitle: '明细',
|
nzTitle: '是否禁用该配置?',
|
||||||
nzWidth: 1200,
|
nzOnOk: () => {
|
||||||
nzContent: ParterRebateManageMenRecordDetailComponent,
|
|
||||||
nzComponentParams: { },
|
|
||||||
nzFooter: null
|
|
||||||
});
|
|
||||||
modal.afterClose.subscribe((res: any) => {
|
|
||||||
if (res) {
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*异常反馈
|
*查看
|
||||||
*/
|
*/
|
||||||
feedback(item?: any) {
|
feedback(item?: any) {
|
||||||
const modal = this.modal.create({
|
const modal = this.modal.create({
|
||||||
nzTitle: '异常反馈',
|
nzTitle: '查看',
|
||||||
nzWidth: 580,
|
nzWidth: 580,
|
||||||
nzContent: ParterRebateManageMenAbnormalFeedbackComponent,
|
nzContent: ParterRebateManageMenAbnormalFeedbackComponent,
|
||||||
nzComponentParams: { i: item },
|
nzComponentParams: { i: item },
|
||||||
@ -162,6 +165,9 @@ export class ParterRebateManageMentSettingComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
configAction() {
|
||||||
|
this.router.navigate(['/partner/rebate/setting/add', ''])
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 重置表单
|
* 重置表单
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
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 { STChange, STColumn, STColumnBadge, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
import { STChange, STColumn, STColumnBadge, STComponent, STData, STRequestOptions } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
|
||||||
import { DynamicSettingModalComponent, ShipperBaseService } from '@shared';
|
import { DynamicSettingModalComponent, ShipperBaseService } from '@shared';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component';
|
||||||
@ -116,7 +116,124 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
showRequired: false
|
showRequired: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
lockedStatus: {
|
||||||
|
type: 'string',
|
||||||
|
title: '企业类型',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '物流企业', value: 0 }
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lockedStatus8: {
|
||||||
|
type: 'string',
|
||||||
|
title: '公司所在地',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '物流企业', value: 0 }
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lockedStatus7: {
|
||||||
|
type: 'string',
|
||||||
|
title: '常用服务',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '整车服务', value: 0 },
|
||||||
|
{ label: '大宗服务', value: 1 }
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lockedStatus6: {
|
||||||
|
type: 'string',
|
||||||
|
title: '客户类型',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '直客', value: 0 },
|
||||||
|
{ label: '渠道客户', value: 1 }
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
contactName5: {
|
||||||
|
title: '渠道销售',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
showRequired: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
contactName4: {
|
||||||
|
title: '合伙人',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
showRequired: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
contactName3: {
|
||||||
|
title: '客服人员',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
showRequired: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
contactName2: {
|
||||||
|
title: '审核人',
|
||||||
|
type: 'string',
|
||||||
|
ui: {
|
||||||
|
placeholder: '请输入',
|
||||||
|
showRequired: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
applyDate: {
|
||||||
|
type: 'string',
|
||||||
|
title: '申请时间',
|
||||||
|
ui: {
|
||||||
|
widget: 'sl-from-to',
|
||||||
|
type: 'date',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value,
|
||||||
|
},
|
||||||
|
} as SFDateWidgetSchema,
|
||||||
|
},
|
||||||
|
applyDate1: {
|
||||||
|
type: 'string',
|
||||||
|
title: '审核时间',
|
||||||
|
ui: {
|
||||||
|
widget: 'sl-from-to',
|
||||||
|
type: 'date',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
visibleIf: {
|
||||||
|
_$expand: (value: boolean) => value,
|
||||||
|
},
|
||||||
|
} as SFDateWidgetSchema,
|
||||||
|
},
|
||||||
networkTransporter: {
|
networkTransporter: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '网络货运人',
|
title: '网络货运人',
|
||||||
@ -138,6 +255,22 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
lockedStatus3: {
|
||||||
|
type: 'string',
|
||||||
|
title: '企业状态',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
{ label: '正常', value: 0 },
|
||||||
|
{ label: '冻结', value: 1 }
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
source: {
|
source: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '注册渠道',
|
title: '注册渠道',
|
||||||
@ -155,13 +288,13 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lockedStatus: {
|
source2: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '企业状态',
|
title: '证件是否过期',
|
||||||
enum: [
|
enum: [
|
||||||
{ label: '全部', value: '' },
|
{ label: '全部', value: '' },
|
||||||
{ label: '正常', value: 0 },
|
{ label: '是', value: 1 },
|
||||||
{ label: '冻结', value: 1 }
|
{ label: '否', value: 2 }
|
||||||
],
|
],
|
||||||
default: '',
|
default: '',
|
||||||
ui: {
|
ui: {
|
||||||
@ -170,8 +303,22 @@ export class FreightComponentsListComponent implements OnInit {
|
|||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
source1: {
|
||||||
|
type: 'string',
|
||||||
|
title: '网络货运人',
|
||||||
|
enum: [
|
||||||
|
{ label: '全部', value: '' },
|
||||||
|
],
|
||||||
|
default: '',
|
||||||
|
ui: {
|
||||||
|
widget: 'select',
|
||||||
|
visibleIf: {
|
||||||
|
expand: (value: boolean) => value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.ui = { '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } };
|
this.ui = { '*': { spanLabelFixed: 110, grid: { lg: 8, md: 12, sm: 12, xs: 24 }, enter: () => this.st.load() } };
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,11 +13,11 @@ import { NgModule } from '@angular/core';
|
|||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
||||||
import { NzTableModule } from 'ng-zorro-antd/table';
|
import { NzTableModule } from 'ng-zorro-antd/table';
|
||||||
import { InsuranceTableComponent } from './insurance-table.component';
|
|
||||||
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
||||||
import { NzInputModule } from 'ng-zorro-antd/input';
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
||||||
import { DelonFormModule } from '@delon/form';
|
import { DelonFormModule } from '@delon/form';
|
||||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||||
|
import { InsuranceTableComponent } from './insurance-table.component';
|
||||||
const COMPONENTS = [InsuranceTableComponent];
|
const COMPONENTS = [InsuranceTableComponent];
|
||||||
const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule];
|
const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule];
|
||||||
|
|
||||||
|
|||||||
13
src/app/shared/components/rebate-table/index.ts
Normal file
13
src/app/shared/components/rebate-table/index.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-25 20:20:07
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-01-26 11:05:44
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\index.ts
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
*/
|
||||||
|
export * from './rebate-table.module'
|
||||||
|
export * from './rebate-table.service'
|
||||||
|
export * from './rebate-table.component'
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
<!--
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-25 20:18:52
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-03-11 15:12:01
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
-->
|
||||||
|
<div nz-row>
|
||||||
|
<div nz-col nzSpan="24">
|
||||||
|
<!-- <div class="mb-md ml-xl" style="text-align: right;">
|
||||||
|
<button nz-button nzType="primary" (click)="add()">新增公里数</button>
|
||||||
|
<button class="ml-md" nz-button nzType="primary" (click)="save()">保存</button>
|
||||||
|
</div> -->
|
||||||
|
<div>
|
||||||
|
<sf #sf [schema]="schema" [formData]="sfdata" [button]="'none'" [ui]="ui">
|
||||||
|
<ng-template sf-template="freightPrice" let-i let-ui="ui">
|
||||||
|
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate">
|
||||||
|
<nz-input-number [(ngModel)]="minrebatePrice" [nzMin]="0" ></nz-input-number>
|
||||||
|
</nz-input-group>
|
||||||
|
<ng-template #addOnAfterTemplate>
|
||||||
|
<span >元</span>
|
||||||
|
</ng-template>
|
||||||
|
</ng-template>
|
||||||
|
</sf>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<nz-table #groupingTable [nzData]="data" nzBordered nzSize="small" [nzFrontPagination]="false"
|
||||||
|
[nzScroll]="{ x: '900px' }" [nzShowPagination]="false" class="ml-xl" style="max-width: 1200px;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2" nzWidth="250px" nzAlign="center" nzLeft>险种</th>
|
||||||
|
<th nzWidth="220px" nzAlign="center" >普货-基本险</th>
|
||||||
|
<th nzWidth="220px" nzAlign="center" >普货-综合险</th>
|
||||||
|
<th rowspan="2" nzWidth="60px" nzAlign="center" nzRight>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr *ngFor="let item of groupingTable.data;let i = index">
|
||||||
|
<td nzWidth="250px" nzAlign="center" nzLeft>
|
||||||
|
<div style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
|
<div >
|
||||||
|
公里数(km)
|
||||||
|
</div>
|
||||||
|
<div style="color:#f0f0f0;">|</div>
|
||||||
|
<div >
|
||||||
|
<label style="width: 65px;text-align: right;"> {{item.startKm}}</label>
|
||||||
|
<label>-</label>
|
||||||
|
|
||||||
|
<nz-input-number [ngModel]="item.endKm" (ngModelChange)="changeEndKm($event,i)" [nzMin]="0"
|
||||||
|
[nzFormatter]="formatterDollar" nzSize="small">
|
||||||
|
</nz-input-number>(含)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td nzWidth="220px" nzAlign="center" >
|
||||||
|
<div style=" margin-left: 26%">
|
||||||
|
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate2">
|
||||||
|
<nz-input-number [(ngModel)]="item.baserebateRate" [nzMin]="0" nzSize="small"
|
||||||
|
>
|
||||||
|
</nz-input-number>
|
||||||
|
</nz-input-group>
|
||||||
|
<ng-template #addOnAfterTemplate2>
|
||||||
|
<span >%</span>
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td nzWidth="220px" nzAlign="center" >
|
||||||
|
<div style=" margin-left: 26%">
|
||||||
|
<nz-input-group [nzAddOnAfter]="addOnAfterTemplate2">
|
||||||
|
<nz-input-number [(ngModel)]="item.blanketrebateRate" [nzMin]="0" nzSize="small" >
|
||||||
|
</nz-input-number>
|
||||||
|
</nz-input-group>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td nzWidth="60px" nzAlign="center" nzRight>
|
||||||
|
<a *ngIf="i === groupingTable.data.length-1 && groupingTable.data.length>1"
|
||||||
|
nz-popconfirm
|
||||||
|
nzPopconfirmTitle="是否确认删除?" (nzOnConfirm)="deleteRow(i)"
|
||||||
|
>删除</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</nz-table>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
:host::ng-deep {
|
||||||
|
nz-input-number {
|
||||||
|
width: 85px;
|
||||||
|
|
||||||
|
input {
|
||||||
|
width : 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-number-handler-wrap {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.ant-input-group {
|
||||||
|
display: -webkit-inline-box !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
195
src/app/shared/components/rebate-table/rebate-table.component.ts
Normal file
195
src/app/shared/components/rebate-table/rebate-table.component.ts
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
import { debounceTime } from 'rxjs/operators';
|
||||||
|
import { Subject } from 'rxjs';
|
||||||
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, ViewChild } from '@angular/core';
|
||||||
|
import { BaseService } from '@shared';
|
||||||
|
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-rebate-table',
|
||||||
|
templateUrl: './rebate-table.component.html',
|
||||||
|
styleUrls: ['./rebate-table.component.less']
|
||||||
|
})
|
||||||
|
export class RebateTableComponent implements OnInit {
|
||||||
|
data: any[] = [];
|
||||||
|
headers: any[] = [];
|
||||||
|
sfdata: any; // 货源单设置回显
|
||||||
|
|
||||||
|
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||||
|
schema: SFSchema = {};
|
||||||
|
ui!: SFUISchema;
|
||||||
|
|
||||||
|
formatterDollar = (value: number): string => `${value}`;
|
||||||
|
minrebatePrice: number = 0;
|
||||||
|
changeSub = new Subject<string>();
|
||||||
|
constructor(public service: BaseService, private cdr: ChangeDetectorRef) {}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
this.loadData();
|
||||||
|
this.initSF()
|
||||||
|
this.changeEndKmAction();
|
||||||
|
this.minrebatePrice = 1000
|
||||||
|
}
|
||||||
|
|
||||||
|
loadData() {
|
||||||
|
this.service.request('/api/mdc/cuc/rebateConfig/list').subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
console.log(res);
|
||||||
|
this.data = res;
|
||||||
|
this.cdr.detectChanges();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.service.request('/api/mdc/pbc/sysConfigItem/findItemValueByItemKeys', [
|
||||||
|
"rebate.config.minrebatePrice"
|
||||||
|
]).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
console.log(res);
|
||||||
|
this.minrebatePrice = Number(res[0].itemValue)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initSF() {
|
||||||
|
this.schema = {
|
||||||
|
properties: {
|
||||||
|
freightPrice: {
|
||||||
|
type: 'string',
|
||||||
|
title: '单票投保最低保费',
|
||||||
|
ui: {
|
||||||
|
widget: 'custom',
|
||||||
|
placeholder: '请输入',
|
||||||
|
errors: { required: '请填写' }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: ['freightPrice']
|
||||||
|
};
|
||||||
|
this.ui = {
|
||||||
|
'*': {
|
||||||
|
spanLabelFixed: 160,
|
||||||
|
grid: { span: 24 }
|
||||||
|
},
|
||||||
|
$freightPrice: {
|
||||||
|
grid: { span: 8 }
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 修改结束车长
|
||||||
|
* @param event 车长
|
||||||
|
* @param i 下标
|
||||||
|
*/
|
||||||
|
changeEndLength(event: any, i: number) {
|
||||||
|
if (event <= this.headers[i].startLength) {
|
||||||
|
this.headers[i].endLength = this.headers[i].startLength + 1;
|
||||||
|
this.changeNextStartLength(event, i + 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.headers[i].endLength = event;
|
||||||
|
this.changeNextStartLength(event, i + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改结束公里数
|
||||||
|
* @param event 车长
|
||||||
|
* @param i 下标
|
||||||
|
*/
|
||||||
|
changeEndKm(event: any, i: number) {
|
||||||
|
if (event) {
|
||||||
|
console.log(event);
|
||||||
|
|
||||||
|
this.changeSub.next(`${event},${i}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
changeEndKmAction() {
|
||||||
|
this.changeSub.pipe(debounceTime(500)).subscribe((res: string) => {
|
||||||
|
if (res) {
|
||||||
|
const paras = res.split(',');
|
||||||
|
const num = Number(paras[0]);
|
||||||
|
const i = Number(paras[1]);
|
||||||
|
|
||||||
|
if (num <= this.data[i].startKm) {
|
||||||
|
this.data[i].endKm = null;
|
||||||
|
setTimeout(() => {
|
||||||
|
this.data[i].endKm = this.data[i].startKm + 1 ;
|
||||||
|
}, 0);
|
||||||
|
this.changeNextStartKm(this.data[i].startKm + 1, i + 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.data[i].endKm = num;
|
||||||
|
this.changeNextStartKm(num, i + 1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
add() {
|
||||||
|
console.log(this.data);
|
||||||
|
|
||||||
|
const tem = this.data[this.data?.length - 1];
|
||||||
|
if (tem && tem.endKm) {
|
||||||
|
this.data.push({
|
||||||
|
endKm: '',
|
||||||
|
startKm: tem.endKm
|
||||||
|
});
|
||||||
|
this.data = [...this.data];
|
||||||
|
} else {
|
||||||
|
this.service.msgSrv.warning('请填写完整公里数');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteRow(index: number) {
|
||||||
|
console.log(index);
|
||||||
|
var newArr = this.data.concat();
|
||||||
|
newArr.splice(this.data.length-1,1)
|
||||||
|
// this.data = this.data.pop()
|
||||||
|
console.log(newArr);
|
||||||
|
this.data = [...newArr];
|
||||||
|
}
|
||||||
|
|
||||||
|
save() {
|
||||||
|
if(!this.minrebatePrice) {
|
||||||
|
this.service.msgSrv.error('必填项为空!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let params= {
|
||||||
|
minrebatePrice: this.minrebatePrice,
|
||||||
|
rebateConfigDTOS: this.data
|
||||||
|
}
|
||||||
|
console.log(params);
|
||||||
|
this.service.request('/api/mdc/cuc/rebateConfig/saveBatch', params).subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
console.log(res);
|
||||||
|
this.service.msgSrv.success('修改成功');
|
||||||
|
this.loadData();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 遍历同步后置位车长
|
||||||
|
* @param event 车长
|
||||||
|
* @param i 下标
|
||||||
|
*/
|
||||||
|
private changeNextStartLength(event: number, i: number) {
|
||||||
|
if (this.headers[i]) {
|
||||||
|
this.headers[i].startLength = event;
|
||||||
|
if (this.headers[i].endLength <= event) {
|
||||||
|
this.headers[i].endLength = this.headers[i].startLength + 0.5;
|
||||||
|
this.changeNextStartLength(event + 0.5, i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 遍历同步后置位公里数
|
||||||
|
* @param event 车长
|
||||||
|
* @param i 下标
|
||||||
|
*/
|
||||||
|
private changeNextStartKm(event: number, i: number) {
|
||||||
|
if (this.data[i]) {
|
||||||
|
this.data[i].startKm = event;
|
||||||
|
if (this.data[i].endKm <= event) {
|
||||||
|
this.data[i].endKm = this.data[i].startKm + 1;
|
||||||
|
this.changeNextStartKm(event + 1, i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-25 20:23:54
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-02-11 17:20:49
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.module.ts
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
*/
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
||||||
|
import { NzTableModule } from 'ng-zorro-antd/table';
|
||||||
|
import { RebateTableComponent } from './rebate-table.component';
|
||||||
|
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
||||||
|
import { NzInputModule } from 'ng-zorro-antd/input';
|
||||||
|
import { DelonFormModule } from '@delon/form';
|
||||||
|
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||||
|
const COMPONENTS = [RebateTableComponent];
|
||||||
|
const MODULES = [NzTableModule, NzInputNumberModule, NzPopconfirmModule, NzInputModule, NzButtonModule, DelonFormModule];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: COMPONENTS,
|
||||||
|
imports: [CommonModule, FormsModule, ...MODULES],
|
||||||
|
exports: COMPONENTS
|
||||||
|
})
|
||||||
|
export class rebateTableModule {}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* @Description :
|
||||||
|
* @Version : 1.0
|
||||||
|
* @Author : Shiming
|
||||||
|
* @Date : 2022-01-25 20:21:04
|
||||||
|
* @LastEditors : Shiming
|
||||||
|
* @LastEditTime : 2022-01-25 20:35:52
|
||||||
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\insurance-table\\insurance-table.service.ts
|
||||||
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
|
*/
|
||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Injectable({ providedIn: 'root' })
|
||||||
|
|
||||||
|
export class RebateService {
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: your name
|
* @Author: your name
|
||||||
* @Date: 2021-11-29 10:04:12
|
* @Date: 2021-11-29 10:04:12
|
||||||
* @LastEditTime : 2022-02-11 14:31:22
|
* @LastEditTime : 2022-03-11 15:12:20
|
||||||
* @LastEditors : Shiming
|
* @LastEditors : Shiming
|
||||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\index.ts
|
* @FilePath : \\tms-obc-web\\src\\app\\shared\\index.ts
|
||||||
@ -21,6 +21,7 @@ export * from './components/dict-select/index';
|
|||||||
export * from './components/dynamic-setting';
|
export * from './components/dynamic-setting';
|
||||||
export * from './components/singlepage-setting';
|
export * from './components/singlepage-setting';
|
||||||
export * from './components/insurance-table/index';
|
export * from './components/insurance-table/index';
|
||||||
|
export * from './components/rebate-table/index';
|
||||||
|
|
||||||
// Utils
|
// Utils
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
|
|||||||
@ -592,6 +592,20 @@
|
|||||||
"text": "入账详情",
|
"text": "入账详情",
|
||||||
"link": "/partner/recorded/record/:id",
|
"link": "/partner/recorded/record/:id",
|
||||||
"hide": true
|
"hide": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "轮播图管理",
|
||||||
|
"link": "/partner/scroll-img/list",
|
||||||
|
"hide": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "知识库管理",
|
||||||
|
"icon": "iconfont icon-yundan-copy",
|
||||||
|
"group": true,
|
||||||
|
"children": [{
|
||||||
|
"text": "banner管理",
|
||||||
|
"link": "/knowledge/banner"
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user