xuxueyang
2024-07-15 556a9021308af6cb7a39551ad3ab63f3bb2b4e5c
update 必填项目
已修改1个文件
27 ■■■■■ 文件已修改
sub_pages/supplier/flower-manage/flower-add.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-add.vue
@@ -225,8 +225,8 @@
                    bannerList: [], //str[]
                    video: '',
                    level: '', //FLOWER_LEVEL
                    price: 0.00,
                    stock: 0,
                    price: '',
                    stock: '',
                    params: [], //id,value
                },
                requireFields: [{
@@ -238,6 +238,12 @@
                },{
                    name: '商品等级',
                    key: 'level'
                }, {
                    name: '商品价格',
                    key: 'price'
                }, {
                    name: '商品库存',
                    key: 'stock'
                }],
                show_select_category: false,
                show_select_level: false,
@@ -510,6 +516,15 @@
            },
            async submit() {
                if (!this.dto.price) {
                    this.$message.showToast('商品价格未设置')
                    return
                }
                if (this.dto.price <= 0) {
                    this.$message.showToast('商品价格不能小于等于0')
                    return
                }
                for (var field of this.requireFields) {
                    if (!this.dto[field.key]) {
                        this.$message.showToast(`${field.name}信息未填写`)
@@ -519,7 +534,15 @@
                if(this.dto.params.length<1){
                    this.$message.showToast('商品参数详情未设置')
                    return
                } else {
                    for (var item of this.dto.params) {
                        if (!item.value) {
                            this.$message.showToast('存在商品参数详情未设置')
                            return
                }
                    }
                }
                // if (!this.dto.applicationType) {
                //     this.$message.showToast('未选择类型')
                //     return