diff --git a/src/views/product/components/addGroup.vue b/src/views/product/components/addGroup.vue index a9ec8e6..32727b6 100644 --- a/src/views/product/components/addGroup.vue +++ b/src/views/product/components/addGroup.vue @@ -69,7 +69,7 @@ export default { isShow: 1, sort: 0, productIds: [], - saleTime:[], + saleTime: [], useTime: 0, shopId: localStorage.getItem('shopId') }, @@ -153,16 +153,16 @@ export default { }, show(obj) { if (obj && obj.id) { - console.log(obj, '调试1') this.form = obj this.form.id = obj.id this.form.isShow = obj.isShow this.form.name = obj.name this.form.sort = obj.sort this.form.productIds = obj.productIds - this.$set(this.form , 'saleTime',[obj.saleStartTime, obj.saleEndTime]) + if (obj.saleStartTime != null) { + this.$set(this.form, 'saleTime', [obj.saleStartTime, obj.saleEndTime]) + } this.getProduts() - console.log(this.form, '调试1') } this.dialogVisible = true