Merge remote-tracking branch 'origin/master'

master
袁野 1 year ago
commit d5fad21c6c
  1. 1
      src/app/admin/config-manage/third-product/third-product.component.html
  2. 39
      src/app/admin/system/oils-discount/oils-discount.component.html
  3. 35
      src/app/admin/system/oils-discount/oils-discount.component.ts

@ -99,6 +99,7 @@
<nz-option nzLabel="优惠券包" [nzValue]="7"></nz-option> <nz-option nzLabel="优惠券包" [nzValue]="7"></nz-option>
<nz-option nzLabel="汇联通充值" [nzValue]="8"></nz-option> <nz-option nzLabel="汇联通充值" [nzValue]="8"></nz-option>
<nz-option nzLabel="实物商品" [nzValue]="10"></nz-option> <nz-option nzLabel="实物商品" [nzValue]="10"></nz-option>
<nz-option nzLabel="个人油卡充值" [nzValue]="16"></nz-option>
<nz-option nzLabel="团购套餐" [nzValue]="17"></nz-option> <nz-option nzLabel="团购套餐" [nzValue]="17"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>

@ -32,6 +32,7 @@
<span>共计 {{total}} 条数据</span> <span>共计 {{total}} 条数据</span>
<div class="operating-button"> <div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="showTripartitePlatformModal()" >渠道支付配置</button> <button nz-button nzType="primary" class="right-btn" (click)="showTripartitePlatformModal()" >渠道支付配置</button>
<button nz-button nzType="primary" class="right-btn" (click)="showConfigOilCard()" >油卡充值配置</button>
<button nz-button nzType="primary" class="right-btn" (click)="getAdd()" >添加油品优惠</button> <button nz-button nzType="primary" class="right-btn" (click)="getAdd()" >添加油品优惠</button>
</div> </div>
<nz-table <nz-table
@ -181,20 +182,24 @@
</form> </form>
</nz-modal> </nz-modal>
<!-- <nz-modal [(nzVisible)]="configOilCardRechargeModal" nzTitle="油卡充值配置" (nzOnCancel)="closeConfigOilCard()" (nzOnOk)="submitConfigOilCard()"
<nz-modal [(nzVisible)]="configOilMerNumModal" nzTitle="配置商户号" (nzOnCancel)="closeConfigOilMerNum()" (nzOnOk)="submitConfigOilMerNum()"> [nzBodyStyle]="{ padding: '0px 20px 0px'}" >
<form nz-form [formGroup]="configOilMerNumForm"> <nz-tabset>
<div nz-row> <nz-tab nzTitle="充值赠送比例">
<div nz-col [nzSpan]="22"> <form nz-form [formGroup]="configOilCardRechargeForm">
<nz-form-item> <div nz-row>
<nz-form-label nzRequired>商户号</nz-form-label> <div nz-col [nzSpan]="22">
<nz-form-control> <nz-form-item>
<nz-input-group> <nz-form-label nzRequired>赠送比例</nz-form-label>
<input nz-input formControlName="codeValue" [placeholder]="'加油站订单入账商户号'" /> <nz-form-control>
</nz-input-group> <nz-input-group nzAddOnAfter="%">
</nz-form-control> <nz-input-number [nzPrecision]="2" [nzMax]="500" [nzMin]="0" formControlName="codeValue"></nz-input-number>
</nz-form-item> </nz-input-group>
</div> </nz-form-control>
</div> </nz-form-item>
</form> </div>
</nz-modal>--> </div>
</form>
</nz-tab>
</nz-tabset>
</nz-modal>

@ -27,8 +27,8 @@ export class OilsDiscountComponent implements OnInit {
roleTypeArray; roleTypeArray;
gasChannelConfigChannelArray = []; gasChannelConfigChannelArray = [];
configOilMerNumModal = false; configOilCardRechargeModal = false;
configOilMerNumForm: FormGroup; configOilCardRechargeForm: FormGroup;
channelId = '1'; channelId = '1';
tripartitePlatformModal = false; tripartitePlatformModal = false;
@ -66,8 +66,8 @@ export class OilsDiscountComponent implements OnInit {
priceRate: [null], priceRate: [null],
}); });
this.configOilMerNumForm = this.form.group({ this.configOilCardRechargeForm = this.form.group({
codeType: ['OIL_WX_MER'], codeType: ['OIL_CARD_RECHARGE_RATIO'],
codeValue: [null, [Validators.required]], codeValue: [null, [Validators.required]],
}); });
@ -149,23 +149,23 @@ export class OilsDiscountComponent implements OnInit {
this.isVisible = false; this.isVisible = false;
} }
showConfigOilMerNum() { showConfigOilCard() {
this.common.mappingSysNameOl('OIL_WX_MER', data => { this.common.mappingSysNameOl('OIL_CARD_RECHARGE_RATIO', data => {
this.configOilMerNumForm.patchValue(data['return_data']); this.configOilCardRechargeForm.patchValue(data['return_data']);
}); });
this.configOilMerNumModal = true; this.configOilCardRechargeModal = true;
} }
closeConfigOilMerNum() { closeConfigOilCard() {
this.configOilMerNumModal = false; this.configOilCardRechargeModal = false;
} }
submitConfigOilMerNum() { submitConfigOilCard() {
for (const i in this.configOilMerNumForm.controls) { for (const i in this.configOilCardRechargeForm.controls) {
this.configOilMerNumForm.controls[i].markAsDirty(); this.configOilCardRechargeForm.controls[i].markAsDirty();
this.configOilMerNumForm.controls[i].updateValueAndValidity(); this.configOilCardRechargeForm.controls[i].updateValueAndValidity();
} }
if (this.configOilMerNumForm.status == null || this.configOilMerNumForm.status !== 'VALID') { if (this.configOilCardRechargeForm.status == null || this.configOilCardRechargeForm.status !== 'VALID') {
this.modal.warning({ this.modal.warning({
nzTitle: '提示', nzTitle: '提示',
nzContent: '请填写所有必填项', nzContent: '请填写所有必填项',
@ -173,13 +173,13 @@ export class OilsDiscountComponent implements OnInit {
return; return;
} }
this.common.editConfig(this.configOilMerNumForm.value, data => { this.common.editConfig(this.configOilCardRechargeForm.value, data => {
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
this.modal.success({ this.modal.success({
nzTitle: '提示', nzTitle: '提示',
nzContent: '操作成功', nzContent: '操作成功',
}); });
this.closeConfigOilMerNum(); this.closeConfigOilCard();
} else { } else {
this.modal.error({ this.modal.error({
nzTitle: '提示', nzTitle: '提示',
@ -189,6 +189,7 @@ export class OilsDiscountComponent implements OnInit {
}); });
} }
// 打开配置第三方模态框 // 打开配置第三方模态框
showTripartitePlatformModal () { showTripartitePlatformModal () {
this.selectChannel(this.channelId); this.selectChannel(this.channelId);

Loading…
Cancel
Save