Browse Source

优化秒杀时间配置

master
sj 2 years ago
parent
commit
c4aa10e2a9
  1. 8
      src/views/bxg/activity/bargain/form.vue
  2. 2
      src/views/bxg/shop/goods/form.vue
  3. 20
      src/views/bxg/shop/set/seckillform.vue

8
src/views/bxg/activity/bargain/form.vue

@ -3,20 +3,20 @@
<el-form ref="form" :model="form" :rules="rules" :inline="true" size="small" label-width="140px"> <el-form ref="form" :model="form" :rules="rules" :inline="true" size="small" label-width="140px">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="选择商品:" prop="good"> <el-form-item label="选择商品:" prop="good">
<cgood v-model="form1.good" :disabled="true" ></cgood> <cgood v-model="form1.good" disable ></cgood>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-form-item label="砍价活动标题"> <el-form-item label="砍价活动标题">
<el-input v-model="form.title" style="width: 500px;" /> <el-input v-model="form.title" style="width: 500px;" />
</el-form-item> </el-form-item>
<el-form-item label="商品名称"> <el-form-item label="商品名称">
<el-input v-model="form.storeName" style="width: 500px;" disabled="true"/> <el-input v-model="form.storeName" style="width: 500px;" disabled/>
</el-form-item> </el-form-item>
<el-form-item label="砍价简介"> <el-form-item label="砍价简介">
<el-input v-model="form.info" disabled="true" style="width: 500px;" rows="5" type="textarea" /> <el-input v-model="form.info" disabled style="width: 500px;" rows="5" type="textarea" />
</el-form-item> </el-form-item>
<el-form-item label="单位"> <el-form-item label="单位">
<el-input v-model="form.unitName" disabled="true" style="width: 500px;" /> <el-input v-model="form.unitName" disabled style="width: 500px;" />
</el-form-item> </el-form-item>
<el-form-item label="活动开始时间"> <el-form-item label="活动开始时间">
<template> <template>

2
src/views/bxg/shop/goods/form.vue

@ -211,7 +211,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="底部栏目配置:" > <el-form-item label="底部栏目配置:" >
<el-tabs v-model="editableTabsValue" type="card" editable @edit="handleTabsEdit" style="width: 950px"> <el-tabs v-model="editableTabsValue" type="card" editable @edit="handleTabsEdit" class="mr20">
<el-tab-pane <el-tab-pane
:key="item.name" :key="item.name"
v-for="(item, index) in editableTabs" v-for="(item, index) in editableTabs"

20
src/views/bxg/shop/set/seckillform.vue

@ -76,14 +76,9 @@ export default {
} else this.doEdit() } else this.doEdit()
}, },
doAdd() { doAdd() {
// console.log('this.form',Number(this.form.time.slice(0,2))) console.log('增加')
this.form.time=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: '添加成功',
@ -93,18 +88,16 @@ export default {
this.loading = false this.loading = false
this.$parent.init() this.$parent.init()
}).catch(err => { }).catch(err => {
// console.log('this.form.time',this.form.time)
this.form.time= this.form.time>9?this.form.time+':00':'0'+this.form.time+':00'
this.loading = false this.loading = false
console.log(err.response.data.message) // console.log(err.response.data.message)
}) })
}, },
doEdit() { doEdit() {
console.log('修改')
this.form.time=Number(this.form.time.slice(0,2)) this.form.time=Number(this.form.time.slice(0,2))
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: '修改成功',
@ -115,7 +108,8 @@ export default {
this.$parent.init() this.$parent.init()
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
console.log(err.response.data.message) this.form.time= this.form.time>9?this.form.time+':00':'0'+this.form.time+':00'
// console.log(err.response.data.message)
}) })
}, },
resetForm() { resetForm() {

Loading…
Cancel
Save