!325 下单优化

Merge pull request !325 from 德仔/xzj
This commit is contained in:
德仔
2021-07-26 02:49:54 +00:00
committed by Gitee

View File

@ -589,7 +589,7 @@ export default {
//普通单、拆分单 //普通单、拆分单
if(this.form.orderTypeList[0] == 0 || this.form.orderTypeList[0] == 1){ if(this.form.orderTypeList[0] == 0 || this.form.orderTypeList[0] == 1){
//售前、售后、营养师助理都不能为空 //售前、售后、营养师助理都不能为空
if(this.form.preSaleId == null || this.form.preSaleId <= 0 || this.form.afterSaleId == null || this.form.afterSaleId <= 0 /*if(this.form.preSaleId == null || this.form.preSaleId <= 0 || this.form.afterSaleId == null || this.form.afterSaleId <= 0
|| this.form.nutriAssisId == null || this.form.nutriAssisId <= 0){ || this.form.nutriAssisId == null || this.form.nutriAssisId <= 0){
this.$message({ this.$message({
type: 'warning', type: 'warning',
@ -597,7 +597,7 @@ export default {
center: true center: true
}); });
return false; return false;
} }*/
//根据是否拆分判断营养师 //根据是否拆分判断营养师
if(this.form.orderTypeList[0] == 0){ if(this.form.orderTypeList[0] == 0){
if(this.form.nutritionistIdList == null || this.form.nutritionistIdList.length != 1 || this.form.nutritionistIdList[0] <= 0){ if(this.form.nutritionistIdList == null || this.form.nutritionistIdList.length != 1 || this.form.nutritionistIdList[0] <= 0){
@ -633,12 +633,11 @@ export default {
} }
//售中单 //售中单
else if(this.form.orderTypeList[0] == 3){ else if(this.form.orderTypeList[0] == 3){
//售中、售后、营养师助理不能为空 //售中不能为空
if(this.form.onSaleId == null || this.form.onSaleId <= 0 || this.form.afterSaleId == null || this.form.afterSaleId <= 0 if(this.form.onSaleId == null || this.form.onSaleId <= 0){
|| this.form.nutriAssisId == null || this.form.nutriAssisId <= 0){
this.$message({ this.$message({
type: 'warning', type: 'warning',
message: '售中、售后、营养师助理不能为空', message: '售中不能为空',
center: true center: true
}); });
return false; return false;