From 283fbf62003a2bbc3ad9dd22ff2a0a6f14c121d5 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Fri, 14 Mar 2025 16:33:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AE=9A=E8=B0=83=E4=BB=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storage/adjustment/adjustmentAdd.vue | 26 ++++++++++++++----- .../adjustmentFlow/adjustmentEdit.vue | 22 ++++++++++++++++ 2 files changed, 42 insertions(+), 6 deletions(-) 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