|
@@ -749,8 +749,10 @@ define(['$', 'template', 'order', 'native', 'helper', 'user', 'api', 'config', '
|
|
/* 点击下订单 */
|
|
/* 点击下订单 */
|
|
$.newTouch('.btn-place', function (event) {
|
|
$.newTouch('.btn-place', function (event) {
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
- if(order.appendID==="布艺沙发"){
|
|
|
|
- if(order.productCount<3){
|
|
|
|
|
|
+ console.log(order);
|
|
|
|
+ // 判断布艺沙发下单数量少于3套
|
|
|
|
+ if (order.appendID === "布艺沙发") {
|
|
|
|
+ if (order.productCount < 3) {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
message: '布衣沙发3套起购'
|
|
message: '布衣沙发3套起购'
|
|
}]);
|
|
}]);
|
|
@@ -760,31 +762,42 @@ define(['$', 'template', 'order', 'native', 'helper', 'user', 'api', 'config', '
|
|
if ($(this).hasClass('disable')) {
|
|
if ($(this).hasClass('disable')) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ //擦玻璃数量少于10平米
|
|
if (product.type_str == "擦玻璃" && order.productCount < 10) {
|
|
if (product.type_str == "擦玻璃" && order.productCount < 10) {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
message: '数量不少于10平米'
|
|
message: '数量不少于10平米'
|
|
}]);
|
|
}]);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ // 新居开慌的数量少于50平米
|
|
if (product.type_str == "新居开荒" && order.productCount < 50) {
|
|
if (product.type_str == "新居开荒" && order.productCount < 50) {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
message: '数量不少于50平米'
|
|
message: '数量不少于50平米'
|
|
}]);
|
|
}]);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (product.type_str == "租房大扫除" && order.productCount < 10) {
|
|
|
|
|
|
+ // 民宿保洁的数量少于10平米
|
|
|
|
+ if (product.type_str == "民宿保洁" && order.productCount < 10) {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
message: '数量不少于10平米'
|
|
message: '数量不少于10平米'
|
|
}]);
|
|
}]);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ //未选择服务
|
|
if (product.extra && !order.appendID) {
|
|
if (product.extra && !order.appendID) {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
message: '请选择服务'
|
|
message: '请选择服务'
|
|
}]);
|
|
}]);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ //未选择服务时间
|
|
|
|
+ if (order.bookingTime === "") {
|
|
|
|
+ $doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
|
|
+ message: '请选择服务时间'
|
|
|
|
+ }]);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // 地址为空
|
|
if (!order.address) {
|
|
if (!order.address) {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
$doc.trigger('spa:openpanel', ['simpleAlert', {
|
|
message: '请选择地址'
|
|
message: '请选择地址'
|