diff --git a/yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue b/yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue index af296f9942..c92a198dfb 100644 --- a/yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue +++ b/yxt-as-ui/src/views/storage/adjustment/adjustmentAdd.vue @@ -202,6 +202,17 @@ export default { return index + 1 }, saveOrUpdate() { + if (this.formobj.smsPricestrategyBillDetailList.length > 0) { + for (var i = 0; i < this.formobj.smsPricestrategyBillDetailList.length; i++) { + if (this.formobj.smsPricestrategyBillDetailList[i].strategyType = '') { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表中价格策略不能为空' }) + return + } + } + } else { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表不能为空' }) + return + } this.$refs['form_obj'].validate((valid) => { if (valid) { this.submitdisabled = true @@ -223,12 +234,15 @@ export default { }) }, submit() { - if (this.formobj.smsPricestrategyBillDetailList.length == 0) { - this.$message({ - showClose: true, - type: 'warning', - message: '请添加商品类别' - }) + if (this.formobj.smsPricestrategyBillDetailList.length > 0) { + for (var i = 0; i < this.formobj.smsPricestrategyBillDetailList.length; i++) { + if (this.formobj.smsPricestrategyBillDetailList[i].strategyType = '') { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表中价格策略不能为空' }) + return + } + } + } else { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表不能为空' }) return } this.$refs['form_obj'].validate((valid) => { diff --git a/yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue b/yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue index a13d1779cf..c36ef24f9c 100644 --- a/yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue +++ b/yxt-as-ui/src/views/workFlow/adjustmentFlow/adjustmentEdit.vue @@ -219,6 +219,17 @@ export default { }) }, saveOrUpdate() { + if (this.formobj.smsPricestrategyBillDetailList.length > 0) { + for (var i = 0; i < this.formobj.smsPricestrategyBillDetailList.length; i++) { + if (this.formobj.smsPricestrategyBillDetailList[i].strategyType = '') { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表中价格策略不能为空' }) + return + } + } + } else { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表不能为空' }) + return + } this.$refs['form_obj'].validate((valid) => { if (valid) { this.submitdisabled = true @@ -247,6 +258,17 @@ export default { }) }, submit() { + if (this.formobj.smsPricestrategyBillDetailList.length > 0) { + for (var i = 0; i < this.formobj.smsPricestrategyBillDetailList.length; i++) { + if (this.formobj.smsPricestrategyBillDetailList[i].strategyType = '') { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表中价格策略不能为空' }) + return + } + } + } else { + this.$message({ showClose: true, type: 'warning', message: '商品类别列表不能为空' }) + return + } this.$refs['form_obj'].validate((valid) => { if (valid) { this.submitdisabled = true