|
|
@@ -81,7 +81,8 @@
|
|
|
<el-form-item
|
|
|
label="Points Value:"
|
|
|
prop="purchasePoints"
|
|
|
- class="flex1">
|
|
|
+ class="flex1"
|
|
|
+ v-if="form.redemptionMethod != 'Manual Issue'">
|
|
|
<el-input
|
|
|
class="add-text"
|
|
|
v-model="form.purchasePoints"
|
|
|
@@ -90,6 +91,14 @@
|
|
|
max="999999"
|
|
|
maxlength="6"/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="Points Value:"
|
|
|
+ class="flex1"
|
|
|
+ v-else>
|
|
|
+ <el-input
|
|
|
+ class="add-text"
|
|
|
+ disabled/>
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
|
<div class="flexr">
|
|
|
<el-form-item
|
|
|
@@ -283,6 +292,7 @@
|
|
|
import api from '../../http/api/voucher.js';
|
|
|
import site from '../../http/api/site'
|
|
|
import settings from '../../settings.js'
|
|
|
+import apiBase from '@/api/apiBase.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -370,6 +380,11 @@ export default {
|
|
|
trigger: "change",
|
|
|
message: "Please select country"
|
|
|
},
|
|
|
+ chargeType: {
|
|
|
+ required: true,
|
|
|
+ trigger: "change",
|
|
|
+ message: "Please select charge type"
|
|
|
+ },
|
|
|
sitePks: {
|
|
|
required: true,
|
|
|
trigger: "change",
|
|
|
@@ -447,6 +462,7 @@ export default {
|
|
|
this.options.country = []
|
|
|
}).finally(() => {
|
|
|
this.getWeekOptions();
|
|
|
+ this.getChargeTypeOptions();
|
|
|
this.getRedemTypeOptions();
|
|
|
this.getVoucherTypeOptions();
|
|
|
this.getAllSite();
|
|
|
@@ -519,7 +535,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getChargeTypeOptions() {
|
|
|
- site.getChargeTypeList().then(res => {
|
|
|
+ apiBase.getChargerTypeOptions().then(res => {
|
|
|
if (res.data) {
|
|
|
this.options.charge = res.data
|
|
|
} else {
|
|
|
@@ -606,6 +622,9 @@ export default {
|
|
|
this.form.timePeriodStart = this.form.timePeriod[0]
|
|
|
this.form.timePeriodEnd = this.form.timePeriod[1]
|
|
|
}
|
|
|
+ if (this.form.redemptionMethod == 'Manual Issue') {
|
|
|
+ this.form.purchasePoints = "";
|
|
|
+ }
|
|
|
this.isEdit ? this.updateVoucher() : this.createVoucher();
|
|
|
}
|
|
|
});
|