bug
This commit is contained in:
@ -78,7 +78,7 @@ export default {
|
||||
beforeInit() {
|
||||
return true
|
||||
},
|
||||
getQueryParame: function() {
|
||||
getQueryParame() {
|
||||
return {
|
||||
page: this.page,
|
||||
size: this.size,
|
||||
|
@ -407,7 +407,7 @@ export default {
|
||||
},
|
||||
mounted () {
|
||||
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
|
||||
})
|
||||
},
|
||||
@ -604,6 +604,7 @@ export default {
|
||||
that.form1.good.image = data.image
|
||||
that.generate(data.productId);
|
||||
that.manyFormValidate = data.attrs;
|
||||
console.log(data)
|
||||
if(data.spec_type === 0){
|
||||
that.manyFormValidate = [];
|
||||
}else {
|
||||
|
@ -17,7 +17,7 @@
|
||||
icon="el-icon-plus"
|
||||
@click="toAddURL"
|
||||
>
|
||||
新增
|
||||
新增312
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,6 +21,12 @@
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="map.time" 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">
|
||||
<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)" />
|
||||
@ -75,7 +81,7 @@ export default {
|
||||
beforeInit() {
|
||||
this.url = 'api/yxSystemGroupData'
|
||||
const sort = 'id,desc'
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_seckill_time' }
|
||||
this.params = { page: this.page, size: this.size, sort: sort, groupName: 'yshop_seckill_time'}
|
||||
return true
|
||||
},
|
||||
subDelete(id) {
|
||||
@ -107,7 +113,8 @@ export default {
|
||||
id: data.id,
|
||||
groupName: data.groupName,
|
||||
time: data.map.time,
|
||||
continued: data.map.continued
|
||||
continued: data.map.continued,
|
||||
status:data.map.status
|
||||
}
|
||||
_this.dialog = true
|
||||
}
|
||||
|
@ -1,11 +1,18 @@
|
||||
<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-item label="开启时间(整数小时)">
|
||||
<el-input v-model="form.time" style="width: 270px;" />
|
||||
<el-input v-model="form.time" style="width: 270px;"/>
|
||||
</el-form-item>
|
||||
<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 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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -17,10 +24,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { add, edit } from '@/api/yxSystemGroupData'
|
||||
import {add, edit} from '@/api/yxSystemGroupData'
|
||||
import picUpload from '@/components/pic-upload'
|
||||
|
||||
export default {
|
||||
components: { picUpload },
|
||||
components: {picUpload},
|
||||
props: {
|
||||
isAdd: {
|
||||
type: Boolean,
|
||||
@ -34,10 +42,10 @@ export default {
|
||||
id: '',
|
||||
groupName: 'yshop_seckill_time',
|
||||
time: 5,
|
||||
status:2, //默认关闭
|
||||
continued: 2
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -45,16 +53,15 @@ export default {
|
||||
this.resetForm()
|
||||
},
|
||||
doSubmit() {
|
||||
if (parseInt(this.form.continued) + parseInt(this.form.time) > 24) {
|
||||
return this.$message.error("开启+持续时间不能超过24小时")
|
||||
}
|
||||
this.loading = true
|
||||
if (this.isAdd) {
|
||||
this.doAdd()
|
||||
} else this.doEdit()
|
||||
},
|
||||
doAdd() {
|
||||
if(this.form.continued + this.form.time > 24){
|
||||
this.loading = false
|
||||
return this.$message.error("开启+持续时间不能超过24小时")
|
||||
}
|
||||
add(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
@ -70,10 +77,6 @@ export default {
|
||||
})
|
||||
},
|
||||
doEdit() {
|
||||
if(this.form.continued + this.form.time > 24){
|
||||
this.loading = false
|
||||
return this.$message.error("开启+持续时间不能超过24小时")
|
||||
}
|
||||
edit(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
@ -95,7 +98,8 @@ export default {
|
||||
id: '',
|
||||
groupName: 'yshop_seckill_time',
|
||||
time: 5,
|
||||
continued: 2
|
||||
continued: 2,
|
||||
status:2 //默认关闭
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user