Commit d5774cfa by 李伟康

直播验证

1 parent 60dc4431
......@@ -940,7 +940,7 @@
>
<glsx-combi-form
class="edit-form-container"
ref="liveEditFormRef"
ref="liveEditFormRef_1"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
......@@ -991,7 +991,7 @@
>
<glsx-combi-form
class="edit-form-container"
ref="liveEditFormRef"
ref="liveEditFormRef_2"
:formRef="editChildRef"
:isEdit="true"
:isBlock="true"
......@@ -1609,10 +1609,10 @@ export default {
{
validator: (rule, value, callback) => {
const { dataset: { index } } = event.target || event.srcElement,
{ selectedProInfo } = this
{ selectedProInfo } = this
if (typeof index == 'undefined' && value > -1) return callback()
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'
}
......@@ -2813,8 +2813,8 @@ export default {
this.selectedProInfo = selectedProInfo
//是否限购
if(res.goodsList.length > 1) this.limitPurchaseDisabled = true
if (res.goodsList.length > 1) this.limitPurchaseDisabled = true
// 预估销量
if (info.predictVolume) {
this.editForm.predictVolume = (info.predictVolume / 100).toFixed(2)
......@@ -3181,14 +3181,19 @@ export default {
})
})
}
if (this.$refs.liveEditFormRef) {
this.$refs.liveEditFormRef.$refs[this.editChildRef].validate((liveValid, liveErrorObj) => {
if (!liveValid) {
validFlag = false
this.whereToGo('liveFlag')
}
})
if (this.editForm.liveFlag) {
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) {
validFlag = false
this.whereToGo('liveFlag')
}
})
}
}
if (this.$refs.commoditysEditFormRef) {
this.$refs.commoditysEditFormRef.forEach(item => {
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!