修复营销活动
This commit is contained in:
@@ -2,14 +2,14 @@ import request from '@/utils/request'
|
|||||||
|
|
||||||
export function get() {
|
export function get() {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/aliPay',
|
url: 'bxg/api/aliPay',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update(data) {
|
export function update(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/aliPay',
|
url: 'bxg/api/aliPay',
|
||||||
data,
|
data,
|
||||||
method: 'put'
|
method: 'put'
|
||||||
})
|
})
|
||||||
@@ -18,7 +18,7 @@ export function update(data) {
|
|||||||
// 支付
|
// 支付
|
||||||
export function toAliPay(url, data) {
|
export function toAliPay(url, data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/' + url,
|
url: 'bxg/api/' + url,
|
||||||
data,
|
data,
|
||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -244,6 +244,11 @@ export default {
|
|||||||
},
|
},
|
||||||
doAdd() {
|
doAdd() {
|
||||||
add(this.form).then(res => {
|
add(this.form).then(res => {
|
||||||
|
if (res.status==500){
|
||||||
|
this.loading = false
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '添加成功',
|
title: '添加成功',
|
||||||
|
|||||||
@@ -155,13 +155,12 @@
|
|||||||
<el-input type="text" v-model="scope.row.stock" maxlength="7" :disabled="true"/>
|
<el-input type="text" v-model="scope.row.stock" maxlength="7" :disabled="true"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="pink_price" label="拼团价" align="center">
|
||||||
<el-table-column prop="stock" label="拼团价" align="center">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input type="text" v-model="scope.row.pink_price"/>
|
<el-input type="text" v-model="scope.row.pink_price"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stock" label="拼团库存" align="center">
|
<el-table-column prop="pink_stock" label="拼团库存" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input type="text" v-model="scope.row.pink_stock" maxlength="7"/>
|
<el-input type="text" v-model="scope.row.pink_stock" maxlength="7"/>
|
||||||
</template>
|
</template>
|
||||||
@@ -228,6 +227,12 @@ export default {
|
|||||||
components: {editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic, cgood},
|
components: {editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic, cgood},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
rule:{
|
||||||
|
phone: [
|
||||||
|
{ required: true, message: '请输入手机号码', trigger: 'blur' },
|
||||||
|
{ pattern: /^((1[3,5,8][0-9])|(14[5,7])|(17[0,5,6,7,8])|(19[7]))\d{8}$/, message: '请检查手机号是否正确', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
},
|
||||||
spinShow: false,
|
spinShow: false,
|
||||||
// 批量设置表格data
|
// 批量设置表格data
|
||||||
oneFormBatch: [
|
oneFormBatch: [
|
||||||
@@ -356,6 +361,8 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
treeSelect: [],
|
treeSelect: [],
|
||||||
tableIndex: 0,
|
tableIndex: 0,
|
||||||
|
|
||||||
|
|
||||||
ruleValidate: {
|
ruleValidate: {
|
||||||
title: [
|
title: [
|
||||||
{required: true, message: '请输入拼团名称', trigger: 'blur'}
|
{required: true, message: '请输入拼团名称', trigger: 'blur'}
|
||||||
@@ -379,8 +386,14 @@ export default {
|
|||||||
{required: true, message: '请选择运费模板', trigger: 'change', type: 'number'}
|
{required: true, message: '请选择运费模板', trigger: 'change', type: 'number'}
|
||||||
],
|
],
|
||||||
price: [
|
price: [
|
||||||
{required: true, message: '请输入拼团价格', trigger: 'blur'}
|
{required: true, message: '请输入商品售价', trigger: 'blur'}
|
||||||
],
|
],
|
||||||
|
// pink_price: [
|
||||||
|
// {required: true, message: '请输入拼团价格', trigger: 'blur'}
|
||||||
|
// ],
|
||||||
|
// pink_stock: [
|
||||||
|
// {required: true,message: '库存设置不能小于0', trigger: 'blur',min: 1, },
|
||||||
|
// ],
|
||||||
people: [
|
people: [
|
||||||
{required: true, message: '请选择拼团人数', trigger: 'change', type: 'number'}
|
{required: true, message: '请选择拼团人数', trigger: 'change', type: 'number'}
|
||||||
],
|
],
|
||||||
@@ -651,6 +664,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.formValidate.spec_type === 0) {
|
if (this.formValidate.spec_type === 0) {
|
||||||
this.formValidate.attrs = this.oneFormValidate;
|
this.formValidate.attrs = this.oneFormValidate;
|
||||||
|
console.log('this.oneFormValidate',this.oneFormValidate)
|
||||||
this.formValidate.header = [];
|
this.formValidate.header = [];
|
||||||
this.formValidate.items = [];
|
this.formValidate.items = [];
|
||||||
} else {
|
} else {
|
||||||
@@ -661,12 +675,16 @@ export default {
|
|||||||
return this.$message.warning('请点击生成规格!');
|
return this.$message.warning('请点击生成规格!');
|
||||||
}
|
}
|
||||||
add(this.formValidate).then(async res => {
|
add(this.formValidate).then(async res => {
|
||||||
|
if (res.status==500){
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '操作成功',
|
message: '操作成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({path: '/activity/combination'});
|
this.$router.push({path: '/bxg/activity/combination'});
|
||||||
}, 500);
|
}, 500);
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
|
|||||||
@@ -122,10 +122,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toAddURL(){
|
toAddURL(){
|
||||||
this.$router.push({ path: 'bxg/activity/combinationAdd' })
|
this.$router.push({ path: '/bxg/activity/combinationAdd'})
|
||||||
},
|
},
|
||||||
toUpdateURL(id){
|
toUpdateURL(id){
|
||||||
this.$router.push({ path: 'bxg/activity/combinationEdit/'+id })
|
this.$router.push({ path: '/bxg/activity/combinationEdit/'+id })
|
||||||
},
|
},
|
||||||
formatTimeTwo,
|
formatTimeTwo,
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getInfo(),
|
this.getInfo(),
|
||||||
initData('api/yxSystemGroupData',{ groupName: 'yshop_seckill_time',status:1 }).then(res => {
|
initData('bxg/api/yxSystemGroupData',{ groupName: 'yshop_seckill_time',status:1 }).then(res => {
|
||||||
this.myTimes = res.content
|
this.myTimes = res.content
|
||||||
})
|
})
|
||||||
if(this.$route.params.id){
|
if(this.$route.params.id){
|
||||||
@@ -660,24 +660,30 @@ export default {
|
|||||||
if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){
|
if(this.formValidate.spec_type === 1 && this.manyFormValidate.length===0){
|
||||||
return this.$message.warning('请点击生成规格!');
|
return this.$message.warning('请点击生成规格!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 判断是否是添加
|
// 判断是否是添加
|
||||||
if(this.isAdd){
|
if(this.isAdd){
|
||||||
console.log(this.formValidate)
|
console.log(this.formValidate)
|
||||||
add(this.formValidate).then(res=>{
|
add(this.formValidate).then(res=>{
|
||||||
|
if (res.status==500){
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
message:'操作成功',
|
message:'操作成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({ path: '/activity/seckill' });
|
this.$router.push({ path: '/bxg/activity/seckill' });
|
||||||
}, 500);
|
}, 500);
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
add(this.formValidate).then(async res => {
|
add(this.formValidate).then(async res => {
|
||||||
|
if (res.status==500){
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$message({
|
this.$message({
|
||||||
message:'操作成功',
|
message:'操作成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
|
|||||||
@@ -106,10 +106,10 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toAddURL(){
|
toAddURL(){
|
||||||
this.$router.push({ path: '/activity/secKillAdd' })
|
this.$router.push({ path: '/bxg/activity/secKillAdd' })
|
||||||
},
|
},
|
||||||
toUpdateURL(id){
|
toUpdateURL(id){
|
||||||
this.$router.push({ path: '/activity/secKillEdit/'+id })
|
this.$router.push({ path: '/bxg/activity/secKillEdit/'+id })
|
||||||
},
|
},
|
||||||
formatTimeTwo,
|
formatTimeTwo,
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|||||||
@@ -19,7 +19,12 @@
|
|||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
<el-table v-loading="loading" :data="data" size="small" style="width: 100%;">
|
||||||
<el-table-column prop="id" label="ID" />
|
<el-table-column prop="id" label="ID" />
|
||||||
<el-table-column prop="map.time" label="开启时间(整数小时)" />
|
<el-table-column prop="map.time" label="开启时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{scope.row.map.time>9?scope.row.map.time+':00':'0'+scope.row.map.time+':00'}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="map.time" label="开启时间(整数小时)" />-->
|
||||||
<el-table-column prop="map.continued" label="持续时间(整数小时)" />
|
<el-table-column prop="map.continued" label="持续时间(整数小时)" />
|
||||||
<el-table-column prop="map.status" label="状态">
|
<el-table-column prop="map.status" label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -112,7 +117,7 @@ export default {
|
|||||||
_this.form = {
|
_this.form = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
groupName: data.groupName,
|
groupName: data.groupName,
|
||||||
time: data.map.time,
|
time: data.map.time>9?data.map.time+':00':'0'+data.map.time+':00',
|
||||||
continued: data.map.continued,
|
continued: data.map.continued,
|
||||||
status:data.map.status
|
status:data.map.status
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,16 @@
|
|||||||
:title="isAdd ? '新增' : '编辑'" width="500px">
|
:title="isAdd ? '新增' : '编辑'" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px">
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="150px">
|
||||||
<el-form-item label="开启时间(整数小时)">
|
<el-form-item label="开启时间(整数小时)">
|
||||||
<el-input v-model="form.time" style="width: 270px;"/>
|
<!-- <el-input v-model="form.time" style="width: 270px;"/>-->
|
||||||
|
<el-time-select
|
||||||
|
v-model="form.time"
|
||||||
|
:picker-options="{
|
||||||
|
start: '00:00',
|
||||||
|
step: '00:60',
|
||||||
|
end: '24:00'
|
||||||
|
}"
|
||||||
|
placeholder="选择时间">
|
||||||
|
</el-time-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="持续时间(整数小时)">
|
<el-form-item label="持续时间(整数小时)">
|
||||||
<el-input v-model="form.continued" style="width: 270px;"/>
|
<el-input v-model="form.continued" style="width: 270px;"/>
|
||||||
@@ -41,7 +50,7 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
groupName: 'yshop_seckill_time',
|
groupName: 'yshop_seckill_time',
|
||||||
time: 5,
|
time: '08:00',
|
||||||
status:2, //默认关闭
|
status:2, //默认关闭
|
||||||
continued: 2
|
continued: 2
|
||||||
},
|
},
|
||||||
@@ -62,7 +71,14 @@ export default {
|
|||||||
} else this.doEdit()
|
} else this.doEdit()
|
||||||
},
|
},
|
||||||
doAdd() {
|
doAdd() {
|
||||||
|
// console.log('this.form',Number(this.form.time.slice(0,2)))
|
||||||
|
this.form.time=Number(this.form.time.slice(0,2))
|
||||||
add(this.form).then(res => {
|
add(this.form).then(res => {
|
||||||
|
if (res.status==500){
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
this.loading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '添加成功',
|
title: '添加成功',
|
||||||
@@ -78,6 +94,11 @@ export default {
|
|||||||
},
|
},
|
||||||
doEdit() {
|
doEdit() {
|
||||||
edit(this.form).then(res => {
|
edit(this.form).then(res => {
|
||||||
|
if (res.status==500){
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
this.loading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '修改成功',
|
title: '修改成功',
|
||||||
@@ -97,7 +118,7 @@ export default {
|
|||||||
this.form = {
|
this.form = {
|
||||||
id: '',
|
id: '',
|
||||||
groupName: 'yshop_seckill_time',
|
groupName: 'yshop_seckill_time',
|
||||||
time: 5,
|
time: '08:00',
|
||||||
continued: 2,
|
continued: 2,
|
||||||
status:2 //默认关闭
|
status:2 //默认关闭
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,10 @@
|
|||||||
<el-radio v-model="form.isShow" :label="1">是</el-radio>
|
<el-radio v-model="form.isShow" :label="1">是</el-radio>
|
||||||
<el-radio v-model="form.isShow" :label="0" style="width: 200px;">否</el-radio>
|
<el-radio v-model="form.isShow" :label="0" style="width: 200px;">否</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="说明">
|
<el-form-item label="权益说明">
|
||||||
|
<el-input v-model="form.benefit" rows="3" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="规则说明">
|
||||||
<el-input v-model="form.explain" rows="3" type="textarea" />
|
<el-input v-model="form.explain" rows="3" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ export default {
|
|||||||
imageArr: data.image ? data.image.split(',') : [],
|
imageArr: data.image ? data.image.split(',') : [],
|
||||||
iconArr: data.icon ? data.icon.split(',') : [],
|
iconArr: data.icon ? data.icon.split(',') : [],
|
||||||
explain: data.explain,
|
explain: data.explain,
|
||||||
|
benefit:data.benefit,
|
||||||
addTime: data.addTime,
|
addTime: data.addTime,
|
||||||
isDel: data.isDel
|
isDel: data.isDel
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user