Commit e2dd540a authored by lihui's avatar lihui

Merge branch 'lihui/distributionRoute' of...

Merge branch 'lihui/distributionRoute' of https://git.yidian-inc.com:8021/bp/op-web-service into lihui/distributionRoute
parents c4ef5199 31adafcf
......@@ -30,6 +30,7 @@
</el-select>
</el-form-item>
<el-form-item style="margin-left: 50px">
<el-button @click="reset()">重置</el-button>
<el-button type="primary" @click="getActivityList">搜索</el-button>
</el-form-item>
<el-form-item>
......@@ -189,6 +190,13 @@ export default {
};
},
methods: {
// 重置
reset() {
this.activity.activityName = "";
this.activity.online_status = "";
this.getActivityList();
},
/* API */
// 获取商品列表
async getActivityList() {
......
......@@ -11,13 +11,14 @@
</div>
<!-- Tab -->
<el-table :data="comTableData" border style="width: 100%">
<el-table-column label="显示顺序" align="center" width="140">
<el-table-column label="" align="center" width="50px">
<template #default="scope">
<i class="el-icon-top" @click="upMove(scope.$index, scope.row)"></i>
<i
class="el-icon-bottom"
@click="upDown(scope.$index, scope.row)"
></i>
<i class="el-icon-top" @click="upMove(scope.$index, scope.row)" style="margin-right:15px;"></i>
</template>
</el-table-column>
<el-table-column label="" align="center" width="50px">
<template #default="scope">
<i class="el-icon-bottom" @click="upDown(scope.$index, scope.row)"></i>
</template>
</el-table-column>
<el-table-column
......@@ -87,6 +88,7 @@
<el-form-item
label="商品标题:"
prop="goods_name"
style="width:90%;"
:rules="[{ required: true, message: '请输入商品标题' }]"
>
<el-input
......@@ -181,7 +183,7 @@
</div>
<el-form-item
label="商家"
label="商家"
prop="business1"
:rules="[{ required: true, message: '请选择商家' }]"
>
......
......@@ -8,9 +8,9 @@
space="30%"
:align-center="true"
>
<el-step title="信息编辑"></el-step>
<el-step title="添加商品"></el-step>
<el-step title="拼单设置"></el-step>
<el-step title="信息编辑" @click="step1"></el-step>
<el-step title="添加商品" @click="step2"></el-step>
<el-step title="拼单设置" @click="step3"></el-step>
</el-steps>
<div class="content">
<infoEditing
......@@ -58,13 +58,13 @@ import spellOrderSet from "./components/spellOrderSet.vue";
import {
addMarketing,
marketingInfo,
updateMarketing
updateMarketing,
} from "../../../service/Activity/index";
export default {
components: {
infoEditing,
addProduc,
spellOrderSet
spellOrderSet,
},
data() {
return {
......@@ -78,11 +78,40 @@ export default {
takePlaceIDArr: [],
startTime: "",
endTime: "",
stepTwoTitle: "" // 传给addProduct的title
stepTwoTitle: "", // 传给addProduct的title
};
},
methods: {
// 步骤条点击事件
step1() {
if (this.$route.query.marketing_id != undefined) {
this.active = 1;
}
},
step2() {
if (this.$route.query.marketing_id != undefined) {
if (this.$refs.infoEdit.infoEditForm.title == "") {
ElMessage.error("请填写商品标题");
return;
}
this.active = 2;
}
},
step3() {
if (this.$route.query.marketing_id != undefined) {
if (this.$refs.infoEdit.infoEditForm.title == "") {
ElMessage.error("请填写商品标题");
return;
}else if (this.$refs.addProduc.comTableData.length == 0) {
ElMessage.error("请至少选择一个商品");
return;
}else{
this.active = 3;
}
}
},
// 上一步
prev() {
this.active--;
......@@ -115,7 +144,7 @@ export default {
}
let params = {
marketing_id: marketingId,
marketing_type: "4"
marketing_type: "4",
};
const res = await marketingInfo(params);
this.infoEditArr = res.result.marketing_info;
......@@ -138,7 +167,7 @@ export default {
if (reg.test(path)) return unescape(RegExp.$2.replace(/\+/g, " "));
return "";
}
let list = this.$refs.infoEdit.picSubmitList.map(item => {
let list = this.$refs.infoEdit.picSubmitList.map((item) => {
let rs = getUrlParms(item.url, "url");
return rs;
});
......@@ -161,14 +190,14 @@ export default {
end_time: dayJs(this.endDate).format("YYYY-MM-DD HH:mm:ss"),
pindan_pic: picList,
pindan_desc: this.$refs.infoEdit.infoEditForm.desc,
take_place_ids: this.takePlaceIDArr
take_place_ids: this.takePlaceIDArr,
};
if (this.$route.query.marketing_id == undefined) {
const res = await addMarketing(params);
if (res.code === 0) {
ElMessage.success({
message: "添加成功",
type: "success"
type: "success",
});
this.$router.push({ path: "/op/activity/manage" });
} else {
......@@ -179,7 +208,7 @@ export default {
if (res.code === 0) {
ElMessage.success({
message: "修改成功",
type: "success"
type: "success",
});
this.$router.push({ path: "/op/activity/manage" });
} else {
......@@ -189,11 +218,11 @@ export default {
},
getTakeTakePlaceListFromChild(val) {
this.takePlaceIDArr = val;
}
},
},
created() {
this.marketingInfoMet();
}
},
};
</script>
......@@ -224,8 +253,13 @@ export default {
margin: 20px auto;
}
.stepsBtn {
width: 64%;
width: 100%;
height: 80px;
line-height: 80px;
background: white;
position: fixed;
bottom: 0px;
text-align: center;
margin-top: 50px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment