This commit is contained in:
cun-nan 2024-09-03 11:07:47 +08:00
parent 553639e4b6
commit 8bd63ea9f3

View File

@ -45,11 +45,8 @@
{{ item }}
</div>
<el-select v-model="ruleForm.dieselUserLevel" multiple clearable placeholder="请选择油品油号(多选)">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
:value="item.id.toString()"
:key="index"></el-option>
<el-option v-for="(item,index) in oilNumberList" :key="index"
:label="getOilNamess(oilNameList,item.oilName)" :value="item.oilName"></el-option>
</el-select>
</div>
</el-form-item>
@ -155,6 +152,7 @@ import {
} from "@/api/EventMarketing/activeFullminus";
import {listCardCoupon} from "@/api/EventMarketing/cardCoupon";
import {listUserGrade} from "@/api/staff/user/usergrade";
import {getOilNameList, oilNumberList} from "@/api/order/oilnumgun";
export default {
name: "ActiveNewlyweds",
@ -248,6 +246,9 @@ export default {
//
cardCouponList:[],
userGradeList: [],
oilNameList: [],
//
oilNumberList: [],
//
rules: {
name: [
@ -270,11 +271,31 @@ export default {
},
created() {
// this.getList()
// this.getInfo()
this.getInfo()
this.getCardCoupon()
this.listUserGrade()
this.getOilList()
},
methods: {
getOilList(){
getOilNameList().then(response => {
this.oilNameList = response.data;
})
oilNumberList().then(response => {
this.oilNumberList = response.data.records;
})
},
getOilNamess(list, id) {
let name = ""
if (list != null && list != "") {
list.forEach(item => {
if (item.id == id) {
name = item.oilName;
}
})
}
return name;
},
Typeindex4(index) {
this.tindex4 = index
},
@ -294,12 +315,14 @@ export default {
getInfoActiveNewlyweds().then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
if (res.data.couponList) this.couponList = res.data.couponList
}else {
this.ruleForm = {
activeTimeType:0,
paymentType:[],
courtesyReward:[]
}
this.tindex1 = 0