|
@@ -241,10 +241,10 @@
|
|
|
multiple
|
|
multiple
|
|
|
clearable>
|
|
clearable>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="(item, index) in options.days"
|
|
|
|
|
|
|
+ v-for="(item, index) in options.weeks"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
- :label="item"
|
|
|
|
|
- :value="item"/>
|
|
|
|
|
|
|
+ :label="item.key"
|
|
|
|
|
+ :value="item.value"/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
@@ -316,6 +316,7 @@ export default {
|
|
|
days: [],
|
|
days: [],
|
|
|
site: [],
|
|
site: [],
|
|
|
type: [],
|
|
type: [],
|
|
|
|
|
+ weeks: [],
|
|
|
charge: ["AC", "DC"],
|
|
charge: ["AC", "DC"],
|
|
|
redemp: [],
|
|
redemp: [],
|
|
|
country: []
|
|
country: []
|
|
@@ -424,10 +425,10 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
getCountryOptions() {
|
|
getCountryOptions() {
|
|
|
- this.options.days = [];
|
|
|
|
|
|
|
+ /*this.options.days = [];
|
|
|
for (let i = 1; i <= 31; i++) {
|
|
for (let i = 1; i <= 31; i++) {
|
|
|
this.options.days.push(i);
|
|
this.options.days.push(i);
|
|
|
- }
|
|
|
|
|
|
|
+ }*/
|
|
|
site.getCountryList().then(res => {
|
|
site.getCountryList().then(res => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|
|
|
this.options.country = res.data
|
|
this.options.country = res.data
|
|
@@ -442,11 +443,28 @@ export default {
|
|
|
})
|
|
})
|
|
|
this.options.country = []
|
|
this.options.country = []
|
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
|
|
|
+ this.getWeekOptions();
|
|
|
this.getRedemTypeOptions();
|
|
this.getRedemTypeOptions();
|
|
|
this.getVoucherTypeOptions();
|
|
this.getVoucherTypeOptions();
|
|
|
this.getAllSite();
|
|
this.getAllSite();
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ getWeekOptions() {
|
|
|
|
|
+ api.getWeekOptions().then(res => {
|
|
|
|
|
+ if (res.data) {
|
|
|
|
|
+ this.options.weeks = res.data
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.options.weeks = []
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ message: err,
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ })
|
|
|
|
|
+ this.options.weeks = []
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
getRedemTypeOptions() {
|
|
getRedemTypeOptions() {
|
|
|
api.getRedemMethodOptions().then(res => {
|
|
api.getRedemMethodOptions().then(res => {
|
|
|
if (res.data) {
|
|
if (res.data) {
|