diff --git a/src/app/admin/merchant-store/store-edit/store-edit.component.scss b/src/app/admin/merchant-store/store-edit/store-edit.component.scss
index 800400d..f8e0222 100644
--- a/src/app/admin/merchant-store/store-edit/store-edit.component.scss
+++ b/src/app/admin/merchant-store/store-edit/store-edit.component.scss
@@ -5,3 +5,7 @@ button {
background-color: #ffffff;
}
#container {width:800px; height: 500px; }
+
+nz-input-number {
+ width: 100%;
+}
diff --git a/src/app/admin/merchant-store/store-edit/store-edit.component.ts b/src/app/admin/merchant-store/store-edit/store-edit.component.ts
index 32b53e4..b1404f2 100644
--- a/src/app/admin/merchant-store/store-edit/store-edit.component.ts
+++ b/src/app/admin/merchant-store/store-edit/store-edit.component.ts
@@ -109,11 +109,10 @@ export class StoreEditComponent implements OnInit {
return;
}
}
- if (this.logoFile.length !== 0) {
- if (this.logoFile[0]['response'] != null) {
- this.validateForm.value.storeLogo = this.logoFile[0]['response']['return_data'][0];
- } else {
- this.validateForm.value.storeLogo = this.logoFile[0].name;
+ if (this.validateForm.value.prestoreType === '0') {
+ if (this.validateForm.value.splitAccountNo == null || this.validateForm.value.splitRate == null) {
+ this.message.error('必填项不能为空');
+ return;
}
}
if (this.editFlag) {
@@ -145,6 +144,7 @@ export class StoreEditComponent implements OnInit {
console.log(data);
data['return_data']['brandId'] = String(data['return_data']['brandId']);
data['return_data']['type'] = String(data['return_data']['type']);
+ data['return_data']['prestoreType'] = String(data['return_data']['prestoreType']);
if (data['return_data']['storeLogo'] != null && data['return_data']['storeLogo'] !== '') {
const logo = String(data['return_data']['storeLogo']);
const logoArray = [];
diff --git a/src/app/admin/merchant/merchant-list/merchant-list.component.html b/src/app/admin/merchant/merchant-list/merchant-list.component.html
index 706d723..a49b999 100644
--- a/src/app/admin/merchant/merchant-list/merchant-list.component.html
+++ b/src/app/admin/merchant/merchant-list/merchant-list.component.html
@@ -80,7 +80,7 @@
@@ -124,6 +126,54 @@
+
+
+
+
diff --git a/src/app/admin/merchant/merchant-list/merchant-list.component.scss b/src/app/admin/merchant/merchant-list/merchant-list.component.scss
index 8bee3fb..0325db1 100644
--- a/src/app/admin/merchant/merchant-list/merchant-list.component.scss
+++ b/src/app/admin/merchant/merchant-list/merchant-list.component.scss
@@ -2,3 +2,6 @@
height: 60px;
width: 60px;
}
+nz-input-number {
+ width: 100%;
+}
diff --git a/src/app/admin/merchant/merchant-list/merchant-list.component.ts b/src/app/admin/merchant/merchant-list/merchant-list.component.ts
index 3737264..e7f8f2b 100644
--- a/src/app/admin/merchant/merchant-list/merchant-list.component.ts
+++ b/src/app/admin/merchant/merchant-list/merchant-list.component.ts
@@ -6,7 +6,8 @@ import {CommonsService} from '../../../services/commons.service';
import {MerchantService} from '../../../services/merchant.service';
import {Router} from '@angular/router';
import {environment} from '../../../../environments/environment';
-import {MerAmountService} from "../../../services/mer-amount.service";
+import {MerAmountService} from '../../../services/mer-amount.service';
+import {MerchantTripartitePlatformService} from '../../../services/merchant-tripartite-platform.service';
@Component({
selector: 'app-merchant-list',
@@ -25,12 +26,16 @@ export class MerchantListComponent implements OnInit {
rechargeModal = false;
rechargeForm: FormGroup; // 充值模态框
+ tripartitePlatformModal = false;
+ tripartitePlatformForm: FormGroup; // 充值模态框
+
constructor(
private form: FormBuilder,
private merchant: MerchantService,
private iconService: IconService,
private message: NzMessageService,
private merAmountService: MerAmountService,
+ private tripartitePlatformService: MerchantTripartitePlatformService,
private router: Router,
private common: CommonsService,
private modal: NzModalService,
@@ -53,6 +58,15 @@ export class MerchantListComponent implements OnInit {
merId: [null],
amount: [null, [Validators.required]],
});
+
+ this.tripartitePlatformForm = this.form.group({
+ merId: [null],
+ platformType: ['1', [Validators.required]],
+ platformMerName: [null, [Validators.required]],
+ platformMerNumber: [null, [Validators.required]],
+ profitSharingStatus: ['false', [Validators.required]],
+ profitSharingRatio: [null],
+ });
this.getRequest(true, this.searchForm.value);
}
@@ -145,7 +159,7 @@ export class MerchantListComponent implements OnInit {
showRechargeModal(merId: number) {
- this.rechargeForm.patchValue({ merId: merId});
+ this.rechargeForm.patchValue({ merId});
this.rechargeModal = true;
}
@@ -182,5 +196,52 @@ export class MerchantListComponent implements OnInit {
});
}
+
+ showTripartitePlatformModal(merId: number) {
+ this.tripartitePlatformService.getDetail(merId, 1, data => {
+ if (data['return_data'] != null) {
+ data['return_data']['platformType'] = String(data['return_data']['platformType']);
+ data['return_data']['profitSharingStatus'] = String(data['return_data']['profitSharingStatus']);
+ this.tripartitePlatformForm.patchValue(data['return_data']);
+ } else {
+ this.tripartitePlatformForm.patchValue( { merId: merId, platformType: '1', profitSharingStatus: 'false' });
+ }
+ });
+ this.tripartitePlatformModal = true;
+ }
+
+ closeTripartitePlatformModal() {
+ this.tripartitePlatformForm.reset();
+ this.tripartitePlatformModal = false;
+ }
+
+ submitTripartitePlatform() {
+ for (const i in this.tripartitePlatformForm.controls) {
+ this.tripartitePlatformForm.controls[i].markAsDirty();
+ this.tripartitePlatformForm.controls[i].updateValueAndValidity();
+ }
+ if (this.tripartitePlatformForm.status == null || this.tripartitePlatformForm.status !== 'VALID') {
+ this.modal.warning({
+ nzTitle: '提示',
+ nzContent: '请填写所有必填项',
+ });
+ return;
+ }
+ this.tripartitePlatformService.editTripartitePlatform(this.tripartitePlatformForm.value, data => {
+ if (data['return_code'] === '000000') {
+ this.modal.success({
+ nzTitle: '提示',
+ nzContent: '保存成功',
+ });
+ this.closeTripartitePlatformModal();
+ } else {
+ this.modal.error({
+ nzTitle: '提示',
+ nzContent: data['return_msg'],
+ });
+ }
+ });
+ }
+
}
diff --git a/src/app/admin/order/oil-station-order/oil-station-order.component.html b/src/app/admin/order/oil-station-order/oil-station-order.component.html
index 7686ff5..56e9a80 100644
--- a/src/app/admin/order/oil-station-order/oil-station-order.component.html
+++ b/src/app/admin/order/oil-station-order/oil-station-order.component.html
@@ -6,6 +6,16 @@