| | |
| | | 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')
|
| | |
| | | <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> |
| | | |
| | |
| | | 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, |
| | | } |