|
|
@ -196,6 +196,7 @@ Page({ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
order: function () { |
|
|
order: function () { |
|
|
|
|
|
console.log(this.data) |
|
|
let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product; |
|
|
let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product; |
|
|
let linkmanIds = []; |
|
|
let linkmanIds = []; |
|
|
// if (linkmanList.length < productNum && app.globalData.product.isGroup != 1) {
|
|
|
// if (linkmanList.length < productNum && app.globalData.product.isGroup != 1) {
|
|
|
@ -212,7 +213,7 @@ Page({ |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (!time && date.is_time_stock == true) { |
|
|
if (!time && date && date.is_time_stock == true) { |
|
|
wx.showToast({ |
|
|
wx.showToast({ |
|
|
title: '请选择使用时间', |
|
|
title: '请选择使用时间', |
|
|
icon: 'none' |
|
|
icon: 'none' |
|
|
@ -229,16 +230,17 @@ Page({ |
|
|
linkmanList.map(item => { |
|
|
linkmanList.map(item => { |
|
|
linkmanIds.push(item.id) |
|
|
linkmanIds.push(item.id) |
|
|
}) |
|
|
}) |
|
|
|
|
|
console.log(date) |
|
|
let data = { |
|
|
let data = { |
|
|
coupon_id: this.data.coupon ? this.data.coupon.id : null, |
|
|
coupon_id: this.data.coupon ? this.data.coupon.id : null, |
|
|
source: "WECHATXCX", |
|
|
source: "WECHATXCX", |
|
|
product_list: [{ |
|
|
product_list: [{ |
|
|
type: product.product.type, |
|
|
type: product.product.type, |
|
|
product_id: product.product.id, |
|
|
product_id: product.product.id, |
|
|
sku_id: date.sku_id ? date.sku_id : product.sku.id, |
|
|
sku_id: (date && date.sku_id) ? date.sku_id : product.sku.id, |
|
|
start_time: time.start_time, |
|
|
start_time: time.start_time, |
|
|
end_time: time.end_time, |
|
|
end_time: time.end_time, |
|
|
use_date: date.date, |
|
|
use_date: date ? date.date : '', |
|
|
visitors: linkmanIds.join(","), |
|
|
visitors: linkmanIds.join(","), |
|
|
remark: remark, |
|
|
remark: remark, |
|
|
product_num: app.globalData.product.isGroup == 1 ? 1 : productNum |
|
|
product_num: app.globalData.product.isGroup == 1 ? 1 : productNum |
|
|
|