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