| | |
| | | el: { |
| | | precision: 0, |
| | | min: 0, |
| | | max: 99999999, |
| | | controls: false, |
| | | }, |
| | | rules: { required: true, message: '请输入库存', trigger: 'blur' }, |
| | |
| | | el: { |
| | | precision: 0, |
| | | min: 1, |
| | | max: 99999999, |
| | | controls: false, |
| | | }, |
| | | rules: { |
| | |
| | | extraButtons: [ |
| | | { |
| | | text: '上架', |
| | | show: (row) => row.status === 'I', |
| | | show: (row) => row.status === 'I' && row.stock>0, |
| | | atClick: async (row) => { |
| | | try { |
| | | await this.$elBusUtil.confirm('确定要上架吗?') |
| | |
| | | ) |
| | | if (code === 0) { |
| | | this.$message.success('上架成功') |
| | | this.$refs.crud.clearSelection() |
| | | } |
| | | } catch (e) { |
| | | return false |
| | |
| | | ) |
| | | if (code === 0) { |
| | | this.$message.success('下架成功') |
| | | this.$refs.crud.clearSelection() |
| | | } |
| | | } catch (e) { |
| | | return false |