bug
This commit is contained in:
@ -78,7 +78,7 @@ export default {
|
|||||||
beforeInit() {
|
beforeInit() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getQueryParame: function() {
|
getQueryParame() {
|
||||||
return {
|
return {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
|
@ -407,7 +407,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getInfo(),
|
this.getInfo(),
|
||||||
initData('api/yxSystemGroupData',{ groupName: 'yshop_seckill_time' }).then(res => {
|
initData('api/yxSystemGroupData',{ groupName: 'yshop_seckill_time',status:1 }).then(res => {
|
||||||
this.myTimes = res.content
|
this.myTimes = res.content
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -604,6 +604,7 @@ export default {
|
|||||||
that.form1.good.image = data.image
|
that.form1.good.image = data.image
|
||||||
that.generate(data.productId);
|
that.generate(data.productId);
|
||||||
that.manyFormValidate = data.attrs;
|
that.manyFormValidate = data.attrs;
|
||||||
|
console.log(data)
|
||||||
if(data.spec_type === 0){
|
if(data.spec_type === 0){
|
||||||
that.manyFormValidate = [];
|
that.manyFormValidate = [];
|
||||||
}else {
|
}else {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="toAddURL"
|
@click="toAddURL"
|
||||||
>
|
>
|
||||||
新增
|
新增312
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -21,6 +21,12 @@
|
|||||||
<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="开启时间(整数小时)" />
|
||||||
<el-table-column prop="map.continued" label="持续时间(整数小时)" />
|
<el-table-column prop="map.continued" label="持续时间(整数小时)" />
|
||||||
|
<el-table-column prop="map.status" label="状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-show="scope.row.status == 1" type="success">开启</el-tag>
|
||||||
|
<el-tag v-show="scope.row.status == 2" type="danger">关闭</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column v-if="checkPermission(['admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT','YXSYSTEMGROUPDATA_DELETE'])" label="操作" width="150px" align="center">
|
<el-table-column v-if="checkPermission(['admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT','YXSYSTEMGROUPDATA_DELETE'])" label="操作" width="150px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-permission="['admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)" />
|
<el-button v-permission="['admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT']" size="mini" type="primary" icon="el-icon-edit" @click="edit(scope.row)" />
|
||||||
@ -107,7 +113,8 @@ export default {
|
|||||||
id: data.id,
|
id: data.id,
|
||||||
groupName: data.groupName,
|
groupName: data.groupName,
|
||||||
time: data.map.time,
|
time: data.map.time,
|
||||||
continued: data.map.continued
|
continued: data.map.continued,
|
||||||
|
status:data.map.status
|
||||||
}
|
}
|
||||||
_this.dialog = true
|
_this.dialog = true
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog" :title="isAdd ? '新增' : '编辑'" width="500px">
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" :before-close="cancel" :visible.sync="dialog"
|
||||||
|
: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;"/>
|
||||||
@ -7,6 +8,12 @@
|
|||||||
<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;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="是否开启">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio :label="1">开启</el-radio>
|
||||||
|
<el-radio :label="2">关闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<!--<el-input v-model="form.groupName" />-->
|
<!--<el-input v-model="form.groupName" />-->
|
||||||
@ -19,6 +26,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {add, edit} from '@/api/yxSystemGroupData'
|
import {add, edit} from '@/api/yxSystemGroupData'
|
||||||
import picUpload from '@/components/pic-upload'
|
import picUpload from '@/components/pic-upload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {picUpload},
|
components: {picUpload},
|
||||||
props: {
|
props: {
|
||||||
@ -34,10 +42,10 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
groupName: 'yshop_seckill_time',
|
groupName: 'yshop_seckill_time',
|
||||||
time: 5,
|
time: 5,
|
||||||
|
status:2, //默认关闭
|
||||||
continued: 2
|
continued: 2
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -45,16 +53,15 @@ export default {
|
|||||||
this.resetForm()
|
this.resetForm()
|
||||||
},
|
},
|
||||||
doSubmit() {
|
doSubmit() {
|
||||||
|
if (parseInt(this.form.continued) + parseInt(this.form.time) > 24) {
|
||||||
|
return this.$message.error("开启+持续时间不能超过24小时")
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.isAdd) {
|
if (this.isAdd) {
|
||||||
this.doAdd()
|
this.doAdd()
|
||||||
} else this.doEdit()
|
} else this.doEdit()
|
||||||
},
|
},
|
||||||
doAdd() {
|
doAdd() {
|
||||||
if(this.form.continued + this.form.time > 24){
|
|
||||||
this.loading = false
|
|
||||||
return this.$message.error("开启+持续时间不能超过24小时")
|
|
||||||
}
|
|
||||||
add(this.form).then(res => {
|
add(this.form).then(res => {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
@ -70,10 +77,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
doEdit() {
|
doEdit() {
|
||||||
if(this.form.continued + this.form.time > 24){
|
|
||||||
this.loading = false
|
|
||||||
return this.$message.error("开启+持续时间不能超过24小时")
|
|
||||||
}
|
|
||||||
edit(this.form).then(res => {
|
edit(this.form).then(res => {
|
||||||
this.resetForm()
|
this.resetForm()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
@ -95,7 +98,8 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
groupName: 'yshop_seckill_time',
|
groupName: 'yshop_seckill_time',
|
||||||
time: 5,
|
time: 5,
|
||||||
continued: 2
|
continued: 2,
|
||||||
|
status:2 //默认关闭
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user