Commit d5774cfa by 李伟康

直播验证

1 parent 60dc4431
...@@ -940,7 +940,7 @@ ...@@ -940,7 +940,7 @@
> >
<glsx-combi-form <glsx-combi-form
class="edit-form-container" class="edit-form-container"
ref="liveEditFormRef" ref="liveEditFormRef_1"
:formRef="editChildRef" :formRef="editChildRef"
:isEdit="true" :isEdit="true"
:isBlock="true" :isBlock="true"
...@@ -991,7 +991,7 @@ ...@@ -991,7 +991,7 @@
> >
<glsx-combi-form <glsx-combi-form
class="edit-form-container" class="edit-form-container"
ref="liveEditFormRef" ref="liveEditFormRef_2"
:formRef="editChildRef" :formRef="editChildRef"
:isEdit="true" :isEdit="true"
:isBlock="true" :isBlock="true"
...@@ -1612,7 +1612,7 @@ export default { ...@@ -1612,7 +1612,7 @@ export default {
{ selectedProInfo } = this { selectedProInfo } = this
if (typeof index == 'undefined' && value > -1) return callback() if (typeof index == 'undefined' && value > -1) return callback()
if (value < 1) return callback(new Error('请设置活动库存')) if (value < 1) return callback(new Error('请设置活动库存'))
if(value > selectedProInfo[index].goodsStock) return callback(new Error('不能大于商品库存')) if (value > selectedProInfo[index].goodsStock) return callback(new Error('不能大于商品库存'))
}, },
trigger: 'change' trigger: 'change'
} }
...@@ -2813,7 +2813,7 @@ export default { ...@@ -2813,7 +2813,7 @@ export default {
this.selectedProInfo = selectedProInfo this.selectedProInfo = selectedProInfo
//是否限购 //是否限购
if(res.goodsList.length > 1) this.limitPurchaseDisabled = true if (res.goodsList.length > 1) this.limitPurchaseDisabled = true
// 预估销量 // 预估销量
if (info.predictVolume) { if (info.predictVolume) {
...@@ -3181,14 +3181,19 @@ export default { ...@@ -3181,14 +3181,19 @@ export default {
}) })
}) })
} }
if (this.$refs.liveEditFormRef) { if (this.editForm.liveFlag) {
this.$refs.liveEditFormRef.$refs[this.editChildRef].validate((liveValid, liveErrorObj) => { const liveTarget = this.editForm.liveBroadcastMediaType == 1 ?'liveEditFormRef_1':'liveEditFormRef_2'
if (this.$refs[liveTarget]) {
console.log('直播', '============')
this.$refs[liveTarget].$refs[this.editChildRef].validate((liveValid, liveErrorObj) => {
if (!liveValid) { if (!liveValid) {
validFlag = false validFlag = false
this.whereToGo('liveFlag') this.whereToGo('liveFlag')
} }
}) })
} }
}
if (this.$refs.commoditysEditFormRef) { if (this.$refs.commoditysEditFormRef) {
this.$refs.commoditysEditFormRef.forEach(item => { this.$refs.commoditysEditFormRef.forEach(item => {
item.$refs[this.editChildRef].validate((commoditysValid, commoditysErrorObj) => { item.$refs[this.editChildRef].validate((commoditysValid, commoditysErrorObj) => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!