|
|
|
@ -347,33 +347,33 @@ Page({ |
|
|
|
util.showToast('请选择废纸品类') |
|
|
|
return |
|
|
|
} |
|
|
|
if (util.isEmpty(this.data.form.unitPrice)) { |
|
|
|
if (this.data.form.bidType == 1) { |
|
|
|
util.showToast('请输入商品单价') |
|
|
|
} else { |
|
|
|
util.showToast('请输入起拍单价') |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
if(app.globalData.kg){ |
|
|
|
if(parseFloat(this.data.form.unitPrice) > 100){ |
|
|
|
if (this.data.form.bidType == 1) { |
|
|
|
util.showToast('请检查您输入的商品单价是否合理') |
|
|
|
} else { |
|
|
|
util.showToast('请检查您输入的起拍单价是否合理') |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
} else { |
|
|
|
if(parseFloat(this.data.form.unitPrice) < 100){ |
|
|
|
if (this.data.form.bidType == 1) { |
|
|
|
util.showToast('请检查您输入的商品单价是否合理') |
|
|
|
} else { |
|
|
|
util.showToast('请检查您输入的起拍单价是否合理') |
|
|
|
} |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
// if (util.isEmpty(this.data.form.unitPrice)) {
|
|
|
|
// if (this.data.form.bidType == 1) {
|
|
|
|
// util.showToast('请输入商品单价')
|
|
|
|
// } else {
|
|
|
|
// util.showToast('请输入起拍单价')
|
|
|
|
// }
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
// if(app.globalData.kg){
|
|
|
|
// if(parseFloat(this.data.form.unitPrice) > 100){
|
|
|
|
// if (this.data.form.bidType == 1) {
|
|
|
|
// util.showToast('请检查您输入的商品单价是否合理')
|
|
|
|
// } else {
|
|
|
|
// util.showToast('请检查您输入的起拍单价是否合理')
|
|
|
|
// }
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
// if(parseFloat(this.data.form.unitPrice) < 100){
|
|
|
|
// if (this.data.form.bidType == 1) {
|
|
|
|
// util.showToast('请检查您输入的商品单价是否合理')
|
|
|
|
// } else {
|
|
|
|
// util.showToast('请检查您输入的起拍单价是否合理')
|
|
|
|
// }
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
if (util.isEmpty(this.data.form.stock)) { |
|
|
|
util.showToast('请输入库存') |
|
|
|
return |
|
|
|
@ -410,7 +410,13 @@ Page({ |
|
|
|
this.setData({ requesting: true }) |
|
|
|
wx.showLoading({ title: '加载中', mask: true }) |
|
|
|
if(!app.globalData.kg){ |
|
|
|
this.data.form.unitPrice = math.divide(this.data.form.unitPrice, 1000) |
|
|
|
if(this.data.form.unitPrice>0){ |
|
|
|
this.data.form.unitPrice = math.divide(this.data.form.unitPrice, 1000) |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.data.form.unitPrice='' |
|
|
|
} |
|
|
|
|
|
|
|
this.data.form.stock = math.times(this.data.form.stock, 1000) |
|
|
|
if (!util.isEmpty(this.data.form.lowestNum)) { |
|
|
|
this.data.form.lowestNum = math.times(this.data.form.lowestNum, 1000) |
|
|
|
|