1
xuxueyang
2024-07-15 e4bb10264e289d376ed5d938c59b0fdbb1d41d6b
1
已修改2个文件
21 ■■■■ 文件已修改
sub_pages/supplier/flower-manage/flower-add.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-manage.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sub_pages/supplier/flower-manage/flower-add.vue
@@ -525,10 +525,12 @@
                    this.$message.showToast('商品价格格式错误,精确到分')
                    return
                }
                if (tmp.toFixed(2) != tmp.toFixed(3)) {
                if ((tmp.toFixed(2) + '' + '0') !== tmp.toFixed(3)) {
                    this.$message.showToast('商品价格至多精确到分')
                    console.log('tmp.toFixed(2)',tmp.toFixed(2),tmp.toFixed(3))
                    // console.log('tmp.toFixed(2)',tmp.toFixed(2),tmp.toFixed(3))
                    return
                } else {
                    this.dto.price = this.dto.price.toFixed(2)
                }
                if (this.dto.price <= 0) {
                    this.$message.showToast('商品价格不能小于等于0')
sub_pages/supplier/flower-manage/flower-manage.vue
@@ -5,7 +5,8 @@
            <view @click.stop="clickButton('in')" class="button button-search-in"></view>
            <view @click.stop="clickButton('unpass')" class="button button-search-unpass"></view>
            <view @click.stop="clickButton('inpass')" class="button button-search-inpass" style="flex:5"></view>
            <view @click.stop="clickButton('delete')" class="button button-search-delete" style="margin-top: -1rpx;"></view>
            <view @click.stop="clickButton('delete')" class="button button-search-delete" style="margin-top: -1rpx;">
            </view>
        </view>
@@ -207,6 +208,18 @@
                    this.$message.showToast('输入格式不正确')
                    return
                }
                if (key == 'price') {
                    if (value <= 0) {
                        this.$message.showToast('价格需要大于0')
                        return
                    }
                } else {
                    if (value < 0) {
                        this.$message.showToast('库存不能小于0')
                        return
                    }
                }
                var dto = {
                    id: item.id,
                }