修改积分商品回显问题
parent
83f145767e
commit
c86d863f1d
|
@ -33,11 +33,7 @@
|
||||||
<Select
|
<Select
|
||||||
v-model="form.pointsGoodsCategoryId"
|
v-model="form.pointsGoodsCategoryId"
|
||||||
:label-in-value="true"
|
:label-in-value="true"
|
||||||
@on-change="
|
@on-change="changeCategory"
|
||||||
(val) => {
|
|
||||||
changeCategory(val, index);
|
|
||||||
}
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<Option v-for="item in categoryList" :value="item.id" :key="item.id">{{
|
<Option v-for="item in categoryList" :value="item.id" :key="item.id">{{
|
||||||
item.name
|
item.name
|
||||||
|
@ -97,7 +93,10 @@ export default {
|
||||||
name: "editPointsGoods",
|
name: "editPointsGoods",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
pointsGoodsCategoryId:'',
|
||||||
|
pointsGoodsCategoryName:'',
|
||||||
form: {
|
form: {
|
||||||
|
|
||||||
/** 活动名称 */
|
/** 活动名称 */
|
||||||
promotionName: "",
|
promotionName: "",
|
||||||
/** 报名截止时间 */
|
/** 报名截止时间 */
|
||||||
|
@ -110,6 +109,7 @@ export default {
|
||||||
seckillRule: "",
|
seckillRule: "",
|
||||||
goodsSku: {},
|
goodsSku: {},
|
||||||
promotionStatus: "NEW",
|
promotionStatus: "NEW",
|
||||||
|
|
||||||
},
|
},
|
||||||
categoryList: [], // 分类列表
|
categoryList: [], // 分类列表
|
||||||
id: this.$route.query.id, // 活动id
|
id: this.$route.query.id, // 活动id
|
||||||
|
@ -134,6 +134,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 分类
|
||||||
|
changeCategory(v){
|
||||||
|
console.log(v);
|
||||||
|
this.pointsGoodsCategoryId=v.value
|
||||||
|
this.pointsGoodsCategoryName=v.label
|
||||||
|
},
|
||||||
// 关闭当前页面
|
// 关闭当前页面
|
||||||
closeCurrentPage() {
|
closeCurrentPage() {
|
||||||
this.$store.commit("removeTag", "edit-points-goods");
|
this.$store.commit("removeTag", "edit-points-goods");
|
||||||
|
@ -167,7 +173,12 @@ export default {
|
||||||
this.form.startTime = start;
|
this.form.startTime = start;
|
||||||
this.form.endTime = end;
|
this.form.endTime = end;
|
||||||
this.submitLoading = true;
|
this.submitLoading = true;
|
||||||
updatePointsGoods(this.form).then((res) => {
|
let params={
|
||||||
|
...this.form,
|
||||||
|
pointsGoodsCategoryId: this.pointsGoodsCategoryId,
|
||||||
|
pointsGoodsCategoryName:this.pointsGoodsCategoryName
|
||||||
|
}
|
||||||
|
updatePointsGoods(params).then((res) => {
|
||||||
this.submitLoading = false;
|
this.submitLoading = false;
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$Message.success("积分商品修改成功");
|
this.$Message.success("积分商品修改成功");
|
||||||
|
|
Loading…
Reference in New Issue